The imaginary part of the array. See Also -------- numpy.ndarray.imag
(
self: NamedArray[_ShapeType, np.dtype[_SupportsImag[_ScalarType]]], # type: ignore[type-var]
)
| 553 | |
| 554 | @property |
| 555 | def imag( |
| 556 | self: NamedArray[_ShapeType, np.dtype[_SupportsImag[_ScalarType]]], # type: ignore[type-var] |
| 557 | ) -> NamedArray[_ShapeType, _dtype[_ScalarType]]: |
| 558 | """ |
| 559 | The imaginary part of the array. |
| 560 | |
| 561 | See Also |
| 562 | -------- |
| 563 | numpy.ndarray.imag |
| 564 | """ |
| 565 | if isinstance(self._data, _arrayapi): |
| 566 | from xarray.namedarray._array_api import imag |
| 567 | |
| 568 | return imag(self) |
| 569 | |
| 570 | return self._new(data=self._data.imag) |
| 571 | |
| 572 | @property |
| 573 | def real( |