Skip to content

Commit efa4e89

Browse files
authored
Merge pull request PyDMD#549 from ClimeTrend/master
Bug fix for the variable projection algorithm of BOPDMD
2 parents d21a949 + b1faef8 commit efa4e89

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ dist/**
1919

2020
# Virtual environment
2121
venv*/**
22+
.venv
23+
24+
# Pyenv
25+
.python-version

pydmd/bopdmd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,8 +624,8 @@ def compute_B(alpha):
624624
q_out, djac_out, j_pvt = qr(
625625
djac_matrix, mode="economic", pivoting=True
626626
)
627-
ij_pvt = np.arange(IA)
628-
ij_pvt = ij_pvt[j_pvt]
627+
ij_pvt = np.zeros(IA, dtype=int)
628+
ij_pvt[j_pvt] = np.arange(IA, dtype=int)
629629
rjac[:IA] = np.triu(djac_out[:IA])
630630
rhs_top = q_out.conj().T.dot(rhs_temp)
631631
scales_pvt = scales[j_pvt[:IA]]

0 commit comments

Comments
 (0)