From 1d1c9c70a138b8f71c53071280e792dc5822db6b Mon Sep 17 00:00:00 2001 From: Hans Dembinski Date: Fri, 28 Jul 2023 09:19:13 +0200 Subject: [PATCH] replace smallest by tiny to be compatible with older numpy versions --- src/iminuit/cost.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/iminuit/cost.py b/src/iminuit/cost.py index be8d7e4e..0f9bba49 100644 --- a/src/iminuit/cost.py +++ b/src/iminuit/cost.py @@ -113,12 +113,12 @@ class documentation for details. CHISQUARE = 1.0 NEGATIVE_LOG_LIKELIHOOD = 0.5 -_SMALLEST_NORMAL = np.finfo(float).smallest_normal +_TINY_FLOAT = np.finfo(float).tiny def _safe_log(x): # guard against x = 0 - return np.log(np.maximum(_SMALLEST_NORMAL, x)) + return np.log(np.maximum(_TINY_FLOAT, x)) def _unbinned_nll(x):