exoplanet-dev / exoplanet

Fast & scalable MCMC for all your exoplanet needs!
https://docs.exoplanet.codes
MIT License
206 stars 52 forks source link

RegularGridInterpolator in exoplanet #180

Closed shbhuk closed 3 years ago

shbhuk commented 3 years ago

I'm trying to use an interpolator object in pymc3 and found this deprecated documentation page detailing using exoplanet for RegularGridInterpolator. Trying to replicate the 2d interpolation example from exoplanet v0.1.6, I get -

NotImplementedError: Only the C version is implemented

Describe the solution you'd like I understand this example is from an older version, but am wondering if there is an updated example of using the RegularGridInterpolator function with the updated exoplanet.

exoplanet v0.4.4

dfm commented 3 years ago

This error means that you have compiler issues with Theano or the flags set to not FAST_COMPILE or something. You could check out the pure Theano version of the interpolator on the GitHub main branch:

https://github.com/exoplanet-dev/exoplanet/blob/7f7d64d743e8d6ff18878583551b57d8a6b20b04/src/exoplanet/interp.py

You could probably just extract that and use it directly.