def zero_remove(data, mask):
 new_mask = mask.copy()
 new_mask[(data == 0)] = 0
 return new_mask

def zero_remove ( data , mask ) : new_mask = mask . copy ( ) new_mask [ ( data == 0 ) ] = 0 return new_mask
modify inputted mask to also mask out zero values .