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

Function make_ds

xarray/tests/test_dask.py:1092–1110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1090
1091
1092def make_ds():
1093 map_ds = xr.Dataset()
1094 map_ds["a"] = make_da()
1095 map_ds["b"] = map_ds.a + 50
1096 map_ds["c"] = map_ds.x + 20
1097 map_ds = map_ds.chunk({"x": 4, "y": 5})
1098 map_ds["d"] = ("z", [1, 1, 1, 1])
1099 map_ds["z"] = [0, 1, 2, 3]
1100 map_ds["e"] = map_ds.x + map_ds.y
1101 map_ds.coords["c1"] = 0.5
1102 map_ds.coords["cx"] = ("x", np.arange(len(map_ds.x)))
1103 map_ds.coords["cx"].attrs["test2"] = "test2"
1104 map_ds.attrs["test"] = "test"
1105 map_ds.coords["xx"] = map_ds["a"] * map_ds.y
1106
1107 map_ds.x.attrs["long_name"] = "x"
1108 map_ds.y.attrs["long_name"] = "y"
1109
1110 return map_ds
1111
1112
1113# fixtures cannot be used in parametrize statements

Callers 1

map_dsFunction · 0.85

Calls 3

chunkMethod · 0.95
make_daFunction · 0.85
arangeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…