-
Notifications
You must be signed in to change notification settings - Fork 360
Open
Labels
Description
Like numpy.cumsum() or numpy.cumprod() but with map, mapv, map_inplace, map_into since unlike Numpy, in Rust we don't take a performance hit by supplying user functions. I imagine the signature to be something like
fn cum_mapv<F: Fn(T,T) -> T>(&self<T>, f: F) -> Self// T being the element type
// cumsum example:
let a = Array::linspace(0., 100., 100).cummapv(|acc, cur| acc + cur);If this will be considered for inclusion, I can write up a PR!