package np

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type tag = [
  1. | `Iinfo
]
type t = [ `Iinfo | `Object ] Obj.t
val of_pyobject : Py.Object.t -> t
val to_pyobject : [> tag ] Obj.t -> Py.Object.t
val 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

val bits : t -> int

Attribute bits: get value or raise Not_found if None.

val bits_opt : t -> int option

Attribute bits: get value as an option.

val min : t -> int

Attribute min: get value or raise Not_found if None.

val min_opt : t -> int option

Attribute min: get value as an option.

val max : t -> int

Attribute max: get value or raise Not_found if None.

val max_opt : t -> int option

Attribute max: get value as an option.

val to_string : t -> string

Print the object to a human-readable representation.

val show : t -> string

Print the object to a human-readable representation.

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

Pretty-print the object to a formatter.

OCaml

Innovation. Community. Security.