Linked Questions

Popular Questions

How to delete an element from array in loop?

Asked by At

I have an array size of (1000,3) for each iteration, I want to remove the first element of the array, so after 1000 iters, the array will be empty. If the array is empty, the new array is constructed by shuffle the original array. So the code like

original_array = [1000,3]
tmp_array = np.copy(original_array)
for in in range (2000):
   # remove the first element of array
   if (original_array size equal 0) then
       original_array = np.random.shuffle(tmp_array)

Related Questions