FiniteDifferences.jl
FiniteDifferences.jl copied to clipboard
High accuracy derivatives, estimated via numerical finite differences (formerly FDM.jl)
Closes #206 I am tempted to generalize this from `Bool` to `Integer`, matching ChainRules's convention. If we do then we can at some point in the future workout a way...
Hello, I hope all is well. I have a question about the title. I am interested in computing a $M\times N \times N$ three-way array of derivatives: $\frac{\partial^{2}f_{i}}{\partial x_{j}\partial x_{k}}$...
ref https://github.com/JuliaDiff/ChainRulesTestUtils.jl/issues/258 https://github.com/JuliaDiff/FiniteDifferences.jl/blob/5c2979e7b84cb000ead2e256c2c5bdba005b0d22/src/to_vec.jl#L36-L57
Sorry to misuse issues to ask questions, but I could't find any other way to communicate with you developers. I am using this package to calculate the first order derivative...
reproducer: ```julia using FiniteDifferences,LinearAlgebra;SparseArrays,Random grad(central_fdm(5,1),norm,B) I_n = spdiagm(ones(n)) Random.seed!(0) B = sprand(n, n, 0.5) * 0.2 + I_n FiniteDifferences.grad(central_fdm(5,1),norm,B) ``` it gives: ``` ERROR: TypeError: in new, expected Int64, got...
Closes #188 breaks a few rules in ChainRules, need to take a look at that before merging
There was a CI Cache bug affecting the previous ci files (found in a different project). there was also an exclude for macOS x86 jobs, but there were no x86...
Turns out type-stability was causing a bunch of allocations. Type inference was failing for some reason. Also tracking history surpisingly, causes allocations. We don't need to track history when doing...
We can't really do finite differencing around `Inf` or `NaN` can we?
Integers can't be perturbed, so their `to_vec` should be empty. Originally suggested in https://github.com/JuliaDiff/FiniteDifferences.jl/pull/187 ```julia function to_vec(x::Integer) Integer_from_vec(v) = x return Bool[], Integer_from_vec end ``` Would also fix (a part...