def test_jackknife(self):
        np.random.seed(31415)
        x, var0 = self.generate_data()

        result = cs.jackknife_connectivity('PDC', x, VAR(2), nfft=4,
                                           leaveout=1)
        self.assertEqual(result.shape, (100, 2, 2, 4))

        structure = np.mean(np.mean(result, axis=3), axis=0)
        # make sure result has roughly the correct structure
        self.assertTrue(np.all(np.abs(structure-[[1, 0], [0.5, 1]]) < 0.25))
dataset/ETHPy150Open scot-dev/scot/scot/tests/test_statistics.py/TestFunctions.test_jackknife/original