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

Remove deprecated multichannel keyword from skimage.filters.gaussian #857

Merged

Conversation

jklaise
Copy link
Member

@jklaise jklaise commented Oct 5, 2023

Fixes #856.

channel_axis was introduced in 0.19 so bumping lower bound for scikit-image to that.

@jklaise jklaise changed the title Remove deprecated multichannel keyword from skimage.filters.gaussian Remove deprecated multichannel keyword from skimage.filters.gaussian Oct 5, 2023
@@ -561,7 +561,8 @@ def zoom_blur(x: np.ndarray, max_zoom: float, step_zoom: float, xrange: tuple =
return x_z


def glass_blur(x: np.ndarray, sigma: float, max_delta: int, iterations: int, xrange: tuple = None) -> np.ndarray:
def glass_blur(x: np.ndarray, sigma: float, max_delta: int, iterations: int,
channel_axis: int = -1, xrange: tuple = None) -> np.ndarray:
Copy link
Member Author

Choose a reason for hiding this comment

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

The public interface has now changed to explicitly include channel_axis, although it's unclear whether the implementation would respect anything other than the default -1 value (it assumes the layout starts with [height, width] axes). Still the function is not used anywhere publicly in the code base or examples so I think this is fine.

Copy link
Contributor

Choose a reason for hiding this comment

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

If we're not sure channel_axis actually works for anything other than -1, would it not be safer to remove it as a kwarg and just hard-code it inside glass_blur and gaussian_blur? i.e. just say in docstrings that these functions assume [h, w, c]?

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed, updated here: ceca05a

@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

Merging #857 (ceca05a) into master (39af073) will not change coverage.
Report is 4 commits behind head on master.
The diff coverage is 25.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #857   +/-   ##
=======================================
  Coverage   81.98%   81.98%           
=======================================
  Files         159      159           
  Lines       10375    10375           
=======================================
  Hits         8506     8506           
  Misses       1869     1869           
Files Coverage Δ
alibi_detect/utils/perturbation.py 22.50% <25.00%> (ø)

@jklaise jklaise merged commit 6f61c22 into SeldonIO:master Oct 6, 2023
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

multichannel parameter deprecated in skimage
2 participants