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

Allow unary negation to work with all distributions #96

Merged
merged 2 commits into from
Mar 31, 2024

Conversation

venpopov
Copy link
Contributor

Summary

Fixed #95. I added a test showing that -dist_wrap('norm') and -dist_student_t(3) fail before the fix and pass afterwards.

Not sure if this is the optimal approach, but I just copy pasted the part from Ops.dist_normal that handled the unary negation to the code for Ops.dist_default and Ops.dist_transformed

@mitchelloharawild
Copy link
Owner

Looks great, thanks!

@mitchelloharawild mitchelloharawild merged commit 5946354 into mitchelloharawild:master Mar 31, 2024
6 checks passed
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.

unary negation operator '-' works only with dist_normal()
2 participants