summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2020-03-28 22:08:05 +0300
committerGitHub <noreply@github.com>2020-03-28 22:08:05 +0300
commit243dc1e90e59daf18b17a6a1ebb705cc7bc66e92 (patch)
treeaef2ae0c8fadcca1ce6eee19778b6f5fa175809a /numpy
parent22356fc0ec8ca50aeb8f40633f7c7d906a648ab8 (diff)
parent56baf827dcb12d79cce68970abffcb96431b5dc8 (diff)
downloadnumpy-243dc1e90e59daf18b17a6a1ebb705cc7bc66e92.tar.gz
Merge pull request #15854 from rossbar/hist-docstring
DOC: Fix docstring for _hist_bin_auto.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/lib/histograms.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/numpy/lib/histograms.py b/numpy/lib/histograms.py
index 5358c6846..32d7df117 100644
--- a/numpy/lib/histograms.py
+++ b/numpy/lib/histograms.py
@@ -229,21 +229,21 @@ def _hist_bin_fd(x, range):
def _hist_bin_auto(x, range):
"""
Histogram bin estimator that uses the minimum width of the
- Freedman-Diaconis and Sturges estimators if the FD bandwidth is non zero
- and the Sturges estimator if the FD bandwidth is 0.
+ Freedman-Diaconis and Sturges estimators if the FD bin width is non-zero.
+ If the bin width from the FD estimator is 0, the Sturges estimator is used.
The FD estimator is usually the most robust method, but its width
estimate tends to be too large for small `x` and bad for data with limited
variance. The Sturges estimator is quite good for small (<1000) datasets
- and is the default in the R language. This method gives good off the shelf
+ and is the default in the R language. This method gives good off-the-shelf
behaviour.
.. versionchanged:: 1.15.0
If there is limited variance the IQR can be 0, which results in the
FD bin width being 0 too. This is not a valid bin width, so
``np.histogram_bin_edges`` chooses 1 bin instead, which may not be optimal.
- If the IQR is 0, it's unlikely any variance based estimators will be of
- use, so we revert to the sturges estimator, which only uses the size of the
+ If the IQR is 0, it's unlikely any variance-based estimators will be of
+ use, so we revert to the Sturges estimator, which only uses the size of the
dataset in its calculation.
Parameters