def test_active_east_links(): links = sgrid.active_east_links((3, 4)) assert_array_equal( links, np.array([[-1, -1, -1, -1], [4, 5, 6, -1], [-1, -1, -1, -1]]) ) links = sgrid.active_east_links((1, 4)) assert_array_equal(links, np.array([[-1, -1, -1, -1]])) links = sgrid.active_east_links((4, 1)) assert_array_equal(links, np.array([[-1, -1, -1, -1]]).T) links = sgrid.horizontal_active_link_ids((4, 5)) assert_array_equal(np.array([[9, 10, 11, 12], [13, 14, 15, 16]]), links) links = sgrid.active_east_links((4, 5)) assert_array_equal( np.array( [ [-1, -1, -1, -1, -1], [9, 10, 11, 12, -1], [13, 14, 15, 16, -1], [-1, -1, -1, -1, -1], ] ), links, )
def test_active_east_links(): links = sgrid.active_east_links((3, 4)) assert_array_equal( links, np.array([[-1, -1, -1, -1], [4, 5, 6, -1], [-1, -1, -1, -1]]) ) links = sgrid.active_east_links((1, 4)) assert_array_equal(links, np.array([[-1, -1, -1, -1]])) links = sgrid.active_east_links((4, 1)) assert_array_equal(links, np.array([[-1, -1, -1, -1]]).T) links = sgrid.horizontal_active_link_ids((4, 5)) assert_array_equal(np.array([[9, 10, 11, 12], [13, 14, 15, 16]]), links) links = sgrid.active_east_links((4, 5)) assert_array_equal( np.array( [ [-1, -1, -1, -1, -1], [9, 10, 11, 12, -1], [13, 14, 15, 16, -1], [-1, -1, -1, -1, -1], ] ), links, )