[SciPy-user] AttributeError: 'scipy.linalg' module has no attribute '_cast'

Nils Wagner nwagner at mecha.uni-stuttgart.de
Wed Mar 6 11:48:26 CST 2002


Hi,

I tried to import linalg from scipy

Python 2.1.2 (#1, Feb 25 2002, 18:04:21)
[GCC 2.95.3 20010315 (SuSE)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> from scipy import *
>>> from scipy.linalg import *
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
AttributeError: 'scipy.linalg' module has no attribute '_cast'
>>>

>>> from scipy.linalg import expm
>>>

Any idea ?

Nils

Moreover, the matrix functions do not work properly.

>>> a = 1.*identity(2)
>>> print sinm(a)
array_from_pyobj:intent(inout) array must be contiguous and with a
proper type and size.
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File
"/usr/local/lib/python2.1/site-packages/scipy/linalg/linear_algebra.py",
line 777, in sinm
    return toreal(-0.5j*(expm(1j*A) - expm(-1j*A)))
  File
"/usr/local/lib/python2.1/site-packages/scipy/linalg/linear_algebra.py",
line 735, in expm
    F = solve(D,N)
  File
"/usr/local/lib/python2.1/site-packages/scipy/linalg/linear_algebra.py",
line 122, in solve
    results = lapack_routine(a, bt)
clapack.error: failed in converting 2nd argument `b' of clapack.zgesv to
C/Fortran array
>>>



More information about the SciPy-user mailing list