diff --git a/pymc/data.py b/pymc/data.py index d75fd698b8..0b18f2232a 100644 --- a/pymc/data.py +++ b/pymc/data.py @@ -234,7 +234,7 @@ def determine_coords( for dim in dims: dim_name = dim # str is applied because dim entries may be None - coords[str(dim_name)] = value[dim].to_numpy() + coords[str(dim_name)] = cast(xr.DataArray, value[dim]).to_numpy() if isinstance(value, np.ndarray) and dims is not None: if len(dims) != value.ndim: