Skip to content

Commit b049d3a

Browse files
authored
ensure 1st paper code is runnable (#121)
1 parent 20e223b commit b049d3a

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

Diff for: Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name = "Attractors"
22
uuid = "f3fd9213-ca85-4dba-9dfd-7fc91308fec7"
33
authors = ["George Datseris <[email protected]>", "Kalel Rossi", "Alexandre Wagemakers"]
44
repo = "https://github.com/JuliaDynamics/Attractors.jl.git"
5-
version = "1.13.5"
5+
version = "1.13.6"
66

77
[deps]
88
BlackBoxOptim = "a134a8b2-14d6-55f6-9291-3336d3ab0209"

Diff for: src/deprecated.jl

+15-2
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,29 @@
22
# In the future, this call signature will remain here but its source code
33
# will simply be replaced by an error message.
44
function basins_of_attraction(grid::Tuple, ds::DynamicalSystem; kwargs...)
5-
error("""
5+
@warn("""
66
The function `basins_of_attraction(grid::Tuple, ds::DynamicalSystem; ...)` has
77
been replaced by the more generic
88
`basins_of_attraction(mapper::AttractorMapper, grid::Tuple`) which works for
99
any instance of `AttractorMapper`. The `AttractorMapper` itself requires as
1010
input an kind of dynamical system the user wants, like a `StroboscopicMap` or
1111
`CoupledODEs` or `DeterministicIteratedMap` etc.
1212
13-
Please use that method instead.
13+
For now, we do the following for you:
14+
```
15+
mapper = AttractorsViaRecurrences(ds, grid; sparse = false)
16+
basins_of_attraction(mapper)
17+
```
18+
and we are completely ignoring any keywords you provided (which could be about the
19+
differential equation solve, or the metaparameters of the recurrences algorithm).
20+
21+
We strongly recommend that you study the documentation of Attractors.jl
22+
and update your code. The only reason we provide this backwards compatibility
23+
is because our first paper "Effortless estimation of basins of attraction"
24+
uses this function signature in the script in the paper (which we can't change anymore).
1425
""")
26+
mapper = AttractorsViaRecurrences(ds, grid; sparse = false)
27+
return basins_of_attraction(mapper)
1528
end
1629

1730
@deprecate RecurrencesSeededContinuation RecurrencesFindAndMatch

0 commit comments

Comments
 (0)