EvoloPy icon indicating copy to clipboard operation
EvoloPy copied to clipboard

运行example时报错

Open Wonder9988 opened this issue 2 years ago • 5 comments

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.

Wonder9988 avatar May 10 '23 09:05 Wonder9988

Have u figure it out? Same error here.

linlie98 avatar Aug 06 '23 04:08 linlie98

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.

alamz7 avatar Aug 10 '23 11:08 alamz7

Thx, problem solved~

linlie98 avatar Aug 11 '23 07:08 linlie98

ValueError Traceback (most recent call last) in <cell line: 3>() 1 # Run EvoCluster 2 from optimizer import run ----> 3 run(optimizer, objectivefunc, NumOfRuns, params, export_flags)

/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.

vishalkshah avatar Feb 23 '24 04:02 vishalkshah

please help to figure out this error

vishalkshah avatar Feb 23 '24 04:02 vishalkshah