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