You might find this helpful: http://www.scipy.org/PerformancePython
Generally I think numpy's numerical linear algebra is comparable to matlab's. -Marshall On Oct 22, 8:15 am, Harald Schilly <harald.schi...@gmail.com> wrote: > not really, at least not that i'm aware of. you should ask this at > numpy/scipy since they are much more similar to matlab ... (these > libraries are part of sage) > basically, python is slower in some respect, e.g. loops, since they > involve much more complex objects (i.e. python objects!). on the other > hand, it is much easier to include compiled code which makes them much > faster (see cython for near C speed loops, that's another project, > also part of sage and a lot is built using it) > one other basic difference is, that since numpy uses python objects, > you pass references to functions - not an entire copy as with matlab. > consequently, function calls are faster and use less memory (there are > also "views", which represent a smaller part of a matrix - > modifications in a view show up in the real matrix) > python data structures are more complex and flexible, for example, you > can choose how the vectors are aligned in memory (column vs. rows). > that's cute if you want to speed up certain operations. > also, there are projects aimed to "replace" matlab based on python, > look at pythonxy, enthought suite, spyder (http://code.google.com/p/spyderlib/ > ), ... > > one direct example i can give you: > > sage/python with numpy: > sage: m = random_matrix(RDF, 1000) > # random_matrix is sage code and different from randn > # to archieve the same, do: > from numpy import random > m = random.randn(1000) > sage: from numpy.linalg import svd > sage: %time U,s,Vh = svd(m.numpy()) > > MATLAB 2009a > s = 1000; > m = randn(s,s); > tic; [u,s,v] = svd(m); toc > > background of this story: lapack/double/dgesvd.f vs. lapack/double/ > dgesdd.f in netlib.org > > so, bottom line, it's not really a question of sage vs. matlab since > you have to look into specific python tools to archive the same. sage > includes some of them and a future task is to wrap them "directly" in > sage specific functions. > > H --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---