Skip to main content

Mojo function

nan

nan[dtype: DType]() -> Scalar[dtype]

Gets a NaN value for the given dtype.

Constraints:

Can only be used for FP dtypes.

Parameters:

  • dtype (DType): The value dtype.

Returns:

Scalar: The NaN value of the given dtype.

Was this page helpful?