from functools import reduce
tmp = reduce(lambda x, y: x | np.all(p_a_colors == y, axis=-1), p_rem, np.
    zeros(p_a_colors.shape[:1], dtype=np.bool))
indices = np.where(tmp)[0]
find and delete from more-dimensional numpy array