              dummy = np.empty((points, ), dtype=data.dtype)
              dummy[:] = np.nan
              return dummy
          x_range = range(points)
          trend = np.poly1d(np.polyfit(x_range, data, 3))(x_range)
          logger.debug("Calculated Trend")
          return trend
  
  
  class _ExponentialMovingAverage():  # pylint:disable=too-few-public-methods
      """ Reshapes data before calculating exponential moving average, then iterates once over the
 
</s> remove         return _ExponentialMovingAverage(data, self._args["smooth_amount"])()
 </s> add         retval = _ExponentialMovingAverage(data, self._args["smooth_amount"])()
        logger.debug("Calculated Smoothed data: shape: %s", retval.shape)
        return retval </s> remove     def _ewma_vectorized_safe(self):
 </s> add     def _ewma_vectorized_safe(self) -> None: </s> remove     def _ewma_vectorized_2d(self, data, out):
 </s> add     def _ewma_vectorized_2d(self, data: np.ndarray, out: np.ndarray) -> None: </s> remove     def _ewma_vectorized(self, data, out, offset=None):
 </s> add     def _ewma_vectorized(self,
                         data: np.ndarray,
                         out: np.ndarray,
                         offset: Optional[float] = None) -> None: </s> remove     def __call__(self):
 </s> add     def __call__(self) -> np.ndarray:
        trend = np.poly1d(np.polyfit(x_range, np.nan_to_num(data), 3))(x_range)
        logger.debug("Calculated Trend: shape: %s", trend.shape)
              dummy = np.empty((points, ), dtype=data.dtype)
              dummy[:] = np.nan
              return dummy
          x_range = range(points)
        trend = np.poly1d(np.polyfit(x_range, np.nan_to_num(data), 3))(x_range)
        logger.debug("Calculated Trend: shape: %s", trend.shape)
        trend = np.poly1d(np.polyfit(x_range, np.nan_to_num(data), 3))(x_range)
        logger.debug("Calculated Trend: shape: %s", trend.shape)
          return trend
  
  
  class _ExponentialMovingAverage():  # pylint:disable=too-few-public-methods
      """ Reshapes data before calculating exponential moving average, then iterates once over the
keep keep keep keep replace replace keep keep keep keep keep
 Bugfixes:
  - Stats graph - Handle NaNs in data
  - logger - de-elevate matplotlib font messages 
lib/gui/analysis/stats.py