geocat.comp.polynomial._rearrange_axis
geocat.comp.polynomial._rearrange_axis#
- geocat.comp.polynomial._rearrange_axis(data, axis=0)#
rearranges the
numpy.ndarray
as a two-dimensional array of size (n,-1), where n is the number of elements of the dimension defined by
axis
.- Parameters
data (
numpy.ndarray
) – An array to be rearrangedaxis (
int
, optional) – The axis that all other dimensions are rearranged around it. Defaults to 0.
- Returns
tuple (data ndarray
,shape :class:`tuple
)` – A tuple, where the first element contains the reshaped data, and the second is a tuple with all dimensions except the one specified by the axis.