Skip to content

API differences between Uniform and Bernoulli #1211

Closed
@Danvil

Description

@Danvil

Hello,

distributions::Uniform::from panics when the given range is invalid.

In contrast distributions::Bernoulli::new returns an Option object if the given probability is invalid.

It comes to a surprise that seemingly similar functions have different API design. Is there a particular reason for this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    B-APIBreakage: APIE-questionParticipation: opinions wanted

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions