diff --git a/src/parcels/_chunk_cached_array/core.py b/src/parcels/_chunk_cached_array/core.py index bded6d1a5..bf73682a3 100644 --- a/src/parcels/_chunk_cached_array/core.py +++ b/src/parcels/_chunk_cached_array/core.py @@ -140,6 +140,11 @@ def _raw_vindex(self, *indices: np.ndarray) -> np.ndarray: def _vindex_get(self, indexer: VectorizedIndexer): key = indexer.tuple + # The chunk-cache fast path requires a fancy integer array per dimension. + # Some dims (e.g. unindexed extra dims) may come through as a bare slice + # instead, so fall back to dask's own vectorized indexing in that case. + if any(isinstance(k, slice) for k in key): + return self.array.vindex[key].compute() return self._raw_vindex(*key) def _oindex_get(self, indexer: OuterIndexer):