IsNaN#

IsNaN - 13#

Version

  • name: IsNaN (GitHub)

  • domain: main

  • since_version: 13

  • function: False

  • support_level: SupportType.COMMON

  • shape inference: True

This version of the operator has been available since version 13.

Summary

Returns which elements of the input are NaN.

Inputs

  • X (heterogeneous) - T1: input

Outputs

  • Y (heterogeneous) - T2: output

Type Constraints

  • T1 in ( tensor(bfloat16), tensor(double), tensor(float), tensor(float16) ): Constrain input types to float tensors.

  • T2 in ( tensor(bool) ): Constrain output types to boolean tensors.

Examples

default

node = onnx.helper.make_node(
    "IsNaN",
    inputs=["x"],
    outputs=["y"],
)

x = np.array([3.0, np.nan, 4.0, np.nan], dtype=np.float32)
y = np.isnan(x)
expect(node, inputs=[x], outputs=[y], name="test_isnan")

Differences

00Returns which elements of the input are NaN.Returns which elements of the input are NaN.
11
22**Inputs****Inputs**
33
44* **X** (heterogeneous) - **T1**:* **X** (heterogeneous) - **T1**:
55 input input
66
77**Outputs****Outputs**
88
99* **Y** (heterogeneous) - **T2**:* **Y** (heterogeneous) - **T2**:
1010 output output
1111
1212**Type Constraints****Type Constraints**
1313
1414* **T1** in (* **T1** in (
15 tensor(bfloat16),
1516 tensor(double), tensor(double),
1617 tensor(float), tensor(float),
1718 tensor(float16) tensor(float16)
1819 ): ):
1920 Constrain input types to float tensors. Constrain input types to float tensors.
2021* **T2** in (* **T2** in (
2122 tensor(bool) tensor(bool)
2223 ): ):
2324 Constrain output types to boolean tensors. Constrain output types to boolean tensors.

IsNaN - 9#

Version

  • name: IsNaN (GitHub)

  • domain: main

  • since_version: 9

  • function: False

  • support_level: SupportType.COMMON

  • shape inference: True

This version of the operator has been available since version 9.

Summary

Returns which elements of the input are NaN.

Inputs

  • X (heterogeneous) - T1: input

Outputs

  • Y (heterogeneous) - T2: output

Type Constraints

  • T1 in ( tensor(double), tensor(float), tensor(float16) ): Constrain input types to float tensors.

  • T2 in ( tensor(bool) ): Constrain output types to boolean tensors.