Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lehner committed Oct 31, 2023
1 parent c93b1a0 commit cc42c66
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tests/ad/ad.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@
eps = prec.eps**0.5
g.message(f"Numerical derivatives with eps = {eps}")
for var in [a1, a2, b1, b2, x, t1]:
if isinstance(var.value, g.lattice):
lt = g.lattice(var.value)
else:
lt = var.value.copy()
rng.cnormal(lt)
lt = rng.cnormal(var.value.new())
var.value += lt * eps
v1 = c(with_gradients=False)
var.value -= 2 * lt * eps
Expand Down

0 comments on commit cc42c66

Please sign in to comment.