From c409f492d9114e4c9e7b62b2cb1ce4f147f7ecc1 Mon Sep 17 00:00:00 2001 From: Tomas Stolker Date: Tue, 24 Sep 2024 20:02:43 +0200 Subject: [PATCH] Check if standard deviation is zero with np.isclose --- orbitize/plot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orbitize/plot.py b/orbitize/plot.py index 7832236a..52e1f30e 100644 --- a/orbitize/plot.py +++ b/orbitize/plot.py @@ -112,7 +112,7 @@ def plot_corner(results, param_list=None, **corner_kwargs): index_num = results.param_idx[label_key] # only plot non-fixed parameters - if np.std(results.post[:, index_num]) > 0: + if not np.isclose(0.0, np.std(results.post[:, index_num])): param_indices.append(index_num) if ( label_key.startswith("aop")