Skip to content

Commit

Permalink
Merge pull request #1406 from JuliaSymbolics/baggepinnen-patch-3
Browse files Browse the repository at this point in the history
Remove stack-overflowy `convert` method
  • Loading branch information
ChrisRackauckas authored Jan 16, 2025
2 parents 8541338 + d2d3caa commit 19b252e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/num.jl
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,7 @@ Base.convert(::Type{Num}, x::Symbolic{<:Number}) = Num(x)
Base.convert(::Type{Num}, x::Number) = Num(x)
Base.convert(::Type{Num}, x::Num) = x

Base.convert(::Type{<:Array{Num}}, x::AbstractArray) = map(Num, x)
Base.convert(::Type{<:Array{Num}}, x::AbstractArray{Num}) = x
Base.convert(::Type{T}, x::AbstractArray{Num}) where T <: Array{Num} = T(map(Num, x))
Base.convert(::Type{Sym}, x::Num) = value(x) isa Sym ? value(x) : error("cannot convert $x to Sym")

LinearAlgebra.lu(x::Union{Adjoint{<:RCNum},Transpose{<:RCNum},Array{<:RCNum}}; check=true, kw...) = sym_lu(x; check=check)
Expand Down

0 comments on commit 19b252e

Please sign in to comment.