Skip to content

Complex arrays support #270

@seadra

Description

@seadra

Apologies if there's already a way to do this, but it there a way remove the assumption that arrays are real numbers?

When doing

@variables u[1:2,1:2]
u'*u

the resulting expression doesn't use complex conjugation, and similarly, conj(u) just gives the matrix itself.

I tried @variables u[1:2,1:2]::Complex but it gives the 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`)
in expression starting at In[42]:1

Similarly, the following

@syms u[1:2,1:2]::Complex

gives

MethodError: Cannot `convert` an object of type Expr to an object of type Symbol
Closest candidates are:
  convert(::Type{T}, ::T) where T at essentials.jl:205
  Symbol(::Any...) at strings/basic.jl:229

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions