Skip to main content

Python class

finfo

finfo

class max.dtype.finfo(dtype)

source

Bases: object

Numerical properties of a floating point DType.

This is modeled after torch.finfo, providing bits, eps, max, min, tiny, smallest_normal, and dtype attributes for every MAX float dtype, including bfloat16, float8, and float4 types that numpy cannot represent.

Parameters:

dtype (DType) – A floating-point DType to query.

Raises:

TypeError – If dtype is not a floating-point type.

bits

bits: int

source

dtype

dtype: DType

source

eps

eps: float

source

max

max: float

source

min

min: float

source

smallest_normal

property smallest_normal: float

source

Alias for tiny (torch.finfo compatibility).

tiny

tiny: float

source