Skip to content

Commit c487c7f

Browse files
authored
fix basins_of_attracion action on internal variables of the mapper (#178)
* fix basins * only change the output basins, not the mapper state * change patch number
1 parent 4697e7d commit c487c7f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
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.26.2"
5+
version = "1.26.3"
66

77

88
[deps]

src/mapping/recurrences/attractor_mapping_recurrences.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,11 @@ function basins_of_attraction(mapper::AttractorsViaRecurrences; show_progress =
234234
end
235235

236236
# remove attractors and rescale from 1 to max number of attractors
237+
bas_tmp = copy(basins)
237238
ind = iseven.(basins)
238-
basins[ind] .+= 1
239-
basins .= (basins .- 1) 2
240-
return basins, mapper.bsn_nfo.attractors
239+
bas_tmp[ind] .+= 1
240+
bas_tmp .= (bas_tmp .- 1) 2
241+
return bas_tmp, mapper.bsn_nfo.attractors
241242
end
242243

243244
#####################################################################################

0 commit comments

Comments
 (0)