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

Function _maybe_add_count

xarray/coding/frequencies.py:238–245  ·  view source on GitHub ↗

If count is greater than 1, add it to the base offset string

(base: str, count: float)

Source from the content-addressed store, hash-verified

236
237
238def _maybe_add_count(base: str, count: float):
239 """If count is greater than 1, add it to the base offset string"""
240 if count != 1:
241 assert count == int(count)
242 count = int(count)
243 return f"{count}{base}"
244 else:
245 return base
246
247
248def month_anchor_check(dates):

Callers 2

get_freqMethod · 0.85
_infer_daily_ruleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…