(index, gamma_condition_fun)
| 4669 | |
| 4670 | |
| 4671 | def _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 | |
| 4685 | def _closest_observation(n, quantiles): |
no test coverage detected