title: ValueError: Maximum allowed dimension exceeded, AgglomerativeClustering fit_predict
body: <p>I'm tryinng to fit hierarchical clustering on a 23-dimensional dataset of 100.000 objects. How to solve the follwing error?</p>
  
  <pre><code>&gt;&gt;&gt;ac = AgglomerativeClustering(n_clusters=2, affinity='euclidean', linkage='complete')
  &gt;&gt;&gt;k=hf.features_itter(hf.file)
  &gt;&gt;&gt;k
  
  
  array([[49,  0,  3, ...,  0,  0,  3],
         [39,  1,  4, ...,  0,  0,  3],
         [25,  0,  3, ...,  0,  0,  1],
         ...,
         [21,  0,  6, ...,  0,  0,  1],
         [47,  0,  8, ...,  0,  0,  2],
         [28,  1,  2, ...,  0,  1,  3]], dtype=uint8)
  
  &gt;&gt;&gt;res = ac.fit_predict(k)
  
  Traceback (most recent call last):
    File "&lt;pyshell#18&gt;", line 1, in &lt;module&gt;
      hierarchical()
    File "C:\Users\Tolis\Downloads\WPy-3670\notebooks\ergasia\clustering.py", line 39, in hierarchical
      ac.fit_predict(k)
    File "C:\Users\Tolis\Downloads\WPy-3670\python-3.6.7\lib\site-packages\sklearn\base.py", line 355, in fit_predict
      self.fit(X)
    File "C:\Users\Tolis\Downloads\WPy-3670\python-3.6.7\lib\site-packages\sklearn\cluster\hierarchical.py", line 830, in fit
      **kwargs)
    File "C:\Users\Tolis\Downloads\WPy-3670\python-3.6.7\lib\site-packages\sklearn\externals\joblib\memory.py", line 329, in __call__
      return self.func(*args, **kwargs)
    File "C:\Users\Tolis\Downloads\WPy-3670\python-3.6.7\lib\site-packages\sklearn\cluster\hierarchical.py", line 584, in _complete_linkage
      return linkage_tree(*args, **kwargs)
    File "C:\Users\Tolis\Downloads\WPy-3670\python-3.6.7\lib\site-packages\sklearn\cluster\hierarchical.py", line 470, in linkage_tree
      out = hierarchy.linkage(X, method=linkage, metric=affinity)
    File "C:\Users\Tolis\Downloads\WPy-3670\python-3.6.7\lib\site-packages\scipy\cluster\hierarchy.py", line 708, in linkage
      y = distance.pdist(y, metric)
    File "C:\Users\Tolis\Downloads\WPy-3670\python-3.6.7\lib\site-packages\scipy\spatial\distance.py", line 1877, in pdist
      dm = np.empty((m * (m - 1)) // 2, dtype=np.double)
  ValueError: Maximum allowed dimension exceeded
  </code></pre>
  
  <p>ValueError: Maximum allowed dimension exceeded</p>