Skip to content

Error with .~ and rand  #405

Closed
Closed
@marius311

Description

@marius311

The following errors with Turing v0.21.1 and DynamicPPL v0.19.1. It was suggested on Slack this is a bug and to post here:

@model function toy()
    x = Vector{Float64}(undef, 2)
    x .~ [Normal() for i=1:2]
end

toy()() # works
rand(toy()) # ERROR: type NamedTuple has no field x

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