MCPcopy Index your code
hub / github.com/numpy/numpy / _wrapit

Function _wrapit

numpy/_core/fromnumeric.py:38–45  ·  view source on GitHub ↗
(obj, method, *args, **kwds)

Source from the content-addressed store, hash-verified

36
37# functions that are now methods
38def _wrapit(obj, method, *args, **kwds):
39 conv = _array_converter(obj)
40 # As this already tried the method, subok is maybe quite reasonable here
41 # but this follows what was done before. TODO: revisit this.
42 arr, = conv.as_arrays(subok=False)
43 result = getattr(arr, method)(*args, **kwds)
44
45 return conv.wrap(result, to_scalar=False)
46
47
48def _wrapfunc(obj, method, *args, **kwds):

Callers 2

_wrapfuncFunction · 0.85
squeezeFunction · 0.85

Calls 1

wrapMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…