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

Method __call__

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

Source from the content-addressed store, hash-verified

8432 return doc.replace(np_ret, np_ma_ret)
8433
8434 def __call__(self, *args, **params):
8435 # Find the common parameters to the call and the definition
8436 _extras = self._extras
8437 common_params = set(params).intersection(_extras)
8438 # Drop the common parameters from the call
8439 for p in common_params:
8440 _extras[p] = params.pop(p)
8441 # Get the result
8442 result = self._func.__call__(*args, **params).view(MaskedArray)
8443 if "fill_value" in common_params:
8444 result.fill_value = _extras.get("fill_value", None)
8445 if "hardmask" in common_params:
8446 result._hardmask = bool(_extras.get("hard_mask", False))
8447 return result
8448
8449
8450arange = _convert2ma(

Callers

nothing calls this directly

Calls 3

viewMethod · 0.45
__call__Method · 0.45
getMethod · 0.45

Tested by

no test coverage detected