MCPcopy
hub / github.com/numpy/numpy / _wrapreduction_any_all

Function _wrapreduction_any_all

numpy/_core/fromnumeric.py:86–99  ·  view source on GitHub ↗
(obj, ufunc, method, axis, out, **kwargs)

Source from the content-addressed store, hash-verified

84
85
86def _wrapreduction_any_all(obj, ufunc, method, axis, out, **kwargs):
87 # Same as above function, but dtype is always bool (but never passed on)
88 passkwargs = {k: v for k, v in kwargs.items()
89 if v is not np._NoValue}
90
91 if type(obj) is not mu.ndarray:
92 try:
93 reduction = getattr(obj, method)
94 except AttributeError:
95 pass
96 else:
97 return reduction(axis=axis, out=out, **passkwargs)
98
99 return ufunc.reduce(obj, axis, bool, out, **passkwargs)
100
101
102def _take_dispatcher(a, indices, axis=None, out=None, mode=None):

Callers 2

anyFunction · 0.85
allFunction · 0.85

Calls 2

itemsMethod · 0.80
reduceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…