Add order parameter to COO.reshape
#193
Conversation
Adds support for `np.reshape` to dispatch to `COO.reshape` properly.
Codecov Report
@@ Coverage Diff @@
## master #193 +/- ##
==========================================
+ Coverage 97.52% 97.52% +<.01%
==========================================
Files 11 11
Lines 1416 1417 +1
==========================================
+ Hits 1381 1382 +1
Misses 35 35
Continue to review full report at Codecov.
|
One minor change. |
|
||
# order parameter not actually supported | ||
with pytest.raises(NotImplementedError): | ||
np.reshape(s, shape, order='F') |
hameerabbasi
Sep 19, 2018
Collaborator
We might want to remove these two lines from the test, if we add this functionality later it'll crap out.
We might want to remove these two lines from the test, if we add this functionality later it'll crap out.
hameerabbasi
Sep 19, 2018
Collaborator
An exception from coverage is already in place.
An exception from coverage is already in place.
jcrist
Sep 19, 2018
Author
Collaborator
Done.
I personally prefer to check these errors - in the past I've seen code that was supposed to raise a DeprecationWarning
or NotImplementedError
fail to actually raise due to a bug. I don't think of the tests as the-one-uneditable-source-of-truth, I think someone adding this functionality wouldn't be surprised to see a test fail due to a NotImplementedError
not being raised anymore, and be fine changing the test.
Anyway, happy to cede to you here. I believe this should be good to go.
Done.
I personally prefer to check these errors - in the past I've seen code that was supposed to raise a DeprecationWarning
or NotImplementedError
fail to actually raise due to a bug. I don't think of the tests as the-one-uneditable-source-of-truth, I think someone adding this functionality wouldn't be surprised to see a test fail due to a NotImplementedError
not being raised anymore, and be fine changing the test.
Anyway, happy to cede to you here. I believe this should be good to go.
hameerabbasi
Sep 19, 2018
Collaborator
Fair enough. 👍
Fair enough.
Adds support for
np.reshape
to dispatch toCOO.reshape
properly.