Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
KlausC opened this issue Nov 16, 2018 · 0 comments
Closed

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

KlausC opened this issue Nov 16, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@KlausC
Copy link
Contributor

KlausC commented Nov 16, 2018

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
@andreasnoack andreasnoack added bug Something isn't working linear algebra labels Jan 7, 2019
KristofferC referenced this issue in JuliaLang/julia Aug 26, 2019
* proper diagonal in copytri! (fix #30055)

* added sprandn methods with Type

* additional parameter in copytri! for diagonal

* @inline copytri! to enforce constant propagation

(cherry picked from commit 4be9339)
KristofferC referenced this issue in JuliaLang/julia Aug 27, 2019
* proper diagonal in copytri! (fix #30055)

* added sprandn methods with Type

* additional parameter in copytri! for diagonal

* @inline copytri! to enforce constant propagation

(cherry picked from commit 4be9339)
KristofferC referenced this issue in JuliaLang/julia Feb 20, 2020
* proper diagonal in copytri! (fix #30055)

* added sprandn methods with Type

* additional parameter in copytri! for diagonal

* @inline copytri! to enforce constant propagation

(cherry picked from commit 4be9339)
@KristofferC KristofferC transferred this issue from JuliaLang/julia Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants