MCPcopy Create free account
hub / github.com/numpy/numpy / __call__

Method __call__

numpy/ma/extras.py:269–278  ·  view source on GitHub ↗
(self, x, *args, **params)

Source from the content-addressed store, hash-verified

267 both the data and mask calls.
268 """
269 def __call__(self, x, *args, **params):
270 func = getattr(np, self.__name__)
271 if isinstance(x, ndarray):
272 _d = func(x.__array__(), *args, **params)
273 _m = func(getmaskarray(x), *args, **params)
274 return masked_array(_d, mask=_m)
275 else:
276 _d = func(np.asarray(x), *args, **params)
277 _m = func(getmaskarray(x), *args, **params)
278 return masked_array(_d, mask=_m)
279
280
281class _fromnxfunction_seq(_fromnxfunction):

Callers

nothing calls this directly

Calls 3

getmaskarrayFunction · 0.85
funcFunction · 0.50
__array__Method · 0.45

Tested by

no test coverage detected