rulinalg
rulinalg copied to clipboard
"Flatten" the statistics functions (mean, etc.) on `BaseMatrix` trait
Some opening discussion of this issue can be found in #115 .
Currently these functions all take an Axis argument and work along the given axis. In most (all?) libraries it is conventional to have these functions work on the flattened array by default with optional arguments to work along the axis.
As rust does not provide optional arguments we cannot mimick this behaviour. We have a couple of options moving forwards:
- Add a new variant to the
Axisenum,Flat. (Wont work well with currentsplit_atfunctions). - Have existing functions work on flat array, and add new
mean_along_axisfunctions which have the current functionality.
This issue to discuss any other ideas and track the implementation.