JuliaArrays / JuliaArrays/FillArrays.jl
`permutedims(::RectDiagonal, perm)` isn't `RectDiagonal`
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 187
- Forks
- 41
- Avg merge
- 17h 29m
- Merged PRs (30d)
- 1
Description
For example:
julia> using FillArrays: RectDiagonal
julia> d = RectDiagonal(randn(4))
4×4 RectDiagonal{Float64, Vector{Float64}, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}:
-2.47027 ⋅ ⋅ ⋅
⋅ 0.139025 ⋅ ⋅
⋅ ⋅ -1.05975 ⋅
⋅ ⋅ ⋅ 0.41858
julia> permutedims(d, (2, 1))
4×4 Matrix{Float64}:
-2.47027 0.0 0.0 0.0
0.0 0.139025 0.0 0.0
0.0 0.0 -1.05975 0.0
0.0 0.0 0.0 0.41858
julia> pkgversion(FillArrays)
v"1.13.0"
julia> versioninfo()
Julia Version 1.11.6
Commit 9615af0f269 (2025-07-09 12:58 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: macOS (arm64-apple-darwin24.0.0)
CPU: 10 × Apple M1 Max
WORD_SIZE: 64
LLVM: libLLVM-16.0.6 (ORCJIT, apple-m1)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Julia example with RectDiagonal and permutedims(d, (2, 1)), then trace the permutedims behavior for RectDiagonal. Add a regression test for the demonstrated case and verify that the result remains a RectDiagonal with the same diagonal values rather than a Matrix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100