Skip to main content

Histogram

wandb class for histograms.

Histogram(
sequence: Optional[Sequence] = None,
np_histogram: Optional['NumpyHistogram'] = None,
num_bins: int = 64
) -> None

This object works just like numpy's histogram function https://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram.html

Examples:โ€‹

Generate histogram from a sequence

wandb.Histogram([1, 2, 3])

Efficiently initialize from np.histogram.

hist = np.histogram(data)
wandb.Histogram(np_histogram=hist)
Arguments
sequence(array_like) input data for histogram
np_histogram(numpy histogram) alternative input of a precomputed histogram
num_bins(int) Number of bins for the histogram. The default number of bins is 64. The maximum number of bins is 512
Attributes
bins([float]) edges of bins
histogram([int]) number of elements falling in each bin
Class Variables
MAX_LENGTH512
Was this page helpful?๐Ÿ‘๐Ÿ‘Ž