Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix edge case where autograd vjp test would fail on some machines #1737

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading