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] table: Update ids in Table.__del__ #2470

Merged
merged 1 commit into from
Jul 14, 2017

Conversation

ales-erjavec
Copy link
Contributor

Issue
import Orange.data
d = Orange.data.Table("iris")
del d[2:]
d[[True, False]]

fails with

Traceback (most recent call last):
  File "<stdin>", line 4, in <module>
  File "/Users/aleserjavec/workspace/orange3/Orange/data/table.py", line 694, in __getitem__
    return self.from_table_rows(self, key)
  File "/Users/aleserjavec/workspace/orange3/Orange/data/table.py", line 449, in from_table_rows
    self.ids = np.array(source.ids[row_indices])
IndexError: boolean index did not match indexed array along dimension 0; dimension is 150 but corresponding boolean dimension is 2
Description of changes

Update ids in Table.__del__

Includes
  • Code changes
  • Tests
  • Documentation

Would later fail on table indexing with a boolean mask array.
@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@aabdccd). Click here to learn what that means.
The diff coverage is 100%.

@@           Coverage Diff            @@
##             master   #2470   +/-   ##
========================================
  Coverage          ?   74.3%           
========================================
  Files             ?     321           
  Lines             ?   56022           
  Branches          ?       0           
========================================
  Hits              ?   41626           
  Misses            ?   14396           
  Partials          ?       0

@astaric astaric merged commit 2aa859b into biolab:master Jul 14, 2017
@ales-erjavec ales-erjavec deleted the fixes/table-del-ids branch November 14, 2017 08:55
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.

3 participants