[Numpy-discussion] dtype.isbuiltin changed by .newbyteorder

Matthew Brett matthew.brett at gmail.com
Thu Jan 14 08:01:48 EST 2010


Over on the scipy list, someone pointed out an oddness in the output
of the matlab reader, which revealed this - to me - unexpected
behavior in numpy:

In [20]: dt = np.dtype('f8')

In [21]: dt.isbuiltin
Out[21]: 1

In [22]: ndt = dt.newbyteorder('<')

In [23]: ndt.isbuiltin
Out[23]: 0

I was expecting the 'isbuiltin' attribute to be the same (1) after
byte swapping.    Does that seem reasonable to y'all?  Then, is this a

Thanks a lot,


More information about the NumPy-Discussion mailing list