Is there an error in the DEAP overview

96 views Asked by At

I'm trying to try out the DEAP package for python and since I'm not too good in python yet I'm taking baby steps. I'm following along with the overview page and I think I've found an error.

On this site http://deap.readthedocs.org/en/1.0.x/overview.html#algorithms

It seems that this line is in error:

for child1, child2 in zip(offspring[::2], offspring[1::2]):

The variable offspring is a map object so I get an object is not subscriptable error. Is the error mine or is this bad code?

0

There are 0 answers