class_docstr: Class for generating a list of covariance matrices from time series.
  
  Prepare a TimeSeriesCovariance Object from time series in dictionary.
  
  Parameters
  ----------
  data_dict : dict
      Dictionary with 'time', 'raw_data', 'label' as key
      and the corresponding array as values.
  n_steps : int
      Size of the batches.
  n_timeseries : int
      The number of electrodes used for the recording.
  label_map : dictionary
      Encode the label into digits.
  margin : int
      Number of index to remove before and after a sign change (Can
      help getting a stationary signal).
  
  Attributes
  ----------
  label_map : dictionary
      Encode the label into digits.
  data_dict : dict
      Dictionary with 'time', 'raw_data', 'label' as key
      and the corresponding array as values.
  n_steps : int
      Size of the batches.
  n_timeseries : int
      The number of electrodes used for the recording.
  batches : array
      The start indexes of the batches to use to compute covariance matrices.
  margin : int
      Number of index to remove before and after a sign change (Can
      help getting a stationary signal).
  covs : array
      The covariance matrices.
  labels : array
      The digit labels corresponding to each batch.
  covec : array
      The vectorized version of the covariance matrices.
  diags : array
      The covariance matrices diagonals.
docstr: Create the batches used to compute covariance matrices.
  
  If margin != 0, we add an index margin at each label change
  to get stationary signal corresponding to each label.
docstr_tok: ["Create","the","batches","used","to","compute","covariance","matrices",".","If","margin","!","=","0",",","we","add","an","index","margin","at","each","label","change","to","get","stationary","signal","corresponding","to","each","label","."]
code: def _create_batches(self):
      """Create the batches used to compute covariance matrices.
  
      If margin != 0, we add an index margin at each label change
      to get stationary signal corresponding to each label.
      """
      start_ids = gs.where(np.diff(self.data["y"]) != 0)[0]
      end_ids = np.append(start_ids[1:], len(self.data)) - self.margin
      start_ids += self.margin
      batches_list = [
          range(start_id, end_id - self.n_steps, self.n_steps)
          for start_id, end_id in zip(start_ids, end_ids)
      ]
      self.batches = np.int_(gs.concatenate(batches_list))
  
imports: import numpy
  import geomstats.backend
  from geomstats.geometry.symmetric_matrices import SymmetricMatrices
label_desc: Use image node_id 3 for calling the TimeSeriesCovariance obj's underlying member method code with example usage: obj._create_batches() without return types