From 76769346cebc3cec122895ca538aa23b9cd9ea60 Mon Sep 17 00:00:00 2001 From: Lan Zagar Date: Wed, 4 Jan 2017 11:55:01 +0100 Subject: [PATCH] Merge pull request #1855 from VesnaT/fix_transpose [FIX] Table.transpose: Keep metas array two dimensional when no attributes in domain (cherry picked from commit e380ca2180624727ede7110064be007632df829a) --- Orange/data/table.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Orange/data/table.py b/Orange/data/table.py index aa31afd76ef..f49e88918e7 100644 --- a/Orange/data/table.py +++ b/Orange/data/table.py @@ -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))