Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideTisi committed Jun 19, 2024
1 parent 63538eb commit 00a2061
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions python/metatensor-operations/metatensor/operations/sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,10 @@ def sort_block(
... )
>>> # samples (first dimension of the array) are sorted
>>> block_sorted_2_sample.values
array([[3, 4, 5],
[9,10,11],
[0, 1, 2],
[6, 7, 8],
])
array([[ 3, 4, 5],
[ 9, 10, 11],
[ 0, 1, 2],
[ 6, 7, 8]])
>>> # This function can also sort gradients:
>>> sorted_block.add_gradient(
... parameter="g",
Expand Down

0 comments on commit 00a2061

Please sign in to comment.