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

Method count

xarray/computation/rolling.py:226–230  ·  view source on GitHub ↗
(self, keep_attrs: bool | None = None)

Source from the content-addressed store, hash-verified

224 raise NotImplementedError()
225
226 def count(self, keep_attrs: bool | None = None) -> T_Xarray:
227 keep_attrs = self._get_keep_attrs(keep_attrs)
228 rolling_count = self._counts(keep_attrs=keep_attrs)
229 enough_periods = rolling_count >= self.min_periods
230 return rolling_count.where(enough_periods)
231
232 count.__doc__ = _ROLLING_REDUCE_DOCSTRING_TEMPLATE.format(name="count")
233

Callers 15

_meanMethod · 0.95
__init__.pyFile · 0.45
first_itemsMethod · 0.45
label_from_attrsFunction · 0.45
__iter__Method · 0.45
test_missing_valuesMethod · 0.45
test_nansFunction · 0.45
test_groupby_countMethod · 0.45
test_resample_doctestMethod · 0.45

Calls 3

_get_keep_attrsMethod · 0.95
_countsMethod · 0.95
whereMethod · 0.45

Tested by 15

test_missing_valuesMethod · 0.36
test_nansFunction · 0.36
test_groupby_countMethod · 0.36
test_resample_doctestMethod · 0.36
test_multiple_groupersFunction · 0.36
test_lazy_groupingFunction · 0.36
test_season_resamplerMethod · 0.36
test_countMethod · 0.36