Skip to content

Commit

Permalink
minor test fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
denizyuret committed Dec 26, 2020
1 parent 7aff801 commit e94af8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/gradcheck.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ function gcwalk(i, xptr, gptr, f0, f, x, kw, nsample, verbose, delta, rtol, atol
if isa(value(xptr[i]), Number)
if isa(xptr[i], Param)
xi = xptr[i].value
delta = delta > 0 ? oftype(xi,delta) : cbrt(eps(xi))
delta = delta > 0 ? oftype(float(xi),delta) : cbrt(eps(xi))
xptr[i].value = xi >= 0 ? xi + delta : xi - delta
f1 = gcsum(f, x...; kw...)
nd = (f1 - f0) / (xptr[i] - xi)
xptr[i].value = xi
else
xi = xptr[i]
delta = delta > 0 ? oftype(xi,delta) : cbrt(eps(xi))
delta = delta > 0 ? oftype(float(xi),delta) : cbrt(eps(xi))
xptr[i] = xi >= 0 ? xi + delta : xi - delta
f1 = gcsum(f, x...; kw...)
nd = (f1 - f0) / (xptr[i] - xi)
Expand Down

2 comments on commit e94af8f

@denizyuret
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/26966

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.2.4 -m "<description of version>" e94af8f18eb87e88a3b4fdf5f21e038e1785a078
git push origin v1.2.4

Please sign in to comment.