The real part of the array. See Also -------- numpy.ndarray.real
(
self: NamedArray[_ShapeType, np.dtype[_SupportsReal[_ScalarType]]], # type: ignore[type-var]
)
| 571 | |
| 572 | @property |
| 573 | def real( |
| 574 | self: NamedArray[_ShapeType, np.dtype[_SupportsReal[_ScalarType]]], # type: ignore[type-var] |
| 575 | ) -> NamedArray[_ShapeType, _dtype[_ScalarType]]: |
| 576 | """ |
| 577 | The real part of the array. |
| 578 | |
| 579 | See Also |
| 580 | -------- |
| 581 | numpy.ndarray.real |
| 582 | """ |
| 583 | if isinstance(self._data, _arrayapi): |
| 584 | from xarray.namedarray._array_api import real |
| 585 | |
| 586 | return real(self) |
| 587 | return self._new(data=self._data.real) |
| 588 | |
| 589 | def __dask_tokenize__(self) -> object: |
| 590 | # Use v.data, instead of v._data, in order to cope with the wrappers |