Skip to content

Commit

Permalink
Tyler comments 1
Browse files Browse the repository at this point in the history
  • Loading branch information
yaugenst-flex committed Sep 4, 2024
1 parent 350d1db commit 0e92e95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 3 additions & 3 deletions tidy3d/components/autograd/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ def get_tracer(x: typing.Any) -> typing.Any:
if not is_traced(x):
return None

if not _is_traced_objary(x):
return x
if _is_traced_objary(x):
return anp.array(x.tolist())

return anp.array(x.tolist())
return x


def split_list(x: list[typing.Any], index: int) -> (list[typing.Any], list[typing.Any]):
Expand Down
4 changes: 0 additions & 4 deletions tidy3d/components/data/data_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,6 @@ def _interp_validator(self, field_name: str = None) -> None:
This does not check every 'DataArray' by default. Instead, when required, this check can be
called from a validator, as is the case with 'CustomMedium' and 'CustomFieldSource'.
"""
# skip this validator if currently tracing for autograd
if self.has_tracers:
return

if field_name is None:
field_name = "DataArray"

Expand Down

0 comments on commit 0e92e95

Please sign in to comment.