From 66d41150cc5d264eb72306b9ed5ca6c812754de1 Mon Sep 17 00:00:00 2001 From: Lorenzo Squadrani Date: Mon, 18 May 2026 13:11:51 +0200 Subject: [PATCH 1/2] fixed solver_gate.save_exp issue with new JAX versions (keyword a_max from jnp.clip was deprecated) --- jaxley/solver_gate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jaxley/solver_gate.py b/jaxley/solver_gate.py index 62cede8c3..9bf34628f 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) From 06d0766de0367dd73a4c699401829632953f4699 Mon Sep 17 00:00:00 2001 From: Lorenzo Squadrani Date: Wed, 20 May 2026 10:19:39 +0200 Subject: [PATCH 2/2] update CHANGELOG.md for save_exp fix --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe59cedb1..6c3343111 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