On Aug 15, 11:38 pm, William Stein <wst...@gmail.com> wrote: > It sound like it wouldn't be difficult for you to name one single > Matlab matrix function that engineers would actually use that > Numpy/Scipy doesn't have? I wonder why it's not in numpy yet.
Sorry, I couldn't parse that. Did you mean "would" instead of "wouldn't"? More directly - it appeared to me that the "popular" matrix decompositions in MATLAB were all (or almost all) available to be wrapped from SciPy/NumPy as Sage methods for RDF/CDF matrices. > I know one example sort of like this, which is "rref", for reduced row > echelon form. However, in a numerical setting, my understanding is > that engineers would never ever use rref directly anyways. > Nonetheless, Matlab has it and Numpy/Scipy don't, because there is no > point in having it. I have to be careful, because I would not claim to be a numerical linear algebraist, so I am willing to be corrected - but I think an LU decomposition would be the first choice for an alternative to rref. It is basically what we used to call Gaussian elimination, rather than Gauss-Jordan elimination, but with more care about pivoting in a numerical setting. Enabling LU decomposition for rectangular matrices (not just square), which is now possible in NumPy/SciPy, is a patch with a positive review (iirc) and I have posted a patch for an exact LU decomposition, which is able to run over generic rings twice as fast as echelon form (as theory would predict). Needs review. An LU decomposition is the lever for a similar speedup (2x) in solve_left() over generic rings. > Incidentally, as I discovered by putting this on a homework assignment > for my class, it genuinely is really easy to implement rref in Numpy, > and the result from almost anybody is very impressively fast, even in > pure Python (Cython barely helps in this case, since Numpy is already > so optimized). I would vote for not allowing a naive/classical rref algorithm from Sage to be applied to a matrix over RDF/CDF. > Also, with your "75%" above, do you mean when working with Sage > matrices or Numpy arrays? Consider the primary numerical matrix decompositions - LU, QR, SVD, Cholesky, Schur. Rough recollection - and it depends on patches in- progress - these are available in MATLAB, and almost all are also available for Sage RDF/CDF matrices (maybe just Cholesky needs attention). Some are available for exact Sage matrices (modulo finding exact eigenvalues in some cases). Along with straight-out numerical eigenvalues for Sage RDF/CDF matrices, and exact Jordan canonical form and exact rational canonical form (over *any* field), I'd posit roughly 75% coverage by Sage in this area, exact and RDF/CDF combined. Maybe higher. Rob -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org