Skip to content

Commit

Permalink
MAINT: Avoid creating an intermediate array in np.quantile (numpy#24610)
Browse files Browse the repository at this point in the history
* MAINT: Avoid creating of intermediate array in np.quantile

* whitespace
  • Loading branch information
eendebakpt committed Sep 6, 2023
1 parent 2f0bd6e commit da8cdcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion numpy/lib/_function_base_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -4493,7 +4493,7 @@ def _quantile_is_valid(q):
if not (0.0 <= q[i] <= 1.0):
return False
else:
if not (np.all(0 <= q) and np.all(q <= 1)):
if not (q.min() >= 0 and q.max() <= 1):
return False
return True

Expand Down

0 comments on commit da8cdcf

Please sign in to comment.