Is there an efficient way to apply Python’s in (__contains__)  elementwise to a torch.tensor?
This is the behaviour I’m looking for:
>> some_values = [3, 5, 8]
>> m = torch.randint(0, 10, (2,2))
>> m
[[0, 9],
[8, 5]]
>> m in some_values
[[False, False],
 [True, True]]

Thanks in advance!