cunumeric.nanmin#

cunumeric.nanmin(a: ndarray, axis: Any = None, out: ndarray | None = None, keepdims: bool = False, initial: int | float | None = None, where: ndarray | None = None) ndarray#

Return minimum of an array or minimum along an axis, ignoring any NaNs. When all-NaN slices are encountered, a NaN is returned for that slice only when CUNUMERIC_NUMPY_COMPATIBILITY environment variable is set, otherwise identity is returned. Empty slices will raise a ValueError

Parameters:
  • a (array_like) – Array containing numbers whose minimum is desired. If a is not an array, a conversion is attempted.

  • axis ({int, tuple of int, None}, optional) – Axis or axes along which the minimum is computed. The default is to compute the minimum of the flattened array.

  • out (ndarray, optional) – Alternative output array in which to place the result. Must be of the same shape and buffer length as the expected output. See ufuncs-output-type for more details.

  • keepdims (bool, Optional) –

    If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array.

    If the default value is passed, then keepdims will not be passed through to the amin method of sub-classes of ndarray, however any non-default value will be. If the sub-class’ method does not implement keepdims any exceptions will be raised.

  • initial (scalar, optional) – The maximum value of an output element. Must be present to allow computation on empty slice. See ~cunumeric.ufunc.reduce for details.

  • where (array_like[bool], optional) – Elements to compare for the minimum. See ~cunumeric.ufunc.reduce for details.

Returns:

nanmin – Minimum of a. If axis is None, the result is a scalar value. If axis is given, the result is an array of dimension a.ndim - 1.

Return type:

ndarray or scalar

Notes

CuNumeric’s implementation will not raise a Runtime Warning for slices with all-NaNs

Availability:

Multiple GPUs, Multiple CPUs