Skip to content

Commit

Permalink
Fix edge case where autograd vjp test would fail on some machines
Browse files Browse the repository at this point in the history
  • Loading branch information
yaugenst-flex committed Jun 3, 2024
1 parent 053f61b commit 3cbb9f5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import tidy3d as td
import xarray as xr

from autograd.core import vspace, VJPNode, backward_pass
from autograd.tracer import trace, new_box
from autograd.core import VJPNode
from autograd.tracer import new_box

from tidy3d.log import _get_level_int
from tidy3d.web import BatchData
Expand Down Expand Up @@ -868,8 +868,7 @@ def make_data(
np.random.seed(1)
data = np.random.random(data_shape)

# data = np.ones(data_shape)
data = (1 + 1j) * data if is_complex else data
data = (1 + 0.5j) * data if is_complex else data
data = gaussian_filter(data, sigma=1.0) # smooth out the data a little so it isnt random
data_array = data_array_type(data, coords=coords)
return data_array
Expand Down

0 comments on commit 3cbb9f5

Please sign in to comment.