Skip to content

Commit 9a8afdc

Browse files
committed
A few small fixes.
1 parent f788176 commit 9a8afdc

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/finitediff.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ end
2222
else
2323
error("Unrecognized fdtype: must be Val{:forward} or Val{:central}.")
2424
end
25-
nothing
2625
end
2726

2827
function compute_epsilon_elemtype(epsilon, x)
@@ -31,11 +30,10 @@ function compute_epsilon_elemtype(epsilon, x)
3130
elseif eltype(x) <: Real
3231
return eltype(x)
3332
elseif eltype(x) <: Complex
34-
return eltype(x).parameters[1]
33+
return real(eltype(x))
3534
else
3635
error("Could not compute epsilon type.")
3736
end
38-
nothing
3937
end
4038

4139
function fdtype_error(funtype::DataType=Val{:Real})
@@ -46,7 +44,6 @@ function fdtype_error(funtype::DataType=Val{:Real})
4644
else
4745
error("Unrecognized funtype: valid values are Val{:Real} or Val{:Complex}.")
4846
end
49-
nothing
5047
end
5148

5249
include("derivatives.jl")

0 commit comments

Comments
 (0)