# Error using delay\_fnn

**URL:** https://discourse.julialang.org/t/error-using-delay-fnn/132297
**Category:** Modelling & Simulations
**Tags:** dynamical-systems
**Created:** [September 11, 2025, 4:54pm UTC](https://discourse.julialang.org/t/error-using-delay-fnn/132297 "2025-09-11T16:54:17Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dylanmcn](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@dylanmcn](https://discourse.julialang.org/u/dylanmcn)
#### Post date: [September 11, 2025, 4:54pm UTC](https://discourse.julialang.org/t/error-using-delay-fnn/132297/1 "2025-09-11T16:54:17Z")

</div>

Hello,

I am trying to use the delay\_fnn function in the DynamicalSystems package and I keep getting the following error:

ERROR: MethodError: no method matching StateSpaceSet{2, Float64, SVector{2, Float64}, Nothing}(::Vector{SVector{2, Float64}})  
The type `StateSpaceSet{2, Float64, SVector{2, Float64}, Nothing}` exists, but no method is defined for this combination of argument types when trying to construct it.

Here is the code:

'function lorenz96\_rule!(du, u, p, t)  
F = p[1]; N = length(u)  
# 3 edge cases  
du[1] = (u[2] - u[N - 1]) \* u[N] - u[1] + F  
du[2] = (u[3] - u[N]) \* u[1] - u[2] + F  
du[N] = (u[1] - u[N - 2]) \* u[N - 1] - u[N] + F  
# then the general case  
for n in 3:(N - 1)  
du[n] = (u[n + 1] - u[n - 2]) \* u[n - 1] - u[n] + F  
end  
return nothing # always `return nothing` for in-place form!  
end

N = 6  
u0 = range(0.1, 1; length = N)  
p0 = [8.0]  
lorenz96 = CoupledODEs(lorenz96\_rule!, u0, p0)

total\_time = 12.5  
sampling\_time = 0.02  
Y, t = trajectory(lorenz96, total\_time; Ttr = 2.2, Δt = sampling\_time)  
z = Y[:, 1]

τ = estimate\_delay(z, “mi\_min”)

Ed = delay\_fnn(z, τ, 2:8)’

Thanks for any help. New to Julia (from Matlab) but familiar with attractor reconstruction.

---

<div class="post-metadata">

### Author: ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)
#### Post date: [September 11, 2025, 8:24pm UTC](https://discourse.julialang.org/t/error-using-delay-fnn/132297/2 "2025-09-11T20:24:39Z")

</div>

sorry, this is because of StateSpaceSets.jl v2.5. I did a cool change there but it changed some internals. I thought it wouldn’t break anything downstream but it did! It should be fixed by the next time you update your packages.

---

<div class="post-metadata">

### Author: ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)
#### Post date: [September 11, 2025, 8:34pm UTC](https://discourse.julialang.org/t/error-using-delay-fnn/132297/3 "2025-09-11T20:34:37Z")

</div>

I just released a fix let me know if it works or not.

---

<div class="post-metadata">

### Author: ![dylanmcn](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@dylanmcn](https://discourse.julialang.org/u/dylanmcn)
#### Post date: [September 11, 2025, 9:41pm UTC](https://discourse.julialang.org/t/error-using-delay-fnn/132297/4 "2025-09-11T21:41:28Z")

</div>

It worked!! Thanks so much for the prompt reply and smooth solution.
