JuliaArrays / JuliaArrays/StructArrays.jl
dims keyword constructor gives unintuitive result when types do not match
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 402
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
MWE:
julia> using StructArrays
julia> v = [1 3; 2 -1]
2×2 Matrix{Int64}:
1 3
2 -1
julia> StructArray{ComplexF64}(v, dims=1)
0-element StructArray(StructArray(), StructArray()) with eltype ComplexF64 with indices 1:0
It is probably best to error if types do not match.
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 by reproducing the MWE with Julia and StructArrays, then trace the constructor path used by StructArray{ComplexF64}(v, dims=1). The issue is done when a mismatched input type no longer produces a misleading zero-element result and instead raises an error.
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