Having an array (2d) with index of colors is there a way to replace the index by its color in one step not element by element?
Example:
colors=[[255,0,0],[125,222,11]]
im_x=[[0,0],[1,0]]
#the result must be:
im_c= [[[255,0,0],[255,0,0]],[[125,222,11],[255,0,0]]
I have try colors[im_x] but it does not work :(