ivy.has_nans(x: Union[ivy.Array, ivy.NativeArray], include_infs: bool = True) → bool[source]

Determine whether the array contains any nans, as well as infs or -infs if specified.

  • x (array) – Input array.

  • include_infs (bool, optional) – Whether to include infs and -infs in the check. Default is True.


Boolean as to whether the array contains nans.

Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty