Skip to content

Stack overflow in rand!() with product distribution #1909

Closed
@droodman

Description

@droodman
julia> using Random, Distributions
julia> v = [0.; 0.]; rand!(v, product_distribution([Normal(), Normal()]))
ERROR: StackOverflowError:
Stacktrace:
 [1] rand!(rng::Xoshiro, A::Vector{Float64}, X::DiagNormal) (repeats 2 times)
   @ Random ~/.julia/juliaup/julia-1.11.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/Random/src/Random.jl:268

I'm using Distributions v0.25.11, Random v1.11.0, Julia 1.11.1, macOS 15.0.1. It also happens in Windows.

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