code: def r_get_numbers(matchgroup, num):
      
      res = []
      for i in range(num):
          res.append(float(matchgroup.next().group()))
      return np.array(res)
docs: A helper function which can be used similarly to fscanf(fid,'%f',num) to extract num arguments from the regex iterator