rulinalg icon indicating copy to clipboard operation
rulinalg copied to clipboard

"Flatten" the statistics functions (mean, etc.) on `BaseMatrix` trait

Open AtheMathmo opened this issue 8 years ago • 0 comments

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 current split_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.

AtheMathmo avatar Dec 28 '16 10:12 AtheMathmo