title: How to compute Mean Shift or K Means in n dimensions in python
body: <p>I am trying to find clusters in my n dimensional data. I tried:</p>
  
  <pre><code>from sklearn.cluster import MeanShift
  
  arr_3d = np.array([...])
  arr_3d.shape # (2, 6, 2)
  cluster = MeanShift().fit(arr_3d)
  </code></pre>
  
  <p>This gives an error</p>
  
  <pre><code>ValueError: Found array with dim 3. Estimator expected &lt;=2.
  </code></pre>
  
  <p>Reshaped data is confusing and I'd like to avoid it. I'm not attached to using sci kit learn, I just want n-dimensional mean shift or K means in a python library. How do I do this?</p>