Open acsofie opened 2 years ago
I can't reproduce this.
julia> using SymEngine
julia> @vars a
(a,)
julia> b = zeros(2)
2-element Array{Float64,1}:
0.0
0.0
julia> b[1]=a
ERROR: ArgumentError: symbolic value cannot be evaluated to a numeric value
Stacktrace:
[1] evalf(::Basic, ::Int64, ::Bool) at /home/isuru/projects/SymEngine.jl/src/numerics.jl:14
[2] convert(::Type{Float64}, ::Basic) at /home/isuru/projects/SymEngine.jl/src/numerics.jl:184
[3] setindex!(::Array{Float64,1}, ::Basic, ::Int64) at ./array.jl:782
[4] top-level scope at REPL[14]:1
julia> b[1]=a+1
ERROR: ArgumentError: symbolic value cannot be evaluated to a numeric value
Stacktrace:
[1] evalf(::Basic, ::Int64, ::Bool) at /home/isuru/projects/SymEngine.jl/src/numerics.jl:14
[2] convert(::Type{Float64}, ::Basic) at /home/isuru/projects/SymEngine.jl/src/numerics.jl:184
[3] setindex!(::Array{Float64,1}, ::Basic, ::Int64) at ./array.jl:782
[4] top-level scope at REPL[15]:1
@isuruf which version of julia and SymEngine you use? I downloaded it from the official debian apt repo. Maybe debian problam?
environment:
use:
now the type of
a
isBasic
and the type ofb
isArray{Float64,1}
. if we assign a Basic to an element ofb
, it throw an error.This is acceptable. However, if use an expression, then
julia crash completely. This situation may need an ArgumentError.