jax.numpy.iinfo

class jax.numpy.iinfo(type)

Machine limits for integer types.

bits

The number of bits occupied by the type.

Type

int

min

The smallest integer expressible by the type.

Type

int

max

The largest integer expressible by the type.

Type

int

Parameters

int_type (integer type, dtype, or instance) – The kind of integer data type to get information about.

See also

finfo

The equivalent for floating point data types.

Examples

With types:

>>> ii16 = np.iinfo(np.int16)
>>> ii16.min
-32768
>>> ii16.max
32767
>>> ii32 = np.iinfo(np.int32)
>>> ii32.min
-2147483648
>>> ii32.max
2147483647

With instances:

>>> ii32 = np.iinfo(np.int32(10))
>>> ii32.min
-2147483648
>>> ii32.max
2147483647
__init__(int_type)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(int_type)

Initialize self.

Attributes

max

Maximum value of given dtype.

min

Minimum value of given dtype.