def test_active_outlinks_4x5(): links = sgrid.active_outlinks((4, 5)) assert_array_equal( np.array([ [ -1, 0, 1, 2, -1, -1, 3, 4, 5, -1, -1, 6, 7, 8, -1, -1, -1, -1, -1, -1 ], [ -1, -1, -1, -1, -1, 9, 10, 11, 12, -1, 13, 14, 15, 16, -1, -1, -1, -1, -1, -1, ], ]), links, )
def test_active_outlinks_4x5(): links = sgrid.active_outlinks((4, 5)) assert_array_equal( np.array( [ [-1, 0, 1, 2, -1, -1, 3, 4, 5, -1, -1, 6, 7, 8, -1, -1, -1, -1, -1, -1], [ -1, -1, -1, -1, -1, 9, 10, 11, 12, -1, 13, 14, 15, 16, -1, -1, -1, -1, -1, -1, ], ] ), links, )
def test_active_outlinks(): links = sgrid.active_outlinks((3, 4)) assert_array_equal( np.array([ [-1, 0, 1, -1, -1, 2, 3, -1, -1, -1, -1, -1], [-1, -1, -1, -1, 4, 5, 6, -1, -1, -1, -1, -1], ]), links, )
def test_active_outlinks(): links = sgrid.active_outlinks((3, 4)) assert_array_equal( np.array( [ [-1, 0, 1, -1, -1, 2, 3, -1, -1, -1, -1, -1], [-1, -1, -1, -1, 4, 5, 6, -1, -1, -1, -1, -1], ] ), links, )
def test_outlinks_4x5(self): links = sgrid.active_outlinks((4, 5)) self.assertArrayEqual(np.array([[-1, 0, 1, 2, -1, -1, 3, 4, 5, -1, -1, 6, 7, 8, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, 9, 10, 11, 12, -1, 13, 14, 15, 16, -1, -1, -1, -1, -1, -1]]), links)
def test_outlinks(self): links = sgrid.active_outlinks((3, 4)) self.assertArrayEqual( np.array([[-1, 0, 1, -1, -1, 2, 3, -1, -1, -1, -1, -1], [-1, -1, -1, -1, 4, 5, 6, -1, -1, -1, -1, -1]]), links)