made changes whilst debugging least interpolation. Now works in most cases. I have found one remaining bug which I cannot resolve. the test case is in test_interpolation. use meshgrid