Skip to content

Commit

Permalink
MAINT: remove duplicated calculation of number of points
Browse files Browse the repository at this point in the history
  • Loading branch information
mhvk committed Dec 14, 2024
1 parent ca602e3 commit 312c519
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion astropy/utils/masked/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1302,7 +1302,6 @@ def mean(self, axis=None, dtype=None, out=None, keepdims=False, *, where=True):
n = np.add.reduce(where, axis=axis, keepdims=keepdims)

# catch the case when an axis is fully masked to prevent div by zero:
n = np.add.reduce(where, axis=axis, keepdims=keepdims)
neq0 = n == 0
n += neq0
result /= n
Expand Down

0 comments on commit 312c519

Please sign in to comment.