docs: def C_array2dict(C):
      """Convert a 1D array containing C values to a dictionary."""
      d = OrderedDict()
      i=0
      for k in C_keys:
          s = C_keys_shape[k]
          if s == 1:
              j = i+1
              d[k] = C[i]
          else:
              j = i \
        + reduce(operator.mul, s, 1)
              d[k] = C[i:j].reshape(s)
          i = j
      return d