adbin_hist1d_edges¶
-
hep_spt.
adbin_hist1d_edges
(arr, nbins=100, range=None, weights=None, is_sorted=False, reduce_bias=False)[source]¶ Create adaptive binned edges to make a histogram from the given data.
- Parameters
arr (numpy.ndarray) – array of data.
nbins (int) – number of bins. Must be greater than the length of the input array.
range (None or tuple(float, float)) – range of the histogram.
weights (numpy.ndarray) – optional array of weights.
is_sorted (bool) – whether the input sample is already sorted or not.
reduce_bias – if set to True, the array will be processed twice (backward and forward) to reduce any kind of bias produced. If no weights are provided, this is unnecessary, since the process is deterministic.
- Returns
Edges of the histogram, with size (nbins + 1).
- Return type
- Raises
ValueError – If the number of bins specified is greater than the length of the input array.
Note
The number of bins must be smaller than the length of the input array.
See also