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

Method __call__

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

Source from the content-addressed store, hash-verified

301 just the processed array instead of a list.
302 """
303 def __call__(self, *args, **params):
304 func = getattr(np, self.__name__)
305 arrays = []
306 args = list(args)
307 while len(args) > 0 and issequence(args[0]):
308 arrays.append(args.pop(0))
309 res = []
310 for x in arrays:
311 _d = func(np.asarray(x), *args, **params)
312 _m = func(getmaskarray(x), *args, **params)
313 res.append(masked_array(_d, mask=_m))
314 if len(arrays) == 1:
315 return res[0]
316 return res
317
318
319class _fromnxfunction_allargs(_fromnxfunction):

Callers

nothing calls this directly

Calls 3

issequenceFunction · 0.85
getmaskarrayFunction · 0.85
funcFunction · 0.50

Tested by

no test coverage detected