You can have a look at the test named "test_agglomerative_clustering" in: https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/cluster/tests/test_hierarchical.py -- Olivier