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

Function make_da

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

Source from the content-addressed store, hash-verified

1074
1075
1076def make_da():
1077 da = xr.DataArray(
1078 np.ones((10, 20)),
1079 dims=["x", "y"],
1080 coords={"x": np.arange(10), "y": np.arange(100, 120)},
1081 name="a",
1082 ).chunk({"x": 4, "y": 5})
1083 da.x.attrs["long_name"] = "x"
1084 da.attrs["test"] = "test"
1085 da.coords["c2"] = 0.5
1086 da.coords["ndcoord"] = da.x * 2
1087 da.coords["cxy"] = (da.x * da.y).chunk({"x": 4, "y": 5})
1088
1089 return da
1090
1091
1092def make_ds():

Callers 3

make_dsFunction · 0.85
map_daFunction · 0.85

Calls 2

arangeMethod · 0.80
chunkMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…