Skip to content

ProjectTo(Adjoint{<:SparseMatrixCSC})(::Matrix) does not preserve sparsity #447

Open
@oxinabox

Description

@oxinabox

Consider:

julia> x = sprand(3,3, 0.2)
3×3 SparseMatrixCSC{Float64, Int64} with 4 stored entries:
 0.289391           0.43614
          0.427879    
                   0.332239

julia> xt = x'
3×3 adjoint(::SparseMatrixCSC{Float64, Int64}) with eltype Float64:
 0.289391  0.0       0.0
 0.0       0.427879  0.0
 0.43614   0.0       0.332239

julia> ProjectTo(xt)(ones(3,3))
3×3 Matrix{Float64}:
 1.0  1.0  1.0
 1.0  1.0  1.0
 1.0  1.0  1.0

cc @jieli-matrix

Metadata

Metadata

Assignees

No one assigned

    Labels

    ProjectTorelated to the projection functionalitybugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions