diff --git a/.gitignore b/.gitignore index 2fed1f4..9d3d322 100644 --- a/.gitignore +++ b/.gitignore @@ -61,3 +61,6 @@ target/ # Jupyter checkpoints *.ipynb_checkpoints/ + +# Misc +*.c diff --git a/preimage/kernels/generic_string.py b/preimage/kernels/generic_string.py index 1ec4319..eecaf9e 100644 --- a/preimage/kernels/generic_string.py +++ b/preimage/kernels/generic_string.py @@ -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