Skip to content

[BUG] incorrect matrix type casting in concatenation #45498

@GiggleLiu

Description

@GiggleLiu

This is a bug in nightly, which breaks multiple tests.

julia> using SparseArrays

julia> ds = rand(ComplexF64, 4, 4);

julia> sp = sprand(ComplexF64, 4, 4, 0.5);

julia> vs = [sp, ds];

julia> typeof.(vs)
2-element Vector{DataType}:
 Matrix{ComplexF64} (alias for Array{Complex{Float64}, 2})
 Matrix{ComplexF64} (alias for Array{Complex{Float64}, 2})

In Julia1.7, it does not cast a sparse matrix to a dense matrix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions