Return, for the 1-D array x, the index (into x) of the first occurrence of each unique value, ordered by ascending value.
x
Input
[3 1 2 3 3 1]
Output
[1 2 0]
This one's part of Premium. Unlock the full NumPy track plus every other premium problem on the site.
solve(...)