Skip to main content
Log in

Mojo function

nan

nan[type: DType]() -> SIMD[$0, 1]

Gets a NaN value for the given dtype.

Constraints:

Can only be used for FP dtypes.

Parameters:

  • type (DType): The value dtype.

Returns:

The NaN value of the given dtype.

Was this page helpful?