Skip to content

Commit 3dba073

Browse files
author
Daniel Mateos
committed
Fix type hints to hopefully fix tests
1 parent 6141281 commit 3dba073

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

scdata/tools/series.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
from scdata.tools.custom_logger import logger
22

3+
from typing import Optional
34
from pandas import Series, Timedelta
45
import numpy as np
56

6-
def infer_sampling_rate(series: Series) -> int | None:
7+
def infer_sampling_rate(series: Series) -> Optional[int]:
78
'''Infer the sampling rate of the given timeseries, rounded to the
89
closest minute.
910
'''
@@ -21,7 +22,7 @@ def infer_sampling_rate(series: Series) -> int | None:
2122
return integer_minutes
2223

2324

24-
def mode_ratio(series: Series, ignore_zeroes=True) -> int:
25+
def mode_ratio(series: Series, ignore_zeroes=True) -> float:
2526
'''Count the percentage of times the most common value appears in the series,
2627
ignoring zeroes and NaNs.'''
2728

0 commit comments

Comments
 (0)