Fast fuse of close points in a numpy-2d (vectorized)
问题 I have a question similar to the question asked here: simple way of fusing a few close points. I want to replace points that are located close to each other with the average of their coordinates. The closeness in cells is specified by the user (I am talking about euclidean distance). In my case I have a lot of points (about 1-million). This method is working, but is time consuming as it uses a double for loop. Is there a faster way to detect and fuse close points in a numpy 2d array? To be