Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Update from FDM.jl to FiniteDifferences.jl #181

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ os:
- osx
julia:
- 1.0
- 1.1
- 1.2
- 1.3
- nightly
notifications:
email: false
Expand Down
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name = "Nabla"
uuid = "49c96f43-aa6d-5a04-a506-44c7070ebe78"
version = "0.12.1"
version = "0.12.2"

[deps]
DiffRules = "b552c78f-8df3-52c6-915a-8e097449b14b"
DualNumbers = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74"
FDM = "e25cca7e-83ef-51fa-be6c-dfe2a3123128"
FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
DiffRules = "^0.0"
DualNumbers = ">=0.6.0"
FDM = "^0.6"
FiniteDifferences = "0.7, 0.8"
SpecialFunctions = ">=0.5.0"
julia = "^1.0"

Expand Down
1 change: 1 addition & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Nabla = "49c96f43-aa6d-5a04-a506-44c7070ebe78"

[compat]
Documenter = "~0.19"
2 changes: 1 addition & 1 deletion docs/src/pages/custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ of the documentation.
In order to ensure correctness for custom sensitivity definitions, we can compare the
results against those computed by the method of finite differences.
The finite differencing itself is implemented in the Julia package
[FDM](https://github.com/invenia/FDM.jl), but Nabla defines and exports functionality
[FiniteDifferences.jl](https://github.com/juliadiff/FiniteDifferences.jl), but Nabla defines and exports functionality
that permits checking results against finite differencing.

The primary workhorse function for this is `check_errs`.
Expand Down
4 changes: 2 additions & 2 deletions src/finite_differencing.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using FDM
using FiniteDifferences

export check_Dv, check_Dv_update, check_errs,
assert_approx_equal, domain1, domain2, points, in_domain
Expand All @@ -21,7 +21,7 @@ function approximate_Dv(
x::Tuple{Vararg{∇ArrayOrScalar}},
v::Tuple{Vararg{∇ArrayOrScalar}}
)
return FDM.Central(5, 1)(ε -> sum(ȳ .* f((x .+ ε .* v)...)))
return FiniteDifferences.Central(5, 1)(ε -> sum(ȳ .* f((x .+ ε .* v)...)))
end

approximate_Dv(f, ȳ::∇ArrayOrScalar, x::∇ArrayOrScalar, v::∇ArrayOrScalar) =
Expand Down