This is a pre-release version (latest). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy latest / numpy / lib / _histograms_impl / _hist_bin_sturges

function

numpy.lib._histograms_impl:_hist_bin_sturges

source: build-install/usr/lib/python3.14/site-packages/numpy/lib/_histograms_impl.py :53

Signature

def   _hist_bin_sturges ( x range )

Summary

Sturges histogram bin estimator.

Extended Summary

A very simplistic estimator based on the assumption of normality of the data. This estimator has poor performance for non-normal data, which becomes especially obvious for large data sets. The estimate depends only on size of the data.

Parameters

x : array_like

Input data that is to be histogrammed, trimmed to range. May not be empty.

Returns

h : An estimate of the optimal bin width for the given data.

Aliases

  • numpy.lib._histograms_impl._hist_bin_sturges