ageron / handson-ml

⛔️ DEPRECATED – See https://github.com/ageron/handson-ml3 instead.
Apache License 2.0
25.14k stars 12.91k forks source link

Code `np.inf` uniformly #587

Closed marciomazza closed 3 years ago

marciomazza commented 3 years ago

I see at least 3 ways in which infinity is expressed in different parts of the book's code:

np.infty
np.inf
float("inf")

As a style minor suggestion, consider to use only one, like np.inf (or even math.inf).

marciomazza commented 3 years ago

I realized this is the repo for the first edition, and the suggestion is based on the 2nd. I resubmitted in https://github.com/ageron/handson-ml2/issues/235.