exoplanet-dev / celerite2

Fast & scalable Gaussian Processes in one dimension
https://celerite2.readthedocs.io
MIT License
70 stars 11 forks source link

Fix PyMC and PyTensor deprecation warnings #130

Closed vandalt closed 5 months ago

vandalt commented 5 months ago

Two deprecation warnings appeared in recent releases of PyTensor (link) or PyMC:

The moment() to support_point() boiled down to changing a function name.

However, ndims_params is now computed when an instance is created, which means it could not be used directly in the rng_fn() classmethod (via cls). The fix suggested by a PyMC dev was to hardcoded ndims_params inside rng_fn()

I also added tests to check that 1) ndims_params and ndim_supp derived from the signature give the expected values and 2) support_point behaves as expected

dfm commented 5 months ago

Thanks! GitHub had an Actions outage yesterday which I think meant that the tests never got triggered. Can you try pushing to your branch again?