Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Friedman committed May 6, 2022
2 parents f88e917 + 112fc18 commit 9da6351
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ target/

# Jupyter checkpoints
*.ipynb_checkpoints/

# Misc
*.c
2 changes: 1 addition & 1 deletion preimage/kernels/generic_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def set_gram_matrix_from_file(self, filename, delim="\t", lower_triangle=True):
gram_matrix = np.eye(n_lines)
with open(filename) as fin:
for row, line in enumerate(fin):
line = map(float, line.split(delim))
line = map(float, line.strip().split(delim))
for col, val in enumerate(line):
if row != col:
gram_matrix[row, col] = val
Expand Down

0 comments on commit 9da6351

Please sign in to comment.