Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Implement roll (circular shift of elements) #160
This is my attempt to implement the equivalent of
I think this is nearly done, but it could be improved. In particular, the function is supposed to produce a copy of the array but I wasn't sure the preferred way of doing that so I called the
Thanks again for providing this awesome package. Looking forward to your comments!
@@ Coverage Diff @@ ## master #160 +/- ## ========================================== + Coverage 96.9% 96.96% +0.05% ========================================== Files 11 11 Lines 1197 1218 +21 ========================================== + Hits 1160 1181 +21 Misses 37 37
Things are excellent here, mostly! Just a few comments.
I think all comments are addressed. Thanks so much for the feedback.
A few remaining questions:
How should this function handle a non-COO input? Should I add a call to as_coo(...) at the top?
as_coo at the top.
Should I do more work to check inputs (e.g. if user provides a 2D sequence for axis or shift, should I throw a more descriptive error message?)
Ideally, NumPy error messages should be mirrored. But as long as this fails, it's alright.
I need to request changes, but the review mechanism on GitHub seems broken right now. I'll come back to it soon.
But in essence: Replace
Final comments, hopefully. Thanks for your patience with me. Only one is mandatory.