Thanks for the example.
Let’s call the first tensor input, the second output and the last theta.
Would the following work:
threshold = 0.26
idx = theta > threshold
input_filt = input[idx]
output_filt = output[idx]

If you want to keep the negation, you could use:
input_filt = input[~idx]
output_filt = output[~idx]

or just flip the > sign.
Let me know, if that’s what you want.