Skip to content

Commit

Permalink
fix: range in rep_encode should be 0 to len(m)
Browse files Browse the repository at this point in the history
  • Loading branch information
wfnuser committed Dec 6, 2024
1 parent 2ae6265 commit e805e13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Basefold.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
"def rep_encode(m, k0, c):\n",
" assert len(m) % k0 == 0, \"len(m): %d is not a multiple of k0: %d\" % (len(m), k0)\n",
" code = []\n",
" for i in range(0, c*len(m), k0):\n",
" for i in range(0, len(m), k0):\n",
" for j in range(0, c):\n",
" code += m[i:i+k0]\n",
" return code"
Expand Down

0 comments on commit e805e13

Please sign in to comment.