Skip to content

Commit

Permalink
TYP: fix type error (#61)
Browse files Browse the repository at this point in the history
* TYP: fix type error

* proper fix
  • Loading branch information
martinfleis committed Feb 8, 2024
1 parent cd33d6d commit e644190
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions xvec/accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions xvec/zonal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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],
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e644190

Please sign in to comment.