The list A is based on list T1. Now T1 is transformed to list T2. I want to replace the index numbers of list A with respect to T2 i.e. element 1 is to be replaced with 2, 2 is to be replaced with 4, 3 is to be replaced with 5. I present the expected output.
import numpy as np
T1 = [0, 1, 2, 3, 4, 5, 6, 7]
A=[np.array([[[0, 1],
[0, 3],
[1, 3],
[3, 4],
[3, 6],
[4, 5],
[4, 7],
[5, 7],
[6, 4]]])]
T2 = [0, 2, 4, 5, 8, 9, 10, 11]
The expected output is
A=[array([[[0, 2],
[0, 5],
[2, 5],
[5, 8],
[5, 10],
[8, 9],
[8, 11],
[9, 11],
[10, 8]]])]