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,
weights=None,
weak_q=False,
)
| 1575 | |
| 1576 | |
| 1577 | def _nanquantile_unchecked( |
| 1578 | a, |
| 1579 | q, |
| 1580 | axis=None, |
| 1581 | out=None, |
| 1582 | overwrite_input=False, |
| 1583 | method="linear", |
| 1584 | keepdims=np._NoValue, |
| 1585 | weights=None, |
| 1586 | weak_q=False, |
| 1587 | ): |
| 1588 | """Assumes that q is in [0, 1], and is an ndarray""" |
| 1589 | # apply_along_axis in _nanpercentile doesn't handle empty arrays well, |
| 1590 | # so deal them upfront |
| 1591 | if a.size == 0: |
| 1592 | return np.nanmean(a, axis, out=out, keepdims=keepdims) |
| 1593 | return fnb._ureduce(a, |
| 1594 | func=_nanquantile_ureduce_func, |
| 1595 | q=q, |
| 1596 | weights=weights, |
| 1597 | keepdims=keepdims, |
| 1598 | axis=axis, |
| 1599 | out=out, |
| 1600 | overwrite_input=overwrite_input, |
| 1601 | method=method, |
| 1602 | weak_q=weak_q) |
| 1603 | |
| 1604 | |
| 1605 | def _nanquantile_ureduce_func( |
no outgoing calls
no test coverage detected
searching dependent graphs…