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

Method test_warns_ambiguous_dim

xarray/tests/test_plot.py:2080–2086  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2078 ).plot.imshow()
2079
2080 def test_warns_ambiguous_dim(self) -> None:
2081 arr = DataArray(easy_array((3, 3, 3)), dims=["y", "x", "band"])
2082 with pytest.warns(UserWarning):
2083 arr.plot.imshow()
2084 # but doesn't warn if dimensions specified
2085 arr.plot.imshow(rgb="band")
2086 arr.plot.imshow(x="x", y="y")
2087
2088 def test_rgb_errors_too_many_dims(self) -> None:
2089 arr = DataArray(easy_array((3, 3, 3, 3)), dims=["y", "x", "z", "band"])

Callers

nothing calls this directly

Calls 3

DataArrayClass · 0.90
easy_arrayFunction · 0.85
imshowMethod · 0.80

Tested by

no test coverage detected