diff --git a/nannyml/stats/avg/calculator.py b/nannyml/stats/avg/calculator.py index 54942442a..7db067f71 100644 --- a/nannyml/stats/avg/calculator.py +++ b/nannyml/stats/avg/calculator.py @@ -97,8 +97,8 @@ def __init__( self._upper_alert_thresholds: Dict[str, Optional[float]] = {column_name: 0 for column_name in self.column_names} self._lower_alert_thresholds: Dict[str, Optional[float]] = {column_name: 0 for column_name in self.column_names} - self.lower_threshold_value_limit: float = np.nan - self.upper_threshold_value_limit: float = np.nan + self.lower_threshold_value_limit: Optional[float] = None + self.upper_threshold_value_limit: Optional[float] = None self.simple_stats_metric = 'values_avg' @log_usage(UsageEvent.STATS_AVG_FIT) diff --git a/nannyml/stats/count/calculator.py b/nannyml/stats/count/calculator.py index 4c4bb5813..01dbe79fa 100644 --- a/nannyml/stats/count/calculator.py +++ b/nannyml/stats/count/calculator.py @@ -75,8 +75,8 @@ def __init__( self._upper_alert_threshold: Optional[float] = 0 self._lower_alert_threshold: Optional[float] = 0 - self.lower_threshold_value_limit: float = 0 - self.upper_threshold_value_limit: float = np.nan + self.lower_threshold_value_limit: Optional[float] = 0 + self.upper_threshold_value_limit: Optional[float] = None self.simple_stats_metric = 'rows_count' def _calculate_count_value_stats(self, data: pd.DataFrame): diff --git a/nannyml/stats/median/calculator.py b/nannyml/stats/median/calculator.py index 1a5410f2a..eae5ad9e6 100644 --- a/nannyml/stats/median/calculator.py +++ b/nannyml/stats/median/calculator.py @@ -101,8 +101,8 @@ def __init__( self._upper_alert_thresholds: Dict[str, Optional[float]] = {column_name: 0 for column_name in self.column_names} self._lower_alert_thresholds: Dict[str, Optional[float]] = {column_name: 0 for column_name in self.column_names} - self.lower_threshold_value_limit: float = np.nan - self.upper_threshold_value_limit: float = np.nan + self.lower_threshold_value_limit: Optional[float] = None + self.upper_threshold_value_limit: Optional[float] = None self.simple_stats_metric = 'values_median' @log_usage(UsageEvent.STATS_MEDIAN_FIT) diff --git a/nannyml/stats/std/calculator.py b/nannyml/stats/std/calculator.py index a09da9420..c0e63db07 100644 --- a/nannyml/stats/std/calculator.py +++ b/nannyml/stats/std/calculator.py @@ -102,7 +102,7 @@ def __init__( self._upper_alert_thresholds: Dict[str, Optional[float]] = {column_name: 0 for column_name in self.column_names} self._lower_alert_thresholds: Dict[str, Optional[float]] = {column_name: 0 for column_name in self.column_names} - self.lower_threshold_value_limit: float = 0 + self.lower_threshold_value_limit: Optional[float] = 0 self.upper_threshold_value_limit: Optional[float] = None self.simple_stats_metric = 'values_std' diff --git a/nannyml/stats/sum/calculator.py b/nannyml/stats/sum/calculator.py index 6e5c7654d..d1b42c80b 100644 --- a/nannyml/stats/sum/calculator.py +++ b/nannyml/stats/sum/calculator.py @@ -96,8 +96,8 @@ def __init__( self._upper_alert_thresholds: Dict[str, Optional[float]] = {column_name: 0 for column_name in self.column_names} self._lower_alert_thresholds: Dict[str, Optional[float]] = {column_name: 0 for column_name in self.column_names} - self.lower_threshold_value_limit: float = np.nan - self.upper_threshold_value_limit: float = np.nan + self.lower_threshold_value_limit: Optional[float] = None + self.upper_threshold_value_limit: Optional[float] = None self.simple_stats_metric = 'values_sum' @log_usage(UsageEvent.STATS_SUM_FIT)