"Flatten" the statistics functions (mean, etc.) on `BaseMatrix` trait
AtheMathmo opened this issue · comments
James Lucas commented
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
Axis
enum,Flat
. (Wont work well with currentsplit_at
functions). - Have existing functions work on flat array, and add new
mean_along_axis
functions which have the current functionality.
This issue to discuss any other ideas and track the implementation.