Skip to content

kron between Diagonal and non-numeric matrix gives output with undefs #837

@lkapelevich

Description

@lkapelevich

on 1.7-dev:

julia> using JuMP, LinearAlgebra

julia> X = ones(AffExpr, 2, 2);

julia> kron(I(2), X)
4×4 Matrix{AffExpr}:
    1       1    #undef  #undef
    1       1    #undef  #undef
 #undef  #undef     1       1
 #undef  #undef     1       1

Instead of dispatching to https://github.com/JuliaLang/julia/blob/master/stdlib/LinearAlgebra/src/diagonal.jl#L540 which initializes the output with zeros, we go into https://github.com/JuliaLang/julia/blob/master/stdlib/LinearAlgebra/src/dense.jl#L414

Metadata

Metadata

Assignees

No one assigned

    Labels

    regressionRegression in behavior compared to a previous version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions