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

Fix gradient descent example for Python 3 #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

naoyak
Copy link

@naoyak naoyak commented May 3, 2016

The example producing Figure 8-3 in the book doesn't work in Python 3, apparently because the iterator returned by map() doesn't work with pyplot, so using a list comprehension here instead.

The example producing Figure 8-3 in the book doesn't work in Python 3, apparently because the iterator returned by `map()` doesn't work with pyplot, so using a list comprehension here instead.
@daun-io
Copy link

daun-io commented Jan 10, 2017

I was finding the way to fix this by including map into list which is absolutely working but not an efficient idea.
Thank you for suggesting me a better way :)

@brettmendes87
Copy link

Just wanted to say thank you to naoyak! This one really had me scratching my head when I first encountered it.

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

Successfully merging this pull request may close these issues.

3 participants