Skip to content

Commit a898bf2

Browse files
committed
Merge branch 'release/1.4.0'
2 parents dd0570b + d512a3f commit a898bf2

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
1.4.0
2+
- Added a "display" method to hierarchical clusters (by 1kastner).
3+
14
1.2.1
25
- Fixed an issue in multiprocessing code.
36

cluster/method/hierarchical.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,3 +206,14 @@ def getlevel(self, threshold):
206206
self.cluster()
207207

208208
return self._data[0].getlevel(threshold)
209+
210+
def display(self):
211+
"""
212+
Prints a simple dendogram-like representation of the full cluster
213+
to the console.
214+
"""
215+
# initialize the cluster if not yet done
216+
if not self.__cluster_created:
217+
self.cluster()
218+
219+
self._data[0].display()

cluster/test/test_hierarchical.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,6 @@ def testClusterLen0(self):
6666

6767
class HClusterIntegerTestCase(Py23TestCase):
6868

69-
def __init__(self, *args, **kwargs):
70-
super(HClusterIntegerTestCase, self).__init__(*args, **kwargs)
71-
if hexversion < 0x030000f0:
72-
self.assertCItemsEqual = self.assertItemsEqual
73-
else:
74-
self.assertCItemsEqual = self.assertCountEqual
75-
7669
def setUp(self):
7770
self.__data = [791, 956, 676, 124, 564, 84, 24, 365, 594, 940, 398,
7871
971, 131, 365, 542, 336, 518, 835, 134, 391]

cluster/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.3.3
1+
1.4.0

pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[pytest]
2+
looponfailroots = cluster
23
norecursedirs = env env3 env3_nonumpy .git

0 commit comments

Comments
 (0)