The imaginary part of the masked array. This property is a view on the imaginary part of this `MaskedArray`. See Also -------- real Examples -------- >>> x = np.ma.array([1+1.j, -2j, 3.45+1.6j], mask=[False, True, False]) >>
(self)
| 4470 | |
| 4471 | @property |
| 4472 | def imag(self): |
| 4473 | """ |
| 4474 | The imaginary part of the masked array. |
| 4475 | |
| 4476 | This property is a view on the imaginary part of this `MaskedArray`. |
| 4477 | |
| 4478 | See Also |
| 4479 | -------- |
| 4480 | real |
| 4481 | |
| 4482 | Examples |
| 4483 | -------- |
| 4484 | >>> x = np.ma.array([1+1.j, -2j, 3.45+1.6j], mask=[False, True, False]) |
| 4485 | >>> x.imag |
| 4486 | masked_array(data=[1.0, --, 1.6], |
| 4487 | mask=[False, True, False], |
| 4488 | fill_value=1e+20) |
| 4489 | |
| 4490 | """ |
| 4491 | result = self._data.imag.view(type(self)) |
| 4492 | result.__setmask__(self._mask) |
| 4493 | return result |
| 4494 | |
| 4495 | # kept for compatibility |
| 4496 | get_imag = imag.fget |