I had a look at the negative sampling code. Python and Cython code do slightly different things. Seems the Python code may enter an infinite loop with degenerate vocabulary, in that negative sampling `while` loop? Cython is OK.

Simply taking `negative + 1` random indices and setting `labels` array accordingly with 0s/1s, without the explicit while loop, sounds safer.