dpctl.tensor.isnan

dpctl.tensor.isnan

isnan(x, /, *, out=None, order=’K’)

Test if each element of an input array is a NaN.

Parameters:
  • x (usm_ndarray) – Input array.

  • out (Union[usm_ndarray, None], optional) – Output array to populate. Array must have the correct shape and the expected data type.

  • order ("C","F","A","K", optional) – Memory layout of the new output array, if parameter out is None. Default: “K”.

Returns:

An array which is True where x is NaN, False otherwise. The data type of the returned array is bool.

Return type:

usm_ndarray