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

Method round

xarray/coding/cftimeindex.py:766–781  ·  view source on GitHub ↗

Round dates to a fixed frequency. Parameters ---------- freq : str The frequency level to round the index to. Must be a fixed frequency like 'S' (second) not 'ME' (month end). See `frequency aliases <https://pandas.pydata.org/pandas-docs

(self, freq)

Source from the content-addressed store, hash-verified

764 return self._round_via_method(freq, _ceil_int)
765
766 def round(self, freq):
767 """Round dates to a fixed frequency.
768
769 Parameters
770 ----------
771 freq : str
772 The frequency level to round the index to. Must be a fixed
773 frequency like 'S' (second) not 'ME' (month end). See `frequency
774 aliases <https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`_
775 for a list of possible values.
776
777 Returns
778 -------
779 CFTimeIndex
780 """
781 return self._round_via_method(freq, _round_to_nearest_half_even)
782
783 @property
784 def is_leap_year(self):

Callers 2

_interpolate_day_of_yearFunction · 0.45
encodeMethod · 0.45

Calls 1

_round_via_methodMethod · 0.95

Tested by

no test coverage detected