Преглед на файлове

Bug in range(len(count) - 1, -1) (#292)

Bug in  range(len(count) - 1, -1) ,need 3 arguments here, otherwise the result is empty
scyes преди 6 години
родител
ревизия
796de7c657
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      notebooks/2_BasicModels/word2vec.ipynb

+ 1 - 1
notebooks/2_BasicModels/word2vec.ipynb

@@ -116,7 +116,7 @@
     "# Retrieve the most common words\n",
     "count.extend(collections.Counter(text_words).most_common(max_vocabulary_size - 1))\n",
     "# Remove samples with less than 'min_occurrence' occurrences\n",
-    "for i in range(len(count) - 1, -1):\n",
+    "for i in range(len(count) - 1, -1, -1):\n",
     "    if count[i][1] < min_occurrence:\n",
     "        count.pop(i)\n",
     "    else:\n",