JuliaDiff / JuliaDiff/ChainRulesCore.jl
Make ZeroTangent() == 0
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 267
- Forks
- 66
- PR merge metrics
- No merged PRs in 30d
Description
I feel like we can overload == for ZeroTangent()`
to do something like
==(::ZeroTangent, a) = iszero(a)
would also need to overload hash
since all things that are equal to zero in julia have the same hash, buit we can just call hash(0, h)
this would be useful for testhing some of the stuff i am working on to not AD things that don't appear in this function.
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 locating the ZeroTangent definition and any existing equality or hashing methods. Check how Julia represents zero-like values and add tests covering equality with zero and matching hashes; done means the proposed comparisons and hash behavior work without breaking existing ZeroTangent tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100