From 0b3e44901a8eed609e8d84a66d5df81c0786687a Mon Sep 17 00:00:00 2001 From: nikicc Date: Sat, 3 Jun 2017 00:12:50 +0200 Subject: [PATCH] OWSieve: Ensure dense data --- Orange/widgets/visualize/owsieve.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Orange/widgets/visualize/owsieve.py b/Orange/widgets/visualize/owsieve.py index 7c44164344e..245cde8a4a8 100644 --- a/Orange/widgets/visualize/owsieve.py +++ b/Orange/widgets/visualize/owsieve.py @@ -183,6 +183,8 @@ def set_data(self, data): self.openContext(self.data) if self.data: self.discrete_data = self.sparse_to_dense(data, True) + if self.discrete_data.is_sparse(): + self.discrete_data.X = self.discrete_data.X.toarray() self.resolve_shown_attributes() self.update_graph() self.update_selection() @@ -223,7 +225,8 @@ def discretizer(data): self.attr_y} new_domain = data.domain.select_columns(attrs) data = Table.from_table(new_domain, data) - data.X = data.X.toarray() + if data.is_sparse(): + data.X = data.X.toarray() return discretizer(data) @Inputs.features