If I have a list:
a=[6,3,2,5,1,4]
and a specific size likes 3, so number 1~2 will tagged 1, 3~4 tagged 2, 5~6 tagged 3, likes list b:
b=[3,2,1,3,1,2]
How can I efficient to do this? Note that list could be floating number
Sorry for unclear description, Update with more complex example:
a=[2.5,1.4,1.6,2.1,1.5,0.7]
output will be :
b=[3,1,2,3,2,1]