salem.reduce¶
- salem.reduce(arr, factor=1, how=<function mean>)[source]¶
Reduces an array’s size by a given factor.
The reduction can be done by any reduction function (default is mean).
- Parameters
- arrndarray
an array of at least 2 dimensions (the reduction is done on the two last dimensions).
- factorint
the factor to apply for reduction (must be a divider of the original axis dimension!).
- howfunc
the reduction function
- Returns
- the reduced array