-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
kron for more than 2 operands #36
Comments
There is an old issue about custom infix operators. |
I believe the issue @jiahao is referring to is JuliaLang/julia#552 (wow, all the way back in the triple-digits!) |
Indeed, I should have looked first. However, aside from the discussion of allowing infix operators and using unicode for them, it is interesting that StefanKarpinski mentions in JuliaLang/julia#552 that you can always do kron(A,B,C), which is not true (for me at least, with the latest Julia build). |
Putting aside the issue of infix operators, I think it would be great to have
|
An even simpler definition would be:
:) |
+1 |
@JeffBezanson, a counterexample would be a Hadamard matrix, which can be defined as a Kronecker product of 2×2 matrices. Since they are 2×2, you can afford to ⊗ a dozen of them before worrying about memory. (Of course, you are better off representing the matrix implicitly and using Hadamard.jl, but sometimes it's nice to play around with the full matrix.) |
As an associative operation, it would make sense to extend
kron
to an arbitrary number of arguments. I think adding these definitions to linalg/dense.jl would do the trick, but I leave it to the developers to choose the strategy that fits best with the multiple dispatch philosophy (hence no pull request):Also, how would you feel of having a new binary operator ⊗ (U+2297) that refers to
kron
?The text was updated successfully, but these errors were encountered: