title: setting an array element with a sequence error whilst trying to plot
body: <pre><code>img = mpimg.imread('file.tif') #imports image
  
  im_x = np.sum(img, axis=0) #sum the rows of the array
  
  hist = pl.hist(im_x) #returns a list - this works fine
  
  test = np.array(hist) #turns hist into a numpy array so i can plot it
  
  plt.plot(test)
  plt.show()
  </code></pre>
  
  <p>I'm trying to import an image to an array, sum the values of each row, then plot this in a histogram.</p>
  
  <p>The code above gives me the 'setting an array element with a sequence error' message, which I don't understand as it's a numpy array. </p>
  
  <p>I've only been using python for a week, so it could be something really obvious I'm doing wrong. </p>