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

Method __isub__

numpy/ma/core.py:4334–4349  ·  view source on GitHub ↗

Subtract other from self in-place.

(self, other)

Source from the content-addressed store, hash-verified

4332 return self
4333
4334 def __isub__(self, other):
4335 """
4336 Subtract other from self in-place.
4337
4338 """
4339 m = getmask(other)
4340 if self._mask is nomask:
4341 if m is not nomask and m.any():
4342 self._mask = make_mask_none(self.shape, self.dtype)
4343 self._mask += m
4344 elif m is not nomask:
4345 self._mask += m
4346 other_data = getdata(other)
4347 other_data = np.where(self._mask, other_data.dtype.type(0), other_data)
4348 self._data.__isub__(other_data)
4349 return self
4350
4351 def __imul__(self, other):
4352 """

Callers

nothing calls this directly

Calls 4

getmaskFunction · 0.85
make_mask_noneFunction · 0.85
getdataFunction · 0.85
anyMethod · 0.45

Tested by

no test coverage detected