Skip to content

Commit

Permalink
Fix quantile
Browse files Browse the repository at this point in the history
  • Loading branch information
wesselb committed May 20, 2022
1 parent 3d736a2 commit d7a1517
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lab/numpy/generic.py
Expand Up @@ -331,4 +331,8 @@ def argsort(a: Numeric, axis: Int = -1, descending: bool = False):

@dispatch
def quantile(a: Numeric, q: Numeric, axis: Union[Int, None] = None):
return np.quantile(a, q, axis=axis, method="linear")
if tuple(map(int, np.__version__.split("."))) >= (1, 22): # pragma: no cover
method = {"method": "linear"}
else: # pragma: no cover
method = {"interpolation": "linear"}
return np.quantile(a, q, axis=axis, **method)

0 comments on commit d7a1517

Please sign in to comment.