We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 09e8134 + 8adb998 commit 6cf9129Copy full SHA for 6cf9129
pydmd/bopdmd.py
@@ -1365,15 +1365,11 @@ def _initialize_alpha(self):
1365
ux1 = ux[:, :-1]
1366
ux2 = ux[:, 1:]
1367
1368
- # Define the diagonal matrix T as the following.
1369
- t1 = self._time[:-1]
1370
- t2 = self._time[1:]
1371
- T = np.diag(t2 - t1)
1372
-
1373
# Define the matrices Y and Z as the following and compute the
1374
# rank-truncated SVD of Y.
1375
Y = (ux1 + ux2) / 2
1376
- Z = (ux2 - ux1).dot(np.linalg.inv(T))
+ # Element-wise division by time differences. w/o large T
+ Z = (ux2 - ux1) / (self._time[1:] - self._time[:-1])
1377
U, s, V = compute_svd(Y, self._svd_rank)
1378
S = np.diag(s)
1379
0 commit comments