Hello,

I’d like to do the following using element wise operation :

I have a tensor a = [1,2,3,4]

And I have a bijection, that is represented by a dictionary for example

b = {1:4,2:1,3:2,4:3}

The transform would be :

f(a,b) = [4,1,2,3]

1 become a 4, 2 became a 1 and so forth…

Is this operation possible using only element wise operations?