Serialization#
- metatensor.torch.save(path: str, tensor: TensorMap)[source]#
Save the given
TensorMap
to a file atpath
.TensorMap
are serialized using numpy’s.npz
format, i.e. a ZIP file without compression (storage method isSTORED
), where each file is stored as a.npy
array. See the C API documentation for more information on the format.
- metatensor.torch.load(path: str) TensorMap [source]#
Load a previously saved
TensorMap
from the given path.TensorMap
are serialized using numpy’s.npz
format, i.e. a ZIP file without compression (storage method isSTORED
), where each file is stored as a.npy
array. See the C API documentation for more information on the format.