Here's the numpy.ndarray I've got:
a=[[[ 0.01, 0.02 ]], [[ 0.03, 0.04 ]]]
and I want it to convert to
a = [(0.01, 0.02), (0.03, 0.04)]
Currently I just use the following for loop but I'm not sure whether it's efficient enough:
b = []
for point in a:
b.append((point[0][0], point[0][1]))
print(b)
I've found somewhat a similar question but there're no tuples so a suggested ravel().tolist() approach didn't work for me here.