def test_north_links():
    links = sgrid.active_north_links((3, 4))
    assert_array_equal(links, np.array([[-1, 0, 1, -1], [-1, 2, 3, -1], [-1, -1, -1, -1]]))

    links = sgrid.active_north_links((1, 4))
    assert_array_equal(links, np.array([[-1, -1, -1, -1]]))

    links = sgrid.active_north_links((4, 1))
    assert_array_equal(links, np.array([[-1, -1, -1, -1]]).T)
def test_active_north_links():
    links = sgrid.active_north_links((3, 4))
    assert_array_equal(
        links, np.array([[-1, 0, 1, -1], [-1, 2, 3, -1], [-1, -1, -1, -1]]))

    links = sgrid.active_north_links((1, 4))
    assert_array_equal(links, np.array([[-1, -1, -1, -1]]))

    links = sgrid.active_north_links((4, 1))
    assert_array_equal(links, np.array([[-1, -1, -1, -1]]).T)
    def test_north_links(self):
        links = sgrid.active_north_links((3, 4))
        self.assertArrayEqual(links, np.array([[-1,  0,  1, -1],
                                            [-1,  2,  3, -1],
                                            [-1, -1, -1, -1]]))

        links = sgrid.active_north_links((1, 4))
        self.assertArrayEqual(links, np.array([[-1, -1, -1, -1]]))

        links = sgrid.active_north_links((4, 1))
        self.assertArrayEqual(links, np.array([[-1, -1, -1, -1]]).T)