Closed gdalle closed 1 week ago
Your linked comment points out the issue: https://github.com/adrhill/SparseConnectivityTracer.jl/blob/ec44afc4b84cb1b6b7f234870776b4658a4987ac/src/overloads/arrays.jl#L72
We overload norm(A::AbstractArray{<:AbstractTracer})
, which is less specific than StaticArrays' norm(A:: StaticArray)
(source).
This is a general issue with array overloads since LinearAlgebra uses array-level types as traits for dispatch (e.g. Symmetric
, Hermitian
, ...). See also #133.
We could solve this problem by sticking our array overloads in a big loop over different array types.
I guess we could start by supporting types form StaticArrays as well as common LinearAlgebra matrix types?
Yeah but where does it stop?
Also I don't want StaticArrays in the main dependencies so we might have to make the loop parametric and handle static types in a package extension.
Closing in favor of the more general discussion in #192.
See https://github.com/JuliaSmoothOptimizers/ADNLPModels.jl/issues/247#issuecomment-2260558148