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

Fix LinearAlgebra.hermitian(::AbstractJuMPScalar, ::Symbol) #3693

Merged
merged 2 commits into from
Feb 29, 2024

Conversation

odow
Copy link
Member

@odow odow commented Feb 29, 2024

Closes #3692

Docstrinng is:

help?> LinearAlgebra.hermitian
  hermitian(A, uplo=:U)

  Construct a hermitian view of A. If A is a matrix, uplo controls whether the upper (if uplo = :U)
  or lower (if uplo = :L) triangle of A is used to implicitly fill the other one. If A is a Number,
  its real part is returned converted back to the input type.

  If a hermitian view of a matrix is to be constructed of which the elements are neither matrices
  nor numbers, an appropriate method of hermitian has to be implemented. In that case,
  hermitian_type has to be implemented, too.

The important sentence is: If A is a Number, its real part is returned converted back to the input type.

test/test_complex.jl Outdated Show resolved Hide resolved
test/test_complex.jl Outdated Show resolved Hide resolved
Copy link

codecov bot commented Feb 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.36%. Comparing base (d031be9) to head (8e19007).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3693   +/-   ##
=======================================
  Coverage   98.36%   98.36%           
=======================================
  Files          43       43           
  Lines        5698     5699    +1     
=======================================
+ Hits         5605     5606    +1     
  Misses         93       93           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@odow odow merged commit a9b5ff9 into master Feb 29, 2024
11 checks passed
@odow odow deleted the od/fix-hermitian branch February 29, 2024 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

LinearAlgebra.hermitian is incorrect
1 participant