Skip to content

Commit 5ae9fd9

Browse files
Merge pull request #114 from musm/patch-1
Fix allocate memory Vector bug
2 parents 01df15b + e59632b commit 5ae9fd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/finite_difference.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ function finite_difference{T <: Number}(f,
139139
x::AbstractVector{T},
140140
dtype::Symbol = :central)
141141
# Allocate memory for gradient
142-
g = AbstractVector{Float64}(length(x))
142+
g = Vector{Float64}(length(x))
143143

144144
# Mutate allocated gradient
145145
finite_difference!(f, float(x), g, dtype)

0 commit comments

Comments
 (0)