mlx_moveaxis()repositions one or more axes to new locations.aperm.mlx()provides the familiar R interface, permuting axes according topermvia repeated calls tomlx_moveaxis().
Usage
mlx_moveaxis(x, source, destination)
# S3 method for class 'mlx'
aperm(a, perm = NULL, resize = TRUE, ...)Arguments
- x, a
An object coercible to mlx via
as_mlx().- source
Integer vector of axis indices to move (1-indexed).
- destination
Integer vector giving the target positions for
sourceaxes (1-indexed). Must be the same length assource.- perm
Integer permutation describing the desired axis order, matching the semantics of
base::aperm().- resize
Logical flag from
base::aperm(). OnlyTRUEis currently supported for mlx arrays.- ...
Additional arguments accepted for compatibility; ignored.