diff --git a/CHANGELOG.md b/CHANGELOG.md index fe59cedb..6c334311 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ Implements Brette et al. (2005), 'Adaptive exponential integrate-and-fire model - Fix issue causing some `View`s to take too long to create (#791, @alexpejovic) - Fix single point branch plotting with type="comp" (#797, @jnsbck) - jx.integrate took O(n^2) time with n compartments on the backwards pass. Instead of backpropagating through the forward solve, we now use a custom_jvp (another tridiagonal solve, which is O(n)) (#795 @manuelgloeckler) +- Fix compatibility with newer JAX versions by avoiding the deprecated `jnp.clip(..., a_max=...)` keyword in `solver_gate.save_exp` (#798, @lorenzosquadrani) # 0.13.0 diff --git a/jaxley/solver_gate.py b/jaxley/solver_gate.py index 62cede8c..9bf34628 100644 --- a/jaxley/solver_gate.py +++ b/jaxley/solver_gate.py @@ -6,7 +6,7 @@ def save_exp(x, max_value: float = 20.0): """Clip the input to a maximum value and return its exponential.""" - x = jnp.clip(x, a_max=max_value) + x = jnp.minimum(x, max_value) return jnp.exp(x)