Error in scipy.cluster.hierarchy.dedrogram "above_threshold_color=above_threshold_color"
<p>I am trying to visualize a dendrogram in Python 3.5 using scipy 0.18.1 (on mac) with the following code:</p>

<pre><code>import numpy as np
import pandas as pd
import scipy as sci
from matplotlib import pyplot as plt
from scipy.cluster.hierarchy import dendrogram, linkage
from scipy.cluster.hierarchy import cophenet
from scipy.spatial.distance import pdist

data = pd.read_csv("data.csv", header = 0)
data_clean = data.dropna()

cluster = data_clean[['HI','GO', 'PA', 'TE', 'GC', 'FU', 'LA']]
cluster = np.array(cluster)
cluster

data_dist = pdist(cluster) 
data_link = linkage(data_dist)

plt.figure(figsize=(25, 10))
plt.title('Hierarchical Clustering Dendrogram')
plt.xlabel('sample index')
plt.ylabel('distance')
dendrogram(data_link)
</code></pre>

<p>but it returns this error</p>

<pre><code>---------------------------------------------------------------------------
RecursionError                            Traceback (most recent call last)
&lt;ipython-input-14-57671852a042&gt; in &lt;module&gt;()
  1 plt.figure(figsize=(7, 5))
----&gt; 2 dendrogram(data_link)#, labels= ('HI','GO', 'PA', 'TE', 'GC', 'FU', 'LA'))
  3 plt.title('Hierarchical Clustering Dendrogram')#'Dendrograma de Clusterización Jerárquiza')
  4 plt.xlabel('sample index')#'Islas')
  5 plt.ylabel('distance')#'Disimilitud de Jaccard')

 /Users/Irbin/anaconda/lib/python3.5/site-packages/scipy/cluster/hierarchy.py in dendrogram(Z, p, truncate_mode, color_threshold, get_leaves, orientation, labels, count_sort, distance_sort, show_leaf_counts, no_plot, no_labels, leaf_font_size, leaf_rotation, leaf_label_func, show_contracted, link_color_func, ax, above_threshold_color)
2289         contraction_marks=contraction_marks,
2290         link_color_func=link_color_func,
 -&gt; 2291         above_threshold_color=above_threshold_color)
2292 
2293     if not no_plot:

/Users/Irbin/anaconda/lib/python3.5/site-packages/scipy/cluster/hierarchy.py in _dendrogram_calculate_info(Z, p, truncate_mode, color_threshold, get_leaves, orientation, labels, count_sort, distance_sort, show_leaf_counts, i, iv, ivl, n, icoord_list, dcoord_list, lvs, mhr, current_color, color_list, currently_below_threshold, leaf_label_func, level, contraction_marks, link_color_func, above_threshold_color)
2577             level=level + 1, contraction_marks=contraction_marks,
2578             link_color_func=link_color_func,
 -&gt; 2579             above_threshold_color=above_threshold_color)
2580 
2581     max_dist = max(uamd, ubmd, h)

/Users/Irbin/anaconda/lib/python3.5/site-packages/scipy/cluster/hierarchy.py in _dendrogram_calculate_info(Z, p, truncate_mode, color_threshold, get_leaves, orientation, labels, count_sort, distance_sort, show_leaf_counts, i, iv, ivl, n, icoord_list, dcoord_list, lvs, mhr, current_color, color_list, currently_below_threshold, leaf_label_func, level, contraction_marks, link_color_func, above_threshold_color)
2577             level=level + 1, contraction_marks=contraction_marks,
2578             link_color_func=link_color_func,
 -&gt; 2579             above_threshold_color=above_threshold_color)
2580 
2581     max_dist = max(uamd, ubmd, h)

/Users/Irbin/anaconda/lib/python3.5/site-packages/scipy/cluster/hierarchy.py in _dendrogram_calculate_info(Z, p, truncate_mode, color_threshold, get_leaves, orientation, labels, count_sort, distance_sort, show_leaf_counts, i, iv, ivl, n, icoord_list, dcoord_list, lvs, mhr, current_color, color_list, currently_below_threshold, leaf_label_func, level, contraction_marks, link_color_func, above_threshold_color)
2577             level=level + 1, contraction_marks=contraction_marks,
2578             link_color_func=link_color_func,
 -&gt; 2579             above_threshold_color=above_threshold_color)
2580 
2581     max_dist = max(uamd, ubmd, h)

/Users/Irbin/anaconda/lib/python3.5/site-packages/scipy/cluster/hierarchy.py in _dendrogram_calculate_info
         levellevel   contraction_markscontraction_marks
         link_color_funclink_color_func
</code></pre>

<p>Actually, in the error report, the bloques with <code>max_dist = max(uamd, ubmd, h)</code> are repeated too many times. The analysis seems working fine, but I can not plot the dendrogram. What could be the error?</p>