Skip to content

Commit 796de7c

Browse files
alouhahaaymericdamien
authored andcommittedDec 10, 2018
Bug in range(len(count) - 1, -1) (aymericdamien#292)
Bug in range(len(count) - 1, -1) ,need 3 arguments here, otherwise the result is empty
1 parent 9e1bb50 commit 796de7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎notebooks/2_BasicModels/word2vec.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
"# Retrieve the most common words\n",
117117
"count.extend(collections.Counter(text_words).most_common(max_vocabulary_size - 1))\n",
118118
"# Remove samples with less than 'min_occurrence' occurrences\n",
119-
"for i in range(len(count) - 1, -1):\n",
119+
"for i in range(len(count) - 1, -1, -1):\n",
120120
" if count[i][1] < min_occurrence:\n",
121121
" count.pop(i)\n",
122122
" else:\n",

0 commit comments

Comments
 (0)
Please sign in to comment.