Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update typing with GeoUtils 0.0.13 #400

Merged
merged 2 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies:
- scikit-image
- scikit-gstat>=1.0
- pytransform3d
- geoutils==0.0.11
- geoutils==0.0.13

# Development-specific
- pip
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies:
- scikit-image
- scikit-gstat>=1.0
- pytransform3d
- geoutils==0.0.11
- geoutils==0.0.13
- pip

# - pip:
Expand Down
4 changes: 2 additions & 2 deletions xdem/coreg/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import scipy.ndimage
import scipy.optimize
import skimage.transform
from geoutils._typing import AnyNumber
from geoutils._typing import Number
from geoutils.raster import (
Mask,
RasterType,
Expand Down Expand Up @@ -201,7 +201,7 @@ def _mask_dataframe_by_dem(df: pd.DataFrame | NDArrayf, dem: RasterType) -> pd.D
def _calculate_ddem_stats(
ddem: NDArrayf | MArrayf,
inlier_mask: NDArrayf | None = None,
stats_list: tuple[Callable[[NDArrayf], AnyNumber], ...] | None = None,
stats_list: tuple[Callable[[NDArrayf], Number], ...] | None = None,
stats_labels: tuple[str, ...] | None = None,
) -> dict[str, float]:
"""
Expand Down
14 changes: 7 additions & 7 deletions xdem/coreg/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import numpy as np
import pandas as pd
import rasterio as rio
from geoutils._typing import AnyNumber
from geoutils._typing import Number
from geoutils.raster import RasterType

from xdem._typing import NDArrayf
Expand All @@ -24,9 +24,9 @@ def create_inlier_mask(
shp_list: list[str | gu.Vector | None] | tuple[str | gu.Vector] | tuple[()] = (),
inout: list[int] | tuple[int] | tuple[()] = (),
filtering: bool = True,
dh_max: AnyNumber = None,
nmad_factor: AnyNumber = 5,
slope_lim: list[AnyNumber] | tuple[AnyNumber, AnyNumber] = (0.1, 40),
dh_max: Number = None,
nmad_factor: Number = 5,
slope_lim: list[Number] | tuple[Number, Number] = (0.1, 40),
) -> NDArrayf:
"""
Create a mask of inliers pixels to be used for coregistration. The following pixels can be excluded:
Expand Down Expand Up @@ -135,9 +135,9 @@ def dem_coregistration(
shp_list: list[str | gu.Vector] | tuple[str | gu.Vector] | tuple[()] = (),
inout: list[int] | tuple[int] | tuple[()] = (),
filtering: bool = True,
dh_max: AnyNumber = None,
nmad_factor: AnyNumber = 5,
slope_lim: list[AnyNumber] | tuple[AnyNumber, AnyNumber] = (0.1, 40),
dh_max: Number = None,
nmad_factor: Number = 5,
slope_lim: list[Number] | tuple[Number, Number] = (0.1, 40),
plot: bool = False,
out_fig: str = None,
verbose: bool = False,
Expand Down
Loading