> Hi,
> I just realized that this question did actually not get sorted out.
> Now I'm just about to convert my code to compare
> arr.dtype.type to the (default scalar!) dtype numpy.uint8
> like this:
> if self.img.dtype.type == N.uint8:
>   self.hist_min, self.hist_max = 0, 1<<8
> elif self.img.dtype.type ==  N.uint16:
>   self.hist_min, self.hist_max = 0, 1<<16
> ...
>
>   
Yes, you can do this and it should work independent of byteorder.  The 
dtype comparison will take into account the byte-order but comparing the 
type objects directly  won't.  So, if that is your intent, then great.

-Travis


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to