JuliaArrays / JuliaArrays/FillArrays.jl

add more support for Base.setindex

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

Nobody has claimed this yet.

Dominant language
Julia
Stars
187
Forks
41
Avg merge
17h 29m
Merged PRs (30d)
1

Description

At the moment we only support setting a single index, but I think eg the following should be supported:

julia> Base.setindex(Zeros(5,5), randn(2,2), 1:2, 1:2)
ERROR: MethodError: no method matching setindex(::Zeros{Float64, 2, Tuple{…}}, ::Matrix{Float64}, ::UnitRange{Int64}, ::UnitRange{Int64})

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 by reproducing the Base.setindex example with Zeros(5,5), randn(2,2), and the two UnitRange indices, then inspect the existing single-index setindex support. Done means the shown range assignment works without a MethodError and preserves the expected matrix values.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.