Python generator to produce lattice points on an n-simplex.
Concatenating numpy arrays isn't a really good idea because that's not how they were designed to be used.

A better way might be this:

def walk(num_dims, samples_per_dim):
    """
    A generator that returns lattice points on an n-simplex.
    """
    values = np.arange(samples_per_dim) / (samples_per_dim - 1)
    for items in itertools.product(values, repeat = num_dims+1):
        if sum(items) == 1.0:
            yield items


Basically, we iterate over all possible combinations of those points, and filter out the invalid ones. This may seem wasteful, but since itertools is written in C, its probably actually faster then your solution. It produces tuples rather then numpy arrays.