PiDMD - SVD Truncation
greinerth opened this issue · comments
Describe the bug
Setting the rank truncation to automatic (svd_rank = 0) for optimal truncation leads to a ValueError exception, hinting a dimension missmatch here.
To Reproduce
# arbitrary input_x of shape [96, 12] in testing environment
pidmd = PiDMD("symmetric", compute_A=true, svd_rank=0)
pidmd.fit(input_x)
Expected behavior
Perform a rank reduced decomposition, s.t. svd_rank < 11.
Output
File "/home/dmd/.local/lib/python3.11/site-packages/pydmd/pidmd.py", line 204, in compute_operator
self._modes = U.dot(self._eigenvectors)
^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: shapes (96,1) and (11,11) not aligned: 1 (dim 1) != 11 (dim 0)
@sichinaga could you please look into it?
@mtezzele I'll address this asap!
Thank you @neox395 for reporting this issue. Now it is fixed thanks to @sichinaga.