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

Method __itruediv__

numpy/ma/core.py:4406–4423  ·  view source on GitHub ↗

True divide self by other in-place.

(self, other)

Source from the content-addressed store, hash-verified

4404 return self
4405
4406 def __itruediv__(self, other):
4407 """
4408 True divide self by other in-place.
4409
4410 """
4411 other_data = getdata(other)
4412 dom_mask = _DomainSafeDivide().__call__(self._data, other_data)
4413 other_mask = getmask(other)
4414 new_mask = mask_or(other_mask, dom_mask)
4415 # The following 3 lines control the domain filling
4416 if dom_mask.any():
4417 (_, fval) = ufunc_fills[np.true_divide]
4418 other_data = np.where(
4419 dom_mask, other_data.dtype.type(fval), other_data)
4420 self._mask |= new_mask
4421 other_data = np.where(self._mask, other_data.dtype.type(1), other_data)
4422 self._data.__itruediv__(other_data)
4423 return self
4424
4425 def __ipow__(self, other):
4426 """

Callers

nothing calls this directly

Calls 6

getdataFunction · 0.85
_DomainSafeDivideClass · 0.85
getmaskFunction · 0.85
mask_orFunction · 0.85
__call__Method · 0.45
anyMethod · 0.45

Tested by

no test coverage detected