EvoloPy
EvoloPy copied to clipboard
运行example时报错
run(optimizer, objectivefunc, NumOfRuns, params, export_flags) a = numpy.concatenate( File "<array_function internals>", line 200, in concatenate ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (4,) + inhomogeneous part.
Have u figure it out? Same error here.
Replace the following line of code
a = numpy.concatenate([[x.optimizer, x.objfname, x.executionTime, x.bestIndividual], x.convergence])
with this one solves the issue.
a = list([[x.optimizer, x.objfname, x.executionTime, x.bestIndividual], x.convergence])
The author[s] is requested to elaborate on the change in terms of potential issues.
Thx, problem solved~
ValueError Traceback (most recent call last)
/content/EvoloPy/optimizer.py in run(optimizer, objectivefunc, NumOfRuns, params, export_flags) 145 Flag_details = True # at least one experiment 146 executionTime[k] = x.executionTime --> 147 a = list( 148 [[x.optimizer, x.objfname, x.executionTime, x.bestIndividual], x.convergence] 149 )
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (4,) + inhomogeneous part.
please help to figure out this error