From cbf60836b2723cee886a4728dadfd7534a483ab0 Mon Sep 17 00:00:00 2001 From: Mario Picciani Date: Wed, 4 Dec 2024 17:16:53 +0100 Subject: [PATCH] ignore errors in ic50_calculation --- drevalpy/datasets/curvecurator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drevalpy/datasets/curvecurator.py b/drevalpy/datasets/curvecurator.py index b7711f7..9db6791 100644 --- a/drevalpy/datasets/curvecurator.py +++ b/drevalpy/datasets/curvecurator.py @@ -126,7 +126,8 @@ def _calc_ic50(model_params_df: pd.DataFrame): """ def ic50(front, back, slope, pec50): - return (np.log10((front - back) / (0.5 + back)) - slope * pec50) / slope + with np.errstate(invalid="ignore"): + return (np.log10((front - back) / (0.5 + back)) - slope * pec50) / slope front = model_params_df["Front"].values back = model_params_df["Back"].values