add singular values in PODBlock

This commit is contained in:
Anna Ivagnes
2025-04-28 17:03:23 +02:00
committed by Dario Coscia
parent e3d4c2fc1a
commit 3c1fed9ae2
2 changed files with 25 additions and 3 deletions

View File

@@ -23,6 +23,8 @@ def test_fit(rank, scale):
assert pod._basis == None
assert pod.basis == None
assert pod._scaler == None
assert pod._singular_values == None
assert pod.singular_values == None
assert pod.rank == rank
assert pod.scale_coefficients == scale
@@ -37,6 +39,8 @@ def test_fit(rank, scale, randomized):
dof = toy_snapshots.shape[1]
assert pod.basis.shape == (rank, dof)
assert pod._basis.shape == (n_snap, dof)
assert pod.singular_values.shape == (rank,)
assert pod._singular_values.shape == (n_snap,)
if scale is True:
assert pod._scaler["mean"].shape == (n_snap,)
assert pod._scaler["std"].shape == (n_snap,)