JuliaArrays / JuliaArrays/ZeroDimensionalArrays.jl
should `similar(::ZeroDimensionalArray, ::Int)` return `Vector` or `FixedSizeVector`?
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 10
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Currently similar falls back to returning Array:
julia> using ZeroDimensionalArrays
julia> a = ZeroDimensionalArrayImmutable(fill(false))
0-dimensional ZeroDimensionalArrayImmutable{Bool}:
0
julia> similar(a, 1)
1-element Vector{Bool}:
0
julia> similar(a, 1, 1)
1×1 Matrix{Bool}:
0
Perhaps it'd be nicer to return FixedSizeArray? That would require a dependency on FixedSizeArrays, though.
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 documented similar(a, 1) and similar(a, 1, 1) examples for ZeroDimensionalArrayImmutable. Decide whether these calls should return Vector or FixedSizeVector, and evaluate the possible FixedSizeArrays dependency; done means the intended return type and dependency direction are resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100