You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
now the type of a is Basic and the type of b is Array{Float64,1}.
if we assign a Basic to an element of b, it throw an error.
julia> b[1]=a
ERROR: ArgumentError: symbolic value cannot be evaluated to a numeric value
Stacktrace:
[1] evalf(::Basic, ::Int64, ::Bool) at /home/chen/.julia/packages/SymEngine/OE2Ff/src/numerics.jl:14
[2] convert(::Type{Float64}, ::Basic) at /home/chen/.julia/packages/SymEngine/OE2Ff/src/numerics.jl:184
[3] setindex!(::Array{Float64,1}, ::Basic, ::Int64) at ./array.jl:847
[4] top-level scope at REPL[7]:1
This is acceptable. However, if use an expression, then
julia> b[1]=a+1
signal (6): abort
in expression starting at REPL[7]:1
gsignal at /usr/bin/../lib/x86_64-linux-gnu/libc.so.6 (unknown line)
abort at /usr/bin/../lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x7fd9c26d73a5)
_ZNK9SymEngine3Add6acceptERNS_26EvalRealDoubleVisitorFinalE at /home/user/.julia/artifacts/ba7d931a7fe8b6f27199040e456a4aab6264f0d7/lib/libsymengine.so (unknown line)
unknown function (ip: (nil))
Allocations: 13033709 (Pool: 13027579; Big: 6130); GC: 13
abort
julia crash completely. This situation may need an ArgumentError.
The text was updated successfully, but these errors were encountered:
julia>using SymEngine
julia>@vars a
(a,)
julia> b =zeros(2)
2-element Array{Float64,1}:0.00.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
environment:
use:
now the type of
a
isBasic
and the type ofb
isArray{Float64,1}
.if we assign a Basic to an element of
b
, it throw an error.This is acceptable. However, if use an expression, then
julia crash completely. This situation may need an ArgumentError.
The text was updated successfully, but these errors were encountered: