load_bunch#
- orbit.bunch_utils.load_bunch(input_dir, Handler=<class 'orbit.bunch_utils.serialize.NumPyHandler'>)[source]#
Loads the bunch attributes from a specified directory containing NumPy binary files.
- Parameters
input_dir (str | os.PathLike) – The directory from which to load the bunch data files.
Handler (FileHandler, optional) – The file handler class to use for reading the bunch data (default: NumPyHandler). See orbit.bunch_utils.file_handler for available handlers.
- Returns
A dictionary containing the loaded bunch attributes.
- Return type
- Raises
FileNotFoundError – If the required files are not found in the specified directory.
TypeError – If an attribute in the loaded bunch has an unsupported type.