Skip to content

Commit

Permalink
Fix order of multiplication in mixed-product rule
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarrasch committed Jun 24, 2024
1 parent ee91b4f commit cd7aace
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "LinearMaps"
uuid = "7a12625a-238d-50fd-b39a-03d52299707e"
version = "3.11.2"
version = "3.11.3"

[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Expand Down
4 changes: 4 additions & 0 deletions test/kronecker.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ using Test, LinearMaps, LinearAlgebra, SparseArrays
Kv = LinearMaps.CompositeMap{ComplexF64}(fill(LA LB, 3))
@test kron(A, B)^3 * ones(6) Kv * ones(6)
@test Matrix(K) kron(A, B)^3
A = [0 1; 0 0]
B = [0 0; 1 0]
J = LinearMap(I, 1)
@test Matrix(kron(J, A*B)) == Matrix(kron(J, A) * kron(J, B))
# example that doesn't use mixed-product rule
A = rand(3, 2); B = rand(2, 3)
K = @inferred kron(A, LinearMap(B))
Expand Down

0 comments on commit cd7aace

Please sign in to comment.