Changelog¶
All notable changes to metatensor-operations are documented here, following the keep a changelog format. This project follows Semantic Versioning.
Unreleased¶
Added¶
join_blocks, to join multiple blocks along samples or properties, with similar semantics tojoin
Changed¶
joinwas rewritten and made faster. As part of this, we had to change the API:sort_samplesis not an option anymore, andremove_tensor_name: boolwas replaced byadd_dimension: Optional[str]=None. You can setadd_dimension="tensor"to get the old behavior ofremove_tensor_name=False. The new default behavior is to not add extra dimensions, and fail if the resulting samples or properties are not unique.
Version 0.3.4 - 2025-07-28¶
Fixed¶
insert_dimensionno longer fails when called on empty TensorMap (#924)
Added¶
equal_metadatanow takes acheck_gradients=True/Falseflag to enable or disable metadata checks on the gradients (#948)
Version 0.3.3 - 2025-04-25¶
Fixed¶
Changed the implementation of
std_over_samplesandvar_over_samplesto reduce numerical noise issues when working with float32 (#908)Make sure the filtered
TensorMaphas keys in the same order as the filter infilter_blocks(#885)Make the code compatible with metatensor-torch v0.7.6
Version 0.3.2 - 2025-02-18¶
Fixed¶
mean_over_sampleswas not computing the correct mean
Version 0.3.1 - 2025-02-04¶
Added¶
Added a new
filter_blocksfunction to remove some blocks from a TensorMap according to a selection (#823)
Fixed¶
Fixed the
sortfunction when dealing with empty blocks (#840)
Version 0.3.0 - 2024-10-29¶
Changed¶
axis="components"can now be passed tometatensor.operations.rename_dimension(#763)split,split_block,sliceandslice_blockhave been updated to accept a list of integer directly specifying which samples/properties to keep in the output. The corresponding parameter has been renamed toselectionorselections(forsliceandsplitrespectively) (#772)
Version 0.2.4 - 2024-10-11¶
Changed¶
block_from_arraynow takes optional parameters to specify the names of sample, component and property dimensions
Version 0.2.3 - 2024-08-28¶
Changed¶
We now require Python >= 3.9
sliceanddrop_blocksare now faster thanks toLabels.select
Version 0.2.2 - 2024-06-19¶
Fixed¶
Fixed a bug in
metatensor.torch.sortwhere the labels where not properly sorted (#647)Fix
metatensor.abswhen used with complex values (#553)
Version 0.2.1 - 2024-03-01¶
Changed¶
Use
torch.jit.scriptby default on all operations when using the TorchScript backend (i.e.metatensor.torch) (#504)
Version 0.2.0 - 2024-02-07¶
Changed¶
join()operation now includes thesort_samplesargument to control the sorting of samples in the output joined TensorMap. This defaults to False, opposite to the previous default behaviour.
Added¶
detach()operation to detach all values in a TensorMap/TensorBlock from any computational graphrequires_grad()operation to set therequires_gradof all values in a TensorMap/TensorBlock when storing data in torch Tensors.
Removed¶
the
tooperation was removed. Similar functionality is now offered byTensorMap.to,TensorBlock.to, and the operationsdetach()andrequires_grad().
Version 0.1.0 - 2023-10-11¶
Added¶
Creation operations:
empty_like(),ones_like(),zeros_like(),random_like(),block_from_array();Linear algebra:
dot(),lstsq(),solve();Logic function:
allclose(),equal(),equal_metadata();Manipulation operations:
drop_blocks(),join(),manipulate dimension,one_hot(),remove_gradients(),samples reduction,slice(),split(),to();Mathematical functions:
abs(),add(),divide(),multiply(),pow(),subtract();Set operations:
unique_metadata(),sort();