bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / stats / _stats_py / _histogram
function
scipy.stats._stats_py:_histogram
source: build-install/usr/lib/python3.14/site-packages/scipy/stats/_stats_py.py:2245
Signature
def _histogram(a, numbins = 10, defaultlimits = None, weights = None, *, density = False, cumulative = False)Summary
Create a histogram.
Extended Summary
Separate the range into several bins and return the number of instances in each bin.
Parameters
a: array_likeArray of scores which will be put into bins.
numbins: int, optionalThe number of bins to use for the histogram. Default is 10.
defaultlimits: tuple (lower, upper), optionalThe lower and upper values for the range of the histogram. If no value is given, a range slightly larger than the range of the values in a is used. Specifically
(a.min() - s, a.max() + s), wheres = (1/2)(a.max() - a.min()) / (numbins - 1).weights: array_like, optionalThe weights for each value in
a. Default is None, which gives each value a weight of 1.0
Returns
count: ndarrayNumber of points (or sum of weights) in each bin.
lowerlimit: floatLowest value of histogram, the lower limit of the first bin.
binsize: floatThe size of the bins (all bins have the same size).
extrapoints: intThe number of points outside the range of the histogram.
Notes
This histogram is based on numpy's histogram but has a larger range by default if default limits is not set.
See also
- numpy.histogram
Aliases
scipy.stats._stats_py._histogram