I have an array with three kinds of value:
a = np.array([150, 50, 200, 50, 150])
How do I replace the values with ordered integers so that 50's are replaced with 0's, 150's with 1's, and 200's with 2's like so:
[1, 0, 2, 0, 1]?
Thank you.
np.floor(a / 100).astype(int)