[Numpy-discussion] LapackError:non-native byte order

LittleBigBrain braingateway at gmail.com
Mon Nov 8 12:56:06 EST 2010


Hi everyone,
In my system '<' is the native byte-order, but unless I change the
byte-order label to '=', it won't work in linalg sub-module, but in
others works OK. I am not sure whether this is an expected behavior or
a bug?
>>> import sys
>>> sys.byteorder
'little'
>>> a.dtype.byteorder
'<'
>>> b.dtype.byteorder
'<'
>>> c=a*b
>>> c.dtype.byteorder
'='
>>> d=npy.linalg.solve(a, c)

Traceback (most recent call last):
  File "<pyshell#20>", line 1, in <module>
    d=npy.linalg.solve(a, c)
  File "C:\Python27\lib\site-packages\numpy\linalg\linalg.py", line
326, in solve
    results = lapack_routine(n_eq, n_rhs, a, n_eq, pivots, b, n_eq, 0)
LapackError: Parameter a has non-native byte order in lapack_lite.dgesv
>>> cc=c.newbyteorder('<')
>>> cc.dtype.byteorder
'<'
>>> d=npy.linalg.solve(a, cc)

Traceback (most recent call last):
  File "<pyshell#46>", line 1, in <module>
    d=npy.linalg.solve(a, cc)
  File "C:\Python27\lib\site-packages\numpy\linalg\linalg.py", line
326, in solve
    results = lapack_routine(n_eq, n_rhs, a, n_eq, pivots, b, n_eq, 0)
LapackError: Parameter a has non-native byte order in lapack_lite.dgesv
>>> d=npy.linalg.solve(a.newbyteorder('='), c)
>>> d.shape
(2000L, 1000L)

Thanks,

LittleBigBrain



More information about the NumPy-Discussion mailing list