Populate `payoff_array` with the payoff values for player 0 in the
    tournament game given a random tournament graph in CSR format.

    Parameters
    ----------
    payoff_array : ndarray(float, ndim=2)
        ndarray of shape (n, m), where m = n choose k, prefilled with
        zeros. Modified in place.
    k : scalar(int)
        Size of the subsets of nodes.
    indices : ndarray(int, ndim=1)
        CSR format index array of the adjacency matrix of the tournament
        graph.
    indptr : ndarray(int, ndim=1)
        CSR format index pointer array of the adjacency matrix of the
        tournament graph.

def _populate_tournament_payoff_array0(payoff_array, k, indices, indptr):
    """
    Populate `payoff_array` with the payoff values for player 0 in the
    tournament game given a random tournament graph in CSR format.

    Parameters
    ----------
    payoff_array : ndarray(float, ndim=2)
        ndarray of shape (n, m), where m = n choose k, prefilled with
        zeros. Modified in place.
    k : scalar(int)
        Size of the subsets of nodes.
    indices : ndarray(int, ndim=1)
        CSR format index array of the adjacency matrix of the tournament
        graph.
    indptr : ndarray(int, ndim=1)
        CSR format index pointer array of the adjacency matrix of the
        tournament graph.

    """
    n = payoff_array.shape[0]
    X = np.empty(k, dtype=np.int_)
    a = np.empty(k, dtype=np.int_)
    for i in range(n):
        d = indptr[i+1] - indptr[i]
        if d >= k:
            for j in range(k):
                a[j] = j
            while a[-1] < d:
                for j in range(k):
                    X[j] = indices[indptr[i]+a[j]]
                payoff_array[i, k_array_rank_jit(X)] = 1
                a = next_k_array(a)