Reverse of torch.clamp

Torch.clamp clamps a tensor in the range of [min,max].

I want to do the reverse action.
For example a tensor of shape (N x M), and given some min and max, I want all the values in the tensor in the range [min,max] to be zero.

How to do that?

Just had to do this
tensor[tensor==torch.clamp(tensor, min , max)]=0
sorry for my foolish question