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
Suppress some warnings in examples #3958
Suppress some warnings in examples #3958
Conversation
It it expected that the array may contain nan and this is handled correctly using nanmin
Avoids numpy warnings with the same result. Similar to what is done above
if self.lat_cycle is not None: | ||
lat0 = np.nanmin(lat) | ||
lat -= 360. * ((lat - lat0) > 180.) | ||
with np.errstate(invalid='ignore'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note to self, should probably use np.unroll() here, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, what exactly are we ignoring here? The other changes came with very nice explanations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right you are. I guess I was being lazy 😃
I assume that np.unroll() should we np.unwrap?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, right, np.unwrap(). Squishy brain matter makes for a terrible memory medium...
Supress some warnings in examples
very nice explanations! |
This filters a number of warnings from the examples.
I have done this for 2 reasons