AttributeError: 'tuple' object has no attribute 'reshape' code example
Example: AttributeError: 'tuple' object has no attribute 'reshape'
# from your definition, population is a tuple.
# I'd suggest two options, the first is converting it to an array,
# i.e.
population = np.asarray(population)