promote 8 and 16-bit integer dtypes to float32#7521
Open
grlee77 wants to merge 8 commits intoscikit-image:mainfrom
Open
promote 8 and 16-bit integer dtypes to float32#7521grlee77 wants to merge 8 commits intoscikit-image:mainfrom
grlee77 wants to merge 8 commits intoscikit-image:mainfrom
Conversation
- modify convert_to_float and _supported_float type to cast small integer dtypes (np.uint8, np.int8, np.uint16, np.int16) to float32 instead of float64.
35204fb to
9e16668
Compare
Member
|
I understand that this may break « exact tests » but I feel like it would be for the greater good. I’ve started to remove some scikit image imports from my codebase because of the float64 promotion. With the rise of ML (we’re the same code running on different hardware produces different results for my personal work) I feel like this change would help scikit image maintain relevance |
hmaarrfk
approved these changes
Sep 1, 2024
Member
Member
|
Yes, sounds like a good idea to incorporate this into 7521. I'll remove the "Path to skimage2" tag since I view that more as "API stuff that can be done before skimage2". It's on the 2.0 milestone so we won't forget it. :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
closes #6310
modifies
convert_to_floatand_supported_float typeto cast small integer dtypes (np.uint8, np.int8, np.uint16, np.int16) to float32 instead of float64.most changes are to the expected types and tolerances in test cases
we may want to wait until skimage2 to merge this change
TODO
img_as_floatto return float32 for small integer inputsRelease note