title: matplotlib scatter plot np.choose Value error
body: <p>I am doing kmeans and trying to plot multiple clusters.</p>
  
  <p>I have the following code, where X is my data points array:</p>
  
  <pre><code>centroids, ks = kmeans2(X,3) 
  colors = ['r', 'g', 'b']
  plt.scatter(X[:,0],X[:,1], c=np.choose(ks, colors))
  plt.show() 
  </code></pre>
  
  <p>When trying to plot with 3 clusters, everything is fine<img src="https://i.stack.imgur.com/1bnXV.png" alt="enter image description here"></p>
  
  <p>When trying to plot compute 4 clusters, I get an error saying:</p>
  
  <pre><code>plt.scatter(X[:,0],X[:,1], c=np.choose(ks, colors))
    File "/usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", line 297, in choose
      return choose(choices, out=out, mode=mode)
  ValueError: invalid entry in choice array
  </code></pre>