Skip to content

Commit a3a8559

Browse files
committed
fix: leave mean computation as is
1 parent 303465a commit a3a8559

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pandas/core/nanops.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,8 +1261,7 @@ def nanskew(
12611261
return np.nan
12621262

12631263
with np.errstate(invalid="ignore", divide="ignore"):
1264-
total = values.sum(axis, dtype=np.float64)
1265-
mean = total / count
1264+
mean = values.sum(axis, dtype=np.float64) / count
12661265
if axis is not None:
12671266
mean = np.expand_dims(mean, axis)
12681267

@@ -1351,8 +1350,7 @@ def nankurt(
13511350
return np.nan
13521351

13531352
with np.errstate(invalid="ignore", divide="ignore"):
1354-
total = values.sum(axis, dtype=np.float64)
1355-
mean = total / count
1353+
mean = values.sum(axis, dtype=np.float64) / count
13561354
if axis is not None:
13571355
mean = np.expand_dims(mean, axis)
13581356

0 commit comments

Comments
 (0)