Skip to content
masterclass Buddy

NumPy · Function

np.histogram

Compute a histogram from data. It returns values for the bins and the bin edges.

Last updated

Syntax

numpy.histogram(a, bins=10, range=None, density=None, weights=None)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • numpy.histogramdd
  • numpy.bincount
  • numpy.searchsorted
  • numpy.digitize
  • numpy.histogram_bin_edges

Source: numpy.histogram — NumPy v2.5 Manual. Checked 2026-11-03.