Skip to content

rand(dist) does not consistently honor the element type of dist #1071

Description

@vargonis

One has

julia> typeof(rand(Uniform{Float32}(0f0,1f0)))
Float64

Similar inconsistencies occurs with Exponential and Gamma, although not with Normal. Relatedly:

julia> eltype(Uniform{Float32}(0f0,1f0))
Float64

This is rather easy to fix. I've already taken care of the few cases that are currently producing errors in my code---take a look here. However, this is not complete and does not merit a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions