intent: How do I vectorize this loop in numpy?
rewritten_intent: find the index of the maximum value in the array `arr` where the boolean condition in array `cond` is true
snippet: np.ma.array(np.tile(arr, 2).reshape(2, 3), mask=~cond).argmax(axis=1)