Inplace ops #146
Inplace ops #146
Conversation
Codecov Report
@@ Coverage Diff @@
## master #146 +/- ##
==========================================
+ Coverage 95.77% 96.42% +0.64%
==========================================
Files 10 10
Lines 1183 1174 -9
==========================================
- Hits 1133 1132 -1
+ Misses 50 42 -8
Continue to review full report at Codecov.
|
This looks pretty slick :) Might want to test something like the following as well: np.sin(x, out=x) |
else: | ||
return NotImplemented | ||
|
||
if out is not None: | ||
out = out[0] |
mrocklin
May 3, 2018
Collaborator
I've seen people do things like the following to ensure length
(out,) = out
I've seen people do things like the following to ensure length
(out,) = out
Might necessitate a docs update? Line 23 in 8f2a9ae |
Docs updated, warning added to docs that "in-place ops aren't really in-place". Supported |
cc @mrocklin I think this is ready for a final review. :-) If ready, please do a rebase+merge, I've kept the changes separate. |
847eea8
to
1965051
Removed some unnecessary code for |
Merging. Sorry for the delay in review. Thanks @hameerabbasi |
Closes #80
Leverages the existing
__array_ufunc__
implementation without needing too much extra code.