From 9d6600b487325b8843a67a90522a14a962246e72 Mon Sep 17 00:00:00 2001 From: James Nightingale Date: Thu, 18 Jan 2024 09:15:16 +0000 Subject: [PATCH] log colorbars now use nanmin / nanmax to avoid nans causing error --- autoarray/plot/wrap/base/cmap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoarray/plot/wrap/base/cmap.py b/autoarray/plot/wrap/base/cmap.py index 3aabeecd..6f7c5fb7 100644 --- a/autoarray/plot/wrap/base/cmap.py +++ b/autoarray/plot/wrap/base/cmap.py @@ -50,12 +50,12 @@ def symmetric_cmap_from(self, symmetric_value=None): def vmin_from(self, array: np.ndarray): if self.config_dict["vmin"] is None: - return np.min(array) + return np.nanmin(array) return self.config_dict["vmin"] def vmax_from(self, array: np.ndarray): if self.config_dict["vmax"] is None: - return np.max(array) + return np.nanmax(array) return self.config_dict["vmax"] def norm_from(self, array: np.ndarray, use_log10: bool = False) -> object: