Skip to main content
`Ctrl`+`K`
scipy.sparse.bsr_matrix.

# nanmax

bsr_matrix.nanmax(axis=None, out=None, *, explicit=False)

  Return the maximum, ignoring any Nans, along an axis.

  Return the maximum, ignoring any Nans, of the array/matrix along an axis. By default this takes all elements into account, but with explicit set, only stored elements are considered.

  Added in version 1.11.0.

  Parameters:
    axis{-2, -1, 0, 1, None} optional

      Axis along which the maximum is computed. The default is to compute the maximum over all elements, returning a scalar (i.e., axis = None).

    out None, optional

      This argument is in the signature solely for NumPy compatibility reasons. Do not pass in anything except for the default value, as this argument is not used.

    explicit{False, True} optional (default: False)

      When set to True, only the stored elements will be considered. If a row/column is empty, the sparse.coo_array returned has no stored element (i.e. an implicit zero) for that row/column.

      Added in version 1.15.0.

  Returns:
    amax coo_array or scalar

      Maximum of a. If axis is None, the result is a scalar value. If axis is given, the result is a sparse.coo_array of dimension `a.ndim - 1`.

  See also

  `nanmin`

    The minimum value of a sparse array/matrix along a given axis, ignoring NaNs.

  `max`

    The maximum value of a sparse array/matrix along a given axis, propagating NaNs.

  `numpy.nanmax`

    NumPy’s implementation of ‘nanmax’.