[SciPy-User] numpy svd

Peter Spuhler peter@spuhler....
Wed Mar 23 11:58:37 CDT 2011


I've been porting some IDL code over to scipy and ran into a problem with
linalg.svd()
The following would give me an error message running in a 32-bit environment
(epd 7.0.2).
>>>numpy.linalg.svd(numpy.ones((10,10000)))
Traceback (most recent call last):
  File "C:\Program Files (x86)\Wing IDE 4.0\src\debug\tserver\_sandbox.py",
line 1, in <module>
    # Used internally for debug sandbox under external interpreter
  File "C:\Python27\Lib\site-packages\numpy\linalg\linalg.py", line 1324, in
svd
    vt = vt.transpose().astype(result_t)
MemoryError:

The same function in 32-bit IDL seems to work fine (as well as in Matlab and
Mathematica)
IDL>la_svd,dblarr(10,10000)+1,w,u,v

They both use the gesdd lapack function on the backend.
Why would the numpy routine have problems with this calculation when the
seemingly similar calculation works fine using IDL or Matlab?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20110323/0adbe2aa/attachment.html 


More information about the SciPy-User mailing list