MCPcopy Create free account
hub / github.com/numpy/numpy / _quantile_is_valid

Function _quantile_is_valid

numpy/lib/function_base.py:4565–4574  ·  view source on GitHub ↗
(q)

Source from the content-addressed store, hash-verified

4563
4564
4565def _quantile_is_valid(q):
4566 # avoid expensive reductions, relevant for arrays with < O(1000) elements
4567 if q.ndim == 1 and q.size < 10:
4568 for i in range(q.size):
4569 if not (0.0 <= q[i] <= 1.0):
4570 return False
4571 else:
4572 if not (np.all(0 <= q) and np.all(q <= 1)):
4573 return False
4574 return True
4575
4576
4577def _check_interpolation_as_method(method, interpolation, fname):

Callers 2

percentileFunction · 0.85
quantileFunction · 0.85

Calls 1

allMethod · 0.45

Tested by

no test coverage detected