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

Method _argminmax_wrap

pandas/tests/test_nanops.py:534–544  ·  view source on GitHub ↗
(self, value, axis=None, func=None)

Source from the content-addressed store, hash-verified

532 self.check_funs(nan_op, np_op, skipna, allow_obj=False)
533
534 def _argminmax_wrap(self, value, axis=None, func=None):
535 res = func(value, axis)
536 nans = np.min(value, axis)
537 nullnan = isna(nans)
538 if res.ndim:
539 res[nullnan] = -1
540 elif (hasattr(nullnan, "all") and nullnan.all()) or (
541 not hasattr(nullnan, "all") and nullnan
542 ):
543 res = -1
544 return res
545
546 @pytest.mark.filterwarnings("ignore::RuntimeWarning")
547 def test_nanargmax(self, skipna):

Callers

nothing calls this directly

Calls 4

isnaFunction · 0.90
funcFunction · 0.50
minMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected