Cannot specify symbolic types

Hello,
I cannot specify any symbolic type.

using Symbolics
@variables u::Complex # or any other type

gives the following error:

ERROR: LoadError: AssertionError: @variables expects a tuple of expressions or an expression of a tuple (`@variables x y z(t) v[1:3] w[1:2,1:4]` or `@variables x y z(t) v[1:3] w[1:2,1:4] k=1.0`)

Thanks for any help.

Seems to work for me, what version of Symbolics do you have installed?

julia> @variables x::Real z::Complex{Real} (X::Real)[1:10, 1:10] (Z::Complex{Real})[1:10] s::String
5-element Vector{Any}:
 x
 z
  X[1:10,1:10]
  Z[1:10]
  s

(jl_hqZDlM) pkg> st
      Status `/tmp/jl_hqZDlM/Project.toml`
  [0c5d862f] Symbolics v1.4.2
1 Like

From this issue support for Complex was just merged 14 days ago so yes, it is probably that you are using an older version.