I\'m writing some modelling routines in NumPy that need to select cells randomly from a NumPy array and do some processing on them. All cells must be selected without replacemen
How about using numpy.random.shuffle
or numpy.random.permutation
if you still need the original array?
If you need to change the array in-place than you can create an index array like this:
your_array =
index_array = numpy.arange(your_array.size)
numpy.random.shuffle(index_array)
print your_array[index_array[:10]]