Skip to content

Commit

Permalink
Fix float_
Browse files Browse the repository at this point in the history
  • Loading branch information
finsberg committed Aug 4, 2024
1 parent bcbab25 commit 527cdc1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions demo/beeler_reuter/beeler_reuter_1977_version06.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,)

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

Expand Down
2 changes: 1 addition & 1 deletion src/ap_features/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 527cdc1

Please sign in to comment.