weighted12 = [v * mask12[i] for i, v in enumerate(inn[:-1])]