Fixed derivative method in interp.py and working on checking gradient