Skip to content
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

channel_as_last_axis decorator fix #5348

Merged
merged 2 commits into from
Apr 26, 2021

Conversation

grlee77
Copy link
Contributor

@grlee77 grlee77 commented Apr 22, 2021

Description

After moving the channel axis to the last position, channel_as_last_axis also needs to update the channel_axis kwarg to -1.

This bug was not revealed by the existing test cases for functions where it was used because these functions seem to only check that channel_axis is not None. See for example:

if channel_axis is not None:

The new test here verifies both that the data has been reshaped and the argument set to -1 as expected.

Checklist

For reviewers

  • Check that the PR title is short, concise, and will make sense 1 year
    later.
  • Check that new functions are imported in corresponding __init__.py.
  • Check that new features, API changes, and deprecations are mentioned in
    doc/release/release_dev.rst.

@grlee77 grlee77 added this to the 0.19 milestone Apr 22, 2021
@alexdesiqueira alexdesiqueira merged commit 3932cbb into scikit-image:main Apr 26, 2021
@alexdesiqueira
Copy link
Member

Thank you Greg!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🩹 type: Bug fix Fixes unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants