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

Function _has_infs

pandas/core/nanops.py:176–186  ·  view source on GitHub ↗
(result)

Source from the content-addressed store, hash-verified

174
175
176def _has_infs(result) -> bool:
177 if isinstance(result, np.ndarray):
178 if result.dtype in ("f8", "f4"):
179 # Note: outside of a nanops-specific test, we always have
180 # result.ndim == 1, so there is no risk of this ravel making a copy.
181 return lib.has_infs(result.ravel("K"))
182 try:
183 return np.isinf(result).any()
184 except (TypeError, NotImplementedError):
185 # if it doesn't support infs, then it can't have infs
186 return False
187
188
189def _get_fill_value(

Callers 1

fMethod · 0.85

Calls 2

ravelMethod · 0.45
anyMethod · 0.45

Tested by

no test coverage detected