Skip to content

Too restrictive setindex! for triangular matrices #761

Open
@mateuszbaran

Description

@mateuszbaran

setindex! of triangular matrices could be less restrictive when setting to a structural zero: https://github.com/JuliaLang/julia/blob/4ed484fe7ac591da67bfe384c369430ed658606d/stdlib/LinearAlgebra/src/triangular.jl#L231
it could be iszero(x) instead.

I'm not sure about diagonals of unit triangular matrices (Julia doesn't have isoneunit) but isone(x) may be better then x == 1 as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions