Skip to content

Refactor to use numba #179

Open
Open
@ferrine

Description

@ferrine

https://github.com/pymc-devs/pymc-experimental/blob/ae7b80fc8ad1636e8c5d178c46bd85cf3c0f2e85/pymc_experimental/distributions/discrete.py#L31

Make the random generator vectorized in numba.

The original random sampling method is pure python and when prior or posterior sampling is called a slow loop is running for sampling. Numba has similar syntax to numpy and therefore makes it easy to vectorize the sampling call. It can be implemented as a static broadcasted function that is called by this class

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions