Solved by Nikronic in post #2 
              
              
                Hi, 
I don’t think there is an equivalent function for that in PyTorch (not sure), but I just looked at numpy’s source code and it seems pretty simple as all functions are available in PyTorch to implement same method as numpy. It would not take much time as you just need to replace torch instead of…