Skip to content

copy(UpperTriangular(A)') != UpperTriangular(A)' #586

Closed
@KlausC

Description

@KlausC

Version 1.1.0-DEV.666 (2018-11-16)
Commit 25d0dfc398* (0 days old master)

As the title states: the copy is not equal to the source. The diagonal of the matrix in not copied correctly (adjoint missing).

The same behavior is found in Version 1.0.1 (2018-09-29) and probably in earlier versions.

julia> A = sparse([1+im 2+im 3+im; 4+im 5+im 6+im; 7+im 9+im 0])
3×3 SparseMatrixCSC{Complex{Int64},Int64} with 8 stored entries:
  [1, 1]  =  1+1im
  [2, 1]  =  4+1im
  [3, 1]  =  7+1im
  [1, 2]  =  2+1im
  [2, 2]  =  5+1im
  [3, 2]  =  9+1im
  [1, 3]  =  3+1im
  [2, 3]  =  6+1im

julia> Matrix(A)
3×3 Array{Complex{Int64},2}:
 1+1im  2+1im  3+1im
 4+1im  5+1im  6+1im
 7+1im  9+1im  0+0im

julia> UpperTriangular(A)'
3×3 Adjoint{Complex{Int64},UpperTriangular{Complex{Int64},SparseMatrixCSC{Complex{Int64},Int64}}}:
 1-1im  0+0im  0+0im
 2-1im  5-1im  0+0im
 3-1im  6-1im  0+0im

julia> copy(UpperTriangular(A)')
3×3 LowerTriangular{Complex{Int64},SparseMatrixCSC{Complex{Int64},Int64}}:
 1+1im    ⋅      ⋅  
 2-1im  5+1im    ⋅  
 3-1im  6-1im  0+0im

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions