Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] owhierarchicalclustering: Fix IndexError #6989

Conversation

ales-erjavec
Copy link
Contributor

Issue

File -> Table -> Distances -> Hierarchical Clustering

Select some rows in Table, color by some variable in Hierarchical Clustering now extend the selection in Table (cmd + click) with new instances (must output more data then before).

Raises

---------------------------- IndexError Exception -----------------------------
Traceback (most recent call last):
  File "/home/ales/devel/orange3/Orange/widgets/unsupervised/owhierarchicalclustering.py", line 152, in data
    return self.__colors[index.row()]
           ~~~~~~~~~~~~~^^^^^^^^^^^^^
IndexError: index 12 is out of bounds for axis 0 with size 12
-------------------------------------------------------------------------------

and then it segfaults.

Description of changes

Fix IndexError

Includes
  • Code changes
  • Tests
  • Documentation

@janezd janezd force-pushed the fixes/owhierarchicalclustering-colors-index-error branch from 1b3ef75 to bb1c1c7 Compare January 17, 2025 14:01
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.47%. Comparing base (876acb2) to head (bb1c1c7).
Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6989   +/-   ##
=======================================
  Coverage   88.47%   88.47%           
=======================================
  Files         332      332           
  Lines       73294    73296    +2     
=======================================
+ Hits        64847    64852    +5     
+ Misses       8447     8444    -3     

@janezd janezd merged commit f3d9e19 into biolab:master Jan 17, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants