JuliaDiff / JuliaDiff/FiniteDifferences.jl

Should `to_vec(::Integer)` return an empty vector

Open
#188 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
318
Forks
32
PR merge metrics
No merged PRs in 30d

Description

Integers can't be perturbed, so their to_vec should be empty. Originally suggested in https://github.com/JuliaDiff/FiniteDifferences.jl/pull/187

function to_vec(x::Integer)
     Integer_from_vec(v) = x
     return Bool[], Integer_from_vec
end

Would also fix (a part of) https://github.com/chrisbrahms/Hankel.jl/pull/27

Did not test yet whether it messes up any existing ChainRules tests.

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 at the to_vec(::Integer) entry point and inspect how the proposed empty vector behavior interacts with the ChainRules tests. Confirm that integer inputs produce an empty vector and that the existing ChainRules tests still pass; the issue notes that testing has not yet been done.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
tooling
Issue type
Bug
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.