Skip to content

Missing unit test for .psis_subset() output structure #518

@utkarshpawade

Description

@utkarshpawade

.psis_subset() manually manipulates psis object internals because loo doesn't expose a public subset method (https://github.com/stan-dev/bayesplot/blob/master/R/ppc-loo.R#L722-L738). The existing tests only check that plotting works with a subset and that oversized subsets error, nothing verifies the returned object actually has the correct structure.

If loo changes its psis internals, this will break silently.

We should add a test that checks .psis_subset() preserves class, dimensions, field values, and attributes.

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