44import numpy as np
55import pandas as pd
66import pymc as pm
7- import pytensor
8- import pytensor .tensor as pt
97import pytest
108from arviz import InferenceData , dict_to_dataset
119from pymc import ImputationWarning , inputvars
1210from pymc .distributions import transforms
1311from pymc .logprob .abstract import _logprob
1412from pymc .util import UNSET
15- from pytensor .graph import vectorize_graph
1613from scipy .special import logsumexp
1714from scipy .stats import norm
1815
@@ -323,10 +320,8 @@ def test_nested_recover_marginals():
323320 assert idata .lp_sub_idx .shape == idata .sub_idx .shape + (2 ,)
324321
325322 def true_idx_logp (y ):
326- idx_0 = np .log (0.85 * 0.25 * norm .pdf (y , loc = 0 ) +
327- 0.15 * 0.25 * norm .pdf (y , loc = 1 ))
328- idx_1 = np .log (0.05 * 0.75 * norm .pdf (y , loc = 1 ) +
329- 0.95 * 0.75 * norm .pdf (y , loc = 2 ))
323+ idx_0 = np .log (0.85 * 0.25 * norm .pdf (y , loc = 0 ) + 0.15 * 0.25 * norm .pdf (y , loc = 1 ))
324+ idx_1 = np .log (0.05 * 0.75 * norm .pdf (y , loc = 1 ) + 0.95 * 0.75 * norm .pdf (y , loc = 2 ))
330325 return np .stack ([idx_0 , idx_1 ]).T
331326
332327 np .testing .assert_almost_equal (
@@ -335,10 +330,8 @@ def true_idx_logp(y):
335330 )
336331
337332 def true_sub_idx_logp (y ):
338- sub_idx_0 = np .log (0.85 * 0.25 * norm .pdf (y , loc = 0 ) +
339- 0.05 * 0.75 * norm .pdf (y , loc = 1 ))
340- sub_idx_1 = np .log (0.15 * 0.25 * norm .pdf (y , loc = 1 ) +
341- 0.95 * 0.75 * norm .pdf (y , loc = 2 ))
333+ sub_idx_0 = np .log (0.85 * 0.25 * norm .pdf (y , loc = 0 ) + 0.05 * 0.75 * norm .pdf (y , loc = 1 ))
334+ sub_idx_1 = np .log (0.15 * 0.25 * norm .pdf (y , loc = 1 ) + 0.95 * 0.75 * norm .pdf (y , loc = 2 ))
342335 return np .stack ([sub_idx_0 , sub_idx_1 ]).T
343336
344337 np .testing .assert_almost_equal (
0 commit comments