photonpacket.bincountnd module

photonpacket.bincountnd.bincount2d(array, shape)[source]
photonpacket.bincountnd.bincountnd(array, shape)[source]

Multidimensional histogram

arraynumpy.ndarray

2D array, first dimension being the coordinates, second subsequent counts

shapetuple of ints

list of sizes of dimensions

Returns
histogramnumpy.ndarray

histogram of counts

Notes

The behaviour of this function mimics numpy.bincount() in many dimensions.