avoid codacy warning

This commit is contained in:
Dario Coscia
2025-05-05 10:55:56 +02:00
parent aa2ba5fc7f
commit 6b355b45de

View File

@@ -150,16 +150,16 @@ class PODBlock(torch.nn.Module):
"This may slow down computations.",
ResourceWarning,
)
u, s, v = torch.svd(X.T)
u, s, _ = torch.svd(X.T)
else:
if randomized:
warnings.warn(
"Considering a randomized algorithm to compute the POD basis"
)
u, s, v = torch.svd_lowrank(X.T, q=X.shape[0])
u, s, _ = torch.svd_lowrank(X.T, q=X.shape[0])
else:
u, s, v = torch.svd(X.T)
u, s, _ = torch.svd(X.T)
self._basis = u.T
self._singular_values = s