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

Method decimal_year

xarray/core/accessor_dt.py:567–576  ·  view source on GitHub ↗

Convert the dates as a fractional year.

(self)

Source from the content-addressed store, hash-verified

565
566 @property
567 def decimal_year(self) -> T_DataArray:
568 """Convert the dates as a fractional year."""
569 result = _decimal_year(self._obj)
570 newvar = Variable(
571 dims=self._obj.dims,
572 attrs=self._obj.attrs,
573 encoding=self._obj.encoding,
574 data=result,
575 )
576 return self._obj._replace(newvar, name="decimal_year")
577
578
579class TimedeltaAccessor(TimeAccessor[T_DataArray]):

Callers

nothing calls this directly

Calls 3

_decimal_yearFunction · 0.90
VariableClass · 0.90
_replaceMethod · 0.45

Tested by

no test coverage detected