Documentation
Search…
wandb.data_types.Histogram
wandb class for histograms.
1
Histogram(
2
sequence: Optional[Sequence] = None,
3
np_histogram: Optional['NumpyHistogram'] = None,
4
num_bins: int = 64
5
) -> None
Copied!
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
1
wandb.Histogram([1,2,3])
Copied!
Efficiently initialize from np.histogram.
1
hist = np.histogram(data)
2
wandb.Histogram(np_histogram=hist)
Copied!
Arguments
Text
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
Text
bins
([float]) edges of bins
histogram
([int]) number of elements falling in each bin
Class Variables
Text
MAX_LENGTH
512
Copy link
Contents