diff --git a/xvec/accessor.py b/xvec/accessor.py index a779bb8..f9d49a1 100644 --- a/xvec/accessor.py +++ b/xvec/accessor.py @@ -919,7 +919,7 @@ def zonal_stats( x_coords: Hashable, y_coords: Hashable, stats: str | Callable | Sequence[str | Callable | tuple] = "mean", - name: Hashable = "geometry", + name: str = "geometry", index: bool | None = None, method: str = "rasterize", all_touched: bool = False, @@ -959,7 +959,7 @@ def zonal_stats( :meth:`~xarray.DataArray.reduce` or a list with ``strings``, ``callables`` or ``tuples`` in a ``(name, func, {kwargs})`` format, where ``func`` can be a string or a callable. - name : Hashable, optional + name : str, optional Name of the dimension that will hold the ``geometry``, by default "geometry" index : bool, optional If ``geometry`` is a :class:`~geopandas.GeoSeries`, ``index=True`` will diff --git a/xvec/zonal.py b/xvec/zonal.py index 9e29d86..5ed8159 100644 --- a/xvec/zonal.py +++ b/xvec/zonal.py @@ -30,7 +30,7 @@ def _zonal_stats_rasterize( x_coords: Hashable, y_coords: Hashable, stats: str | Callable | Sequence[str | Callable | tuple] = "mean", - name: Hashable = "geometry", + name: str = "geometry", all_touched: bool = False, **kwargs, ) -> xr.DataArray | xr.Dataset: @@ -105,7 +105,7 @@ def _zonal_stats_iterative( x_coords: Hashable, y_coords: Hashable, stats: str | Callable | Sequence[str | Callable | tuple] = "mean", - name: Hashable = "geometry", + name: str = "geometry", all_touched: bool = False, n_jobs: int = -1, **kwargs: dict[str, Any], @@ -133,7 +133,7 @@ def _zonal_stats_iterative( :meth:`~xarray.DataArray.max`, or :meth:`~xarray.DataArray.quantile`, methods are available. Alternatively, you can pass a ``Callable`` supported by :meth:`~xarray.DataArray.reduce`. - name : Hashable, optional + name : str, optional Name of the dimension that will hold the ``geometry``, by default "geometry" all_touched : bool, optional If True, all pixels touched by geometries will be considered. If False, only