From c621838d226af2864c9562dd17a9883fc60de72e Mon Sep 17 00:00:00 2001 From: Alejandro Santorum Date: Sun, 1 Oct 2023 10:51:25 +0100 Subject: [PATCH] Update JSS sims script to setup pypath --- simulations/jss_sims.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/simulations/jss_sims.py b/simulations/jss_sims.py index 53fa048..158b608 100644 --- a/simulations/jss_sims.py +++ b/simulations/jss_sims.py @@ -6,6 +6,16 @@ import matplotlib import matplotlib.pyplot as plt +# This will add the directory of the script to the Python path +sys.path.append(os.path.dirname(__file__)) + +try: + sys.path.append("./scikit-rmt") + sys.path.append("../") + sys.path.append("../scikit-rmt") +except BaseException: + pass + from skrmt.ensemble.gaussian_ensemble import GaussianEnsemble from skrmt.ensemble.wishart_ensemble import WishartEnsemble from skrmt.ensemble.manova_ensemble import ManovaEnsemble @@ -22,8 +32,6 @@ IMGS_DIRNAME = "skrmt_sim_imgs" SCRIPT_PATH = os.path.dirname(__file__) -# This will add the directory of the script to the Python path -sys.path.append(SCRIPT_PATH) BOLD_CHAR = '\033[1m' END_CHAR = '\033[0m'