@pytest.fixture
def panel():
n, t, k = 11, 7, 3
x = np.random.random((k, t, n))
major = pd.date_range("12-31-1999", periods=7)
items = ["var.{0}".format(i) for i in range(1, k + 1)]
minor = ["entities.{0}".format(i) for i in range(1, n + 1)]
return pd.Panel(x, items=items, major_axis=major, minor_axis=minor)
After Change
@pytest.fixture
def panel():
np.random.seed(12345)
n, t, k = 11, 7, 3
x = np.random.standard_normal((k, t, n))
major = pd.date_range("12-31-1999", periods=7)
items = ["var.{0}".format(i) for i in range(1, k + 1)]