On Monday 24 July 2006 16:42, Bill Baxter wrote:
And I think byteorder matters when comparing dtypes:
numpy.dtype('>f4') == numpy.dtype('
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 Which is why I was trying to change the str() representation of a type to something more intuitive. If nothing else one could even leave repr(a.dtype) --> '
'int32 (little endian)'
I do now understand that (as opposed to numarray and numeric) the byteorder is
now part of the data-type - but I would really encourage keeping the string
for such an important (and often used !) thing more readable than
"