I found a behavior that I could not completely explain in boolean indexing. While it works fine with a tensor

>>> a = torch.tensor([[1,2],[3,4]])
>>> a[torch.tensor([[True,False],[False,True]])]
tensor([1, 4])

It does not work with a list of booleans

>>> a[[[True,False],[False,True]]]
tensor([3, 2])

My best guess is that in the second case the bools are cast to long and treated as indexes. Is this behavior wanted or a bug?