moveAxes method
Returns a layout with axis source
moved to target
.
Implementation
Layout moveAxes(int source, int target) {
final source_ = checkIndex(source, rank, 'source');
final target_ = checkIndex(target, rank, 'target');
final axes = IntegerRange(rank).toList();
axes.removeAt(source_);
axes.insert(target_, source_);
return transpose(axes: axes);
}