Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
fix bugs (#969)
Browse files Browse the repository at this point in the history
  • Loading branch information
TCChenlong authored Apr 20, 2021
1 parent 455ef37 commit 7c66cbd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@
"def vectorizer(input, label=None, length=2000):\r\n",
" if label is not None:\r\n",
" for x, y in zip(input, label):\r\n",
" yield np.array((x + [0]*length)[:2000]).astype('int64'), np.array([y]).astype('int64')\r\n",
" yield np.array((x + [0]*length)[:length]).astype('int64'), np.array([y]).astype('int64')\r\n",
" else:\r\n",
" for x in input:\r\n",
" yield np.array((x + [0]*length)[:2000]).astype('int64')"
" yield np.array((x + [0]*length)[:length]).astype('int64')"
]
},
{
Expand Down

0 comments on commit 7c66cbd

Please sign in to comment.