Skip to content

Beta with concentration1=1 gives nan log_prob at value=0 #2088

@miguelbiron

Description

@miguelbiron

Bug Description

Title.

Steps to Reproduce

import numpyro.distributions as dist

assert jnp.isnan(dist.Beta(1.0, 8.0).log_prob(0.))

Expected Behavior

assert jnp.isclose(dist.Beta(1.0, 8.0).log_prob(0.), 2.079)

The log_prob implementation should handle the cases with any concentration parameter equal to 1. See for example the Julia implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions