code: def loadtxt_asdict(fn, **kwargs):
      
  
      kwargs.update(unpack=True)
      d = loadtxt(fn, **kwargs)
      if len(np.shape(d)) == 2:
          keys = kwargs.get('usecols', None) or range(len(d))
          D = dict([(k, v) for k, v in zip(keys, d)])
      elif len(np.shape(d)) == 1:
          keys = kwargs.get('usecols', None) or [0]
          D = dict([(keys[0], d)])
      else:
          raise Exception('Unknown dimension of loaded data.')
  
      return D
docs: Return what is returned from loadtxt as a dict.
  
      The 'unpack' keyword is enforced to True.
      The keys in the dict is the column numbers loaded. It is the
      integers 0...N-1 for N loaded columns, or the numbers in usecols.