Skip to content

Commit

Permalink
Merge pull request karpathy#199 from ChristianOrr/patch-1
Browse files Browse the repository at this point in the history
bugfix in decode function
  • Loading branch information
karpathy authored Mar 12, 2023
2 parents 0d8fbd1 + 36c7db8 commit a82b33b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/shakespeare_char/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
def encode(s):
return [stoi[c] for c in s] # encoder: take a string, output a list of integers
def decode(l):
''.join([itos[i] for i in l]) # decoder: take a list of integers, output a string
return ''.join([itos[i] for i in l]) # decoder: take a list of integers, output a string

# create the train and test splits
n = len(data)
Expand Down

0 comments on commit a82b33b

Please sign in to comment.