.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.
.psis_subset()manually manipulatespsisobject internals becauseloodoesn'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
loochanges itspsisinternals, this will break silently.We should add a test that checks
.psis_subset()preserves class, dimensions, field values, and attributes.