{ } Raw JSON

bundles / numpy 2.4.4 / numpy / iinfo

class

numpy:iinfo

source: /numpy/__init__.py

Signature

class   iinfo ( type )

Summary

Machine limits for integer types.

Parameters

int_type : integer type, dtype, or instance

The kind of integer data type to get information about.

Attributes

bits : int

The number of bits occupied by the type.

dtype : dtype

Returns the dtype for which iinfo returns information.

min : int

The smallest integer expressible by the type.

max : int

The largest integer expressible by the type.

Examples

With types:
import numpy as np
ii16 = np.iinfo(np.int16)
ii16.min
ii16.max
ii32 = np.iinfo(np.int32)
ii32.min
ii32.max
With instances:
ii32 = np.iinfo(np.int32(10))
ii32.min
ii32.max

See also

finfo

The equivalent for floating point data types.

Aliases

  • numpy.iinfo

Referenced by