[Fun] Improve the Matrix.accumarray function.