MCPcopy
hub / github.com/numpy/numpy / wrapped_method

Function wrapped_method

numpy/ma/core.py:2642–2652  ·  view source on GitHub ↗
(self, *args, **params)

Source from the content-addressed store, hash-verified

2640
2641 """
2642 def wrapped_method(self, *args, **params):
2643 result = getattr(self._data, funcname)(*args, **params)
2644 result = result.view(type(self))
2645 result._update_from(self)
2646 mask = self._mask
2647 if not onmask:
2648 result.__setmask__(mask)
2649 elif mask is not nomask:
2650 # __setmask__ makes a copy, which we don't want
2651 result._mask = getattr(mask, funcname)(*args, **params)
2652 return result
2653 methdoc = getattr(ndarray, funcname, None) or getattr(np, funcname, None)
2654 if methdoc is not None:
2655 wrapped_method.__doc__ = methdoc.__doc__

Callers

nothing calls this directly

Calls 3

_update_fromMethod · 0.80
__setmask__Method · 0.80
viewMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…