JuliaArrays / JuliaArrays/ZeroDimensionalArrays.jl

should `similar(::ZeroDimensionalArray, ::Int)` return `Vector` or `FixedSizeVector`?

Open
#4 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.