classmethod colliderscope.Histogram.from_json(fname: str | Path | IOBase, encoding: str = 'utf-8') Histogram

Instantiate a histogram from JSON file, encoded using the Histogram.to_json() method.

Changed in version 0.2.3: fname accepts file-like object.

Parameters:
fname : str or Path

Location on disk from which to load the data.

encoding : str

Standard used to encode the text into binary formats. Default is "utf-8".

Returns:

Instance loaded from JSON stored data.

Return type:

Histogram


Last update: Jun 27, 2025