          if datapoints <= (self._args["avg_samples"] * 2):
              logger.info("Not enough data to compile rolling average")
              return np.array([], dtype="float64")
  
          avgs = np.cumsum(data, dtype="float64")
          avgs[window:] = avgs[window:] - avgs[:-window]
          avgs = avgs[window - 1:] / window
          avgs = np.pad(avgs, (pad, datapoints - (avgs.shape[0] + pad)), constant_values=(np.nan,))
          logger.debug("Calculated Average: shape: %s", avgs.shape)
          return avgs
 
</s> remove     def _calc_smoothed(self, data):
 </s> add     def _calc_smoothed(self, data: np.ndarray) -> np.ndarray: </s> remove         logger.debug("Calculating Average")
 </s> add         logger.debug("Calculating Average. Data points: %s", len(data)) </s> remove     def _ewma_vectorized_safe(self):
 </s> add     def _ewma_vectorized_safe(self) -> None: </s> remove         mean = np.mean(data)
        limit = np.std(data)
 </s> add         mean = np.mean(np.nan_to_num(data))
        limit = np.std(np.nan_to_num(data)) </s> remove         self._data = data
 </s> add         self._data = np.nan_to_num(data)
        avgs = np.cumsum(np.nan_to_num(data), dtype="float64")
          if datapoints <= (self._args["avg_samples"] * 2):
              logger.info("Not enough data to compile rolling average")
              return np.array([], dtype="float64")
  
        avgs = np.cumsum(np.nan_to_num(data), dtype="float64")
          avgs[window:] = avgs[window:] - avgs[:-window]
          avgs = avgs[window - 1:] / window
          avgs = np.pad(avgs, (pad, datapoints - (avgs.shape[0] + pad)), constant_values=(np.nan,))
          logger.debug("Calculated Average: shape: %s", avgs.shape)
          return avgs
keep keep keep keep replace keep keep keep keep keep
 Bugfixes:
  - Stats graph - Handle NaNs in data
  - logger - de-elevate matplotlib font messages 
lib/gui/analysis/stats.py