Skip to content

Commit b2b8c5b

Browse files
committed
Black formatting on LabelTensor
1 parent 9f504ee commit b2b8c5b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

pina/label_tensor.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ def cat(tensors, dim=0):
294294
concatenate
295295
:param int dim: dimensions on which you want to perform the operation
296296
(default is 0)
297-
:return: A new :class:`LabelTensor' instance obtained by concatenating
297+
:return: A new :class:`LabelTensor' instance obtained by concatenating
298298
the input instances, with the updated labels.
299299
300300
:rtype: LabelTensor
@@ -346,7 +346,7 @@ def stack(tensors):
346346
347347
:param list(LabelTensor) tensors: A list of tensors to stack.
348348
All tensors must have the same shape.
349-
:return: A new :class:`LabelTensor` instance obtained by stacking the
349+
:return: A new :class:`LabelTensor` instance obtained by stacking the
350350
input tensors, with the updated labels.
351351
:rtype: LabelTensor
352352
"""
@@ -368,7 +368,7 @@ def requires_grad_(self, mode=True):
368368
:param bool mode: A boolean value indicating whether the tensor should
369369
track gradients.If `True`, the tensor will track gradients;
370370
if `False`, it will not.
371-
:return: The :class:`LabelTensor` itself with the updated
371+
:return: The :class:`LabelTensor` itself with the updated
372372
`requires_grad` state and retained labels.
373373
:rtype: LabelTensor
374374
"""
@@ -394,7 +394,7 @@ def to(self, *args, **kwargs):
394394
Performs Tensor dtype and/or device conversion. For more details, see
395395
:meth:`torch.Tensor.to`.
396396
397-
:return: A new :class:`LabelTensor` instance with the updated dtype
397+
:return: A new :class:`LabelTensor` instance with the updated dtype
398398
and/or device and retained labels.
399399
:rtype: LabelTensor
400400
"""
@@ -408,7 +408,7 @@ def clone(self, *args, **kwargs):
408408
Clone the :class:`LabelTensor`. For more details, see
409409
:meth:`torch.Tensor.clone`.
410410
411-
:return: A new :class:`LabelTensor` instance with the same data and
411+
:return: A new :class:`LabelTensor` instance with the same data and
412412
labels but allocated in a different memory location.
413413
:rtype: LabelTensor
414414
"""
@@ -466,7 +466,7 @@ def vstack(label_tensors):
466466
"""
467467
Stack tensors vertically. For more details, see :meth:`torch.vstack`.
468468
469-
:param list(LabelTensor) label_tensors: The :class:`LabelTensor`
469+
:param list(LabelTensor) label_tensors: The :class:`LabelTensor`
470470
instances to stack. They need to have equal labels.
471471
:return: A new :class:`LabelTensor` instance obtained by stacking the
472472
input tensors vertically.
@@ -523,7 +523,7 @@ def _update_single_label(
523523

524524
def __getitem__(self, index):
525525
""" "
526-
Override the __getitem__ method to handle the labels of the
526+
Override the __getitem__ method to handle the labels of the
527527
:class:`LabelTensor` instance. It first performs __getitem__ operation
528528
on the :class:`torch.Tensor` part of the instance, then updates the
529529
labels based on the index.
@@ -666,7 +666,7 @@ def detach(self):
666666
def summation(tensors):
667667
"""
668668
Computes the summation of a list of :class:`LabelTensor` instances.
669-
669+
670670
671671
:param list(LabelTensor) tensors: A list of tensors to sum. All tensors
672672
must have the same shape and labels.

0 commit comments

Comments
 (0)