Convert the dates as a fractional year.
(self)
| 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 | |
| 579 | class TimedeltaAccessor(TimeAccessor[T_DataArray]): |
nothing calls this directly
no test coverage detected