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

Method __apply__

xarray/coding/cftime_offsets.py:531–535  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

529 self.month = _validate_month(month, self._default_month)
530
531 def __apply__(self, other):
532 reference_day = _get_day_of_month(other, self._day_option)
533 years = _adjust_n_years(other, self.n, self.month, reference_day)
534 months = years * 12 + (self.month - other.month)
535 return _shift_month(other, months, self._day_option)
536
537 def __sub__(self, other):
538 if TYPE_CHECKING:

Callers

nothing calls this directly

Calls 3

_get_day_of_monthFunction · 0.85
_adjust_n_yearsFunction · 0.85
_shift_monthFunction · 0.85

Tested by

no test coverage detected