def load(filename, mmap_mode=None):
"""Reconstruct a Python object from a file persisted with joblib.dump."""
f = open(filename, 'rb')
fobj = _read_fileobject(f, filename, mmap_mode)
if isinstance(fobj, (str, unicode)):
return load_compatibility(fobj)
obj = _unpickle(fobj, filename, mmap_mode)
return obj
评论列表
文章目录