diff --git a/pyproject.toml b/pyproject.toml index ba22227..fbceb2e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 = "shawnpan@uw.edu" }, { name = "Eurika Kaiser", email = "eurika@uw.edu" }, @@ -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", diff --git a/requirements.txt b/requirements.txt index 7de4f70..ad57159 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/src/pykoopman/koopman.py b/src/pykoopman/koopman.py index 192c2d3..3aefe07 100644 --- a/src/pykoopman/koopman.py +++ b/src/pykoopman/koopman.py @@ -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] @@ -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):