PyTorch equivalent to numpy.divide(where) function

Hi all,

I know that PyTorch has a torch.div() function, but it doesn’t have the where parameter that numpy.divide() (reference) has.

Does anyone know if PyTorch has a function that can do this?
Or maybe a way of doing this in PyTorch?

I appreciate your time and support.

I don’t know of anything. You need to use torch.where, probably.