Assumes that q is in [0, 1], and is an ndarray
(
a,
q,
axis=None,
out=None,
overwrite_input=False,
method="linear",
keepdims=np._NoValue,
)
| 1547 | |
| 1548 | |
| 1549 | def _nanquantile_unchecked( |
| 1550 | a, |
| 1551 | q, |
| 1552 | axis=None, |
| 1553 | out=None, |
| 1554 | overwrite_input=False, |
| 1555 | method="linear", |
| 1556 | keepdims=np._NoValue, |
| 1557 | ): |
| 1558 | """Assumes that q is in [0, 1], and is an ndarray""" |
| 1559 | # apply_along_axis in _nanpercentile doesn't handle empty arrays well, |
| 1560 | # so deal them upfront |
| 1561 | if a.size == 0: |
| 1562 | return np.nanmean(a, axis, out=out, keepdims=keepdims) |
| 1563 | return function_base._ureduce(a, |
| 1564 | func=_nanquantile_ureduce_func, |
| 1565 | q=q, |
| 1566 | keepdims=keepdims, |
| 1567 | axis=axis, |
| 1568 | out=out, |
| 1569 | overwrite_input=overwrite_input, |
| 1570 | method=method) |
| 1571 | |
| 1572 | |
| 1573 | def _nanquantile_ureduce_func(a, q, axis=None, out=None, overwrite_input=False, |
no outgoing calls
no test coverage detected