Histogram
Histogram( sequence: Any = None, np_histogram: tuple | None = None, num_bins: int = 64) -> NoneWraps histogram data for logging. Compatible with wandb.Histogram.
Pass either a raw sequence (list, array) which is binned automatically, or a pre-computed numpy histogram tuple.
Parameters
Section titled “Parameters”sequence— Any array-like data (list, numpy array, etc.). Automatically binned intonum_binsbins usingnumpy.histogram.np_histogram— Pre-computed histogram as a(counts, bin_edges)tuple, matching the output ofnumpy.histogram().num_bins— Number of bins when computing fromsequence. Default 64. Capped atMAX_BINS(512).
Attributes
Section titled “Attributes”counts— List of bin counts.bin_edges— List of bin edges (length =len(counts) + 1).
Raises
Section titled “Raises”ValueError— If neithersequencenornp_histogramis provided, or ifbin_edgeslength doesn’t matchcountslength + 1.