deerlab.read_pickle#

read_pickle(filename)[source]#

Load a pickled object file .pkl and deserialize the bytes into a Python object.

Parameters:
filenamestring

Path to the .pkl file to load.

Returns:
object

The deserialized Python object.

Warning

It is possible to construct malicious pickle data which will execute arbitrary code during unpickling. Never unpickle data that could have come from an untrusted source, or that could have been tampered with. See here for more information. ..