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

Function _apply_over_vars_with_dim

xarray/core/missing.py:233–243  ·  view source on GitHub ↗

Wrapper for datasets

(func, self, dim=None, **kwargs)

Source from the content-addressed store, hash-verified

231
232
233def _apply_over_vars_with_dim(func, self, dim=None, **kwargs):
234 """Wrapper for datasets"""
235 ds = type(self)(coords=self.coords, attrs=self.attrs)
236
237 for name, var in self.data_vars.items():
238 if dim in var.dims:
239 ds[name] = func(var, dim=dim, **kwargs)
240 else:
241 ds[name] = var
242
243 return ds
244
245
246def get_clean_interp_index(

Callers 3

interpolate_naMethod · 0.90
ffillMethod · 0.90
bfillMethod · 0.90

Calls 3

typeFunction · 0.85
itemsMethod · 0.80
funcFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…