Skip to content

Commit 4ebe394

Browse files
authored
Merge pull request #2595 from lanzagar/fastsel
[FIX] OWBoxPlot: Faster selection
2 parents 351b364 + 386d0d0 commit 4ebe394

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Orange/widgets/visualize/owboxplot.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -885,10 +885,11 @@ def commit(self):
885885
selected, selection = None, []
886886
if self.conditions:
887887
selected = Values(self.conditions, conjunction=False)(self.dataset)
888-
selection = [i for i, inst in enumerate(self.dataset)
889-
if inst in selected]
888+
selection = np.in1d(
889+
self.dataset.ids, selected.ids, assume_unique=True).nonzero()[0]
890890
self.Outputs.selected_data.send(selected)
891-
self.Outputs.annotated_data.send(create_annotated_table(self.dataset, selection))
891+
self.Outputs.annotated_data.send(
892+
create_annotated_table(self.dataset, selection))
892893

893894
def show_posthoc(self):
894895
def line(y0, y1):

0 commit comments

Comments
 (0)