Skip to content

Commit d2d3caa

Browse files
authored
Update num.jl
1 parent 256b5da commit d2d3caa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/num.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Base.convert(::Type{Num}, x::Symbolic{<:Number}) = Num(x)
177177
Base.convert(::Type{Num}, x::Number) = Num(x)
178178
Base.convert(::Type{Num}, x::Num) = x
179179

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

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

0 commit comments

Comments
 (0)