[Numpy-discussion] get a dtypes' range?

Christopher Barker Chris.Barker@noaa....
Fri Jun 17 13:27:07 CDT 2011

Fabrice Silva wrote:
>> I'm wondering if there is a way to get the range of values a given dtype 
>> can hold?

> http://docs.scipy.org/doc/numpy/reference/routines.dtype.html#data-type-information

yup, that does it, I hadn't found that, as I was expecting a more OO 
way, i.e. as a method of the dtype.

Also, I need to know in advance if it's a int or a float, but I suppose 
you can't really do much without knowing that anyway.

Actually, I'm a bit confused about dtypes from an OO design perspective 
anyway. I note that the dtypes seem to have all (most?) of the methods 
of ndarrays (or placeholders, anyway), which I don't quite get.

oh well, I've found what I need, thanks.


Christopher Barker, Ph.D.

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception


More information about the NumPy-Discussion mailing list