Well it's probably never exactly `1e-9` but it's *always* `0` on the first update.

Anyway this is obviously an unsafe quick fix and should be done differently.  How about `2 * (np.dot(X, w) >= 0) - 1` ?