load_joblib
- pyhelpers.store.load_joblib(path_to_joblib, verbose=False, **kwargs)
Load data from a joblib file.
- Parameters
path_to_joblib (str or os.PathLike[str]) – path where a joblib file is saved
verbose (bool or int) – whether to print relevant information in console, defaults to
False
kwargs – [optional] parameters of joblib.load
- Returns
data retrieved from the specified path
path_to_joblib
- Return type
any
Note
Example data can be referred to the function
pyhelpers.store.save_joblib()
.
Examples:
>>> from pyhelpers.store import load_joblib >>> from pyhelpers.dirs import cd >>> joblib_pathname = cd("tests\data", "dat.joblib") >>> joblib_dat = load_joblib(joblib_pathname, verbose=True) Loading "tests\data\dat.joblib" ... Done. >>> joblib_dat array([[0.5488135 , 0.71518937, 0.60276338, ..., 0.02010755, 0.82894003, 0.00469548], [0.67781654, 0.27000797, 0.73519402, ..., 0.25435648, 0.05802916, 0.43441663], [0.31179588, 0.69634349, 0.37775184, ..., 0.86219152, 0.97291949, 0.96083466], ..., [0.89111234, 0.26867428, 0.84028499, ..., 0.5736796 , 0.73729114, 0.22519844], [0.26969792, 0.73882539, 0.80714479, ..., 0.94836806, 0.88130699, 0.1419334 ], [0.88498232, 0.19701397, 0.56861333, ..., 0.75842952, 0.02378743, 0.81357508]])