def check_case(self, a, b, q, r):

        x = solve_discrete_are(a, b, q, r)
        assert_array_almost_equal(
            a.getH()*x*a-(a.getH()*x*b)*inv(r+b.getH()*x*b)*(b.getH()*x*a)+q-x, 0.0)
Test stc expansion
dataset/ETHPy150Open scipy/scipy/scipy/linalg/tests/test_solvers.py/TestSolveDiscreteARE.check_case--crossover with--dataset/ETHPy150Open mne-tools/mne-python/mne/tests/test_source_estimate.py/test_expand