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

Only warn about NaNs in input data if not already masked in Background2D #1712

Merged
merged 2 commits into from Feb 29, 2024

Conversation

jdavies-st
Copy link
Contributor

@jdavies-st jdavies-st commented Feb 28, 2024

This PR changes how the warning

AstropyUserWarning: Input data contains invalid values (NaNs or infs), which were automatically masked.

is emitted in Background2D. With this PR, if the mask passed to Background2D masks all the NaNs in the input data, then the warning should not be emitted.

Currently under Bug fixes in CHANGES.rst.

Resolves #1711

Copy link
Member

@larrybradley larrybradley left a comment

Choose a reason for hiding this comment

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

Thanks, @jdavies-st!

@larrybradley larrybradley merged commit c418ed2 into astropy:main Feb 29, 2024
21 checks passed
@larrybradley larrybradley added this to the 1.12.0 milestone Feb 29, 2024
@jdavies-st jdavies-st deleted the fix-background2d-nan-warning branch February 29, 2024 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Background2D warns about NaNs, even if they are already masked
2 participants