예제 #1
0
 def test_sort_merged_samples_by_value(self):
     """sort_merged_samples_by_value should keep label associations"""
     s = merge_samples(array([3,4]), array([5,6]), array([1,2]))
     result = sort_merged_samples_by_value(s)
     self.assertEqual(result, array([[1,2,3,4,5,6],[2,2,0,0,1,1]]))
예제 #2
0
 def test_merge_samples(self):
     """merge_samples should keep the sample label"""
     self.assertEqual(merge_samples(array([1,2]),array([3,4]),array([5])),
         array([[1,2,3,4,5],[0,0,1,1,2]]))