Fitness problem for weights

63 views
Skip to first unread message

snan...@shilpasys.com

unread,
Dec 12, 2017, 8:05:00 AM12/12/17
to deap-users
TypeError: Both weights and assigned values must be a sequence of numbers when assigning to values of <class 'deap.creator.FitnessMax'>. Currently assigning value(s) 55.121628595728602 of <class 'numpy.float64'> to a fitness with weights (-1.0,).

François-Michel De Rainville

unread,
Dec 12, 2017, 8:36:38 AM12/12/17
to deap-users
The value returned by your evaluation function must be sequence, e.g. a tuple. Note the trailing comma

return 55.12, 

Cheers,

2017-12-12 8:04 GMT-05:00 <snan...@shilpasys.com>:
TypeError: Both weights and assigned values must be a sequence of numbers when assigning to values of <class 'deap.creator.FitnessMax'>. Currently assigning value(s) 55.121628595728602 of <class 'numpy.float64'> to a fitness with weights (-1.0,).

--
You received this message because you are subscribed to the Google Groups "deap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deap-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages