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

Method __ipow__

numpy/ma/core.py:4492–4511  ·  view source on GitHub ↗

Raise self to the power other, in place.

(self, other)

Source from the content-addressed store, hash-verified

4490 return self
4491
4492 def __ipow__(self, other):
4493 """
4494 Raise self to the power other, in place.
4495
4496 """
4497 other_data = getdata(other)
4498 other_data = np.where(self._mask, other_data.dtype.type(1), other_data)
4499 other_mask = getmask(other)
4500 with np.errstate(divide='ignore', invalid='ignore'):
4501 self._data.__ipow__(other_data)
4502 invalid = np.logical_not(np.isfinite(self._data))
4503 if invalid.any():
4504 if self._mask is not nomask:
4505 self._mask |= invalid
4506 else:
4507 self._mask = invalid
4508 np.copyto(self._data, self.fill_value, where=invalid)
4509 new_mask = mask_or(other_mask, invalid)
4510 self._mask = mask_or(self._mask, new_mask)
4511 return self
4512
4513 def __float__(self):
4514 """

Callers

nothing calls this directly

Calls 4

getdataFunction · 0.85
getmaskFunction · 0.85
mask_orFunction · 0.85
anyMethod · 0.45

Tested by

no test coverage detected