I understand that this is a solution, but do we really want to keep such a behavior? It can never be intended, and it is unclear from the documentation that torch.ByteTensor should not be used this way. Instead of doing unsafe casting, should we just raise an error when passing a boolean array to torch.ByteTensor?