MCPcopy
hub / github.com/numpy/numpy / _quantile_is_valid

Function _quantile_is_valid

numpy/lib/_function_base_impl.py:4534–4542  ·  view source on GitHub ↗
(q)

Source from the content-addressed store, hash-verified

4532
4533
4534def _quantile_is_valid(q):
4535 # avoid expensive reductions, relevant for arrays with < O(1000) elements
4536 if q.ndim == 1 and q.size < 10:
4537 for i in range(q.size):
4538 if not (0.0 <= q[i] <= 1.0):
4539 return False
4540 elif not (q.min() >= 0 and q.max() <= 1):
4541 return False
4542 return True
4543
4544
4545def _compute_virtual_index(n, quantiles, alpha: float, beta: float):

Callers 2

percentileFunction · 0.85
quantileFunction · 0.85

Calls 2

minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…