Skip to content

Commit

Permalink
Merge pull request #1855 from VesnaT/fix_transpose
Browse files Browse the repository at this point in the history
[FIX] Table.transpose: Keep metas array two dimensional when no attributes in domain
  • Loading branch information
lanzagar authored Jan 4, 2017
2 parents d9fcfed + 33e95f0 commit e380ca2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Orange/data/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,8 @@ def get_table_from_attributes_of_attributes(_vars, _dtype=float):
# metas
# - feature names and attributes of attributes to metas
self.metas, metas = np.empty((self.n_rows, 0), dtype=object), []
if meta_attr_name not in [m.name for m in table.domain.metas]:
if meta_attr_name not in [m.name for m in table.domain.metas] and \
table.domain.attributes:
self.metas = np.array([[a.name] for a in table.domain.attributes],
dtype=object)
metas.append(StringVariable(meta_attr_name))
Expand Down

0 comments on commit e380ca2

Please sign in to comment.