JuliaArrays / JuliaArrays/StaticArrays.jl
Addition shape check does not match base
Open
Nobody has claimed this yet.
bug
- Dominant language
- Julia
- Stars
- 844
- Forks
- 159
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 3
Description
julia> a = randn(2,2);
julia> a[[1,2],[1]] + a[[1,2],1]
2-element Array{Float64,1}:
-0.48713
1.05429
julia> a[(@SVector [1,2]),(@SVector [1])] + a[(@SVector [1,2]),1]
ERROR: DimensionMismatch("Dimensions must match. Got inputs with Size(2, 1) and Size(2,).")
Stacktrace:
[1] +(::StaticArrays.SMatrix{2,1,Float64,2}, ::StaticArrays.SVector{2,Float64}) at /home/ubuntu/.julia/v0.6/StaticArrays/src/linalg.jl:10
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 examples in the issue with Julia and compare the regular Array result with the StaticArrays result. Start at StaticArrays/src/linalg.jl:10, then identify how the two indexed arrays' shapes are checked; done means addition follows the base Array behavior for these inputs and the regression is covered by an appropriate test.
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