jump-dev / JuMP.jl

Modeling language for Mathematical Optimization (linear, mixed-integer, conic, semidefinite, nonlinear)
http://jump.dev/JuMP.jl/
Other
2.17k stars 390 forks source link

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

Closed odow closed 4 months ago

odow commented 4 months ago

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.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.