Skip to content

Commit 59ffa92

Browse files
committed
fix: fix negative total tolerance for m3
1 parent 8649a09 commit 59ffa92

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/nanops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1278,7 +1278,7 @@ def nanskew(
12781278
#
12791279
# #18044 in _libs/windows.pyx calc_skew follow this behavior
12801280
# to fix the fperr to treat m2 <1e-14 as zero
1281-
constant_tolerance = np.finfo(m2.dtype).eps * total
1281+
constant_tolerance = np.finfo(m2.dtype).eps * np.abs(total)
12821282
constant_tolerance2 = constant_tolerance**2 # match order of m2
12831283
constant_tolerance3 = constant_tolerance2 * constant_tolerance # match order of m3
12841284
m2 = _zero_out_fperr(m2, constant_tolerance2)

0 commit comments

Comments
 (0)