jax.numpy.nanmin(a, axis=None, out=None, keepdims=None)[source]ΒΆ

Return minimum of an array or minimum along an axis, ignoring any NaNs.

LAX-backend implementation of nanmin().

Original docstring below.

When all-NaN slices are encountered a RuntimeWarning is raised and Nan is returned for that slice.

  • 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) –

    Alternate output array in which to place the result. The default is None; if provided, it must have the same shape as the expected output, but the type will be cast if necessary. See Output type determination for more details.

    New in version 1.8.0.

  • 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 original a.

    If the value is anything but the default, then keepdims will be passed through to the min method of sub-classes of ndarray. If the sub-classes methods does not implement keepdims any exceptions will be raised.

    New in version 1.8.0.

  • initial (scalar, optional) –

    The maximum value of an output element. Must be present to allow computation on empty slice. See ~numpy.ufunc.reduce for details.

    New in version 1.22.0.

  • where (array_like of bool, optional) –

    Elements to compare for the minimum. See ~numpy.ufunc.reduce for details.

    New in version 1.22.0.


nanmin – An array with the same shape as a, with the specified axis removed. If a is a 0-d array, or if axis is None, an ndarray scalar is returned. The same dtype as a is returned.

Return type