Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行example时报错 #75

Open
Wonder9988 opened this issue May 10, 2023 · 5 comments
Open

运行example时报错 #75

Wonder9988 opened this issue May 10, 2023 · 5 comments

Comments

@Wonder9988
Copy link

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.

@linlie98
Copy link

linlie98 commented Aug 6, 2023

Have u figure it out? Same error here.

@alamz7
Copy link

alamz7 commented Aug 10, 2023

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.

@linlie98
Copy link

Thx, problem solved~

@vishalkshah
Copy link

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
Copy link

please help to figure out this error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants