avoid codacy warning
This commit is contained in:
@@ -150,16 +150,16 @@ class PODBlock(torch.nn.Module):
|
|||||||
"This may slow down computations.",
|
"This may slow down computations.",
|
||||||
ResourceWarning,
|
ResourceWarning,
|
||||||
)
|
)
|
||||||
u, s, v = torch.svd(X.T)
|
u, s, _ = torch.svd(X.T)
|
||||||
else:
|
else:
|
||||||
if randomized:
|
if randomized:
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"Considering a randomized algorithm to compute the POD basis"
|
"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:
|
else:
|
||||||
u, s, v = torch.svd(X.T)
|
u, s, _ = torch.svd(X.T)
|
||||||
self._basis = u.T
|
self._basis = u.T
|
||||||
self._singular_values = s
|
self._singular_values = s
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user