ITADN

Type error when running `convergence_and_basins_of_attraction`

#159Closedandreasmorr 创建于 2024-10-15
A
andreasmorrcommented
**Describe the bug** When running `convergence_and_basins_of_attraction` with any mapper, I get an `Inexact error: Int64`. I believe this is due to the array `iterations` within `convergence_and_basins_of_attraction` being initialized with type Int while it is intended to store Float times. Also, `basins` should be initialized with type Int so there are no issues when using the entries as keys to `attractors` right? **Minimal Working Example** ```julia using Pkg; Pkg.add("DynamicalSystems") Pkg.add("Attractors") Pkg.instantiate() using DynamicalSystems using Attractors function fold_nf_rule!(du, u, p, t) du[1] = -u[1]^2 + p[1] return nothing end u0 = [10.0] p0 = [1.0] fold_nf_ds = CoupledODEs(fold_nf_rule!, u0, p0) grid = (range(-2, 2; length = 41),) mapper = AttractorsViaRecurrences(fold_nf_ds, grid; sparse = false) basins, attractors, convergence = convergence_and_basins_of_attraction(mapper, grid; show_progress = true) ``` **Package versions** ```julia Status `~/.julia/environments/v1.10/Manifest.toml` [f3fd9213] Attractors v1.21.0 [61744808] DynamicalSystems v3.3.22 ```
关闭于 2024-10-24 4 条评论