Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiplication with Matrix{Sym} gives Matrix{Any} #324

Closed
olof3 opened this issue Jan 29, 2020 · 0 comments
Closed

Multiplication with Matrix{Sym} gives Matrix{Any} #324

olof3 opened this issue Jan 29, 2020 · 0 comments

Comments

@olof3
Copy link

olof3 commented Jan 29, 2020

A = fill(Sym("a"), 2, 2)
A*A # is of type Matrix{Any}
A*ones(2,2) # is of type Matrix{Any}
A*Diagonal([1,1]) # is of type Matrix{Any}
A*I(2) # gives an error

I've only investigated this for a little bit, but I don't think that I'll be able to resolve this in a good way myself.

If A is instead of the type Matrix{Basic} (from the SymEngine package) the first three multiplications return the expected type, while the last one fails.

jverzani added a commit to jverzani/SymPy.jl that referenced this issue Jan 29, 2020
jverzani added a commit that referenced this issue Jan 30, 2020
* add promote_op methods; close issue #324

* version bump [ci skip]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants