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

wrong order of clip in cosine weighting #82

Closed
nicrie opened this issue Sep 14, 2023 · 1 comment
Closed

wrong order of clip in cosine weighting #82

nicrie opened this issue Sep 14, 2023 · 1 comment

Comments

@nicrie
Copy link
Contributor

nicrie commented Sep 14, 2023

stumbled over the following RuntimeWarning

RuntimeWarning: invalid value encountered in sqrt
  return np.sqrt(np.cos(np.deg2rad(data))).clip(0, 1)

It seems to me that the right order should be np.sqrt(np.cos(np.deg2rad(data)).clip(0, 1)), i.e. the values are clipped after the cosine and before the square root

@nicrie
Copy link
Contributor Author

nicrie commented Oct 24, 2023

fixed in #91

@nicrie nicrie closed this as completed Oct 24, 2023
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

No branches or pull requests

1 participant