Skip to content

Commit

Permalink
Fix isconvergent does not work on a Set
Browse files Browse the repository at this point in the history
  • Loading branch information
singularitti committed Oct 14, 2023
1 parent 46ea72e commit 885673d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ConvergenceTestWorkflow/actions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ struct TestConvergence{T} <: Action{T}
end
(::TestConvergence)(data) = isconvergent(data)

function isconvergent(a::AbstractVector)
terms = abs.(diff(a))
function isconvergent(a)
terms = abs.(diff(collect(a)))
x, y, z = last(terms, 3)
return all(0 <= r < 1 for r in (y / x, z / y))
end

0 comments on commit 885673d

Please sign in to comment.