diff --git a/Project.toml b/Project.toml index 3a0aca0c5..fccf9e0d0 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "DataDrivenDiffEq" uuid = "2445eb08-9709-466a-b3fc-47e12bd697a2" authors = ["Julius Martensen "] -version = "0.5.6" +version = "0.5.7" [deps] Compat = "34da2185-b29b-5c13-b0c7-acf172513d20" diff --git a/src/basis.jl b/src/basis.jl index a2afce196..e2c21ff85 100644 --- a/src/basis.jl +++ b/src/basis.jl @@ -146,7 +146,7 @@ function update!(b::Basis, eval_expression = false) return end -function unique(b::AbstractArray{Num}, simplify_eqs = false) +function unique(b::AbstractArray{Num}, simplify_eqs::Bool) b = simplify_eqs ? simplify.(b) : b returns = ones(Bool, size(b)...) N = maximum(eachindex(b)) @@ -156,7 +156,7 @@ function unique(b::AbstractArray{Num}, simplify_eqs = false) return b[returns] end -function Base.unique!(b::AbstractArray, simplify_eqs = false) +function Base.unique!(b::AbstractArray, simplify_eqs::Bool) bs = simplify_eqs ? simplify.(b) : b removes = zeros(Bool, size(bs)...) N = maximum(eachindex(bs)) @@ -166,7 +166,7 @@ function Base.unique!(b::AbstractArray, simplify_eqs = false) deleteat!(b, removes) end -function unique(b::AbstractArray{Equation}, simplify_eqs = false) +function unique(b::AbstractArray{Equation}, simplify_eqs::Bool) b = simplify_eqs ? simplify.(b) : b returns = ones(Bool, size(b)...) N = maximum(eachindex(b)) @@ -176,7 +176,7 @@ function unique(b::AbstractArray{Equation}, simplify_eqs = false) return b[returns] end -function Base.unique!(b::AbstractArray{Equation}, simplify_eqs = false) +function Base.unique!(b::AbstractArray{Equation}, simplify_eqs::Bool) bs = [bi.rhs for bi in b] bs = simplify_eqs ? simplify.(bs) : bs removes = zeros(Bool, size(bs)...)