exoplanet-dev / exoplanet-dev/celerite2

Efficiency improvement in `rng_fn()`

Open
#131 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
85
Forks
19
PR merge metrics
No merged PRs in 30d

Description

A PyMC developer pointed out potential inefficiencies in `rng_fn()` for `CeleriteNormalRV`.

Here is the relevant text from [the original comment](https://github.com/pymc-devs/pytensor/issues/866#issuecomment-2196443772):

> Also there's some inefficiency in your rng_fn. If size is provided (size is not None), you shouldn't have to broadcast the params together, it's enough to have your call below where you broadcast each param to size (there you are also hardcoding implicitly the ndims_params when you do param.shape[-n:] btw).
>
> Only when size is not provided do you need to broadcast the params, as size is implicitly the broadcasted batch shape of all the parameters.

I don't have time to look into this now, but wanted to point it out in case someone wanted to look into it.

Thank you!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.