Size of StaticArray type
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 32/100
Research direction
Reproduce the Julia examples using ArrayInterface.known_size, ArrayInterface.size, StaticArray, and StaticArrays, then inspect the IteratorSize-related dispatch involved in those entry points. Done means the expected behavior for type-level dimensions and unknown dimensions is decided, documented by regression tests, and any needed StaticArrays report is filed.
Written by the indexing model from the issue text.
Description
Using ArrayInterface v5.05 and StaticArrays v1.42:
julia> import ArrayInterface as Arr
julia> using StaticArrays
julia> Arr.known_size(SArray{Tuple{2,3}})
(6,)
julia> Arr.size(StaticArray{Tuple{2,3}})
(static(6),)
Are those the intended results? I expected (2, 3) and (static(2), static(3)), respectively. (Though, things work fine for instances of StaticArrays.)
I think what is happening is that IteratorSize(::Type{<:StaticArray}) is defaulting to HasLength() while it might better off be HasShape{N}(), so the wrong method gets called at some point. If that's the case, perhaps its also worth opening a bug report on StaticArrays.
Also, should ArrayInterface.size produce an error if given a Type as an argument? What should be the behavior if one of the dimensions is unknown?
- Dominant language
- Julia
- Stars
- 14
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
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.
More from JuliaArrays/StaticArrayInterface.jl
-
tagbot-manual
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Storage Order Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
JuliaArrays/StaticArrayInterface.jl#4 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
JuliaArrays/StaticArrayInterface.jl#10 · 2 comments ·
All issues in JuliaArrays/StaticArrayInterface.jl
Similar issues
-
bug 🐞 distributed 🕸️
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
CliMA/Oceananigans.jl#6049 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
epiforecasts/BVDOutbreakSize#790 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
kpobrien/JosephsonCircuits.jl#31 · 2 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100