Skip to content

Commit f0bff24

Browse files
🎨 Format Python code with psf/black (#452)
1 parent c28a4bd commit f0bff24

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pina/model/layers/pod.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from .utils_convolution import optimizing
77
import warnings
88

9+
910
class PODBlock(torch.nn.Module):
1011
"""
1112
POD layer: it projects the input field on the proper orthogonal
@@ -121,12 +122,15 @@ def _fit_pod(self, X, randomized):
121122
if X.device.type == "mps": # svd_lowrank not arailable for mps
122123
warnings.warn(
123124
"svd_lowrank not available for mps, using svd instead."
124-
"This may slow down computations.", ResourceWarning
125+
"This may slow down computations.",
126+
ResourceWarning,
125127
)
126128
self._basis = torch.svd(X.T)[0].T
127129
else:
128130
if randomized:
129-
warnings.warn("Considering a randomized algorithm to compute the POD basis")
131+
warnings.warn(
132+
"Considering a randomized algorithm to compute the POD basis"
133+
)
130134
self._basis = torch.svd_lowrank(X.T, q=X.shape[0])[0].T
131135
else:
132136
self._basis = torch.svd(X.T)[0].T

0 commit comments

Comments
 (0)