Skip to content

Commit 61cc705

Browse files
authored
fix eigmin and eigmax sign (#413)
* Remove deprecations; update `norm` behavior * update docs, misc tweaks * fix latex * fix * allow building docs while skipping examples * smaller `huber` example * fix docstring * do the norm deprecation in 2 steps * leave for next PR * fix `eigmin` and `eigmax` sign
1 parent 45e18a4 commit 61cc705

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Changes to the `sign` of atoms:
66
* The sign of `sumlargesteigs` has been changed from `Positive` to `NoSign()` instead of `Positive()`, to allow non-positive-semidefinite inputs. This has the potential
77
to break code that required that sign to be positive. If you run into this problem, please file an issue so we can figure out a workaround. [#412](https://github.com/jump-dev/Convex.jl/pull/412)
8+
* The sign of `eigmin` and `eigmax` has been changed from `Positive` to `NoSign()`. This is a bugfix because in general `eigmin` and `eigmax` do not need to return a positive quantity (for non-positive-semidefinite inputs). Again, this has the potential to break code that required that sign to be positive. If you run into this problem, please file an issue so we can figure out a workaround. [#412](https://github.com/jump-dev/Convex.jl/pull/413)
89
* Removal of deprecations
910
* `lambdamin` and `lambdamax` has been deprecated to `eigmin` and `eigmax` since Convex v0.13.0. This deprecation has been removed, so your code must be updated to call `eigmin` or `eigmax` instead. [#412](https://github.com/jump-dev/Convex.jl/pull/412)
1011
* `norm(x, p)` where `x` is a matrix expression has been deprecated to `opnorm(x,p)` since Convex v0.8.0. This deprecation has been removed, so your code must be updated to call `opnorm(x, p)` instead. Currently, `norm(x,p)` for a matrix

src/atoms/sdp_cone/eig_min_max.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ struct EigMaxAtom <: AbstractExpr
2828
end
2929

3030
function sign(x::EigMaxAtom)
31-
return Positive()
31+
return NoSign()
3232
end
3333

3434
function monotonicity(x::EigMaxAtom)
@@ -81,7 +81,7 @@ struct EigMinAtom <: AbstractExpr
8181
end
8282

8383
function sign(x::EigMinAtom)
84-
return Positive()
84+
return NoSign()
8585
end
8686

8787
function monotonicity(x::EigMinAtom)

test/test_utilities.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Convex: AbstractExpr, ConicObj
2+
using LinearAlgebra
23

34
# It's not super easy to capture the output
45
# I ended up using this pattern from Suppressor:

0 commit comments

Comments
 (0)