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

Function make_xrarray

xarray/tests/test_sparse.py:46–54  ·  view source on GitHub ↗
(dim_lengths, coords=None, name="test")

Source from the content-addressed store, hash-verified

44
45
46def make_xrarray(dim_lengths, coords=None, name="test"):
47 if coords is None:
48 coords = {d: np.arange(n) for d, n in dim_lengths.items()}
49 return xr.DataArray(
50 make_sparray(shape=tuple(dim_lengths.values())),
51 dims=tuple(coords.keys()),
52 coords=coords,
53 name=name,
54 )
55
56
57class do:

Callers 4

test_dataarray_propertyFunction · 0.85
test_dataarray_methodFunction · 0.85
test_datarray_1d_methodFunction · 0.85
test_stackMethod · 0.85

Calls 5

make_sparrayFunction · 0.85
arangeMethod · 0.80
itemsMethod · 0.80
keysMethod · 0.80
valuesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…