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

Method test_concat_lazy

xarray/tests/test_concat.py:1235–1247  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1233
1234 @requires_dask
1235 def test_concat_lazy(self) -> None:
1236 import dask.array as da
1237
1238 arrays = [
1239 DataArray(
1240 da.from_array(InaccessibleArray(np.zeros((3, 3))), 3), dims=["x", "y"]
1241 )
1242 for _ in range(2)
1243 ]
1244 # should not raise
1245 combined = concat(arrays, dim="z")
1246 assert combined.shape == (2, 3, 3)
1247 assert combined.dims == ("z", "x", "y")
1248
1249 def test_concat_avoids_index_auto_creation(self) -> None:
1250 # TODO once passing indexes={} directly to DataArray constructor is allowed then no need to create coords first

Callers

nothing calls this directly

Calls 4

DataArrayClass · 0.90
InaccessibleArrayClass · 0.90
concatFunction · 0.90
from_arrayMethod · 0.45

Tested by

no test coverage detected