Skip to content

Commit 276fcf4

Browse files
committed
edmd iip for candidates
1 parent 9694adc commit 276fcf4

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/koopman/extended_dmd.jl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ function EDMD(X::AbstractArray, Y::AbstractArray, Ψ::AbstractBasis; p::Abstract
3232
N,M = size(X)
3333

3434
# Compute the transformed data
35-
Ψ₀ = Ψ(X, p, t)
36-
Ψ₁ = Ψ(Y, p, t)
35+
Ψ₀ = zeros(eltype(X), length(Ψ), size(X, 2))
36+
Ψ₁ = zeros(eltype(X), length(Ψ), size(Y, 2))
37+
Ψ(Ψ₀, X, p, t)
38+
Ψ(Ψ₁, Y, p, t)
3739

3840
A = alg(Ψ₀, Ψ₁)
3941

@@ -56,7 +58,10 @@ function gEDMD(X::AbstractArray, DX::AbstractArray, Ψ::AbstractBasis; p::Abstra
5658
N,M = size(X)
5759

5860
# Compute the transformed data
59-
Ψ₀ = Ψ(X, p, t)
61+
62+
# Compute the transformed data
63+
Ψ₀ = zeros(eltype(X), length(Ψ), size(X, 2))
64+
Ψ(Ψ₀, X, p, t)
6065

6166
# The jacobian to get d/dt(Ψ) = d/dx(Ψ) dx/dt
6267
= jacobian(Ψ)

0 commit comments

Comments
 (0)