[Numpy-discussion] LapackError:non-native byte order
Mon Nov 8 13:05:34 CST 2010
On Mon, Nov 8, 2010 at 10:34 AM, Pauli Virtanen <email@example.com> wrote:
> Mon, 08 Nov 2010 19:31:31 +0100, Pauli Virtanen wrote:
>> ma, 2010-11-08 kello 18:56 +0100, LittleBigBrain kirjoitti:
>>> 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
>>> >>> a.dtype.byteorder
>>> >>> b.dtype.byteorder
>> The error is here: it's not possible to create such dtypes via any Numpy
>> methods -- the '<' (or '>') is always normalized to '='. Numpy and
>> several other modules consequently assume this normalization.
>> Where do `a` and `b` come from?
> Ok, `x.newbyteorder('<')` seems to do this. Now I'm unsure how things are
> supposed to work.
Yes - it is puzzling that ``x.newbyteorder('<')`` makes arrays that
are confusing to numpy. If numpy generally always normalizes to the
system endian to '=' then should that not also be true of
More information about the NumPy-Discussion