Suppose that I have the following list of coordinates:
[(35.0, 811.0), (37, 820), (66, 80), (88.0, 674.0), (97, 343), (98, 343), (126, 984), (132.0, 784.0), (133.0, 457.0), (165.0, 481.0), (193, 92), (206, 645), (206, 646), (256, 409), (304, 255), (305, 255), (360, 889), (456.0, 689.0), (500, 147), (501, 147), (528.0, 822.0), (536, 483), (536, 509), (542, 872), (560, 512), (605, 755), (605, 756), (663, 144), (664, 144), (727.0, 426.0)]
These coordinates are the centeroid of some shapes, and some of them are very close (different in x or y) like (304, 255), (305, 255). All I want to do is categorizing such coordinates in one set. And for that aim I want to create a unique identifier from this points.
First of all you might think about subtraction or multiplication or pow or etc. but since there is a lot of coordinate in my array and some of them might have same result for aforementioned operations I can't use this trick.
So the question is that, is there any mathematical solution for this task? so that I can create a unique identifier for (304, 255) and (305, 255) ?
PS. I'm using python programming language and Numpy.

I found a solution which I think works in this case. Since all this close coordinates are different in unity part like
140and139we can subtract 9 from this numbers and get the round then it would be a unique number for each of them:We can use
setfunction to preserve the uniuqe items :As we can see one of the close coordinates has gone. And we can categorize them by passing the aforementioned formula as the
keytoitertools.groupbyfunction: