Quick Intro

pygram11 currently provides four simple functions for histogramming.

pygram11.fix1d(x[, bins, range, weights, omp]) histogram x with fixed (uniform) binning
pygram11.var1d(x, bins[, weights, omp]) histogram x with variable (non-uniform) binning
pygram11.fix2d(x, y[, bins, range, weights, omp]) histogram the x, y data with fixed (uniform) binning in two dimensions
pygram11.var2d(x, y, xbins, ybins[, …]) histogram the x and y data with variable width binning in two dimensions

You’ll see there are a number of types of histograms supported by pygram11. For each of the four generic types, one can build a weighted or unweighted histogram. The weighted histograms always return the sum of weights squared in each bin.

Histogramming a normal distribution:

>>> h = pygram11.fix1d(np.random.randn(10000), bins=25, range=(-3, 3))

See the API reference for more examples.