From f0bff2438b9fedf97e3ae63fb2ea81a6127f2c6d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 15 Feb 2025 15:45:42 +0100 Subject: [PATCH] :art: Format Python code with psf/black (#452) --- pina/model/layers/pod.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pina/model/layers/pod.py b/pina/model/layers/pod.py index be8e137..e912da7 100644 --- a/pina/model/layers/pod.py +++ b/pina/model/layers/pod.py @@ -6,6 +6,7 @@ from .stride import Stride from .utils_convolution import optimizing import warnings + class PODBlock(torch.nn.Module): """ POD layer: it projects the input field on the proper orthogonal @@ -121,12 +122,15 @@ class PODBlock(torch.nn.Module): if X.device.type == "mps": # svd_lowrank not arailable for mps warnings.warn( "svd_lowrank not available for mps, using svd instead." - "This may slow down computations.", ResourceWarning + "This may slow down computations.", + ResourceWarning, ) self._basis = torch.svd(X.T)[0].T else: if randomized: - warnings.warn("Considering a randomized algorithm to compute the POD basis") + warnings.warn( + "Considering a randomized algorithm to compute the POD basis" + ) self._basis = torch.svd_lowrank(X.T, q=X.shape[0])[0].T else: self._basis = torch.svd(X.T)[0].T