Skip to content

New CSV reading fails when there are no draws #800

@WardBrian

Description

@WardBrian

For some testing, @bob-carpenter is running Stan with iter_sampling=0 and save_warmup=false, meaning the only input he reads is comments.

This is a bit esoteric, but it did work in previous versions, and is broken following #799

There are two places it breaks:

  • in stancsv.csv_bytes_list_to_numpy, we throw an error if the size is 0
  • the assignment to self._draws[:, chain, :] in assemble_draws fails if the output is size 0

cc @amas0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmethod outputsCmdStan outputs to Python objects

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions