JuliaDiff / JuliaDiff/ReverseDiff.jl

Support scalar inputs to differentiation API functions

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

Nobody has claimed this yet.

Dominant language
Julia
Stars
393
Forks
60
Avg merge
18h 24m
Merged PRs (30d)
8

Description

I did not include a scalar derivative function in the ReverseDiff API on purpose, since ForwardDiff is a much better tool for such a method. However, we do allow users to pass in tuples of arguments to API methods. In this case, we should allow elements of the tuples to be scalars. For example, see here; it's unintuitive (and poor style for the objective code) that b should need to be an array and not a scalar.

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

Begin at ReverseDiff's tuple-argument API methods and compare how scalar and array elements are dispatched. Reproduce the linked example, then verify that tuple inputs accept a scalar element while existing array-based differentiation behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.