Skip to content

Enable chain indexing through symbols #1429

Description

@TorkelE

Basically a continuation of an issue here: penelopeysm/FlexiChains.jl#249 (comment)

When you have a Turing output chain, if you want to access parameter γ in a flexichain draw, you have to use this syntax:

draw = rand(chain; parameters_only = true)
draw[@varname(γ)]

Would it be possible to instead allow indexing with a symbol representing the parameter:

draw[]

?

If so, that might be a nice interface in certain circumstances.

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