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

affine_transform: Remove inconsistencies with ndimage implementation. #205

Merged

Conversation

m-albert
Copy link
Collaborator

@m-albert m-albert commented Apr 20, 2021

As reported by @martinschorb in #204, there are some inconsistencies in dask_image.ndinterp.affine_transform with respect to the ndimage implementation.

This PR

  1. fixes the behaviour when not providing an offset argument and adds a test for this.
  2. adapts the function API to expect tuples of ints for the shape related parameters, just as the downstream scipy implementation does. As @martinschorb points out, the scipy implementation also works when providing output_shape as a ndarray, so I now explicitly perform a conversion into tuple within the function to also allow for this (please object if this doesn't make sense).

I don't see reasons for why the inconsistencies had been there in the first place and assume I had simply not been careful enough during the implementation. Also, there should be no backwards compatibility problem introduced by this PR.

- change offset default parameter to float
- expect tuple for output_shape (and output_chunks)
@GenevieveBuckley GenevieveBuckley merged commit 43f9f7e into dask:main May 4, 2021
GenevieveBuckley added a commit to GenevieveBuckley/dask-image that referenced this pull request May 6, 2021
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.

2 participants