coordinates.coordinate_systems.OblateHomoeoidalCoordinateSystem.get_canonical_axes_order#

static OblateHomoeoidalCoordinateSystem.get_canonical_axes_order(src_axes: Sequence[str]) List[int]#

Compute the permutation indices to reorder src_axes into sorted alphabetical order.

This function is useful for contexts where canonical order is alphabetical, or where symbolic systems (without a defined canonical axis list) use string sorting as a fallback.

Parameters:

src_axes (list of str) – A list of axis names.

Returns:

A permutation P such that [src_axes[i] for i in P] gives sorted(src_axes).

Return type:

list of int

Examples

>>> get_canonical_axes_order(["theta", "r", "phi"])
[2, 1, 0]