🎨 Format Python code with psf/black

This commit is contained in:
ndem0
2024-03-20 13:19:17 +00:00
committed by Nicola Demo
parent 98f7694d6f
commit 6bc8d81a5c

View File

@@ -67,14 +67,21 @@ class AveragingNeuralOperator(KernelNeuralOperator):
projecting_net_input = next(projecting_net.parameters()).size()[-1] projecting_net_input = next(projecting_net.parameters()).size()[-1]
if len(field_indices) + len(coordinates_indices) != input_lifting_net: if len(field_indices) + len(coordinates_indices) != input_lifting_net:
raise ValueError('The lifting_net must take as input the ' raise ValueError(
'coordinates vector and the field vector.') "The lifting_net must take as input the "
"coordinates vector and the field vector."
)
if output_lifting_net+len(coordinates_indices) != projecting_net_input: if (
raise ValueError('The projecting_net input must be equal to' output_lifting_net + len(coordinates_indices)
'the embedding dimension (which is the output) ' != projecting_net_input
'of the lifting_net plus the dimension of the ' ):
'coordinates, i.e. len(coordinates_indices).') raise ValueError(
"The projecting_net input must be equal to"
"the embedding dimension (which is the output) "
"of the lifting_net plus the dimension of the "
"coordinates, i.e. len(coordinates_indices)."
)
# assign # assign
self.coordinates_indices = coordinates_indices self.coordinates_indices = coordinates_indices