Skip to content

Commit

Permalink
Testing SIM_FULL
Browse files Browse the repository at this point in the history
  • Loading branch information
yaugenst-flex committed Nov 22, 2024
1 parent 78d8a71 commit 45a7912
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tidy3d/components/data/data_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
WATT,
)
from ...exceptions import DataError, FileError
from ...log import log
from ..autograd import TidyArrayBox, get_static, interpn, is_tidy_box
from ..types import Axis, Bound

Expand Down Expand Up @@ -125,6 +126,12 @@ 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'.
"""
import importlib.util

if importlib.util.find_spec("scipy") is None:
log.warning("SciPy not installed, skipping '_interp_validator'...")
return

if field_name is None:
field_name = "DataArray"

Expand Down
6 changes: 6 additions & 0 deletions tidy3d/components/geometry/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ def _check_mesh(cls, val: TriangleMeshDataset) -> TriangleMeshDataset:
if val is None:
return None

import importlib.util

if importlib.util.find_spec("trimesh") is None:
log.warning("trimesh not installed, skipping '_check_mesh'...")
return val

import trimesh

mesh = cls._triangles_to_trimesh(val.surface_mesh)
Expand Down

0 comments on commit 45a7912

Please sign in to comment.