data-science-from-scratch icon indicating copy to clipboard operation
data-science-from-scratch copied to clipboard

Fix gradient descent example for Python 3

Open naoyak opened this issue 8 years ago • 2 comments

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.

naoyak avatar May 03 '16 23:05 naoyak

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 :)

daun-io avatar Jan 10 '17 11:01 daun-io

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

brettmendes87 avatar Oct 10 '18 16:10 brettmendes87