On Monday 24 July 2006 16: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
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) --> '<i4'
but
str(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
"<i4".
Most people will thankfully never have to think about byteorder - it should be
like an implementation detail that numpy can transparently handle !
What what it's worth ,
Sebastian Haase
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Numpy-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/numpy-discussion