JuliaApproximation / JuliaApproximation/ApproxFun.jl

Compatibility with ForwardDiff.Dual

Open
#764 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
559
Forks
71
PR merge metrics
No merged PRs in 30d

Description

I would like to use Approxfun for creating custom distributions in Turing.jl but it seems that Approxfun is not compatible with ForwardDiff.Dual

using ForwardDiff, ApproxFun
f = Fun(x->exp(ForwardDiff.Dual(x,1)))

throws: ERROR: LoadError: type ForwardDiff.Dual{Nothing, Float64, 1} not supported

Since Approxfun.jl is compatible with DualNumbers.jl, I assumed that it would be compatible with ForwardDiff.Dual. Any thoughts?

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 by running the provided ForwardDiff and ApproxFun reproducer to confirm the ForwardDiff.Dual error. Trace where ApproxFun rejects the type and compare that behavior with its existing DualNumbers.jl compatibility. Done means the example constructs the function without the unsupported-type error and relevant behavior remains covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.