See below.
julia> using Symbolics
julia> @variables x::Real
1-element Vector{Num}:
x
julia> typeof( x )
Vector{Num} (alias for Array{Num, 1})
julia> @variables x::Real y::Real
2-element Vector{Num}:
x
y
julia> typeof( x )
Num
Do I just need to always use @variables
with a throw-away variable to ensure consistency? Or is the recommended (but undocumented) approach to do x = (Symbolics.@variables x::Real)[1]
?
julia> x = (Symbolics.@variables x::Real)[1]
x
julia> typeof( x )
Num