Just for reference to whom it might be interested I found this examples of implementing forward and backwards methods with scipy and numpy. I have not tried them but based on prtblck’s answer I will definitely spend time on trying them out.
https://seba-1511.github.io/tutorials/advanced/numpy_extensions_tutorial.html 2
Update:  I am using  pytorch version 1.0.0.   The numpy code example ran for me changing the line from numpy_input = input.numpy()  to  numpy_input = input.detach().numpy().
Thanks again.