Closed esiwgnahz closed 3 years ago
Does any example script work?
My initial guess would be that you did not define correctly the cost function calc_cost
(input parameter vector and additional arguments, output scalar). I cannot help more without any reproducible script.
Thank you. I encountered the following problem. Traceback (most recent call last): File " in
ea.optimize(solver = "cpso", sync = True)
File "/site-packages/stochopy/evolutionary_algorithm.py", line 293, in optimize
xstart = xstart, sync = sync)
File "/stochopy/evolutionary_algorithm.py", line 755, in _cpso
pbest[idx] = np.array(X[idx])
IndexError: boolean index did not match indexed array along dimension 1; dimension is 80 but corresponding boolean dimension is 1
The execution is as follows