MCPcopy Index your code
hub / github.com/pydata/xarray / real

Method real

xarray/namedarray/core.py:573–587  ·  view source on GitHub ↗

The real part of the array. See Also -------- numpy.ndarray.real

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

Source from the content-addressed store, hash-verified

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

Callers 1

realFunction · 0.45

Calls 2

_newMethod · 0.95
realFunction · 0.90

Tested by

no test coverage detected