Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix helpers.hist_dist() crash in weight_initialization notebook
The plt.hist function requires its "num" parameter to be an integer. However, in helpers.hist_dist(), the argument value for this parameter is calculated using regular ("/") division operator, which in Python 3 returns a float. This causes an exception when the value is passed to plt.hist. Note that this code would work correctly in Python 2, where the regular division operator returns integers. The fix here is trivial: simply use the integer division operator ("//"), which will return an integer in both Python 2 and 3.
- Loading branch information