What happends in this numpy function: https://numpy.org/doc/stable/reference/generated/numpy.unique.html
a = np.array([1, 2, 5, 3, 2])
u, indices = np.unique(a, return_inverse=True)
The results are:
u
array([1, 2, 3, 5)]
indices
array([0,1,3,2,1), dtype=int64)
u[indices]
array([1, 2, 5, 3, 1])
u are the single values inside this array. What is indices? why is it a 3 and not a 5? and what is going on in u[indices]?