Fixed getting empty selections.
This commit is contained in:
@@ -2,7 +2,7 @@ import unittest
|
||||
import sys
|
||||
sys.path.append('../..')
|
||||
from system.dataset import *
|
||||
from scipy import rand,shape
|
||||
from scipy import rand,shape, array
|
||||
|
||||
class DatasetTest(unittest.TestCase):
|
||||
|
||||
@@ -37,9 +37,12 @@ class DatasetTest(unittest.TestCase):
|
||||
self.assertEquals(['gene_a', 'gene_b', 'gene_c'], data.get_identifiers('genes', [0, 1, 2]))
|
||||
# "advanced" lookup
|
||||
self.assertEquals(['gene_c', 'gene_a'], data.get_identifiers('genes', [2, 0]))
|
||||
# handle empty matrix of indices
|
||||
self.assertEquals([], data.get_identifiers('samples', array([])))
|
||||
# other dimension
|
||||
self.assertEquals(['sample_a', 'sample_b'], data.get_identifiers('samples', [0, 1]))
|
||||
|
||||
|
||||
#def testExtraction(self):
|
||||
# ids = ['gene_a','gene_b']
|
||||
# dim_name = 'genes'
|
||||
|
Reference in New Issue
Block a user