Skip to content

Commit ffeaee8

Browse files
Merge pull request #136 from ChrisRackauckas/ChrisRackauckas-patch-1
Remove adjoint overload
2 parents 4da2f9b + c4b4fe2 commit ffeaee8

File tree

7 files changed

+18
-13
lines changed

7 files changed

+18
-13
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*~
22
*.kate-swp
3+
Manifest.toml

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ os:
44
- linux
55
- osx
66
julia:
7-
- 0.6
8-
- 0.7
7+
- 1.0
98
- nightly
109
notifications:
1110
email: false

Project.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name = "Calculus"
2+
uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9"
3+
version = "0.5.0"
4+
5+
[deps]
6+
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
7+
8+
[compat]
9+
julia = "1"
10+
11+
[extras]
12+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
13+
14+
[targets]
15+
test = ["Test"]

REQUIRE

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/Calculus.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
VERSION < v"0.7.0-beta2.199" && __precompile__()
2-
31
module Calculus
42
using Compat
53
export check_derivative,

src/derivative.jl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ function Compat.LinearAlgebra.gradient(f, dtype::Symbol = :central)
2929
end
3030
end
3131

32-
if isdefined(Base, :adjoint)
33-
Base.adjoint(f::Function) = derivative(f)
34-
else
35-
Base.ctranspose(f::Function) = derivative(f)
36-
end
37-
3832
function jacobian(f, x::Vector{T}, dtype::Symbol) where T <: Number
3933
finite_difference_jacobian(f, x, dtype)
4034
end

test/derivative.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ f2(x::Vector) = sin(x[1])
1919

2020
f3(x::Real) = sin(x)
2121
for x in Compat.range(0.0, stop=0.1, length=11) # seq()
22-
@test norm(f3'(x) - cos(x)) < 10e-4
22+
@test norm(derivative(f3,x) - cos(x)) < 10e-4
2323
end
2424

2525
#

0 commit comments

Comments
 (0)