[Numpy-discussion] trivial question: how to compare dtype - but ignoring byteorder ?
Karol Langner
karol.langner at kn.pl
Tue Jul 25 01:56:05 CDT 2006
On Tuesday 25 July 2006 01:42, Bill Baxter wrote:
> > > And I think byteorder matters when comparing dtypes:
> > > >>> numpy.dtype('>f4') == numpy.dtype('<f4')
> > >
> > > False
>
> Ohhhhh -- that '<' part is indicating *byte order* ?!
> I thought it was odd that numpy could only tell me the type was "less
> than f4", which I assumed must be shorthand for "less than or equal to
> f4". Makes much more sense now!
>
> --bb
Yep! And there are then four possiblities.
'>' - big-endian
'<' - little
'|' - not-applicable
'=' - native
Karol
--
written by Karol Langner
wto lip 25 08:54:51 CEST 2006
More information about the Numpy-discussion
mailing list