code: def simple_moving_matrix(x, n=10):
      
      if x.ndim > 1 and len(x[0]) > 1:
          x = np.average(x, axis=1)
      h = n / 2
      o = 0 if h * 2 == n else 1
      xx = []
      for i in range(h, len(x) - h):
          xx.append(x[i-h:i+h+o])
      return np.array(xx)
docs: Create simple moving matrix.
  
      Parameters
      ----------
      x : ndarray
          A numpy array
      n : integer
          The number of sample points used to make average
  
      Returns
      -------
      ndarray
          A n x n numpy array which will be useful for calculating confidentail
          interval of simple moving average