I have an array A of size 100 which might have repeating elements in it. I have another array B of size 10 which have unique elements in it. All elements of B are present in A and vice versa. I have another array C corresponding to B where each element of C is corresponding to the element in B.
I want to create an array A2 composed of elements of C, such that I can achieve the following:
import numpy as np
A = np.array([1,1,4,5,5,6])
B = np.array([4,6,5,1)])
C = np.array(['A','B','C','D')])
I want to create A2 such that:
A2 = np.array(['D','D','A','C','C','B'])
A2 has elements from C based on matching index of elements of B in A.