JuliaArrays / JuliaArrays/DualArrays.jl
Do we want to support generators? (comprehensions, sum, etc.)
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 1
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Is it possible to auto-diff the following:
julia> function mynorm(x)
sqrt(sum(x^2 for x in x))
end
mynorm (generic function with 1 method)
julia> mynorm([1,2,3])
3.7416573867739413
Or more generally, differentiate code with comprehensions ([x^2 for x in x]), minimum, etc.
This is hard since Generator uses anonymous functions.
map and broadcast also have this issue when passed an anonymous function. It's possible there's a work around by making a type BroadcastedDualVector that turns all the relevant function calls into broadcasted versions.
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 by examining how DualArrays.jl handles anonymous functions and calls involving Generator, map, and broadcast. Determine the supported scope for differentiating comprehensions, sum, minimum, and related expressions, then add coverage showing which requested forms work and document the resulting boundary.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100