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

Function _nanquantile_unchecked

numpy/lib/nanfunctions.py:1549–1570  ·  view source on GitHub ↗

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,
)

Source from the content-addressed store, hash-verified

1547
1548
1549def _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
1573def _nanquantile_ureduce_func(a, q, axis=None, out=None, overwrite_input=False,

Callers 2

nanpercentileFunction · 0.85
nanquantileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected