Added allow_pickle in autosave_data
This commit is contained in:
parent
93686c1361
commit
36eddfff1c
@ -126,7 +126,7 @@ def save_data(filename, checksum, data):
|
|||||||
def load_data(filename):
|
def load_data(filename):
|
||||||
"""Load data from a npz file."""
|
"""Load data from a npz file."""
|
||||||
notify('Loading result from file: {}'.format(filename))
|
notify('Loading result from file: {}'.format(filename))
|
||||||
fdata = np.load(filename)
|
fdata = np.load(filename, alloe_pickle=True)
|
||||||
if 'data' in fdata:
|
if 'data' in fdata:
|
||||||
return fdata['data']
|
return fdata['data']
|
||||||
else:
|
else:
|
||||||
@ -171,7 +171,7 @@ def autosave_data(nargs, kwargs_keys=None, version=None):
|
|||||||
|
|
||||||
filename = get_filename(function, csum, description, *relevant_args)
|
filename = get_filename(function, csum, description, *relevant_args)
|
||||||
if autoload and (verify_file(filename, csum) or verify_file(filename, legacy_csum)):
|
if autoload and (verify_file(filename, csum) or verify_file(filename, legacy_csum)):
|
||||||
result = load_data(filename, allow_pickle)
|
result = load_data(filename)
|
||||||
else:
|
else:
|
||||||
result = function(*args, **kwargs)
|
result = function(*args, **kwargs)
|
||||||
save_data(filename, csum, result)
|
save_data(filename, csum, result)
|
||||||
|
Loading…
Reference in New Issue
Block a user