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

Method test_robust

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

Source from the content-addressed store, hash-verified

963 self.data = np.linspace(0, 1, num=100)
964
965 def test_robust(self) -> None:
966 cmap_params = _determine_cmap_params(self.data, robust=True)
967 assert cmap_params["vmin"] == np.percentile(self.data, 2)
968 assert cmap_params["vmax"] == np.percentile(self.data, 98)
969 assert cmap_params["cmap"] == "viridis"
970 assert cmap_params["extend"] == "both"
971 assert cmap_params["levels"] is None
972 assert cmap_params["norm"] is None
973
974 def test_center(self) -> None:
975 cmap_params = _determine_cmap_params(self.data, center=0.5)

Callers

nothing calls this directly

Calls 1

_determine_cmap_paramsFunction · 0.90

Tested by

no test coverage detected