Skip to content

Commit 5d93c8c

Browse files
committed
fix: fix type hint from float to Number
1 parent d36dad2 commit 5d93c8c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

eis_toolkit/exploratory_analyses/descriptive_statistics.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from numbers import Number
2+
13
import geopandas as gpd
24
import numpy as np
35
import pandas as pd
@@ -10,7 +12,9 @@
1012
from eis_toolkit.exceptions import InvalidColumnException, InvalidRasterBandException
1113

1214

13-
def _descriptive_statistics(data: Union[rasterio.io.DatasetReader, pd.DataFrame, gpd.GeoDataFrame]) -> Dict[str, float]:
15+
def _descriptive_statistics(
16+
data: Union[rasterio.io.DatasetReader, pd.DataFrame, gpd.GeoDataFrame]
17+
) -> Dict[str, Number]:
1418
statistics = DescrStatsW(data)
1519
min = np.min(data)
1620
max = np.max(data)
@@ -69,7 +73,7 @@ def descriptive_statistics_dataframe(
6973

7074

7175
@beartype
72-
def descriptive_statistics_raster(input_data: rasterio.io.DatasetReader, band: int = 1) -> Dict[str, float]:
76+
def descriptive_statistics_raster(input_data: rasterio.io.DatasetReader, band: int = 1) -> Dict[str, Number]:
7377
"""Compute descriptive statistics from raster data.
7478
7579
Computes the following statistics:

0 commit comments

Comments
 (0)