title: How to use SVM when output label is a 3D array?
body: <p>The question is simple, I have a 3D image and I want to segment them using SVM. So I converted the input and output images to 3D numpy array, and now I want to use SVM. But it seems that <code>clf.fit()</code> does not support multidimensional label. So how can I train my model where label is multidimensional array?</p>
  
  <p>A simple e.g.:</p>
  
  <pre><code>from sklearn import svm
  x=[[0,0],[1,1]]
  y=[[0,0],[1,1]]
  clf=svm.SVC(gamma='scale')
  clf.fit(x,y)
  </code></pre>
  
  <p>Error is:</p>
  
  <pre><code>Traceback (most recent call last):
    File "basic.py", line 5, in &lt;module&gt;
      clf.fit(x,y)
    File "/usr/local/lib/python3.5/dist-packages/sklearn/svm/base.py", line 149, in fit
      accept_large_sparse=False)
    File "/usr/local/lib/python3.5/dist-packages/sklearn/utils/validation.py", line 761, in check_X_y
      y = column_or_1d(y, warn=True)
    File "/usr/local/lib/python3.5/dist-packages/sklearn/utils/validation.py", line 797, in column_or_1d
      raise ValueError("bad input shape {0}".format(shape))
  ValueError: bad input shape (2, 2)
  </code></pre>