Skip to content

Commit

Permalink
Enforcing sorting for hierarchical clusters.
Browse files Browse the repository at this point in the history
Fixes #11
  • Loading branch information
exhuma committed Sep 10, 2014
1 parent bfa1e4b commit dc9f779
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cluster/method/hierarchical.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def __init__(self, data, distance_function, linkage=None, num_processes=1):
linkage = 'single'
logger.info("Initializing HierarchicalClustering object with linkage "
"method %s", linkage)
BaseClusterMethod.__init__(self, data, distance_function)
BaseClusterMethod.__init__(self, sorted(data), distance_function)
self.set_linkage_method(linkage)
self.num_processes = num_processes
self.__cluster_created = False
Expand Down

0 comments on commit dc9f779

Please sign in to comment.