mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-15 06:52:39 +02:00
Modified set code in test to work with python 2 and python 3.
This commit is contained in:
parent
ebe4a496a6
commit
97f5ca6b84
1 changed files with 4 additions and 6 deletions
|
|
@ -148,12 +148,10 @@ class TestDebug(unittest.TestCase):
|
||||||
[ 1.71881079],
|
[ 1.71881079],
|
||||||
[ 2.67162871],
|
[ 2.67162871],
|
||||||
[ 3.23761907]])]
|
[ 3.23761907]])]
|
||||||
|
|
||||||
#try doing the clustering
|
#try doing the clustering
|
||||||
active = GPy.util.cluster_with_offset.cluster(data,inputs)
|
active = GPy.util.cluster_with_offset.cluster(data,inputs)
|
||||||
|
|
||||||
#check to see that the clustering has correctly clustered the time series.
|
#check to see that the clustering has correctly clustered the time series.
|
||||||
from sets import Set
|
clusters = set([frozenset(cluster) for cluster in active])
|
||||||
clusters = Set([Set(cluster) for cluster in active])
|
assert set([1,2]) in clusters, "Offset Clustering algorithm failed"
|
||||||
assert Set([1,2]) in clusters, "Offset Clustering algorithm failed"
|
assert set([0,3]) in clusters, "Offset Clustering algoirthm failed"
|
||||||
assert Set([0,3]) in clusters, "Offset Clustering algoirthm failed"
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue