From d23f5c4a6a4d262d6d7e3585714b23c1ff271bcf Mon Sep 17 00:00:00 2001 From: "Lumberbot (aka Jack)" <39504233+meeseeksmachine@users.noreply.github.com> Date: Wed, 19 Jun 2024 21:23:07 -0700 Subject: [PATCH] feat(backport): Use 'method' arg for jax.numpy.percentile (#2524) * Backport PR https://github.com/scikit-hep/pyhf/pull/2522. * Change the argument name in jax.numpy.percentile from 'interpolation' to 'method'. No change to the lower bounds on jax and jaxlib is required as 'method' already existed as an argument in jax v0.4.1. This just deprecates the use of 'interpolation'. Co-authored-by: Matthew Feickert --- src/pyhf/tensor/jax_backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyhf/tensor/jax_backend.py b/src/pyhf/tensor/jax_backend.py index 4ea2509c71..90c2f78f21 100644 --- a/src/pyhf/tensor/jax_backend.py +++ b/src/pyhf/tensor/jax_backend.py @@ -328,7 +328,7 @@ def percentile(self, tensor_in, q, axis=None, interpolation="linear"): .. versionadded:: 0.7.0 """ - return jnp.percentile(tensor_in, q, axis=axis, interpolation=interpolation) + return jnp.percentile(tensor_in, q, axis=axis, method=interpolation) def stack(self, sequence, axis=0): return jnp.stack(sequence, axis=axis)