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

Handle NaNs when clipping in transform.resize #6852

Merged
merged 2 commits into from Mar 27, 2023

Conversation

scott-vsi
Copy link
Contributor

Description

Fixes #6850. I included this test in the existing test_resize_clip test, but if you think it should be its own test I can break it out.

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.
  • There is a bot to help automate backporting a PR to an older branch. For
    example, to backport to v0.19.x after merging, add the following in a PR
    comment: @meeseeksdev backport to v0.19.x
  • To run benchmarks on a PR, add the run-benchmark label. To rerun, the label
    can be removed and then added again. The benchmark output can be checked in
    the "Actions" tab.

@lagru lagru added the 🩹 type: Bug fix Fixes unexpected or incorrect behavior label Mar 26, 2023
Copy link
Member

@lagru lagru left a comment

Choose a reason for hiding this comment

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

I left a minor formatting suggestion otherwise looks good! Thanks @scott-vsi. :)

skimage/transform/tests/test_warps.py Outdated Show resolved Hide resolved
@lagru lagru changed the title account for NaNs in the image when clipping to the input range Handle NaNs when clipping in transform.resize Mar 26, 2023
@lagru lagru added this to the 0.21 milestone Mar 26, 2023
Co-authored-by: Lars Grüter <lagru+github@mailbox.org>
@lagru lagru merged commit 081baae into scikit-image:main Mar 27, 2023
21 checks passed
@lagru
Copy link
Member

lagru commented Mar 27, 2023

Thanks @scott-vsi!

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.

skimage.transform.resize doesn't account for NaN in the image when clipping
3 participants