diff --git a/virtualizarr/manifests/array.py b/virtualizarr/manifests/array.py index 3ef05983..0c74077f 100644 --- a/virtualizarr/manifests/array.py +++ b/virtualizarr/manifests/array.py @@ -148,7 +148,9 @@ def __array_ufunc__(self, ufunc, method, *inputs, **kwargs) -> Any: return _isnan(self.shape) return NotImplemented - def __array__(self, dtype: np.typing.DTypeLike = None) -> np.ndarray: + def __array__( + self, dtype: np.typing.DTypeLike | None = None, copy: bool | None = None + ) -> np.ndarray: raise NotImplementedError( "ManifestArrays can't be converted into numpy arrays or pandas Index objects" ) diff --git a/virtualizarr/manifests/array_api.py b/virtualizarr/manifests/array_api.py index 1651676b..238876d4 100644 --- a/virtualizarr/manifests/array_api.py +++ b/virtualizarr/manifests/array_api.py @@ -97,9 +97,14 @@ def concatenate( new_shape[axis] = new_length_along_concat_axis # do concatenation of entries in manifest - concatenated_paths = np.concatenate( - [arr.manifest._paths for arr in arrays], - axis=axis, + concatenated_paths = ( + cast( # `np.concatenate` is type hinted as if the output could have Any dtype + np.ndarray[Any, np.dtypes.StringDType], + np.concatenate( + [arr.manifest._paths for arr in arrays], + axis=axis, + ), + ) ) concatenated_offsets = np.concatenate( [arr.manifest._offsets for arr in arrays],