Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

genentropy is broken #366

Closed
CNelias opened this issue Jan 10, 2024 · 1 comment
Closed

genentropy is broken #366

CNelias opened this issue Jan 10, 2024 · 1 comment

Comments

@CNelias
Copy link

CNelias commented Jan 10, 2024

Describe the bug
When trying to run the examples from the doc, the following error is returned:

ERROR: MethodError: no method matching genentropy(::Int64, ::Float64, ::Tuple{StateSpaceSet{…}, StepRangeLen{…}})

Closest candidates are:
  genentropy(::Union{AbstractArray{<:Real}, AbstractStateSpaceSet}, ::Real; q, base)
   @ ComplexityMeasures C:\Users\Agarwal_Lab\.julia\packages\ComplexityMeasures\kahfm\src\deprecations.jl:62

Stacktrace:
 [1] _broadcast_getindex_evalf
   @ Base.Broadcast .\broadcast.jl:709 [inlined]
 [2] _broadcast_getindex
   @ Base.Broadcast .\broadcast.jl:682 [inlined]
 [3] getindex
   @ Base.Broadcast .\broadcast.jl:636 [inlined]
 [4] copy
   @ Base.Broadcast .\broadcast.jl:942 [inlined]
 [5] materialize(bc::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{…}, Nothing, typeof(genentropy), Tuple{…}})
   @ Base.Broadcast .\broadcast.jl:903
 [6] top-level scope
   @ REPL[34]:1
Some type information was truncated. Use `show(err)` to see complete types.

Minimal Working Example

using DynamicalSystems
lor = Systems.lorenz()
tr = trajectory(lor, 100.0; Ttr = 10.0)
ες =.^ (-3.5:0.5:3.5) # semi-random guess
Hs = genentropy.(1, ες, Ref(tr))

Package versions
Julia 1.10
DynamicalSystems 3.2.3

@Datseris Datseris transferred this issue from JuliaDynamics/ChaosTools.jl Jan 10, 2024
@Datseris
Copy link
Member

In DynamicalSystems v3+ the function trajectory returns a tuple of the trajectory (dataset) and time vector.

Do instead

tr, tvec = trajectory(lor, 100.0; Ttr = 10.0)

(or use a version of DynamicalSystems.jl before v3 if you want to use old syntax)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants