IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

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

Number of bits used to store one value of this dtype.

dtype​

dtype: DType

source

The floating-point dtype these properties describe.

eps​

eps: float

source

Smallest number that satisfies 1.0 + eps != 1.0.

max​

max: float

source

Largest representable finite value.

min​

min: float

source

Most negative representable finite value.

smallest_normal​

property smallest_normal: float

source

Alias for tiny (torch.finfo compatibility).

tiny​

tiny: float

source

Smallest positive normal value.