-
Notifications
You must be signed in to change notification settings - Fork 118
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 float16 support [#2379] #2483
Conversation
Convert to float32 on startup unless backed, in which case error. scipy does not support complex slicing from float16 data so this is the easiest fix for now.
Codecov Report
@@ Coverage Diff @@
## main #2483 +/- ##
==========================================
+ Coverage 71.59% 71.61% +0.02%
==========================================
Files 94 94
Lines 6449 6454 +5
Branches 739 739
==========================================
+ Hits 4617 4622 +5
Misses 1756 1756
Partials 76 76
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
raise DatasetAccessError(f"Data matrix in {self.data.X.dtype} format is not supported in backed mode." | ||
" Please reload without --backed, or convert matrix to float32") | ||
warnings.warn( | ||
f"Anndata data matrix is in unsupported {self.data.X.dtype} format so will be recast to float32" |
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.
Nit: suggest grammatical improvement to message eg,
Anndata data matrix is in unsupported {self.data.X.dtype} format -- will be cast to float32.
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.
LGTM. One optional minor comment on an message.
Convert to float32 on startup unless backed, in which case error.
scipy does not support complex slicing from float16 data so this is the easiest fix for now.
Reviewers
Functional:
Readability:
Changes