Skip to content

Commit 4ecb3ab

Browse files
committed
Switch w and (1-w) in linear_combination()
1 parent 82926ee commit 4ecb3ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

variations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def linear_combination(w):
3535
# assuming not transformed yet
3636
u1, v1 = var1.transform()
3737
u2, v2 = var2.transform()
38-
return w * u1 + (1-w) * u2, w * v1 + (1-w) * v2
38+
return (1-w) * u1 + w * u2, (1-w) * v1 + w * v2
3939
return linear_combination
4040

4141
@staticmethod

0 commit comments

Comments
 (0)