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

Method __idiv__

numpy/ma/core.py:4368–4385  ·  view source on GitHub ↗

Divide self by other in-place.

(self, other)

Source from the content-addressed store, hash-verified

4366 return self
4367
4368 def __idiv__(self, other):
4369 """
4370 Divide self by other in-place.
4371
4372 """
4373 other_data = getdata(other)
4374 dom_mask = _DomainSafeDivide().__call__(self._data, other_data)
4375 other_mask = getmask(other)
4376 new_mask = mask_or(other_mask, dom_mask)
4377 # The following 4 lines control the domain filling
4378 if dom_mask.any():
4379 (_, fval) = ufunc_fills[np.divide]
4380 other_data = np.where(
4381 dom_mask, other_data.dtype.type(fval), other_data)
4382 self._mask |= new_mask
4383 other_data = np.where(self._mask, other_data.dtype.type(1), other_data)
4384 self._data.__idiv__(other_data)
4385 return self
4386
4387 def __ifloordiv__(self, other):
4388 """

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