Operations¶
The Python API for metatensor also provides functions which operate on
TensorMap
, TensorBlock
, and Labels
and can
be used to build your own machine learning models. These operations are provided
in the metatensor-operations
python package, which is installed by default
when doing pip install metatensor
.
The operations are implemented in Python, and handle the extra metadata
(including sparsity and gradients) of metatensor. Actual manipulations of the
data itself will call the corresponding functions from numpy or PyTorch,
depending on how the arrays are stored in the various TensorBlock
.
The list of all operations currently implemented is available in the API reference below. If you need any other operation, please open an issue!