def setup(self): self.data = {} for dim in [1, 2, 3, 5, 10]: self.data[dim] = generate.features(10, dim)
def setup(self): self.feat = generate.features(10)
def test_contains_empty_bad(): bad = generate.features(10) + [np.array([])] assert contains_empty(bad) bad += generate.features(2, 3) assert contains_empty(bad)
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)
def setup(self): self.feat = Features(generate.features(2, 10, 30))
def test_dim_good(self): for dim in [1, 2, 5, 20]: feat = generate.features(10, dim) d = parse_dim(feat) assert d == dim
def test_contains_empty_good(): assert not contains_empty(generate.features(10))