Skip to content

Commit ce0e67f

Browse files
committed
chore: add scipy permalink and clarify changes
1 parent a3a8559 commit ce0e67f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandas/core/nanops.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,6 +1363,10 @@ def nankurt(
13631363
m4 = adjusted4.sum(axis, dtype=np.float64)
13641364

13651365
# Several floating point errors may occur during the summation due to rounding.
1366+
# This computation is similar to the one in Scipy
1367+
# https://github.com/scipy/scipy/blob/04d6d9c460b1fed83f2919ecec3d743cfa2e8317/scipy/stats/_stats_py.py#L1429
1368+
# With a few modifications, like using the maximum value instead of the averages
1369+
# and some adaptations because they use the average and we use the sum for `m2`.
13661370
# We need to estimate an upper bound to the error to consider the data constant.
13671371
# Lets call:
13681372
# x: true value in data

0 commit comments

Comments
 (0)