class documentation

class iinfo:

View In Hierarchy

iinfo(type)

Machine limits for integer types.

Attributes

bits : int
The number of bits occupied by the type.
min : int
The smallest integer expressible by the type.
max : int
The largest integer expressible by the type.

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
Method __init__ Undocumented
Method __repr__ Undocumented
Method __str__ String representation.
Class Variable ​_max​_vals Undocumented
Class Variable ​_min​_vals Undocumented
Instance Variable bits Undocumented
Instance Variable dtype Undocumented
Instance Variable key Undocumented
Instance Variable kind Undocumented
Property max Maximum value of given dtype.
Property min Minimum value of given dtype.
def __init__(self, int_type):

Undocumented

def __repr__(self):

Undocumented

def __str__(self):
String representation.
_max_vals: dict =

Undocumented

_min_vals: dict =

Undocumented

bits =

Undocumented

dtype =

Undocumented

key =

Undocumented

kind =

Undocumented

@property
max =
Maximum value of given dtype.
@property
min =
Minimum value of given dtype.