Fix codacy
This commit is contained in:
@@ -68,10 +68,12 @@ class DataCondition(ConditionInterface):
|
|||||||
:type conditional_variables: torch.Tensor or LabelTensor
|
:type conditional_variables: torch.Tensor or LabelTensor
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
If either `input` is composed by a list of :class:`~pina.graph.Graph`
|
If either `input` is composed by a list of
|
||||||
or :class:`~torch_geometric.data.Data` objects, all elements must
|
:class:`~pina.graph.Graph` or :class:`~torch_geometric.data.Data`
|
||||||
have the same structure (keys and data types)
|
objects, all elements must have the same structure (keys and data
|
||||||
|
types)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.input = input
|
self.input = input
|
||||||
self.conditional_variables = conditional_variables
|
self.conditional_variables = conditional_variables
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ class Graph(Data):
|
|||||||
**kwargs,
|
**kwargs,
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
Create a new instance of the :class:`~pina.graph.Graph` class by checking
|
Create a new instance of the :class:`~pina.graph.Graph` class by
|
||||||
the consistency of the input data and storing the attributes.
|
checking the consistency of the input data and storing the attributes.
|
||||||
|
|
||||||
:param kwargs: Parameters used to initialize the
|
:param kwargs: Parameters used to initialize the
|
||||||
:class:`~pina.graph.Graph` object.
|
:class:`~pina.graph.Graph` object.
|
||||||
@@ -339,8 +339,8 @@ class KNNGraph(GraphBuilder):
|
|||||||
|
|
||||||
def __new__(cls, pos, neighbours, **kwargs):
|
def __new__(cls, pos, neighbours, **kwargs):
|
||||||
"""
|
"""
|
||||||
Extends the :class:`~pina.graph.GraphBuilder` class to compute edge_index
|
Extends the :class:`~pina.graph.GraphBuilder` class to compute
|
||||||
based on a K-nearest neighbors algorithm.
|
edge_index based on a K-nearest neighbors algorithm.
|
||||||
|
|
||||||
:param pos: A tensor of shape (N, D) representing the positions of N
|
:param pos: A tensor of shape (N, D) representing the positions of N
|
||||||
points in D-dimensional space.
|
points in D-dimensional space.
|
||||||
|
|||||||
@@ -275,7 +275,8 @@ class LabelTensor(torch.Tensor):
|
|||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
"""
|
"""
|
||||||
The string representation of the :class:`~pina.label_tensor.LabelTensor`.
|
The string representation of the
|
||||||
|
:class:`~pina.label_tensor.LabelTensor`.
|
||||||
|
|
||||||
:return: String representation of the
|
:return: String representation of the
|
||||||
:class:`~pina.label_tensor.LabelTensor` instance.
|
:class:`~pina.label_tensor.LabelTensor` instance.
|
||||||
@@ -295,8 +296,8 @@ class LabelTensor(torch.Tensor):
|
|||||||
Concatenate a list of tensors along a specified dimension. For more
|
Concatenate a list of tensors along a specified dimension. For more
|
||||||
details, see :meth:`torch.cat`.
|
details, see :meth:`torch.cat`.
|
||||||
|
|
||||||
:param list[LabelTensor] tensors: :class:`~pina.label_tensor.LabelTensor`
|
:param list[LabelTensor] tensors:
|
||||||
instances to concatenate
|
:class:`~pina.label_tensor.LabelTensor` instances to concatenate
|
||||||
:param int dim: dimensions on which you want to perform the operation
|
:param int dim: dimensions on which you want to perform the operation
|
||||||
(default is 0)
|
(default is 0)
|
||||||
:return: A new :class:`LabelTensor' instance obtained by concatenating
|
:return: A new :class:`LabelTensor' instance obtained by concatenating
|
||||||
@@ -472,8 +473,8 @@ class LabelTensor(torch.Tensor):
|
|||||||
Stack tensors vertically. For more details, see :meth:`torch.vstack`.
|
Stack tensors vertically. For more details, see :meth:`torch.vstack`.
|
||||||
|
|
||||||
:param list of LabelTensor label_tensors: The
|
:param list of LabelTensor label_tensors: The
|
||||||
:class:`~pina.label_tensor.LabelTensor` instances to stack. They need
|
:class:`~pina.label_tensor.LabelTensor` instances to stack. They
|
||||||
to have equal labels.
|
need to have equal labels.
|
||||||
:return: A new :class:`~pina.label_tensor.LabelTensor` instance obtained
|
:return: A new :class:`~pina.label_tensor.LabelTensor` instance obtained
|
||||||
by stacking the input tensors vertically.
|
by stacking the input tensors vertically.
|
||||||
:rtype: LabelTensor
|
:rtype: LabelTensor
|
||||||
|
|||||||
Reference in New Issue
Block a user