Skip to content

Base.convert(::Type{Diagonal{T}}, A::AbstractMatrix), etc. #840

Description

@mtfishman

JuliaLang/julia#48895 and JuliaLang/julia#52487 add more converters and constructors from AbstractMatrix to Diagonal, specifically when Diagonal has type parameters specified. Those aren't available in Julia/LinearAlgebra v1.10. It is subtle for libraries to support code that relies on those conversions in a backwards compatible way, they could be a good candidate for Compat.jl.

It would just be a matter of adding these lines: https://github.com/JuliaLang/LinearAlgebra.jl/blob/045ee5c4583a353d58a2a0f62b1f2ddb45b717b9/src/diagonal.jl#L103-L108 to CompatLinearAlgebraExt.jl.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions