using Pkg
Pkg.activate("/Users/ssiew/juliascript/Symbolics")
using Symbolics
# using Nemo
# using SymbolicNumericIntegration
@variables x
expr = x
println("expr is ",expr)
answer = substitute.( expr, (Dict(x => 7),) )
println("answer is ",answer)
print(
"""
Why is the answer "(7,)" instead of just "7"
The documentation for substitute does not explain.
"""
)
#
with output:
expr is x
answer is (7,)
Why is the answer “(7,)” instead of just “7”
The documentation for substitute does not explain.