Skip to content

Commit 8f78076

Browse files
committed
Improve getjacobian utility in test code
1 parent f859e29 commit 8f78076

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/getjacobian.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# This file is a part of ChangesOfVariables.jl, licensed under the MIT License (MIT).
22

3+
if !isdefined(Main, :getjacobian)
4+
35
import ForwardDiff
46

57
torv_and_back(V::AbstractVector{<:Real}) = V, identity
@@ -33,4 +35,11 @@ function getjacobian(f, x)
3335
ForwardDiff.jacobian(vf, V)
3436
end
3537

38+
end # !isdefined(Main, :getjacobian)
39+
40+
41+
if !isdefined(Main, :foo)
42+
3643
foo(x) = inv(exp(-x) + 1)
44+
45+
end # !isdefined(Main, :foo)

0 commit comments

Comments
 (0)