Skip to content

Commit

Permalink
Replace deprecated np.NaN with np.nan
Browse files Browse the repository at this point in the history
np.NaN will be removed in NumPy 2.0.
  • Loading branch information
EwoutH authored May 24, 2024
1 parent 712807e commit e9c2040
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ema_workbench/analysis/prim.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit e9c2040

Please sign in to comment.