julia
df5361ac - Accept IndexStyle in diagind, defaulting to IndexLinear (#52549)

Commit
2 years ago
Accept IndexStyle in diagind, defaulting to IndexLinear (#52549) Partly revert and redesign #52115, with `diagind` now accepting an optional `IndexStyle`, which is `IndexLinear` by default. This should address the breakages reported in that PR. After this, ```julia julia> D = Diagonal(1:4) 4×4 Diagonal{Int64, UnitRange{Int64}}: 1 ⋅ ⋅ ⋅ ⋅ 2 ⋅ ⋅ ⋅ ⋅ 3 ⋅ ⋅ ⋅ ⋅ 4 julia> diagind(D) 1:5:16 julia> diagind(D, IndexCartesian()) StepRangeLen(CartesianIndex(1, 1), CartesianIndex(1, 1), 4) ``` --------- Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de>
Author
Parents
Loading