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.from_table works correctly with boolean indices #6278

Merged
merged 4 commits into from
Jan 6, 2023

Conversation

markotoplak
Copy link
Member

@markotoplak markotoplak commented Jan 5, 2023

Issue

Table.from_table does not work correctly with boolean indices, but from_table_rows does. See the added test.

Description of changes

Much of the code in from_table expects either slices or integer row indices, so boolean indices are converted to that.

The second last commit is a minor refactor of handling of W and ids in from_table so that it becomes equivalent to the from_table_rows implementation. Why did we handle them differently? from_table had some code from 2015 at that so I though it might not be needed anymore.

The last commit splits off two well-defined operations from from_table so that the code is a bit cleaner.

Includes
  • Code changes
  • Tests
  • Documentation

@lanzagar lanzagar changed the title [FIX] Table.from_table does not work correctly with boolean indices [FIX] Table.from_table works correctly with boolean indices Jan 6, 2023
@lanzagar lanzagar merged commit 461e0d2 into biolab:master Jan 6, 2023
@markotoplak markotoplak deleted the fix-from-table-boolean branch March 21, 2023 15:52
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