Skip to content

Commit

Permalink
fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
HDembinski committed Sep 15, 2024
1 parent f6945be commit 3026eda
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/iminuit/ipywidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from iminuit.util import _guess_initial_step
import numpy as np
from typing import Dict, Any, Callable
import sys

with warnings.catch_warnings():
# ipywidgets produces deprecation warnings through use of internal APIs :(
Expand Down Expand Up @@ -261,5 +262,5 @@ def reset(self, value, limits=None):
def _make_finite(x: float) -> float:
sign = -1 if x < 0 else 1
if abs(x) == np.inf:
return sign * np.finfo(float).max
return sign * sys.float_info.max
return x

0 comments on commit 3026eda

Please sign in to comment.