input = Variable(torch.LongTensor([-1, -1, 0, 1]))
input2 = Variable(torch.LongTensor([[0, 0], [1, 1], [2, 2], [3, 3]]))
temp = input < 1

print input2[temp, :]

I got
RuntimeError: inconsistent tensor size at /b/wheel/pytorch-src/torch/lib/TH/generic/THTensorMath.c:193

if input2 is 1-d, say
input[temp]

there is no problem. Is there a way to do what I want?