The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Traceback (most recent call last):
File "/home/lumy/.local/lib/python3.9/site-packages/pygad/pygad.py", line 1790, in cal_pop_fitness
if pop_fitness[sol_idx] == "undefined":
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
When you look the type of pop_fitness[sol_idx] it's not anymore an instance of List (as we could except because fitness_func return a list) but an numpy.ndarray
And numpy doesn't allow that
It's seem you can run parrallel processing and multi objective at the same time, if you run this minimal code
you get this error
When you look the type of
pop_fitness[sol_idx]
it's not anymore an instance ofList
(as we could except because fitness_func return a list) but annumpy.ndarray
And numpy doesn't allow thatis this a normal behavior ?