Skip to content

Commit ad58bf4

Browse files
committed
Add Mode as rt to avoid str Object decoding issue
1 parent 68522f2 commit ad58bf4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mla/datasets/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def load(dataset="training", digits=np.arange(10)):
5151

5252

5353
def load_nietzsche():
54-
text = open(get_filename("data/nietzsche.txt", "rt")).read().decode("utf-8").lower()
54+
text = open(get_filename("data/nietzsche.txt"), "rt").read().lower()
5555
chars = set(list(text))
5656
char_indices = {ch: i for i, ch in enumerate(chars)}
5757
indices_char = {i: ch for i, ch in enumerate(chars)}

0 commit comments

Comments
 (0)