We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8649a09 commit 59ffa92Copy full SHA for 59ffa92
pandas/core/nanops.py
@@ -1278,7 +1278,7 @@ def nanskew(
1278
#
1279
# #18044 in _libs/windows.pyx calc_skew follow this behavior
1280
# to fix the fperr to treat m2 <1e-14 as zero
1281
- constant_tolerance = np.finfo(m2.dtype).eps * total
+ constant_tolerance = np.finfo(m2.dtype).eps * np.abs(total)
1282
constant_tolerance2 = constant_tolerance**2 # match order of m2
1283
constant_tolerance3 = constant_tolerance2 * constant_tolerance # match order of m3
1284
m2 = _zero_out_fperr(m2, constant_tolerance2)
0 commit comments