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

plot_3d=True #5

Closed
pengz1234 opened this issue May 28, 2020 · 2 comments
Closed

plot_3d=True #5

pengz1234 opened this issue May 28, 2020 · 2 comments

Comments

@pengz1234
Copy link

Hi. Your algorithm is pretty good and it's very useful in many cases.
But,there is an error:"TypeError: object of type 'numpy.float64' has no len()." when i try to change plot_3d=False to True in 2d_example.n
It's not a big matter in Jupyter notebook(In jupyter it can still display the 3D function images),but it is unexecutable in Pycham.
Do you know how to make it?
Thanks.

@befelix
Copy link
Owner

befelix commented May 28, 2020

I'm confused - so the code works in the notebook but fails in Pycharm? If so, it's probably a problem with the matplotlib backend.

@pengz1234
Copy link
Author

I'm confused - so the code works in the notebook but fails in Pycharm? If so, it's probably a problem with the matplotlib backend.

There is the same error in both Jupyter notebook and Pycharm,but it can still display the 3D function image in notebook and it's dosen‘t work in Pycharm.
I change '.ipynb' to '.py' so that i can excute the code in Pycharm,but it stopped when it occured the 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

2 participants