Tensor using where to get indexes in C++

Hi, does anyone know how to do where operation to filter out index of a tensor?

in numpy we have:

            inds = np.where(scores[:, j] > 0.29)[0]

So we can get index where the j columns score bigger than 0.29. How to do this operation in C++ tensor??

As the numpy documentation suggests, that is torch.nonzero.

Best regards

Thomas

Just find it out!!!

Now, I got another issue!!

How to get specific row of a 2 dim tensor by indcies??

func: index(Tensor self, Tensor?[] indices) -> Tensor?