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

Piracy of kron breaks kron(::Matrix,::Matrix) #118

Closed
ericphanson opened this issue Jul 16, 2023 · 0 comments · Fixed by #119
Closed

Piracy of kron breaks kron(::Matrix,::Matrix) #118

ericphanson opened this issue Jul 16, 2023 · 0 comments · Fixed by #119

Comments

@ericphanson
Copy link
Contributor

ericphanson commented Jul 16, 2023

LinearAlgebra.kron(A::VecMatOrTrans, B::VecMatOrTrans, op = *; kwargs...) =

This causes code like

In [24]: A = rand(ComplexF64, 2, 2)
Out[24]: 2×2 Matrix{ComplexF64}:
 0.469153+0.874823im  0.101443+0.0576494im
 0.333506+0.167122im  0.931151+0.260175im

In [25]: B = rand(ComplexF64, 3, 3)
Out[25]: 3×3 Matrix{ComplexF64}:
 0.822419+0.345264im   0.858039+0.306525im   0.47221+0.411678im
 0.369399+0.543773im  0.0729842+0.709066im  0.643159+0.0964229im
  0.34873+0.939529im   0.222741+0.839004im  0.939052+0.274967im

In [26]: kron(A,B)
ERROR: MethodError: no method matching (SuiteSparseGraphBLAS.GBShallowMatrix{ComplexF64})(::Int64, ::Int64; fill::ComplexF64)

Closest candidates are:
  (SuiteSparseGraphBLAS.GBShallowMatrix{T})(::Any, ::F, ::P, ::P, ::P, ::B, ::A) where {T, F, P, B, A} got unsupported keyword argument "fill"
   @ SuiteSparseGraphBLAS ~/.julia/packages/SuiteSparseGraphBLAS/hotIr/src/types.jl:960
  (SuiteSparseGraphBLAS.GBShallowMatrix{T})(::Any, ::F, ::P, ::P, ::P, ::B, ::A, ::Any) where {T, F, P, B, A} got unsupported keyword argument "fill"
   @ SuiteSparseGraphBLAS ~/.julia/packages/SuiteSparseGraphBLAS/hotIr/src/types.jl:960

Stacktrace:
 [1] kron(A::SuiteSparseGraphBLAS.GBShallowMatrix{ComplexF64, ComplexF64, StorageOrders.ColMajor(), Vector{Int64}, Vector{Bool}, Matrix{ComplexF64}}, B::SuiteSparseGraphBLAS.GBShallowMatrix{ComplexF64, ComplexF64, StorageOrders.ColMajor(), Vector{Int64}, Vector{Bool}, Matrix{ComplexF64}}, op::Function; mask::Nothing, accum::Nothing, desc::Nothing)
   @ SuiteSparseGraphBLAS ~/.julia/packages/SuiteSparseGraphBLAS/hotIr/src/operations/kronecker.jl:53
 [2] kron(A::SuiteSparseGraphBLAS.GBShallowMatrix{ComplexF64, ComplexF64, StorageOrders.ColMajor(), Vector{Int64}, Vector{Bool}, Matrix{ComplexF64}}, B::SuiteSparseGraphBLAS.GBShallowMatrix{ComplexF64, ComplexF64, StorageOrders.ColMajor(), Vector{Int64}, Vector{Bool}, Matrix{ComplexF64}}, op::Function)
   @ SuiteSparseGraphBLAS ~/.julia/packages/SuiteSparseGraphBLAS/hotIr/src/operations/kronecker.jl:42
 [3] kron(A::Matrix{ComplexF64}, B::Matrix{ComplexF64}, op::Function; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ SuiteSparseGraphBLAS ~/.julia/packages/SuiteSparseGraphBLAS/hotIr/src/operations/kronecker.jl:69
 [4] kron(A::Matrix{ComplexF64}, B::Matrix{ComplexF64}, op::Function)
   @ SuiteSparseGraphBLAS ~/.julia/packages/SuiteSparseGraphBLAS/hotIr/src/operations/kronecker.jl:69
 [5] kron(A::Matrix{ComplexF64}, B::Matrix{ComplexF64})
   @ SuiteSparseGraphBLAS ~/.julia/packages/SuiteSparseGraphBLAS/hotIr/src/operations/kronecker.jl:69
 [6] top-level scope
   @ REPL[26]:1
 [7] top-level scope
   @ ~/.julia/juliaup/julia-1.9.2+0.aarch64.apple.darwin14/share/julia/stdlib/v1.9/REPL/src/REPL.jl:1416

to fail. Note none of these are SuiteSparseGraphBLAS types.

@ericphanson ericphanson changed the title Piracy of kron Piracy of kron breaks kron(::Matrix,::Matrix) Jul 16, 2023
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

Successfully merging a pull request may close this issue.

1 participant