Skip to content

Commit

Permalink
removing ignore_nan
Browse files Browse the repository at this point in the history
  • Loading branch information
ipdemes committed Nov 17, 2023
1 parent b15f656 commit 7a77535
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions cunumeric/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -3094,7 +3094,6 @@ def mean(
out: Union[ndarray, None] = None,
keepdims: bool = False,
where: Union[ndarray, None] = None,
ignore_nan: bool = False,
) -> ndarray:
"""a.mean(axis=None, dtype=None, out=None, keepdims=False)
Expand Down Expand Up @@ -3126,26 +3125,14 @@ def mean(
where_array = broadcast_where(where, self.shape)
# Do the sum
sum_array = (
self._nansum(
axis=axis,
out=out,
keepdims=keepdims,
dtype=dtype,
where=where_array,
)
if out is not None and out.dtype == dtype and ignore_nan
else self.sum(
self.sum(
axis=axis,
out=out,
keepdims=keepdims,
dtype=dtype,
where=where_array,
)
if out is not None and out.dtype == dtype
else self._nansum(
axis=axis, keepdims=keepdims, dtype=dtype, where=where_array
)
if ignore_nan
else self.sum(
axis=axis, keepdims=keepdims, dtype=dtype, where=where_array
)
Expand Down Expand Up @@ -3207,7 +3194,6 @@ def _nanmean(
out=out,
keepdims=keepdims,
where=nan_mask,
ignore_nan=True,
)

@add_boilerplate()
Expand Down

0 comments on commit 7a77535

Please sign in to comment.