FiniteDifferences.jl
FiniteDifferences.jl copied to clipboard
High accuracy derivatives, estimated via numerical finite differences (formerly FDM.jl)
idk why, i thought this would be caught by our handling of arrays? ```julia julia> v, from_vec = FiniteDifferences.to_vec(1.0:2.0) ([1.0, 0.0, 1.0, 0.0, 2.0, 1.0], FiniteDifferences.var"#structtype_from_vec#29"{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, FiniteDifferences.var"#Tuple_from_vec#48"{NTuple{4, Int64},...
We will likely have to be more careful than in JuliaDiff/ChainRulesTestUtils.jl#205 and JuliaDiff/ChainRules.jl#499, since there are some hot paths here we probably do want to specialize, but I suspect that...
Summary: it seems that the finite difference can't be further differentiated by Zygote Example: If I do ```julia dif(x) = central_fdm(2, 1)(sin, x) ``` and then call ```julia dif'(0) ```...
Minimal example: ```julia julia> using FiniteDifferences julia> using ChainRulesTestUtils: _fdm julia> j′vp(_fdm, x -> sum(x) > 1 ? zeros(10) : zeros(ComplexF64, 10), rand(10), zeros(10)) ERROR: DimensionMismatch("second dimension of A, 20,...
I have a computation that solves an implicit equation using iterative numerical methods (bisection, Brent, etc). I would like to use FiniteDifferences.jl for unit testing partials I write for ChainRulesCore....
Consider: we know that the derviative of any `sum` of a collection of ones similar to the input. because it is `sum(xs) = x[1] + x[2] + ...`. However for...
I didn't look at the implementation details of `to_vec` but I wanted to report a bug we encountered in https://github.com/FluxML/NNlib.jl/pull/272 when applying `to_vec` to a custom array wrapper. ``` 142...
> Ever approximate a derivative in code with: > > h = 0.001 > df(x) = (f(x + h) - f(x)) / h > > It turns out that this...
@wesselb and I had a discussion about this a while ago, and I completely forgot to raise an issue about it. While `FiniteDifferences` accuracy for functions of `Float64`s is as...
this is probably edge case but: ``` julia> central_fdm(5, 1)(ceil, 0.1) 5.833333333333332 julia> central_fdm(5, 1)(ceil, 0.2) -0.8333333333333333 ``` https://github.com/JuliaDiff/ChainRules.jl/pull/277