code: def _par_vector2dict(v, pars, dims, starts=None):
      
      if starts is None:
          starts = _calc_starts(dims)
      d = OrderedDict()
      for i in range(len(pars)):
          l = int(np.prod(dims[i]))
          start = starts[i]
          end = start + l
          y = np.asarray(v[start:end])
          if len(dims[i]) > 1:
              y = y.reshape(dims[i], order='F')  # 'F' = Fortran, column-major
          d[pars[i]] = y.squeeze() if y.shape == (1,) else y
      return d
docs: Turn a vector of samples into an OrderedDict according to param dims.
  
      Parameters
      ----------
      y : list of int or float
      pars : list of str
          parameter names
      dims : list of list of int
          list of dimensions of parameters
  
      Returns
      -------
      d : dict
  
      Examples
      --------
      >>> v = list(range(31))
      >>> dims = [[5], [5, 5], []]
      >>> pars = ['mu', 'Phi', 'eta']
      >>> _par_vector2dict(v, pars, dims)  # doctest: +ELLIPSIS
      OrderedDict([('mu', array([0, 1, 2, 3, 4])), ('Phi', array([[ 5, ...