rust-ndarray / ndarray

ndarray: an N-dimensional array with array views, multidimensional slicing, and efficient operations

Home Page:https://docs.rs/ndarray/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement product_axis

unrenormalizable opened this issue · comments

product_axis is like sum_axis but for product. numpy has this implemented. it is the torch.prod equivalent with the dim argument. It will be good to have this implemented.

Some of the libraries I work with - mainly burn - is adding this functionality but i have to implement it for ndarray in the burn codebase.

I think this is a good idea, since we have sum and sum_axis.

I was about to code it with fold_axis or map_axis, but it seems that we can use that function as a basis.

Hello! Would love to continue contributing, and looking for some more low-hanging fruit; just submitted a PR to close this, please let me know if there's any feedback.