package np

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module NumpyRaw.IinfoSource

Sourcetype tag = [
  1. | `Iinfo
]
Sourcetype t = [ `Iinfo | `Object ] Obj.t
Sourceval of_pyobject : Py.Object.t -> t
Sourceval to_pyobject : [> tag ] Obj.t -> Py.Object.t
Sourceval create : [ `Dtype of Dtype.t | `PyObject of Py.Object.t ] -> t

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

Sourceval bits : t -> int

Attribute bits: get value or raise Not_found if None.

Sourceval bits_opt : t -> int option

Attribute bits: get value as an option.

Sourceval min : t -> int

Attribute min: get value or raise Not_found if None.

Sourceval min_opt : t -> int option

Attribute min: get value as an option.

Sourceval max : t -> int

Attribute max: get value or raise Not_found if None.

Sourceval max_opt : t -> int option

Attribute max: get value as an option.

Sourceval to_string : t -> string

Print the object to a human-readable representation.

Sourceval show : t -> string

Print the object to a human-readable representation.

Sourceval pp : Format.formatter -> t -> unit

Pretty-print the object to a formatter.

OCaml

Innovation. Community. Security.