The function `train` in `mnist.py` creates column vectors of 0s that should have `dtype=int`. d387ee3 fixes this but the book must be updated.