biolab / orange3

🍊 :bar_chart: :bulb: Orange: Interactive data analysis
https://orangedatamining.com
Other
4.78k stars 996 forks source link

BoxPlot error subgroups #4242

Closed Hrovatin closed 4 years ago

Hrovatin commented 4 years ago

When making a boxplot and selecting subgroups the below error occurs. Data was before transposed.

-------------------------------------------------------------------------------
---------------------------- ValueError Exception -----------------------------
Traceback (most recent call last):
  File "/home/karin/Documents/git/orange3venv/lib/python3.6/site-packages/orangewidget/gui.py", line 1693, in __call__
    self.func(**kwds)
  File "/home/karin/Documents/git/orange3/Orange/widgets/visualize/owboxplot.py", line 457, in grouping_changed
    self.update_graph()
  File "/home/karin/Documents/git/orange3/Orange/widgets/visualize/owboxplot.py", line 472, in update_graph
    self.compute_box_data()
  File "/home/karin/Documents/git/orange3/Orange/widgets/visualize/owboxplot.py", line 497, in compute_box_data
    dataset, attr, self.group_var)
  File "/home/karin/Documents/git/orange3/Orange/statistics/contingency.py", line 286, in get_contingency
    dat, col_variable, row_variable, col_unknowns, row_unknowns)
  File "/home/karin/Documents/git/orange3/Orange/statistics/contingency.py", line 194, in __init__
    self.from_data(dat, col_variable, row_variable)
  File "/home/karin/Documents/git/orange3/Orange/statistics/contingency.py", line 220, in from_data
    conts = data._compute_contingency([col_variable], row_variable)
  File "/home/karin/Documents/git/orange3/Orange/data/table.py", line 1490, in _compute_contingency
    col_data, classes_, n_rows, W_)
  File "Orange/data/_contingency.pyx", line 11, in Orange.data._contingency.contingency_floatarray
ValueError: Buffer dtype mismatch, expected 'intp_t' but got 'double'
-------------------------------------------------------------------------------

Version: Orange 3.23.0

PrimozGodec commented 4 years ago

I was just dealing with this kind of error last week https://github.com/biolab/orange3/pull/4231 so I hope it is fixed in a master version. Have you tried with a current master version?

ajdapretnar commented 4 years ago

While checking this bug, I found a new one. 😅 test.xlsx

Select var C and subgroup D. I can reopen a new issue if this one is not a duplicate.

PrimozGodec commented 4 years ago

@ajdapretnar I tried to reproduce this error but I can. What happens in your case? Does it returns an error or just show the wrong statistics?

ajdapretnar commented 4 years ago

@PrimozGodec You are right, I guess I forgot to run pip install -e . to build the latest C files. Closing this.

PrimozGodec commented 4 years ago

Yep, that could be a reason?