Skip to content

Commit

Permalink
nanmean is not oficiall method of ndarray
Browse files Browse the repository at this point in the history
  • Loading branch information
ipdemes committed Oct 18, 2023
1 parent 3071edd commit 67aab76
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
18 changes: 1 addition & 17 deletions cunumeric/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -3179,30 +3179,14 @@ def mean(
return sum_array

@add_boilerplate()
def nanmean(
def _nanmean(
self,
axis: Any = None,
dtype: Union[np.dtype[Any], None] = None,
out: Union[ndarray, None] = None,
keepdims: bool = False,
where: Union[ndarray, None] = None,
) -> ndarray:
"""a.mean(axis=None, dtype=None, out=None, keepdims=False)
Returns the average of the array elements along given axis,
ignoring NaN entires
Refer to :func:`cunumeric.mean` for full documentation.
See Also
--------
cunumeric.nanmean : equivalent function
Availability
--------
Multiple GPUs, Multiple CPUs
"""
from . import _ufunc

if np.issubdtype(dtype, np.integer) or np.issubdtype(dtype, np.bool_):
Expand Down
2 changes: 1 addition & 1 deletion cunumeric/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -7117,7 +7117,7 @@ def nanmean(
--------
Multiple GPUs, Multiple CPUs
"""
return a.nanmean(
return a._nanmean(
axis=axis, dtype=dtype, out=out, keepdims=keepdims, where=where
)

Expand Down

0 comments on commit 67aab76

Please sign in to comment.