Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Implement tesseroid forward modeling using numba #175
I needed to update the tesseroids implementation here to match the one in Tesseroids. There was a lot I had to change so I figured I could also try to do it in numba. It was pleasantly easy to implement the adaptive discretization with numba and the preliminary benchmarks show that it matches the speed of Cython. All this without any compiled code at install time (see #169).
As a bonus, I implemented a simple parallelism by splitting the computation grid into chunks and passing it to
Note: A big thanks to @gmarkall for helping with my initial doubts and getting this started!
I also made a version using pure Python + numpy for benchmarks and to use in testing. It is used as a fail-safe if numba is not available. For tesseroids this version is much slower (~100x). For the prism, sphere, etc it won't be. So it is a viable alternative to have.