Skip to content

Commit 36c7db8

Browse files
authored
bugfix in decode function
Return was left out of the decoder, so it didn't work.
1 parent 0d8fbd1 commit 36c7db8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

data/shakespeare_char/prepare.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
def encode(s):
3333
return [stoi[c] for c in s] # encoder: take a string, output a list of integers
3434
def decode(l):
35-
''.join([itos[i] for i in l]) # decoder: take a list of integers, output a string
35+
return ''.join([itos[i] for i in l]) # decoder: take a list of integers, output a string
3636

3737
# create the train and test splits
3838
n = len(data)

0 commit comments

Comments
 (0)