[Numpy-discussion] get a dtypes' range?

Christopher Barker Chris.Barker@noaa....
Fri Jun 17 12:38:22 CDT 2011

Hi all,

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

essentially, I'm looking for something like sys.maxint, for for whatever 
numpy dtype I have n hand (and eps for floating point types).

I was hoping there would be something like



In this case, I have a uint16, so I can hard code it, but it would be 
nice to be able to be write the code in a more generic fashion.


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