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

Method subset

xarray/core/dataarray.py:600–603  ·  view source on GitHub ↗
(dim, label)

Source from the content-addressed store, hash-verified

598 """splits dataarray along dimension 'dim'"""
599
600 def subset(dim, label):
601 array = self.loc[{dim: label}]
602 array.attrs = {}
603 return as_variable(array)
604
605 variables_from_split = {
606 label: subset(dim, label) for label in self.get_index(dim)

Callers

nothing calls this directly

Calls 1

as_variableFunction · 0.90

Tested by

no test coverage detected