JuliaArrays / JuliaArrays/OffsetArrays.jl
OffsetArray of size 1 from elementwise multiplication
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 212
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Description
See forum discussion with examples.
When I elementwise multiply an offset array by a regular array, I get the result I expect - the resulting array is offset properly - except when the size is 1. When the input array dimension is 6:10, for example, the multiplication result is 6:10 in the first dimension. This is as I expect, and all dimensions of size greater than 1 result in the same first dimension as the input. However, when the input array is 10:10, the multiplication result is 1:1 in the first dimension. I expect 10:10 as the first dimension, consistent with the size > 1 case.
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 linked forum discussion and reproduce elementwise multiplication between an offset array and a regular array for dimensions 6:10 and 10:10. Investigate why the singleton dimension becomes 1:1; done means the size-1 case preserves the offset 10:10 consistently with larger dimensions.
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
- 45/100