          -------
          :class:`numpy.ndarray`
              The moving average for the given data
          """
          logger.debug("Calculating Average")
          window = self._args["avg_samples"]
          pad = ceil(window / 2)
          datapoints = data.shape[0]
  
          if datapoints <= (self._args["avg_samples"] * 2):
 
</s> remove         avgs = np.cumsum(data, dtype="float64")
 </s> add         avgs = np.cumsum(np.nan_to_num(data), dtype="float64") </s> remove     def _collate_stats(self, session_id, timestamps):
 </s> add     def _collate_stats(self, session_id: int) -> dict: </s> remove     def __call__(self):
 </s> add     def __call__(self) -> np.ndarray: </s> remove     def _ewma_vectorized_safe(self):
 </s> add     def _ewma_vectorized_safe(self) -> None: </s> remove     def _calc_smoothed(self, data):
 </s> add     def _calc_smoothed(self, data: np.ndarray) -> np.ndarray:
        logger.debug("Calculating Average. Data points: %s", len(data))
          -------
          :class:`numpy.ndarray`
              The moving average for the given data
          """
        logger.debug("Calculating Average. Data points: %s", len(data))
          window = self._args["avg_samples"]
          pad = ceil(window / 2)
          datapoints = data.shape[0]
  
          if datapoints <= (self._args["avg_samples"] * 2):
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