title: Numpy - ValueError: cannot set an array element with a sequence
body: <p>So, I wrote small test code for calculating the averages from all the csv files in a folder.</p>
  
  <pre><code>parser = argparse.ArgumentParser(description='avg data from csv to csv')
  parser.add_argument('--input', required = True)
  parser.add_argument('--output', required = True)
  args = parser.parse_args()
  
  # Get command arguments
  input_files_path = args.input
  output = args.output
  
  avg = []
  for infile in glob.glob(input_files_path+"*.csv"):
          a = np.loadtxt(infile, delimiter=",")
          mean = np.mean(a, axis=0)
          avg.append((mean))
          print infile
  np.savetxt(output,(avg), fmt = "%.1f", delimiter=", ")
  </code></pre>
  
  <p>but the issue now, when I am trying to save the name of the file as well in the csv file like this:</p>
  
  <pre><code>parser = argparse.ArgumentParser(description='avg data from csv to csv')
  parser.add_argument('--input', required = True)
  parser.add_argument('--output', required = True)
  args = parser.parse_args()
  
  # Get command arguments
  input_files_path = args.input
  output = args.output
  
  avg = []
  for infile in glob.glob(input_files_path+"*.csv"):
          a = np.loadtxt(infile, delimiter=",")
          mean = np.mean(a, axis=0)
          avg.append((infile,(mean)))
          print infile
  np.savetxt(output,(avg), fmt = "%.1f", delimiter=", ")
  </code></pre>
  
  <p>it throws an error:</p>
  
  <pre><code>    np.savetxt(output,(avg), fmt = "%.1f", delimiter=", ")
    File "/usr/lib/python2.7/dist-packages/numpy/lib/npyio.py", line 963, in savetxt
      X = np.asarray(X)
    File "/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 235, in asarray
      return array(a, dtype, copy=False, order=order)
  ValueError: cannot set an array element with a sequence
  </code></pre>
  
  <p>I don't seem to understand what the issue is. Maybe it is because I am trying to append a string to a float? I check the <code>fmt</code>s in numpy.. but I did not find anything interesting.</p>
  
  <pre><code>/usr/lib/python2.7/dist-packages/numpy/lib/npyio.py:773: UserWarning: loadtxt: Empty input file: "../robalo-31.1/op.csv"
    warnings.warn('loadtxt: Empty input file: "%s"' % fname)
  /usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py:2374: RuntimeWarning: invalid value encountered in double_scalars
    return mean(axis, dtype, out)
  </code></pre>