def removearray(L, arr):
    ind = 0
size = len(L)
while ind != size and not np.array_equal(L[ind], arr):
    ind += 1
if ind != size:
    L.pop(ind)
else:
    raise ValueError('array not found in list.')
How do you 'remove' a numpy array from a list of numpy arrays?