JuliaDiff / JuliaDiff/ChainRulesCore.jl

Immutable setindex on Tangent

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

Nobody has claimed this yet.

Dominant language
Julia
Stars
267
Forks
66
PR merge metrics
No merged PRs in 30d

Description

Should Base.setindex be defined on Tangent? It could be handy to construct specific tangents, for example, by modifying the output of rand_tangent.

Base has setindex (no bang) for tuples and named tuples. Arguably for the latter it could be a Base.setproperty behaving similarly but it's uncommon enough to keep a single function.

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

Locate the Tangent and rand_tangent definitions, then inspect how immutable setindex is provided for tuples and named tuples. Determine the intended setindex behavior for constructing a modified Tangent and add focused tests showing the resulting tangent values; done means the behavior is covered and consistent with the existing immutable APIs.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.