MyYaYa commented on issue #13001: Feature request: numpy.cumsum URL: https://github.com/apache/incubator-mxnet/issues/13001#issuecomment-451343665 > I find a elegant method to implement cumsum. Hope this will be useful. > > ``` > step = lambda data, state : (data + state[0], state[0] + data) > data = mx.nd.ones((10, 10)) > state = mx.nd.zeros(10) > outs, state = mx.nd.contrib.foreach(step, data, state) > ``` Now, I find this solution is so slow, especially when the size of array is big. So this solution has become a main cost of time in my program. Is there any efficient solution of 'cumsum' using mxnet's ndarray?
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services