csr_array.max(axis=None, out=None)[source]#

Return the maximum of the array/matrix or maximum along an axis. This takes all elements into account, not just the non-zero ones.

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

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

outNone, 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.

amaxcoo_matrix 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_matrix of dimension a.ndim - 1.

See also


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


NumPy’s implementation of ‘max’ for matrices