Skip to content

issues converting to draws_rvars format #582

Closed
@jgabry

Description

@jgabry

Describe the bug

While working on #581 I discovered that converting to draws_rvars using fit$draws(format = "draws_rvars") fails if called after previously converting to a different format.

To Reproduce

# rvars works if called first
fit <- cmdstanr_example("schools")
fit$draws(format = "draws_rvars")  # OK

# but not if called after another format
fit$draws(format = "draws_array")  # OK
fit$draws(format = "draws_rvars") # ERROR

The error is:

Error: The following variables are missing in the draws object: 
{'theta[1]', 'theta[2]', 'theta[3]', 'theta[4]', 'theta[5]', 'theta[6]', 'theta[7]', 'theta[8]'}

Expected behavior

Successful conversion between formats.

Operating system
mac os x 11.6

CmdStanR version number
0.4.0.9000

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions