MCPcopy
hub / github.com/numpy/numpy / find_cdf_1d

Function find_cdf_1d

numpy/lib/_function_base_impl.py:4877–4883  ·  view source on GitHub ↗
(arr, cdf)

Source from the content-addressed store, hash-verified

4875 cdf[cdf == 0] = -1
4876
4877 def find_cdf_1d(arr, cdf):
4878 indices = np.searchsorted(cdf, quantiles, side="left")
4879 # We might have reached the maximum with i = len(arr), e.g. for
4880 # quantiles = 1, and need to cut it to len(arr) - 1.
4881 indices = minimum(indices, values_count - 1)
4882 result = take(arr, indices, axis=0)
4883 return result
4884
4885 r_shape = arr.shape[1:]
4886 if quantiles.ndim > 0:

Callers 1

_quantileFunction · 0.85

Calls 1

takeFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…