Closed LuisLake90 closed 3 years ago
Hi Luis,
Kronecker only works for AbstractMatrix
types, so an easy fix is to do reshape v
into a Matrix:
b = kronecker(A, reshape(v, :, 1));
As this is likely a common thing, I look into overloading this so it happens automatically.
Hi Michiel,
Thank you so much for your valuable recommendation, I wasn't fully aware that I had to perform this transformation on the vector in question first, as the vector was not part of the supported AbstractMatrix
type. I will definitely use this approach in this particular case.
No problem. This is now done automatically in #90.
Dear developer(s),
First of all, thanks for the excellent work on this particular Julia package. The reason why I decided to submit this request is based on a recent issue that I encountered while trying to perform the Kronecker product involving a matrix and a column vector. It seems that when trying to perform the above-mentioned operation I receive the following error message
ERROR: MethodError: no method matching kronecker(::Array{Float64,2}, ::Array{Float64,1})
. Next, I include the piece of toy example that generated the aforementioned error. Although Julia natively supports this operation via the nativeBase.kron()
, the true is that theKronecker.jl
package provides substantial improvements, particularly in terms of runtime, which I've had the opportunity to test on large matrix operations. It would be great if this issue could be solved. Thanks in advance.