def evolve(population):
    """Evolves the population by one generation."""

    # Get a unique set of discrete cells that need to be checked
    cbdist = sd.cdist(population, population, metric='cityblock')
    print (cbdist==1).sum(axis=0)

    exit()

    active_cells = population[:]
    #ipdb.set_trace()
    for cell in population:
        for neighbor in neighbors(cell):
            if active_cells not in neighbor:
                active_cells.append(neighbor)

    # For each cell in the set, test if it lives or dies
    new_population = []
    for cell in active_cells:
        count = sum(neighbor in population for neighbor in neighbors(cell))
        if count == 3 or (count == 2 and cell in population):
            if cell not in new_population:
                new_population.append(cell)

    # Return the new surviving population
    return new_population
dataset/ETHPy150Open dgasmith/SICM2-Software-Summer-School-2014/Software_Carpentry/Conway/numpy_conway.py/evolve/swapped operands of `not in`