JuliaArrays / JuliaArrays/OffsetArrays.jl

OffsetArray of size 1 from elementwise multiplication

Open
#360 1 comment 0 reactions 0 assignees View on GitHub

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

  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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.