Skip to content

Commit a82b33b

Browse files
authored
Merge pull request karpathy#199 from ChristianOrr/patch-1
bugfix in decode function
2 parents 0d8fbd1 + 36c7db8 commit a82b33b

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)