[Numpy-discussion] numpy endian question

Christopher Hanley chanley@stsci....
Fri Apr 27 08:05:28 CDT 2007


Stefan van der Walt wrote:
>
> Ah, yes, I was confused.  What I meant to ask was, couldn't
> dtype.str[0] sometimes be '|'?
>
>   

That is true.   It would happen for an array of strings. 

 >>> a = n.array(['1','2','3','4'])
 >>> a.dtype.str[0]
'|'

I haven't needed to worry about that case in terms of doing byte swapping.

Chris



More information about the Numpy-discussion mailing list