The question is if I have a 2-dimensional tensor [ [0, 1], [2, 3], [0, 0] ], how to write code without any loop to get the result [ [2], [1, 3] ] ?  The zeros denote invalid positions which we do not select.