romcomma.user.sample.permute_axes§

permute_axes(new_order)[source]§

Provide a rotation matrix which reorders axes. Most use cases are to re-order input axes according to GSA.

Parameters:

new_order (Sequence | None) – A Tuple or List containing a permutation of [0,...,M-1], for passing to np.transpose.

Return type:

ndarray | None

Returns: A rotation matrix which will reorder the axes to new_order. Returns None if new_order is None.