title: ValueError: setting an array element with a sequence directly causes snother error TypeError: only size-1 arrays can be converted to Python scalars
body: <p>I have a matrix that contains <em>n</em> arrays. Each array represent some values associated to a simple picture.
  I want to cluster with KMeans the arrays in the Matrix, but when I fit the model I got the error:</p>
  
  <pre><code>TypeError: only size-1 arrays can be converted to Python scalars
  ValueError: setting an array element with a sequence.
  </code></pre>
  
  <p>This is my code. What should I change?</p>
  
  <pre><code>import matplotlib.pyplot as plt  
  from matplotlib import style 
  from sklearn.cluster import KMeans 
  from sklearn.datasets.samples_generator import make_blobs
  from pymongo import MongoClient
  import numpy
  
  model = KMeans(n_clusters=4, random_state=0)
  
  client = MongoClient()
  db = client['competitors']
  coll = db['competitors_posts_score']
  
  points = []
  
  for u in coll.find():
      for p in u['posts_score']:
          if len(p)==0:
              continue
          points.append(numpy.asarray(p))
  
  X = numpy.asarray([points])
  
  model.fit(X)
  </code></pre>