def METHOD_NAME(N=10, ndim=2):
    d = ndim - 1
    p = 0
    np.random.seed(10)
    pts = np.random.rand(N, ndim).astype("float64")
    q, idx = utils.py_partition(pts, d, p)
    if N == 0:
        assert_equal(q, -1)
    else:
        piv = pts[p, d]
        np.testing.assert_approx_equal(pts[idx[q], d], piv)
        np.testing.assert_array_less(pts[idx[:q], d], piv)
        np.testing.assert_array_less(piv, pts[idx[(q + 1) :], d])