From fb119518d71cbda82a4a7cbef5a62ecf13fb4548 Mon Sep 17 00:00:00 2001 From: rfriedman22 Date: Tue, 17 Mar 2020 11:40:09 -0500 Subject: [PATCH 1/2] Support Gram with trailing delim --- preimage/kernels/generic_string.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/preimage/kernels/generic_string.py b/preimage/kernels/generic_string.py index 29209d4..121a66e 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 From 112fc18ec45c1f8a40be934b4e3d828ccfd86514 Mon Sep 17 00:00:00 2001 From: rfriedman22 Date: Wed, 29 Jul 2020 15:46:09 -0500 Subject: [PATCH 2/2] Update gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) 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