cogpy.utils.reshape

Functions

flush_axes(X, src_axes)

Move the axes specified by src_axes axes of an array X to the last axes.

last_naxes(num_axes)

ravel_dims(arr, axis1, axis2)

Ravel the specified dimensions of an array.

reshape_axes(arr, axes, shape)

Reshape the specified axes of an array while preserving the column order.

roll_dim(x, nroll)

reshapes the array x, for example if x.shape = (3,6,9,0) roll_dim(x,-1).shape = (6,9,0,3) :param x: :type x: array (arbitrary dimensions) :param nroll: :type nroll: int

unflush_axes(X, num_axes, dst_axis)

Move the last num_axes axes of an array X to a new position specified by dst_axes.