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] Fix wrong assert in heatmap #4955

Merged
merged 2 commits into from
Aug 25, 2020

Conversation

ales-erjavec
Copy link
Contributor

Issue

Heatmap widget raises an error if a dataset with exactly 1000 instances in on input and 'Clustering (opt. ordering) is selected for Row clustering.

-------------------------- AssertionError Exception ---------------------------
Traceback (most recent call last):
  File "/Users/aleserjavec/workspace/orange3/Orange/widgets/visualize/owheatmap.py", line 313, in _
    self.set_row_clustering(cb.itemData(idx, ClusteringRole))
  File "/Users/aleserjavec/workspace/orange3/Orange/widgets/visualize/owheatmap.py", line 528, in set_row_clustering
    self.__update_row_clustering()
  File "/Users/aleserjavec/workspace/orange3/Orange/widgets/visualize/owheatmap.py", line 1089, in __update_row_clustering
    self.update_heatmaps()
  File "/Users/aleserjavec/workspace/orange3/Orange/widgets/visualize/owheatmap.py", line 726, in update_heatmaps
    parts = self.construct_heatmaps(self.data, self.split_by_var, self.split_columns_var)
  File "/Users/aleserjavec/workspace/orange3/Orange/widgets/visualize/owheatmap.py", line 901, in construct_heatmaps
    ordered=self.row_clustering == Clustering.OrderedClustering
  File "/Users/aleserjavec/workspace/orange3/Orange/widgets/visualize/owheatmap.py", line 804, in cluster_rows
    assert len(matrix) < self.MaxOrderedClustering
AssertionError

This is due to an wrong condition in the assert

Description of changes
  • Remove asserts
Includes
  • Code changes
  • Tests
  • Documentation

@janezd janezd merged commit a2c7ac7 into biolab:master Aug 25, 2020
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