Example #1
0
 def setup(self):
     self.data = {}
     for dim in [1, 2, 3, 5, 10]:
         self.data[dim] = generate.features(10, dim)
Example #2
0
 def setup(self):
     self.feat = generate.features(10)
Example #3
0
def test_contains_empty_bad():
    bad = generate.features(10) + [np.array([])]
    assert contains_empty(bad)

    bad += generate.features(2, 3)
    assert contains_empty(bad)
Example #4
0
 def setup(self):
     self.filename = 'test.h5'
     remove(self.filename)
     self.group = h5py.File(self.filename).create_group('group')
     self.data = generate.features(10,5,100)
     self.feat = Features(self.data)
Example #5
0
 def setup(self):
     self.feat = Features(generate.features(2, 10, 30))
Example #6
0
 def test_dim_good(self):
     for dim in [1, 2, 5, 20]:
         feat = generate.features(10, dim)
         d = parse_dim(feat)
         assert d == dim
Example #7
0
def test_contains_empty_good():
    assert not contains_empty(generate.features(10))