[Numpy-discussion] LapackError:non-native byte order
braingateway
braingateway@gmail....
Mon Nov 8 17:38:58 CST 2010
Matthew Brett :
> Hi,
>
> On Mon, Nov 8, 2010 at 10:34 AM, Pauli Virtanen <pav@iki.fi> 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
>>>>>>>
>>>> 'little'
>>>>
>>>>>>> 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
> ``newbyteorder``?
>
> See you,
>
> Matthew
>
I agree, at it is not documented or hard to find. I think usually all
users will assume '<' is the same as '=' on normal 'little' system.
Thanks for reply,
LittleBigBrain
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
More information about the NumPy-Discussion
mailing list