Yes, that would work, but for how you're using it (e.g., in the UV section below), it's better to do

    y = x[valid]
    F_a = np.zeros(y.shape)

This makes it clear that `F_a` is the same shape as `y`.