docstr: Slope of the straight line between different points of the time series
  multiplied by the average time step size.
  
  Parameters
  ----------
  X
      Uniformly sampled time series instances.
  t
      Equidistant timestamps corresponding to each input instances (i.e, the array should contain
      numerical values in increasing order).
  
  Returns
  -------
  Array with slope values.
docstr_tok: ["Slope","of","the","straight","line","between","different","points","of","the","time","series","multiplied","by","the","average","time","step","size",".","Parameters","--","--","--","--","--","X","Uniformly","sampled","time","series","instances",".","t","Equidistant","timestamps","corresponding","to","each","input","instances","(","i.e",",","the","array","should","contain","numerical","values","in","increasing","order",")",".","Returns","--","--","--","-","Array","with","slope","values","."]
code: def compute_grads(self, X: np.ndarray, t: np.ndarray) -> np.ndarray:
      """
      Slope of the straight line between different points of the time series
      multiplied by the average time step size.
  
      Parameters
      ----------
      X
          Uniformly sampled time series instances.
      t
          Equidistant timestamps corresponding to each input instances (i.e, the array should contain
          numerical values in increasing order).
  
      Returns
      -------
      Array with slope values.
      """
      dX = X[-1] - X[-self.n_grad_points - 1 : -1]
      dt = t[-1] - t[-self.n_grad_points - 1 : -1]
      mean_grads = np.mean(dX / dt) * np.mean(dt)
      return mean_grads
  
imports: import enum
  import logging
  import numpy
  from typing import Dict
  from alibi_detect.base import BaseDetector, ThresholdMixin, outlier_prediction_dict
  from alibi_detect.utils._types import Literal
label_desc: Use image node_id 5 for calling the SpectralResidual obj's underlying member method code with example usage: obj.compute_grads(X, t) and returns: mean_grads