Skip to content

Commit

Permalink
Fixes minor numpy.eye error that was thrown for unstable learned mo…
Browse files Browse the repository at this point in the history
…dels.
  • Loading branch information
OmidS committed Oct 15, 2024
1 parent 6580074 commit c2f7185
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changes
Versioning follows [semver](https://semver.org/).

- v1.2.5:
- Fixes minor `numpy.eye` error that was thrown for unstable learned models.
- v1.2.0:
- Adds version with support for external input (i.e., IPSID).
- v1.1.0:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

setuptools.setup(
name="PSID",
version="1.2.4",
version="1.2.5",
author="Omid Sani",
author_email="omidsani@gmail.com",
description="Python implementation for preferential subspace identification (PSID)",
Expand Down
4 changes: 2 additions & 2 deletions source/PSID/LSSM.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ def update_secondary_params(self):
self.YCov = self.C @ self.XCov @ self.C.T + self.R
self.YCov = (self.YCov + self.YCov.T)/2
else:
self.XCov = np.eye(self.A.shape); self.XCov[:] = np.nan
self.YCov = np.eye(self.C.shape); self.YCov[:] = np.nan
self.XCov = np.eye(self.state_dim); self.XCov[:] = np.nan
self.YCov = np.eye(self.output_dim); self.YCov[:] = np.nan

try:
self.Pp = linalg.solve_discrete_are(self.A.T, self.C.T, self.Q, self.R, s=self.S) # Solves Katayama eq. 5.42a
Expand Down

0 comments on commit c2f7185

Please sign in to comment.