From 5d46fa2da43be352b3593c86546b5f8f8523862c Mon Sep 17 00:00:00 2001 From: YAY-C Date: Wed, 24 Jul 2024 15:59:06 +0200 Subject: [PATCH] Add `srcdir` argument to single representation loading --- qstack/spahm/rho/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qstack/spahm/rho/utils.py b/qstack/spahm/rho/utils.py index 7e315b5..87a2367 100644 --- a/qstack/spahm/rho/utils.py +++ b/qstack/spahm/rho/utils.py @@ -137,7 +137,7 @@ def load_reps(f_in, from_list=True, srcdir=None, with_labels=False, else: is_single, is_labeled = file_format['is_single'], file_format['is_labeled'] # if the given file contains a single representation create a one-element list - Xs = [np.load(f_in, allow_pickle=True)] if is_single else np.load(f_in, allow_pickle=True) + Xs = [np.load(os.path.join(path2list,f_in), allow_pickle=True)] if is_single else np.load(os.path.join(path2list,f_in), allow_pickle=True) if printlevel > 1: print(f"Loading {len(Xs)} representations (local = {local}, labeled = {is_labeled})") if progress: import tqdm