sbi-dev / sbi

Simulation-based inference toolkit
https://sbi-dev.github.io/sbi/
Apache License 2.0
546 stars 133 forks source link

`pairplot` with 1 dimensional tensor returns an error #1184

Closed gmoss13 closed 1 week ago

gmoss13 commented 2 weeks ago

Describe the bug After recent changes, pairplot can no longer be used to plot the distribution of a 1-dim parameter, and throws TypeError: 'Axes' object is not subscriptable

To Reproduce

import torch
from sbi.analysis import pairplot
theta = torch.randn(1000, 1)
pairplot(theta,limits=[(-1,1)])
Matthijspals commented 2 weeks ago

I most have introduced this, apologies will have a look!

Matthijspals commented 1 week ago

This should be fixed in #1185, and there is a new test that explicitly checks for this