Skip to content

Commit 5a5afa5

Browse files
authored
Properly define 'true' in test. (pytorch#4859)
1 parent 483828e commit 5a5afa5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/test_indexing.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ def test_index_setitem_bools_slices(self):
142142
a[:] = neg_ones_expanded * 5
143143

144144
def test_setitem_expansion_error(self):
145+
true = variable(1).byte()
145146
a = Variable(torch.randn(2, 3))
146147
# check prefix with non-1s doesn't work
147148
a_expanded = a.expand(torch.Size([5, 1]) + a.size())

0 commit comments

Comments
 (0)