rebin

mdhelper.algorithm.utility.rebin(x: ndarray[float], factor: int = None) ndarray[float][source]

Rebin discrete data.

Parameters:
xnumpy.ndarray

Discrete data to be rebinned in the last dimension.

factorint, optional

Size reduction factor. If not specified, the biggest factor on the order of \(\mathcal{O}(1)\), if available, is used.

Returns:
xrnumpy.ndarray

Rebinned discrete data.