Remove dependencies for vertices in test_traceplot. We only need the trace.
from keanu.plots import traceplot
-from keanu.vertex import Gamma, Gaussian
from keanu.vartypes import sample_types
from keanu import Model
from numpy import array
@@ -14,14 +13,9 @@ import matplotlib.pyplot as plt
@pytest.fixture
def trace() -> sample_types:
with Model() as m:
- m.gamma = Gamma(array([[1., 2.], [3., 4.]]), array([[1., 2.], [3., 4.]]))
- m.gaussian = Gaussian(m.gamma, 1.)
-
trace = {
- m.gamma.get_label().getQualifiedName(): [array([[1., 2.], [3., 4.]]),
- array([[2., 3.], [4., 5.]])],
- m.gaussian.get_label().getQualifiedName(): [array([[0.1, 0.2], [0.3, 0.4]]),
- array([[0.2, 0.3], [0.4, 0.5]])]
+ "gamma": [array([[1., 2.], [3., 4.]]), array([[2., 3.], [4., 5.]])],
+ "gaussian": [array([[0.1, 0.2], [0.3, 0.4]]), array([[0.2, 0.3], [0.4, 0.5]])]
}
return trace
