Skip to content

Commit d90b791

Browse files
sichinagamtezzele
authored andcommitted
Added more to test suite
1 parent b4195ae commit d90b791

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/preprocessing/test_randomized.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def test_shape():
3434
def test_rdmd():
3535
"""
3636
Test that RDMD and DMD with randomization are essentially the same.
37+
Compares snapshots, eigenvalues, and reconstructions.
3738
"""
3839
rdmd = RDMD(svd_rank=2, oversampling=10, power_iters=2, seed=1234)
3940
rdmd.fit(sample_data)
@@ -47,5 +48,9 @@ def test_rdmd():
4748
)
4849
pdmd.fit(sample_data)
4950

50-
assert_allclose(pdmd.reconstructed_data, rdmd.reconstructed_data)
51+
assert_allclose(
52+
pdmd.snapshots,
53+
rdmd.compression_matrix.dot(rdmd.snapshots),
54+
)
5155
assert_allclose(np.sort(pdmd.eigs), np.sort(rdmd.eigs))
56+
assert_allclose(pdmd.reconstructed_data, rdmd.reconstructed_data)

0 commit comments

Comments
 (0)