The real part of the masked array. This property is a view on the real part of this `MaskedArray`. See Also -------- imag Examples -------- >>> x = np.ma.array([1+1.j, -2j, 3.45+1.6j], mask=[False, True, False]) >>> x.real
(self)
| 4497 | |
| 4498 | @property |
| 4499 | def real(self): |
| 4500 | """ |
| 4501 | The real part of the masked array. |
| 4502 | |
| 4503 | This property is a view on the real part of this `MaskedArray`. |
| 4504 | |
| 4505 | See Also |
| 4506 | -------- |
| 4507 | imag |
| 4508 | |
| 4509 | Examples |
| 4510 | -------- |
| 4511 | >>> x = np.ma.array([1+1.j, -2j, 3.45+1.6j], mask=[False, True, False]) |
| 4512 | >>> x.real |
| 4513 | masked_array(data=[1.0, --, 3.45], |
| 4514 | mask=[False, True, False], |
| 4515 | fill_value=1e+20) |
| 4516 | |
| 4517 | """ |
| 4518 | result = self._data.real.view(type(self)) |
| 4519 | result.__setmask__(self._mask) |
| 4520 | return result |
| 4521 | |
| 4522 | # kept for compatibility |
| 4523 | get_real = real.fget |