Javascript Reduce Array Function In Numpy Which Function