code: def collect_summary_stats(data):
      
      mean = np.mean(data, axis=0)
      std = np.std(data, axis=0)
      median = np.median(data, axis=0)
      q02, q16, q84, q97 = np.percentile(data, [2.5, 16, 84, 97.5], axis=0)
  
      o = dict(mean=mean,
               std=std,
               median=median,
               q02=q02,
               q16=q16,
               q84=q84,
               q97=q97)
  
      return o
docs: Collect summary statisitics from an array
  
      This creates a dictionry of output arrays of summary
      statistics, with the input array dimension reducted by one.
  
      Parameters
      ----------
  
      data : `numpy.ndarray`
          Array with the collected input data
  
  
      Returns
      -------
  
      output : dict
          Dictionary of `np.ndarray` with the summary data.
          These include mean, std, median, and 4 quantiles (0.025, 0.16, 0.86, 0.975).