Skip to content

Commit 5e57351

Browse files
Fix JAX deprecation warning
1 parent dac8620 commit 5e57351

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

diffrax/_global_interpolation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def _interpret_t(
4040
) -> tuple[IntScalarLike, RealScalarLike]:
4141
maxlen = self.ts_size - 2
4242
index = jnp.searchsorted(self.ts, t, side="left" if left else "right")
43-
index = jnp.clip(index - 1, a_min=0, a_max=maxlen)
43+
index = jnp.clip(index - 1, min=0, max=maxlen)
4444
# Will never access the final element of `ts`; this is correct behaviour.
4545
fractional_part = t - self.ts[index]
4646
return index, fractional_part

diffrax/_step_size_controller/adaptive.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,8 +602,8 @@ def _scale(_y0, _y1_candidate, _y_error):
602602
factormin = jnp.where(keep_step, 1, self.factormin)
603603
factor = jnp.clip(
604604
self.safety * factor1 * factor2 * factor3,
605-
a_min=factormin,
606-
a_max=self.factormax,
605+
min=factormin,
606+
max=self.factormax,
607607
)
608608
# Once again, see above. In case we have gradients on {i,p,d}coeff.
609609
# (Probably quite common for them to have zero tangents if passed across

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ classifiers = [
2323
"Topic :: Scientific/Engineering :: Mathematics",
2424
]
2525
urls = {repository = "https://github.com/patrick-kidger/diffrax" }
26-
dependencies = ["jax>=0.4.23", "jaxtyping>=0.2.24", "typing_extensions>=4.5.0", "typeguard==2.13.3", "equinox>=0.11.2", "lineax>=0.0.5", "optimistix>=0.0.7"]
26+
dependencies = ["jax>=0.4.28", "jaxtyping>=0.2.24", "typing_extensions>=4.5.0", "typeguard==2.13.3", "equinox>=0.11.2", "lineax>=0.0.5", "optimistix>=0.0.7"]
2727

2828
[build-system]
2929
requires = ["hatchling"]

0 commit comments

Comments
 (0)