nanreduce
Performs an NaN
skipping reduction on this array. See the documentation
on sparse.COO.reduce
for examples.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x
|
COO
|
The array to reduce. |
required |
method
|
ufunc
|
The method to use for performing the reduction. |
required |
identity
|
number
|
The identity value for this reduction. Inferred from |
None
|
axis
|
Union[int, Iterable[int]]
|
The axes along which to perform the reduction. Uses all axes by default. |
None
|
keepdims
|
bool_
|
Whether or not to keep the dimensions of the original array. |
False
|
**kwargs
|
dict
|
Any extra arguments to pass to the reduction operation. |
{}
|
Returns:
Type | Description |
---|---|
COO
|
The result of the reduction operation. |
Raises:
Type | Description |
---|---|
ValueError
|
If reducing an all-zero axis would produce a nonzero result. |
See Also
sparse.COO.reduce
: Similar method without NaN
skipping functionality.
Source code in sparse/numba_backend/_coo/common.py
684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 |
|