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): subsetting with empty list #1243
Conversation
ilan-gold
commented
Nov 28, 2023
•
edited by flying-sheep
edited by flying-sheep
- Closes Subsetting w/ empty list when X is dense throws error #1149
- Tests added
- Release note added (or unnecessary)
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1243 +/- ##
===========================================
- Coverage 85.27% 52.07% -33.20%
===========================================
Files 34 34
Lines 5404 5413 +9
===========================================
- Hits 4608 2819 -1789
- Misses 796 2594 +1798
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the idea is that if people want this fast, they should pass an array in the first place, I guess.
Maybe the error message should be more friendly?
@flying-sheep So you're saying we should catch the error and then report back that the data types are mixed? Just a side note, this behavior of mixed types doesn't seem to work so this would not be a regression: from anndata.tests.helpers import gen_adata
adata = gen_adata((100, 100))
adata[[0, 2], :] # good
adata[['cell5'], :] # good
adata[[0, 2, 'cell5'], :] # bad |
Since we add custom handling here, raising a custom error ( |
Sounds good @flying-sheep |
why no release note? |
I guess I didn't know what qualified as "unnecessary" for a release note and this seemed like one of those things. |
Hmm, guess if that's not in the contribution guide we should add it, and if it is, we should link it. As far as I understand, release notes are not encouraged if an unreleased feature gets modified or if the change is purely development process focused (tests, doc building, ...). This is a bugfix to a live feature, so it should get a release note. |
Co-authored-by: Philipp A. <flying-sheep@web.de>
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
#1248) Co-authored-by: Ilan Gold <ilanbassgold@gmail.com>