From 527cdc1534d74d6ba6e62cfe0d22ebfb35107f72 Mon Sep 17 00:00:00 2001 From: Henrik Finsberg Date: Sun, 4 Aug 2024 14:01:24 +0200 Subject: [PATCH] Fix float_ --- demo/beeler_reuter/beeler_reuter_1977_version06.py | 8 ++++---- src/ap_features/features.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/demo/beeler_reuter/beeler_reuter_1977_version06.py b/demo/beeler_reuter/beeler_reuter_1977_version06.py index 8a277ee..e9390d7 100644 --- a/demo/beeler_reuter/beeler_reuter_1977_version06.py +++ b/demo/beeler_reuter/beeler_reuter_1977_version06.py @@ -15,7 +15,7 @@ def init_state_values(**values): # V=-84.624 init_values = np.array( [0.011, 0.988, 0.975, 0.0001, 0.003, 0.994, 0.0001, -84.624], - dtype=np.float_, + dtype=np.float64, ) # State indices and limit checker @@ -53,7 +53,7 @@ def init_parameter_values(**values): # IstimStart=10.0, C=0.01 init_values = np.array( [50.0, 0.04, 3e-05, 0.0009, 0.5, 50000.0, 1000.0, 1.0, 10.0, 0.01], - dtype=np.float_, + dtype=np.float64, ) # Parameter indices and limit checker @@ -213,7 +213,7 @@ def rhs(t, states, parameters, values=None): # Init return args if values is None: - values = np.zeros((8,), dtype=np.float_) + values = np.zeros((8,), dtype=np.float64) else: assert isinstance(values, np.ndarray) and values.shape == (8,) @@ -331,7 +331,7 @@ def monitor(states, t, parameters, monitored=None): # Init return args if monitored is None: - monitored = np.zeros((26,), dtype=np.float_) + monitored = np.zeros((26,), dtype=np.float64) else: assert isinstance(monitored, np.ndarray) and monitored.shape == (26,) diff --git a/src/ap_features/features.py b/src/ap_features/features.py index 000f7b9..862865a 100644 --- a/src/ap_features/features.py +++ b/src/ap_features/features.py @@ -183,7 +183,7 @@ def apd( assert backend in Backend.__members__ - if isinstance(factor, (float, np.float_)) and 0 < factor < 1: + if isinstance(factor, (float, np.float64)) and 0 < factor < 1: # Factor should be multiplied with 100 factor = int(factor * 100) _check_factor(factor)