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

Method test_result_as_expected

xarray/tests/test_dataarray.py:7610–7614  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

7608class TestStackEllipsis:
7609 # https://github.com/pydata/xarray/issues/6051
7610 def test_result_as_expected(self) -> None:
7611 da = DataArray([[1, 2], [1, 2]], dims=("x", "y"))
7612 result = da.stack(flat=[...])
7613 expected = da.stack(flat=da.dims)
7614 assert_identical(result, expected)
7615
7616 def test_error_on_ellipsis_without_list(self) -> None:
7617 da = DataArray([[1, 2], [1, 2]], dims=("x", "y"))

Callers

nothing calls this directly

Calls 3

stackMethod · 0.95
DataArrayClass · 0.90
assert_identicalFunction · 0.90

Tested by

no test coverage detected