[Numpy-discussion] get a dtypes' range?

Fabrice Silva silva@lma.cnrs-mrs...
Fri Jun 17 13:01:53 CDT 2011

Le vendredi 17 juin 2011 à 10:38 -0700, Christopher Barker a écrit :
> 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
> a_dtype.max_value
> a_dtype.min_value
> etc.
> 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.


Fabrice Silva

More information about the NumPy-Discussion mailing list