The problem is as follows:
I have about ~1000 pixels out of 20000*2 whose positions I want to avoid by some distance (a few pixels, say, away from each of those positions).
I want to randomly select ~100,000 of the remaining pixels without replacement and record their positions (which I am finding is the difficult part).
At the moment I:
A. Create a mask from the 1000 positions.
B. Make a list of tuples containing the unmasked positions.
C. Draw from a flattened integer list describing that list of tuples. Hey presto!
But the memory requirements for B are huge and the limiting factor. I am less concerning about speed.
This is the same as memory efficient random number iterator without replacement but with masked circles (swiss cheese). I wonder if it's best just to keep sampling without replacement until the 100,000 are obtained.
Thanks!