Skip to content

numojo.routines.logic.contents

Contents routines (numojo.routines.logic.contents)

Implements Checking routines: currently not SIMD due to bool bit packing issue

Functions

isinf

isinf[dtype: DType, backend: Backend = Vectorized](array: NDArray[dtype]) -> NDArray[DType.bool]

Checks if each element of the input array is infinite.

Parameters:

  • dtype (DType): DType - Data type of the input array.
  • backend (Backend): _mf.Backend - Backend to use for the operation. Defaults to _mf.Vectorized.

Args:

  • array (NDArray): NDArray[dtype] - Input array to check.

Returns:

  • NDArray

Raises

isfinite

isfinite[dtype: DType, backend: Backend = Vectorized](array: NDArray[dtype]) -> NDArray[DType.bool]

Checks if each element of the input array is finite.

Parameters:

  • dtype (DType): DType - Data type of the input array.
  • backend (Backend): _mf.Backend - Backend to use for the operation. Defaults to _mf.Vectorized.

Args:

  • array (NDArray): NDArray[dtype] - Input array to check.

Returns:

  • NDArray

Raises

isnan

isnan[dtype: DType, backend: Backend = Vectorized](array: NDArray[dtype]) -> NDArray[DType.bool]

Checks if each element of the input array is NaN.

Parameters:

  • dtype (DType): DType - Data type of the input array.
  • backend (Backend): _mf.Backend - Backend to use for the operation. Defaults to _mf.Vectorized.

Args:

  • array (NDArray): NDArray[dtype] - Input array to check.

Returns:

  • NDArray

Raises

isneginf

Overload 1

isneginf[dtype: DType, backend: Backend = Vectorized](array: NDArray[dtype]) -> NDArray[DType.bool]

Checks if each element of the input array is negative infinity.

Parameters:

  • dtype (DType): DType - Data type of the input array.
  • backend (Backend): _mf.Backend - Backend to use for the operation. Defaults to _mf.Vectorized.

Args:

  • array (NDArray): NDArray[dtype] - Input array to check.

Returns:

  • NDArray

Raises

Overload 2

isneginf[dtype: DType, backend: Backend = Vectorized](matrix: Matrix[dtype]) -> Matrix[DType.bool]

Checks if each element of the input Matrix is negative infinity.

Parameters:

  • dtype (DType): DType - Data type of the input Matrix.
  • backend (Backend): _mf.Backend - Backend to use for the operation. Defaults to _mf.Vectorized.

Args:

  • matrix (Matrix): Matrix[dtype] - Input Matrix to check.

Returns:

  • Matrix

Raises

isposinf

Overload 1

isposinf[dtype: DType, backend: Backend = Vectorized](array: NDArray[dtype]) -> NDArray[DType.bool]

Checks if each element of the input array is positive infinity. Parameters: dtype: DType - Data type of the input array. backend: _mf.Backend - Backend to use for the operation. Defaults to _mf.Vectorized.

Parameters:

  • dtype (DType)
  • backend (Backend)

Args:

  • array (NDArray): NDArray[dtype] - Input array to check.

Returns:

  • NDArray

Raises

Overload 2

isposinf[dtype: DType, backend: Backend = Vectorized](matrix: Matrix[dtype]) -> Matrix[DType.bool]

Checks if each element of the input Matrix is positive infinity. Parameters: dtype: DType - Data type of the input Matrix. backend: _mf.Backend - Backend to use for the operation. Defaults to _mf.Vectorized.

Parameters:

  • dtype (DType)
  • backend (Backend)

Args:

  • matrix (Matrix): Matrix[dtype] - Input Matrix to check.

Returns:

  • Matrix

Raises