Open JoostvDoorn opened 6 years ago
I agree it would be nice I have no bandwidth right now but PR are always welcome ;)
@nicolaspanel Can I work on this?
@nicolaspanel @JoostvDoorn
I build a function meanaxis(arr, axis = 0)
for square matrices like [[1, 2], [3, 4]]
. Inclusive tests.
/**
* Calculates the arithmetic mean over a specific axis
* axis := 0 means x-axis (columns)
* axis := 1 means y-axis (rows)
* @param {NdArray} arr
* @param {Integer} axis (0 or 1)
*/
function meanaxis(arr, axis = 0)
I changed the function for calculating simple vectors like [1, 2, 3]
.
It would be very helpful if numjs supported mean/sum/min/max etc. over a specific axis like numpy.