MCPcopy Index your code
hub / github.com/numpy/numpy / __ifloordiv__

Method __ifloordiv__

numpy/ma/core.py:4454–4471  ·  view source on GitHub ↗

Floor divide self by other in-place.

(self, other)

Source from the content-addressed store, hash-verified

4452 return self
4453
4454 def __ifloordiv__(self, other):
4455 """
4456 Floor divide self by other in-place.
4457
4458 """
4459 other_data = getdata(other)
4460 dom_mask = _DomainSafeDivide().__call__(self._data, other_data)
4461 other_mask = getmask(other)
4462 new_mask = mask_or(other_mask, dom_mask)
4463 # The following 3 lines control the domain filling
4464 if dom_mask.any():
4465 (_, fval) = ufunc_fills[np.floor_divide]
4466 other_data = np.where(
4467 dom_mask, other_data.dtype.type(fval), other_data)
4468 self._mask |= new_mask
4469 other_data = np.where(self._mask, other_data.dtype.type(1), other_data)
4470 self._data.__ifloordiv__(other_data)
4471 return self
4472
4473 def __itruediv__(self, other):
4474 """

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