Skip to content

Commit d24f049

Browse files
lanzagarastaric
authored andcommitted
Merge pull request biolab#1855 from VesnaT/fix_transpose
[FIX] Table.transpose: Keep metas array two dimensional when no attributes in domain (cherry picked from commit e380ca2)
1 parent c0bef93 commit d24f049

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Orange/data/table.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,8 @@ def get_table_from_attributes_of_attributes(_vars, _dtype=float):
15131513
# metas
15141514
# - feature names and attributes of attributes to metas
15151515
self.metas, metas = np.empty((self.n_rows, 0), dtype=object), []
1516-
if meta_attr_name not in [m.name for m in table.domain.metas]:
1516+
if meta_attr_name not in [m.name for m in table.domain.metas] and \
1517+
table.domain.attributes:
15171518
self.metas = np.array([[a.name] for a in table.domain.attributes],
15181519
dtype=object)
15191520
metas.append(StringVariable(meta_attr_name))

0 commit comments

Comments
 (0)