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

Method __ipow__

numpy/ma/core.py:4425–4444  ·  view source on GitHub ↗

Raise self to the power other, in place.

(self, other)

Source from the content-addressed store, hash-verified

4423 return self
4424
4425 def __ipow__(self, other):
4426 """
4427 Raise self to the power other, in place.
4428
4429 """
4430 other_data = getdata(other)
4431 other_data = np.where(self._mask, other_data.dtype.type(1), other_data)
4432 other_mask = getmask(other)
4433 with np.errstate(divide='ignore', invalid='ignore'):
4434 self._data.__ipow__(other_data)
4435 invalid = np.logical_not(np.isfinite(self._data))
4436 if invalid.any():
4437 if self._mask is not nomask:
4438 self._mask |= invalid
4439 else:
4440 self._mask = invalid
4441 np.copyto(self._data, self.fill_value, where=invalid)
4442 new_mask = mask_or(other_mask, invalid)
4443 self._mask = mask_or(self._mask, new_mask)
4444 return self
4445
4446 def __float__(self):
4447 """

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