Feature/np cumsum#307
Conversation
|
|
||
| public static partial class np | ||
| { | ||
| public static NDArray cumsum(NDArray a) |
henon
left a comment
There was a problem hiding this comment.
Please always add the tests from the numpy docs examples too:
https://docs.scipy.org/doc/numpy-1.15.1/reference/generated/numpy.cumsum.html
Oceania2018
left a comment
There was a problem hiding this comment.
@Plankton555 Glad you get started in NumSharp jounery. Just a little suggestion about this PR.
Try this Assert.IsTrue(Enumerable.SequenceEqual(arr, expected)); instead of for loop.
|
@Oceania2018 I tried using Linq instead but didn't get it to work. Any advice are welcome
|
|
|
4/6 tests are failing currently. The failing tests are related to summing over specific axes, as well as specifying data types. |
|
Thank you for the PR! |
Simple implementation of cumulative sum. Either call as a member function from an NDArray or as a static function via
np.cumsum().