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.

  • data (numpy.ndarray) – An array to be rearranged

  • axis (int, Optional) – The axis that all other dimensions are rearranged around it. Defaults to 0.


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.

Return type

tuple (data numpy.ndarray, shape tuple