def test_panel_index(): index = panelm.panel_index([1, 2, 3, 4], [1, 2, 3]) expected = MultiIndex.from_arrays( [np.tile([1, 2, 3, 4], 3), np.repeat([1, 2, 3], 4)], names=['time', 'panel']) tm.assert_index_equal(index, expected)
def test_panel_index(): index = panelm.panel_index([1,2,3,4], [1,2,3]) expected = MultiIndex.from_arrays([np.tile([1,2,3,4], 3), np.repeat([1,2,3], 4)]) assert(index.equals(expected))
def test_panel_index(): index = panelm.panel_index([1, 2, 3, 4], [1, 2, 3]) expected = MultiIndex.from_arrays( [np.tile([1, 2, 3, 4], 3), np.repeat([1, 2, 3], 4)]) assert (index.equals(expected))