def test_can_use_attributes_as_new_columns(self):
a, _, _ = column_sizes(self.table)
order = [random.randrange(a) for _ in self.domain.attributes]
new_attributes = [self.domain.attributes[i] for i in order]
new_domain = self.create_domain(
new_attributes, new_attributes, new_attributes)
new_table = data.Table.from_table(new_domain, self.table)
After Change
def test_can_use_attributes_as_new_columns(self):
a, _, _ = column_sizes(self.table)
order = np.random.permutation(a)
new_attributes = [self.domain.attributes[i] for i in order]
new_domain = self.create_domain(
new_attributes[:2], new_attributes[2:4], new_attributes[4:])
new_table = data.Table.from_table(new_domain, self.table)
self.assert_table_with_filter_matches(