Fix skimage match_histograms() deprecation: replace multichannel with channel_axis#387
Open
Mr-Neutr0n wants to merge 1 commit intodeforum:mainfrom
Open
Fix skimage match_histograms() deprecation: replace multichannel with channel_axis#387Mr-Neutr0n wants to merge 1 commit intodeforum:mainfrom
Mr-Neutr0n wants to merge 1 commit intodeforum:mainfrom
Conversation
Author
|
following up — skimage renamed the multichannel parameter to channel_axis in match_histograms(). this fixes the deprecation warning / error on newer scikit-image |
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.
Summary
TypeError: match_histograms() got an unexpected keyword argument 'multichannel'Problem
In scikit-image 0.19+, the
multichannelparameter was deprecated and removed in version 0.21. The error occurs when using newer versions of scikit-image.Solution
Replaced
multichannel=Truewithchannel_axis=-1(the new parameter name). The value-1indicates that the channel dimension is the last axis, which is the same behavior asmultichannel=True.Related Issue
Fixes #381
Test Plan
helpers/colors.pychannel_axis=-1is equivalent tomultichannel=Truefor RGB/HSV/LAB images where channels are on the last axis