NuRadioReco.utilities.io_utilities module

IO utilities for NuRadioReco/NuRadioMC

This module provides some pickling functions to allow for faster, numpy 2 cross-compatible pickled numpy arrays. This mostly happens ‘internally’, so end users normally do not need to use this module.

NuRadioReco.utilities.io_utilities.read_pickle(filename, encoding='latin1')[source]

Read in a pickle file and return the result This utility is supposed to provide compatibility for pickles created with different python versions. If a simple pickle.load fails, it will try to load the file with a specific encoding.

Parameters:
filename: string

Name of the pickle file to be opened

encoding: string

Encoding to be used if the first attempt to open the pickle fails