Skip to content

Commit

Permalink
feat(backport): Use 'method' arg for jax.numpy.percentile (#2524)
Browse files Browse the repository at this point in the history
* Backport PR #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 <matthew.feickert@cern.ch>
  • Loading branch information
meeseeksmachine and matthewfeickert committed Jun 20, 2024
1 parent 47d5930 commit d23f5c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pyhf/tensor/jax_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d23f5c4

Please sign in to comment.