We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65815f5 commit 496b7b2Copy full SHA for 496b7b2
pytensor/xtensor/type.py
@@ -636,7 +636,7 @@ def signature(self):
636
637
def xtensor_constant(x, name=None, dims: None | Sequence[str] = None):
638
x_dims: tuple[str, ...]
639
- if isinstance(x, xr.DataArray):
+ if XARRAY_AVAILABLE and isinstance(x, xr.DataArray):
640
xarray_dims = x.dims
641
if not all(isinstance(dim, str) for dim in xarray_dims):
642
raise NotImplementedError(
0 commit comments