title: Error in python while creating pie charts and arrays
body: <p>I am working on a cancer cell research and I am trying to make a pie chart to display the mitosis X death percentage. Hence I have an array named     mitosis_events and another one named Death_events and below is my code: </p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  mitotic_events[get_generation_number(cell)] += 1
  death_events[len(cell)-1] += 1
  
  #Simple Pie chart
  
  # The slices will be ordered and plotted counter-clockwise.
  labels = 'Mitosis', 'Deaths'
  sizes = [mitotic_events, death_events]
  colors = ['Green', 'Red' ]
  explode = (0, 0.1) # only "explode" the 2nd slice (i.e. 'Hogs')
  
  plt.pie(sizes, explode=explode, labels=labels, colors=colors,
      autopct='%1.1f%%', shadow=True, startangle=90)
  # Set aspect ratio to be equal so that pie is drawn as a circle.
  plt.axis('equal')
  
  plt.show()
  </code></pre>
  
  <p>and I get this error in the console: </p>
  
  <pre><code>TypeError: only length-1 arrays can be converted to Python scalars
  </code></pre>
  
  <p>I wonder what is the solution? I know the problem is in this line:</p>
  
  <pre><code>sizes = [mitotic_events, death_events]
  </code></pre>
  
  <p>Thank you in advanced</p>