diff options
author | Melissa Weber Mendonça <melissawm@gmail.com> | 2021-02-10 16:21:47 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-10 16:21:47 -0300 |
commit | 7b0653cdd0d0a5ddcda061ee2eaf247f6303bc1e (patch) | |
tree | 8091f3c22e0f3a16f84bb2789ee6c5a57c82e65e | |
parent | 00f6ddb9881a9587c915b3db00fa6e99bd025bf3 (diff) | |
parent | 570710aafab435024ee17440fb3207740a0d39c2 (diff) | |
download | numpy-7b0653cdd0d0a5ddcda061ee2eaf247f6303bc1e.tar.gz |
Merge pull request #18344 from jamiebarker0310/histogram-binwidth-doc
DOC: Added sentence to docstring of histogram_bin_edges to explain bin width
-rw-r--r-- | numpy/lib/histograms.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/lib/histograms.py b/numpy/lib/histograms.py index 7af67a7ee..b6909bc1d 100644 --- a/numpy/lib/histograms.py +++ b/numpy/lib/histograms.py @@ -562,7 +562,8 @@ def histogram_bin_edges(a, bins=10, range=None, weights=None): below, :math:`h` is the binwidth and :math:`n_h` is the number of bins. All estimators that compute bin counts are recast to bin width using the `ptp` of the data. The final bin count is obtained from - ``np.round(np.ceil(range / h))``. + ``np.round(np.ceil(range / h))``. The final bin width is often less + than what is returned by the estimators below. 'auto' (maximum of the 'sturges' and 'fd' estimators) A compromise to get a good value. For small datasets the Sturges |