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

Method test_normalize_rgb_imshow

xarray/tests/test_plot.py:2109–2115  ·  view source on GitHub ↗
(
        self, vmin: float | None, vmax: float | None, robust: bool
    )

Source from the content-addressed store, hash-verified

2107 ],
2108 )
2109 def test_normalize_rgb_imshow(
2110 self, vmin: float | None, vmax: float | None, robust: bool
2111 ) -> None:
2112 da = DataArray(easy_array((5, 5, 3), start=-0.6, stop=1.4))
2113 arr = da.plot.imshow(vmin=vmin, vmax=vmax, robust=robust).get_array()
2114 assert arr is not None
2115 assert 0 <= arr.min() <= arr.max() <= 1
2116
2117 def test_normalize_rgb_one_arg_error(self) -> None:
2118 da = DataArray(easy_array((5, 5, 3), start=-0.6, stop=1.4))

Callers

nothing calls this directly

Calls 6

DataArrayClass · 0.90
easy_arrayFunction · 0.85
imshowMethod · 0.80
get_arrayMethod · 0.45
minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected