Skip to content

Efficiency improvement in rng_fn() #131

@vandalt

Description

@vandalt

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

Here is the relevant text from the original comment:

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions