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

Method __ifloordiv__

numpy/ma/core.py:4387–4404  ·  view source on GitHub ↗

Floor divide self by other in-place.

(self, other)

Source from the content-addressed store, hash-verified

4385 return self
4386
4387 def __ifloordiv__(self, other):
4388 """
4389 Floor divide self by other in-place.
4390
4391 """
4392 other_data = getdata(other)
4393 dom_mask = _DomainSafeDivide().__call__(self._data, other_data)
4394 other_mask = getmask(other)
4395 new_mask = mask_or(other_mask, dom_mask)
4396 # The following 3 lines control the domain filling
4397 if dom_mask.any():
4398 (_, fval) = ufunc_fills[np.floor_divide]
4399 other_data = np.where(
4400 dom_mask, other_data.dtype.type(fval), other_data)
4401 self._mask |= new_mask
4402 other_data = np.where(self._mask, other_data.dtype.type(1), other_data)
4403 self._data.__ifloordiv__(other_data)
4404 return self
4405
4406 def __itruediv__(self, other):
4407 """

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