Skip to content

Commit

Permalink
fix matplotlib version and complex warning issues
Browse files Browse the repository at this point in the history
  • Loading branch information
pswpswpsw committed Nov 5, 2024
1 parent 84541eb commit 3c57962
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pykoopman"
version = "1.1.0"
version = "1.1.1"
authors = [
{ name = "Shaowu Pan", email = "[email protected]" },
{ name = "Eurika Kaiser", email = "[email protected]" },
Expand All @@ -26,7 +26,7 @@ classifiers = [
"Topic :: Scientific/Engineering :: Mathematics",
]
dependencies = [
"matplotlib <= 3.5.0, >=3.5.0",
"matplotlib >=3.6.0",
"derivative ~= 0.6.0",
"scikit-learn >= 1.1.3, <= 1.1.3",
"numpy >=1.20, <= 1.26",
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
matplotlib == 3.5.0
matplotlib >= 3.6.0
derivative ~= 0.6.0
scikit-learn == 1.1.3
numpy >= 1.20, <= 1.26
Expand Down
6 changes: 4 additions & 2 deletions src/pykoopman/koopman.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def simulate(self, x0, u=None, n_steps=1):
# tmp = self.W @ self.lamda**(k+1) @ y[0].reshape(-1,1)
y[k + 1] = self.lamda @ y[k]
x = np.transpose(self.W @ y.T)
x = x.astype(self.A.dtype)
# x = x.astype(self.A.dtype)
else:
# lifted space (not eigen)
y[0] = self.A @ self.phi(x0).flatten() + self.B @ u[0]
Expand All @@ -299,8 +299,10 @@ def simulate(self, x0, u=None, n_steps=1):
tmp = self.A @ y[k].reshape(-1, 1) + self.B @ u[k + 1].reshape(-1, 1)
y[k + 1] = tmp.flatten()
x = np.transpose(self.C @ y.T)
x = x.astype(self.A.dtype)
# x = x.astype(self.A.dtype)

if np.isrealobj(x0):
x = np.real(x)
return x

def get_feature_names(self, input_features=None):
Expand Down

0 comments on commit 3c57962

Please sign in to comment.