Commit 231f35dc authored by dboe's avatar dboe
Browse files

legacy test working on TensorMaps

parent 956ca8e0
......@@ -153,6 +153,7 @@ class AbstractObject(object):
"""
content_dict = self._as_dict()
content_dict['tfields_version'] = tfields.__version__
np.savez(path, **content_dict)
@classmethod
......@@ -165,7 +166,9 @@ class AbstractObject(object):
# wheter we could avoid pickling (potential security issue)
load_kwargs.setdefault('allow_pickle', True)
np_file = np.load(path, **load_kwargs)
return cls._from_dict(dict(np_file))
d = dict(np_file)
d.pop('tfields_version', None)
return cls._from_dict(d)
def _args(self) -> tuple:
return tuple()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment