Simple example for replacing values in the array according to a list:
import numpy as np
l = [1,3,4,15]
a = np.array([1,1,2,4,6,7,8,9,1,2,3,4,89,12,23,3,4,10,15])
for element in l:
a = np.where(a == element, 0, a)
Since this is rather slow, I'm looking for a faster alternative, that scales well.