From ddaa4c5d6ee6eee6e391193d19e563437d988c24 Mon Sep 17 00:00:00 2001 From: Jeremy Zucker Date: Tue, 13 Jun 2023 20:01:37 -0700 Subject: [PATCH] Update pyciemss_integration.py if the variable name has a '_' in it, then this will only split on the last '_' in front of 'sol' --- python_sandbox/notebooks/pyciemss_integration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python_sandbox/notebooks/pyciemss_integration.py b/python_sandbox/notebooks/pyciemss_integration.py index 1a928fc..d6c50ab 100644 --- a/python_sandbox/notebooks/pyciemss_integration.py +++ b/python_sandbox/notebooks/pyciemss_integration.py @@ -28,7 +28,7 @@ __, __, filenames = next(os.walk(RESULT_PATH)) for filename in filenames: path = os.path.join(RESULT_PATH, filename) - name, k = filename.split('.')[0].split('_') + name, k = filename.split('.')[0].rsplit('_', 1) if k == 'param': pyciemss_results['parameters'][name] = np.genfromtxt(path) elif k == 'sol': @@ -95,4 +95,4 @@ # Write to CSV df.to_csv(os.path.join(RESULT_PATH, 'pyciemss_results.csv'), index = False) -# %% \ No newline at end of file +# %%