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

Fix clean method in case var is nan. #164

Merged
merged 1 commit into from
Oct 25, 2021

Conversation

15b3
Copy link
Contributor

@15b3 15b3 commented Oct 25, 2021

Fix #163.

varmask = var != 0 & np.isfinite(var)

Since the & operator has a higher precedence than the != operator,
the 0 & np.isfinite(var) will be done first, not the var != 0.

Therefore, we need to make the order of calculations explicit.

varmask = (var != 0) & np.isfinite(var)

In addition,

  • Fixed clean_df function (Similar bug).
  • Added tests of them.

@s-celles
Copy link
Member

CI seems broken but it lgtm

Thanks @15b3 for your contribution

@s-celles s-celles merged commit e88c176 into python-windrose:master Oct 25, 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.

clean method bug if a var is nan
2 participants