Skip to main content
Log in

Mojo function

is_nan

is_nan(value: Symbol) -> Symbol

Computes the elementwise is_nan of a symbolic tensor.

Creates a new op node to compute the elementwise is_nan of a symbolic tensor and adds it to the graph, returning the symbolic result.

Args:

  • value (Symbol): The symbolic tensor to use as the input to the is_nan computation.

Returns:

The result will have: - element type bool, true if the element at a given position is NaN, false otherwise - the same shape as the input value.

Raises:

If the symbol doesn't represent a tensor value.

Was this page helpful?