From b41c16b3bae544025a331506f456dc38e8f517bf Mon Sep 17 00:00:00 2001 From: Ewout ter Hoeven Date: Fri, 24 May 2024 15:34:47 +0200 Subject: [PATCH] Replace deprecated np.NaN with np.nan (#361) np.NaN will be removed in NumPy 2.0. --- ema_workbench/analysis/prim.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ema_workbench/analysis/prim.py b/ema_workbench/analysis/prim.py index 15798e926..aac1ea023 100644 --- a/ema_workbench/analysis/prim.py +++ b/ema_workbench/analysis/prim.py @@ -499,7 +499,7 @@ def _inspect_data(self, i, uncs, qp_values): for unc in uncs: values = self.box_lims[i][unc] box_lim.loc[unc] = values.values.tolist() + qp_values[unc] - box_lim.iloc[:, 2::] = box_lim.iloc[:, 2::].replace(-1, np.NaN) + box_lim.iloc[:, 2::] = box_lim.iloc[:, 2::].replace(-1, np.nan) return stats, box_lim @@ -968,7 +968,7 @@ def _calculate_quasi_p(self, i, restricted_dims): # TODO:: this has knock on consequences # TODO:: elsewhere in the code (e.g. all box visualizations # TODO:: as well as in CART etc.) - # qp_values = qp_values.replace(-1, np.NaN) + # qp_values = qp_values.replace(-1, np.nan) qp_values = qp_values.to_dict(orient="list") return qp_values