From bbc08591f2e85ffaddffc9897d5f20d960a9a6c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Tue, 28 Apr 2026 15:58:44 +0200 Subject: [PATCH 1/2] Add extension to Dualization --- Project.toml | 7 +++++++ ext/DualizationExt.jl | 14 ++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 ext/DualizationExt.jl diff --git a/Project.toml b/Project.toml index 5c3cc7b..3d9d974 100644 --- a/Project.toml +++ b/Project.toml @@ -16,7 +16,14 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" UnsafeArrays = "c4a57d5a-5b31-53a6-b365-19f8c011fbd6" +[weakdeps] +Dualization = "191a621a-6537-11e9-281d-650236a99e60" + +[extensions] +DualizationExt = "Dualization" + [compat] +Dualization = "0.5.10, 0.6, 0.7" FillArrays = "1.13" KrylovKit = "0.9.5, 0.10" LinearAlgebra = "1.10" diff --git a/ext/DualizationExt.jl b/ext/DualizationExt.jl new file mode 100644 index 0000000..275541f --- /dev/null +++ b/ext/DualizationExt.jl @@ -0,0 +1,14 @@ +# Copyright (c) 2024: Benoît Legat and contributors +# +# Use of this source code is governed by an MIT-style license that can be found +# in the LICENSE.md file or at https://opensource.org/licenses/MIT. + +module DualizationExt + +import Dualization +import LowRankOpt + +Dualization.dual_attribute(attr::LowRankOpt.RawStatus) = attr +Dualization.dual_attribute(attr::LowRankOpt.Solution) = attr + +end From bc76fe3a84b4c4881cd9cd22db801da58c30034e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Tue, 28 Apr 2026 16:19:48 +0200 Subject: [PATCH 2/2] Fix --- src/solution.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/solution.jl b/src/solution.jl index 3009403..e45969b 100644 --- a/src/solution.jl +++ b/src/solution.jl @@ -74,6 +74,10 @@ function Base.size(s::ShapedSolution) end num_matrices(s::ShapedSolution) = length(s.matrices) +if isdefined(LinearAlgebra, :norm_recursive_check) + LinearAlgebra.norm_recursive_check(::ShapedSolution) = nothing +end + function LinearAlgebra.norm2(s::ShapedSolution{T}) where {T} # `LinearAlgebra.generic_norm2` starts by computing the ∞ norm and do a rescaling, we don't do that here return √(LinearAlgebra.dot(s, s))