From: Travis O. <oli...@ie...> - 2006-09-19 18:46:15
|
Sebastian Haase wrote: > Hi, > What are the possible values of > arr.dtype.kind ? > > It seems that signed and unsigned are considered to be the same "kind" > >>>> arr=N.arange(10,dtype=N.uint) >>>> arr.dtype.kind >>>> > 'i' > >>>> arr.dtype.itemsize >>>> > 8 > (OK - this is just showing off our amd64 linux ;-) ) > > How can I distinguish signed from unsigned without having to list all possible > cases explicitly ? > > > Hmm.... This is a problem. There is a 'u' kind for unsigned integers. On my system I get 'u' when running the code you just gave. Can anybody on a 64-bit system confirm? -Travis |