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

Function _generate_anchored_offsets

xarray/coding/cftime_offsets.py:677–684  ·  view source on GitHub ↗
(
    base_freq: str, offset: type[YearOffset | QuarterOffset]
)

Source from the content-addressed store, hash-verified

675
676
677def _generate_anchored_offsets(
678 base_freq: str, offset: type[YearOffset | QuarterOffset]
679) -> dict[str, type[BaseCFTimeOffset]]:
680 offsets: dict[str, type[BaseCFTimeOffset]] = {}
681 for month, abbreviation in _MONTH_ABBREVIATIONS.items():
682 anchored_freq = f"{base_freq}-{abbreviation}"
683 offsets[anchored_freq] = partial(offset, month=month) # type: ignore[assignment]
684 return offsets
685
686
687_FREQUENCIES: Mapping[str, type[BaseCFTimeOffset]] = {

Callers 1

cftime_offsets.pyFile · 0.85

Calls 1

itemsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…