Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

permutedims with wildcards #31

Open
oxinabox opened this issue May 20, 2019 · 1 comment
Open

permutedims with wildcards #31

oxinabox opened this issue May 20, 2019 · 1 comment

Comments

@oxinabox
Copy link
Member

It would be nice if you could use wildcards and have them treated as wild
in permutedims target permutation.
So that if nda had names (:a, :b)
and you said permutedims(nda, (:_, :a)
then the result would have names (:b, :a)

Further more right now if you have multiple wildcards in the permutation
permutedims will error.
it should probably be possible to resolve that to minimal change in order

@oxinabox
Copy link
Member Author

oxinabox commented May 20, 2019

Here are some examples

Source Permutation Result Numeric permutation
(:a,) (:_) (:a,) (1,)
(:_,) (:a,) (:a,) (1,)
(:a, :b) (:_,:b) (:a, :b) (1,2)
(:a, :b) (:a, :_) (:a, :b) (1,2)
(:a, :b) (:_, :_) (:a, :b) (1,2)
(:_, :b) (:_, :b) (:_, :b) (1,2)
(:_, :b) (:a, :b) (:a, :b) (1,2)
(:_, :b) (:a, :_) (:a, :b) (1,2)
(:_, :_, :c) (:_, :_, :c) (:_, :_, :c) (1,2,3)
(:_, :_, :c) (:_, :c, :_) (:_, :c, :_) (1,3,2)
(:_, :_, :c) (:c, :_, :_) (:c, :_, :_) (3,1,2)
(:a, :b, :c) (:c, :_, :a) (:c, :b, :a) (3,2,1)
(:_, :_, :c) (:c, :a, :b) (:c, :a, :b) (3,1,2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant