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

Silence warnings from nanmin and nanmax. #242

Merged
merged 2 commits into from
Dec 12, 2014
Merged

Conversation

mdickinson
Copy link
Member

When all of raw_value consists of NaNs (which seems like a legitimate use-case, given that we already allow some of the values to be NaNs), the nanmin and nanmax calls in ImageData.get_bounds emit a RuntimeWarning.

This PR avoids that RuntimeWarning by replacing nanmin and nanmax with fmin.reduce and fmax.reduce calls.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 2c52195 on silence-nan-warnings into 3e52ecb on master.

@corranwebster
Copy link
Contributor

Is it too much to ask for a test?

@corranwebster
Copy link
Contributor

Also, can you update CHANGES.txt

@corranwebster
Copy link
Contributor

Otherwise LGTM.

@mdickinson
Copy link
Member Author

Is it too much to ask for a test?

We should definitely add a test. Please can I put that on my to-do list for later today?

@mdickinson
Copy link
Member Author

Merging, with @corranwebster's permission.

mdickinson added a commit that referenced this pull request Dec 12, 2014
Silence warnings from nanmin and nanmax.
@mdickinson mdickinson merged commit 2824f79 into master Dec 12, 2014
@mdickinson mdickinson deleted the silence-nan-warnings branch December 12, 2014 09:52
@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling be1a821 on silence-nan-warnings into 3e52ecb on master.

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.

3 participants