[SciPy-dev] A scalar is no 1 \times 1 matrix ?

Nils Wagner nwagner at mecha.uni-stuttgart.de
Wed Nov 30 06:23:03 CST 2005


>>> linalg.inv(2)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib64/python2.4/site-packages/scipy/linalg/basic.py", line
183, in inv
    raise ValueError, 'expected square matrix'
ValueError: expected square matrix
>>> linalg.inv(mat(2))
array([[ 0.5]])

Is this behaviour wanted ?
 
Nils




More information about the Scipy-dev mailing list