Divide self by other in-place.
(self, other)
| 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 | """ |