Modified set code in test to work with python 2 and python 3.

This commit is contained in:
Michael T Smith 2016-08-04 09:26:40 +01:00
parent ebe4a496a6
commit 97f5ca6b84

View file

@ -151,9 +151,7 @@ class TestDebug(unittest.TestCase):
#try doing the clustering
active = GPy.util.cluster_with_offset.cluster(data,inputs)
#check to see that the clustering has correctly clustered the time series.
from sets import Set
clusters = Set([Set(cluster) for cluster in active])
assert Set([1,2]) in clusters, "Offset Clustering algorithm failed"
assert Set([0,3]) in clusters, "Offset Clustering algoirthm failed"
clusters = set([frozenset(cluster) for cluster in active])
assert set([1,2]) in clusters, "Offset Clustering algorithm failed"
assert set([0,3]) in clusters, "Offset Clustering algoirthm failed"