-
-
Notifications
You must be signed in to change notification settings - Fork 35
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Try running this test from LinearAlgebra in the REPL:
julia> using Test, LinearAlgebra
julia> @testset "zeros in kron with block matrices" begin
D = Diagonal(1:4)
B = reshape([ones(2,2), ones(3,2), ones(2,3), ones(3,3)], 2, 2)
@test kron(D, B) == kron(Array(D), B)
@test kron(B, D) == kron(B, Array(D))
D2 = Diagonal([ones(2,2), ones(3,3)])
@test kron(D, D2) == Diagonal([diag(D2); 2diag(D2)])
@test kron(D2, D) == Diagonal([ones(2,2), fill(2.0,2,2), ones(3,3), fill(2.0,3,3)])
endfails with:
zeros in kron with block matrices: Test Failed at REPL[3]:7
Expression: kron(D, D2) == Diagonal([diag(D2); 2 * diag(D2)])
Evaluated: Diagonal([[1.0 1.0; 1.0 1.0], [1.0 1.0 1.0; 1.0 1.0 1.0; 1.0 1.0 1.0], [2.0 2.0; 2.0 2.0], [2.0 2.0 2.0; 2.0 2.0 2.0; 2.0 2.0 2.0], [3.0 3.0; 3.0 3.0], [3.0 3.0 3.0; 3.0 3.0 3.0; 3.0 3.0 3.0], [4.0 4.0; 4.0 4.0], [4.0 4.0 4.0; 4.0 4.0 4.0; 4.0 4.0 4.0]]) == Diagonal([[1.0 1.0; 1.0 1.0], [1.0 1.0 1.0; 1.0 1.0 1.0; 1.0 1.0 1.0], [2.0 2.0; 2.0 2.0], [2.0 2.0 2.0; 2.0 2.0 2.0; 2.0 2.0 2.0]])This is on latest nightly, where this was supposed to already be fixed (#55941 and JuliaLang/julia#56229):
julia> versioninfo()
Julia Version 1.12.0-DEV.1514
Commit e4dc9d357a1 (2024-10-29 17:18 UTC)
Build Info:
Official https://julialang.org release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 12 × 12th Gen Intel(R) Core(TM) i7-1255U
WORD_SIZE: 64
LLVM: libLLVM-18.1.7 (ORCJIT, alderlake)
Threads: 1 default, 0 interactive, 1 GC (on 12 virtual cores)This same test also segfaults in 1.11
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working