MCPcopy
hub / github.com/pydata/xarray / imag

Method imag

xarray/namedarray/core.py:555–570  ·  view source on GitHub ↗

The imaginary part of the array. See Also -------- numpy.ndarray.imag

(
        self: NamedArray[_ShapeType, np.dtype[_SupportsImag[_ScalarType]]],  # type: ignore[type-var]
    )

Source from the content-addressed store, hash-verified

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(

Callers 1

imagFunction · 0.45

Calls 2

_newMethod · 0.95
imagFunction · 0.90

Tested by

no test coverage detected