Open Tazhio opened 2 years ago
Thanks a lot @Tazhio! Interestingly, I am running python 3.11 and those lines of code do not throw an error here. But a few lines after, the map function is used to generate the offspring object, which is subsetted in a for loop. Here I do get the TypeError: 'map' object is not subscriptable
This is just a minor issue. On the official documentation https://deap.readthedocs.io/en/master/overview.html, there is a starting tutorial.
Now most people are using python3, and in python 3 the map() function only returns an iterator.
Codes like this will return: TypeError: 'map' object is not subscriptable
To solve this, just wrap the map() functions with list.