I have a tensor that stores whether or not an index in available
available = torch.Tensor([1,1,0,0,1,0])
and I want to return an index of either 0, 1, or 4 given that available[0],available[1],available[4] all equal to 1 with the same possibility.
can somebody help me with this? Thanks