dpctl.tensor.isfinite

dpctl.tensor.isfinite

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

Test if each element of input array is a finite number.

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 not positive infinity, negative infinity, or NaN, False otherwise. The data type of the returned array is bool.

Return type:

usm_ndarray