JuliaArrays / JuliaArrays/StaticArrays.jl
Only Int64 works for the length of the array
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 844
- Forks
- 159
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 3
Description
This might be a trivial problem, since the defualt type of integer is Int64.
using StaticArrays
n::Int8 = 20
x= MVector{nw, Float64}(undef)
returns
ERROR: ArgumentError: Static Array parameter Size must be a tuple of Ints (e.g. `SArray{Tuple{3,3}}` or `SMatrix{3,3}`).
while
using StaticArrays
n = 20
x= MVector{nw, Float64}(undef)
works fine.
I think in the Integer supertype, only Int64 is accepted. Is there any particular reason for this?
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
Start with the Julia reproducer in the issue, comparing an Int8 length with the default Int64 length, and inspect StaticArrays' validation of the MVector size parameter. Determine whether non-Int64 integer lengths should be supported or whether the restriction needs documenting; done means a confirmed behavior with a regression test or a clear explanation.
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
- 35/100