title: sklearn always predicts 1 when trying to predict digits
body: <p>I'm trying to write code that predicts digits from curves in blender.
  so I converted the curves to matrices like the ones sklearn use and tried to predict the number, unfortunately, no matter what I do the prediction is always 1.</p>
  
  <p>the 2d matrix (it looks like the circle that I have in blender):</p>
  
  <pre><code>[[  0.   0.   0.   0.   0.   0.   0.   0.]
   [  0.   0.   0.  25.  25.   0.   0.   0.]
   [  0.  25.  25.  25.   0.  25.  25.   0.]
   [  0.  25.   0.   0.   0.   0.  25.   0.]
   [  0.  25.   0.   0.   0.   0.  25.   0.]
   [  0.  25.   0.   0.   0.   0.  25.   0.]
   [  0.   0.  25.  25.  25.  25.   0.   0.]
   [  0.   0.   0.   0.   0.   0.   0.   0.]]
  </code></pre>
  
  <p>the code:</p>
  
  <pre><code>import bpy
  import numpy as np
  from sklearn import datasets
  from sklearn import svm
  import scipy.misc
  
  ob = bpy.context.object
  assert ob.type == 'CURVE' # throw error if it's not a curve
  curve = ob.data
  spline = curve.splines.active # let's assume there's only one
  assert spline.type == 'BEZIER' # throw error if it's not a bezier
  
  shortest = None
  shortestDist = 10000
  shortest_x = None
  shortestDist_x = 10000
  result = []
  for point in spline.bezier_points:
      dist = point.co.y
      dist_x = point.co.x
      if dist &lt; shortestDist : #test if better so far
          shortest = point
          shortestDist = dist   
      if dist_x &lt; shortestDist_x : #test if better so far
          shortest_x = point
          shortestDist_x = dist  
  
  print(1 / abs(shortest.co.y))
  result.append([shortest, shortestDist, dist, dist_x])
  mult_y = 1 / abs(shortest.co.y)
  mult_x = 1 / abs(shortest_x.co.x)
  point_pos = []
  for point in spline.bezier_points:
      loc = point.co.y
      loc_x = point.co.x
      max_y = loc * mult_y
      max_x = loc_x * mult_x
      point_pos.append([loc, loc_x])
  
  matrix = np.zeros((8, 8))
  pixel = []
  
  for index in enumerate(matrix):
      matrix_to_co_y = 1 / len(matrix) * index[0]
      for index_y in enumerate(matrix[index[0]]):
          matrix_to_co_x = 1 / len(matrix) * index_y[0]
          #print(matrix_to_co_y)
          for point in point_pos:
              if matrix_to_co_y &gt; point[0] &gt; matrix_to_co_y - 1 / len(matrix):
                  if matrix_to_co_x &gt; point[1] &gt; matrix_to_co_x - 1 / len(matrix):
                      pixel.append([index[0], index_y[0]])
  
  for p in enumerate(pixel):
      matrix[p[1][0]][p[1][1]] = 25
  
  flat = np.ravel(matrix)
  
  
  digits = datasets.load_digits()
  
  clf = svm.SVC(gamma=0.001, C=100)
  
  x,y = digits.data[:-1], digits.target[:-1]
  clf.fit(x,y)
  print('Prediction:',clf.predict([flat]))
  
  print(matrix)
  </code></pre>
  
  <p>I don't know what I'm doing wrong.
  Any help would be appreciated</p>