Skip to content

Commit 99a602f

Browse files
author
Sebastian Goldmann
committed
kurtosis adjustment to return NaN for constant variance
1 parent ea75dd7 commit 99a602f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/_libs/window/aggregations.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ cdef float64_t calc_kurt(int64_t minp, int64_t nobs,
694694
# GH 42064 46431
695695
# uniform case, force result to be -3.
696696
elif num_consecutive_same_value >= nobs:
697-
result = -3.
697+
result = NaN
698698
else:
699699
dnobs = <float64_t>nobs
700700
A = x / dnobs

0 commit comments

Comments
 (0)