Fix rendering and codacy

This commit is contained in:
FilippoOlivo
2025-03-14 15:05:16 +01:00
parent 436b227809
commit 194f5d24c4
8 changed files with 98 additions and 96 deletions

View File

@@ -216,10 +216,10 @@ class LabelTensor(torch.Tensor):
def extract(self, labels_to_extract):
"""
Extract the subset of the original tensor by returning all the positions
corresponding to the passed ``label_to_extract``. If ``label_to_extract``
is a dictionary, the keys are the dimension names and the values are the
labels to extract. If a single label or a list of labels is passed, the
last dimension is considered.
corresponding to the passed ``label_to_extract``. If
``label_to_extract`` is a dictionary, the keys are the dimension names
and the values are the labels to extract. If a single label or a list
of labels is passed, the last dimension is considered.
:Example:
>>> from pina import LabelTensor