Skip to content

remove need for channel_as_last_axis decorator in skimage.filters - #5584

Merged
grlee77 merged 2 commits into
scikit-image:mainfrom
grlee77:channel-axis-filters-update
Oct 22, 2021
Merged

grlee77 merged 2 commits into
scikit-image:mainfrom
grlee77:channel-axis-filters-update

Conversation

@grlee77

@grlee77 grlee77 commented Sep 28, 2021

Copy link
Copy Markdown
Contributor

Description

This PR removes the need for the channel_as_last_axis decorator utility for functions in the skimage.filters module. This decorator allowed existing functions that assumed channels along the last axis to work without modification. However, ideally we will replace this decorator with native support for arbitrary channel position in each function (with possible exception of cases where it would substantially increase the code complexity).

This PR does not introduce any change to existing behavior. Some new tests involving channel_axis were added to an existing difference_of_gaussian test function.

Checklist

  • Docstrings for all functions
  • Gallery example in ./doc/examples (new features only)
  • Benchmark in ./benchmarks, if your changes aren't covered by an
    existing benchmark
  • Unit tests
  • Clean style in the spirit of PEP8
  • Descriptive commit messages (see below)

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 the πŸ”§ type: Maintenance Refactoring and maintenance of internals label Sep 28, 2021

@rfezzani rfezzani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @grlee77 πŸ˜‰

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

πŸ”§ type: Maintenance Refactoring and maintenance of internals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants