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: - arr : ndarray
an array of at least 2 dimensions (the reduction is done on the two last dimensions).
- factor : int
the factor to apply for reduction (must be a divider of the original axis dimension!).
- how : func
the reduction function
Returns: - the reduced array