MCPcopy
hub / github.com/pandas-dev/pandas / _zero_out_fperr

Function _zero_out_fperr

pandas/core/nanops.py:1619–1624  ·  view source on GitHub ↗
(arg, tol: float | np.ndarray)

Source from the content-addressed store, hash-verified

1617
1618
1619def _zero_out_fperr(arg, tol: float | np.ndarray):
1620 # #18044 reference this behavior to fix rolling skew/kurt issue
1621 if isinstance(arg, np.ndarray):
1622 return np.where(np.abs(arg) < tol, 0, arg)
1623 else:
1624 return arg.dtype.type(0) if np.abs(arg) < tol else arg
1625
1626
1627@disallow("M8", "m8")

Callers 2

nanskewFunction · 0.85
nankurtFunction · 0.85

Calls 3

absMethod · 0.80
whereMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected