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.
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.
If it's RGBA then I'm not sure I understand in what cases we'd want normalization. If it's not already scaled 0..1 or 0..255, then we need to apply that manually, and I don't think we want colorbars for that.
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.
indeed, this is just the simplest patch to restore previous behaviour. Before merging #3849 we used to pass a
Normalize
object in _init_image, and MPL didn't complain, because it's what it uses by default.A different approach would be to patch this in
_init_image
, though I have a strong preference for leaving this responsability entirely to theNormHandler
class because it's its sole purpose. Does it make sense ? Maybe I can add a little more details in the comment here ?