-
Notifications
You must be signed in to change notification settings - Fork 54
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
add sign, sgn #827
add sign, sgn #827
Conversation
Codecov Report
@@ Coverage Diff @@
## master #827 +/- ##
=======================================
Coverage 95.47% 95.48%
=======================================
Files 64 64
Lines 9436 9454 +18
=======================================
+ Hits 9009 9027 +18
Misses 427 427
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
test fails on pytorch 1.8.1: nonzero can't be used with complex dtypes |
rerun tests |
|
this seems to be the case for torch 1.7 as well |
…at into features/780-sign
Tests updated for GPU. |
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.
👏🏼 @mtar thanks a lot as usual. Just a few comments.
Description
This PR adds the
sign
&sgn
functions to heat. The former behaves like numpy on complex values, the latter like pytorch.Note
Requires PyTorch 1.9Uses a indexing mask on older versions now.Issue/s resolved: #780
Changes proposed:
sign
sgn
Type of change
Due Diligence
Does this change modify the behaviour of other functions? If so, which?
no