Skip to content

Commit e644190

Browse files
authored
TYP: fix type error (#61)
* TYP: fix type error * proper fix
1 parent cd33d6d commit e644190

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

xvec/accessor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ def zonal_stats(
919919
x_coords: Hashable,
920920
y_coords: Hashable,
921921
stats: str | Callable | Sequence[str | Callable | tuple] = "mean",
922-
name: Hashable = "geometry",
922+
name: str = "geometry",
923923
index: bool | None = None,
924924
method: str = "rasterize",
925925
all_touched: bool = False,
@@ -959,7 +959,7 @@ def zonal_stats(
959959
:meth:`~xarray.DataArray.reduce` or a list with ``strings``, ``callables``
960960
or ``tuples`` in a ``(name, func, {kwargs})`` format, where ``func`` can be
961961
a string or a callable.
962-
name : Hashable, optional
962+
name : str, optional
963963
Name of the dimension that will hold the ``geometry``, by default "geometry"
964964
index : bool, optional
965965
If ``geometry`` is a :class:`~geopandas.GeoSeries`, ``index=True`` will

xvec/zonal.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def _zonal_stats_rasterize(
3030
x_coords: Hashable,
3131
y_coords: Hashable,
3232
stats: str | Callable | Sequence[str | Callable | tuple] = "mean",
33-
name: Hashable = "geometry",
33+
name: str = "geometry",
3434
all_touched: bool = False,
3535
**kwargs,
3636
) -> xr.DataArray | xr.Dataset:
@@ -105,7 +105,7 @@ def _zonal_stats_iterative(
105105
x_coords: Hashable,
106106
y_coords: Hashable,
107107
stats: str | Callable | Sequence[str | Callable | tuple] = "mean",
108-
name: Hashable = "geometry",
108+
name: str = "geometry",
109109
all_touched: bool = False,
110110
n_jobs: int = -1,
111111
**kwargs: dict[str, Any],
@@ -133,7 +133,7 @@ def _zonal_stats_iterative(
133133
:meth:`~xarray.DataArray.max`, or :meth:`~xarray.DataArray.quantile`,
134134
methods are available. Alternatively, you can pass a ``Callable`` supported
135135
by :meth:`~xarray.DataArray.reduce`.
136-
name : Hashable, optional
136+
name : str, optional
137137
Name of the dimension that will hold the ``geometry``, by default "geometry"
138138
all_touched : bool, optional
139139
If True, all pixels touched by geometries will be considered. If False, only

0 commit comments

Comments
 (0)