code: def _rdump_value_to_numpy(s):
      
      if "structure" in s:
          vector_str, shape_str = re.findall(r'c\([^\)]+\)', s)
          shape = [int(d) for d in shape_str[2:-1].split(',')]
          if '.' in vector_str:
              arr = np.array([float(v) for v in vector_str[2:-1].split(',')])
          else:
              arr = np.array([int(v) for v in vector_str[2:-1].split(',')])
          # 'F' = Fortran, column-major
          arr = arr.reshape(shape, order='F')
      elif "c(" in s:
          if '.' in s:
              arr = np.array([float(v) for v in s[2:-1].split(',')], order='F')
          else:
              arr = np.array([int(v) for v in s[2:-1].split(',')], order='F')
      else:
          arr = np.array(float(s) if '.' in s else int(s))
      return arr
docs: Convert a R dump formatted value to Numpy equivalent
  
      For example, "c(1, 2)" becomes ``array([1, 2])``
  
      Only supports a few R data structures. Will not work with European decimal format.