Skip to content

static interface for permutedims #806

Open
@tpapp

Description

@tpapp

I would like to contribute an implementation for permutedims, but first I would like to ask for suggestions about the interface.

In particular, it would be ideal if one could encode the permutation statically. I could imagine a

struct StaticPermutation{N}
    permuation::NTuple{N,Int}
    ## optionally: constructor that verifies validity
end

type and an interface like

permutedims(sarray, StaticPermutation(2, 3, 1))

but I am interested in suggestions if there is a better solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    arraysAbstractArray interface and array operationsfeaturefeatures and feature requests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions