nanreduce
- sparse.nanreduce(x, method, identity=None, axis=None, keepdims=False, **kwargs)[source]
Performs an
NaNskipping reduction on this array. See the documentation onCOO.reducefor examples.- Parameters:
x (COO) – The array to reduce.
method (numpy.ufunc) – The method to use for performing the reduction.
identity (numpy.number) – The identity value for this reduction. Inferred from
methodif not given. Note that someufuncobjects don’t have this, so it may be necessary to give it.axis (Union[int, Iterable[int]], optional) – The axes along which to perform the reduction. Uses all axes by default.
keepdims (bool, optional) – Whether or not to keep the dimensions of the original array.
**kwargs (dict) – Any extra arguments to pass to the reduction operation.
- Returns:
The result of the reduction operation.
- Return type:
- Raises:
ValueError – If reducing an all-zero axis would produce a nonzero result.
See also
COO.reduceSimilar method without
NaNskipping functionality.