I'm dealing with a large N-D numpy array. I would like to keep only those elements present in a different numpy array, and set the remaining values to 0.
for example, if we consider this numpy array
array([[[36, 1, 72],
[76, 50, 23],
[28, 68, 17],
[84, 75, 69]],
[[ 5, 15, 93],
[92, 92, 88],
[11, 54, 21],
[87, 76, 81]]])
and I want to set 0 in all places except where the values are 50, 11, 72