Skip to content

isfinite error with lyapunov but not lyapunovspectrum #257

Description

@ianwineman

Describe the bug
Using the lyapunov function returns a method error for isfinite where lyapunovspectrum works as expected.

Example error output

julia> lyapunov(sm, 10_000)
ERROR: MethodError: no method matching isfinite(::SVector{2, Float64})
The function `isfinite` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  isfinite(::Missing)
   @ Base missing.jl:101
  isfinite(::BigFloat)
   @ Base mpfr.jl:1048
  isfinite(::Measurements.Measurement)
   @ Measurements ~/.julia/packages/Measurements/pivk0/src/comparisons-tests.jl:52
  ...

Stacktrace:
 [1] (::DynamicalSystemsBase.var"#1#2")(x::SVector{2, Float64})
   @ DynamicalSystemsBase ~/.julia/packages/DynamicalSystemsBase/kc7rt/src/core/dynamicalsystem_interface.jl:345
 [2] _all
   @ ./reduce.jl:1310 [inlined]
 [3] all
   @ ./reducedim.jl:995 [inlined]
 [4] successful_step
   @ ~/.julia/packages/DynamicalSystemsBase/kc7rt/src/core/dynamicalsystem_interface.jl:345 [inlined]
 [5] successful_step
   @ ~/.julia/packages/DynamicalSystemsBase/kc7rt/src/derived_systems/parallel_systems.jl:136 [inlined]
 [6] lyapunov(pds::DynamicalSystemsBase.ParallelDynamicalSystemAnalytic{…}, T::Int64; Ttr::Int64, Δt::Int64, d0::Float64, d0_upper::Float64, d0_lower::Float64, show_progress::Bool)
   @ ChaosTools ~/.julia/packages/ChaosTools/PqsgZ/src/chaosdetection/lyapunovs/lyapunov.jl:113
 [7] lyapunov(ds::DeterministicIteratedMap{…}, T::Int64; u0::SVector{…}, d0::Float64, inittest::ChaosTools.var"#64#65"{…}, kwargs::@Kwargs{})
   @ ChaosTools ~/.julia/packages/ChaosTools/PqsgZ/src/chaosdetection/lyapunovs/lyapunov.jl:64
 [8] lyapunov(ds::DeterministicIteratedMap{…}, T::Int64)
   @ ChaosTools ~/.julia/packages/ChaosTools/PqsgZ/src/chaosdetection/lyapunovs/lyapunov.jl:55
 [9] top-level scope
   @ REPL[10]:1
Some type information was truncated. Use `show(err)` to see complete types.

Works:

using DynamicalSystems, PredefinedDynamicalSystems
sm = PredefinedDynamicalSystems.standardmap([0.1, 0.11]; k=0.6)
lyapunovspectrum(sm, 10_000)

Does not work:

using DynamicalSystems, PredefinedDynamicalSystems
sm = PredefinedDynamicalSystems.standardmap([0.1, 0.11]; k=0.6)
lyapunov(sm, 10_000)

Package versions

[f3fd9213] Attractors v1.29.1
[608a59af] ChaosTools v3.5.0
[ab4b797d] ComplexityMeasures v3.8.5
[5732040d] DelayEmbeddings v2.9.0
[61744808] DynamicalSystems v3.6.3
[6e36e845] DynamicalSystemsBase v3.15.0
[4665ce21] FractalDimensions v1.9.5
[31e2f376] PredefinedDynamicalSystems v1.5.0
[639c3291] RecurrenceAnalysis v2.1.2
[40b095a5] StateSpaceSets v2.5.2
[c804724b] TimeseriesSurrogates v2.7.3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions