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

Function _discret_interpolation_to_boundaries

numpy/lib/function_base.py:4671–4682  ·  view source on GitHub ↗
(index, gamma_condition_fun)

Source from the content-addressed store, hash-verified

4669
4670
4671def _discret_interpolation_to_boundaries(index, gamma_condition_fun):
4672 previous = np.floor(index)
4673 next = previous + 1
4674 gamma = index - previous
4675 res = _get_gamma_mask(shape=index.shape,
4676 default_value=next,
4677 conditioned_value=previous,
4678 where=gamma_condition_fun(gamma, index)
4679 ).astype(np.intp)
4680 # Some methods can lead to out-of-bound integers, clip them:
4681 res[res < 0] = 0
4682 return res
4683
4684
4685def _closest_observation(n, quantiles):

Callers 2

_closest_observationFunction · 0.85
_inverted_cdfFunction · 0.85

Calls 2

_get_gamma_maskFunction · 0.85
astypeMethod · 0.80

Tested by

no test coverage detected