diff --git a/docs/faq b/docs/faq index d2671008d..289e778ce 160000 --- a/docs/faq +++ b/docs/faq @@ -1 +1 @@ -Subproject commit d2671008d950672548ed029e27c1417f6b8b2b8c +Subproject commit 289e778ced6a1ba735fcb001df63f94a1b8df3c9 diff --git a/tidy3d/components/data/data_array.py b/tidy3d/components/data/data_array.py index 63568adb0..588a742b6 100644 --- a/tidy3d/components/data/data_array.py +++ b/tidy3d/components/data/data_array.py @@ -1,4 +1,5 @@ """Storing tidy3d data at it's most fundamental level as xr.DataArray objects""" + from __future__ import annotations from typing import Dict, List, Union from abc import ABC @@ -113,9 +114,17 @@ def assign_data_attrs(cls, val): return val def _interp_validator(self, field_name: str = None) -> None: - """Make sure we can interp()/sel() the data.""" - # NOTE: 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'. + """Make sure we can interp()/sel() the data. + + NOTE + ---- + 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 because + # self.values will be dtype('object') and not interpolatable + if isbox(self.values.flat[0]): + return if field_name is None: field_name = "DataArray"