| 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 | |
| 8450 | arange = _convert2ma( |