[Numpy-tickets] [NumPy] #557: pinv sefgaults with empty arrays
NumPy
numpy-tickets@scipy....
Thu Jul 26 06:41:10 CDT 2007
#557: pinv sefgaults with empty arrays
--------------------------+-------------------------------------------------
Reporter: cdavid | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone:
Component: numpy.linalg | Version: none
Severity: normal | Resolution:
Keywords: |
--------------------------+-------------------------------------------------
Comment (by nils):
I have applied your patch. Works for me.
{{{
Python 2.4.1 (#1, May 25 2007, 18:41:31)
[GCC 4.0.2 20050901 (prerelease) (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> x=numpy.matrix([])
>>> x
matrix([], shape=(1, 0), dtype=float64)
>>> x.I
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib64/python2.4/site-packages/numpy/core/defmatrix.py", line
412, in getI
return asmatrix(func(self))
File "/usr/lib64/python2.4/site-packages/numpy/linalg/linalg.py", line
792, in pinv
_assertNonEmpty(a)
File "/usr/lib64/python2.4/site-packages/numpy/linalg/linalg.py", line
132, in _assertNonEmpty
raise LinAlgError("Arrays cannot be empty")
numpy.linalg.linalg.LinAlgError: Arrays cannot be empty
}}}
--
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/557#comment:1>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.
More information about the Numpy-tickets
mailing list