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

Function _nanquantile_1d

numpy/lib/nanfunctions.py:1597–1609  ·  view source on GitHub ↗

Private function for rank 1 arrays. Compute quantile ignoring NaNs. See nanpercentile for parameter usage

(arr1d, q, overwrite_input=False, method="linear")

Source from the content-addressed store, hash-verified

1595
1596
1597def _nanquantile_1d(arr1d, q, overwrite_input=False, method="linear"):
1598 """
1599 Private function for rank 1 arrays. Compute quantile ignoring NaNs.
1600 See nanpercentile for parameter usage
1601 """
1602 arr1d, overwrite_input = _remove_nan_1d(arr1d,
1603 overwrite_input=overwrite_input)
1604 if arr1d.size == 0:
1605 # convert to scalar
1606 return np.full(q.shape, np.nan, dtype=arr1d.dtype)[()]
1607
1608 return function_base._quantile_unchecked(
1609 arr1d, q, overwrite_input=overwrite_input, method=method)
1610
1611
1612def _nanvar_dispatcher(a, axis=None, dtype=None, out=None, ddof=None,

Callers 1

Calls 1

_remove_nan_1dFunction · 0.85

Tested by

no test coverage detected