diff --git a/customhys/benchmark_func.py b/customhys/benchmark_func.py index 4836c9f..ccd85ca 100644 --- a/customhys/benchmark_func.py +++ b/customhys/benchmark_func.py @@ -37,11 +37,11 @@ message = "`optproblems` not found! Please, install it to use the cec2005 benchmark functions" wa.showwarning(message, ImportWarning, "benchmark_func.py", 29) -import shutil -if shutil.which("latex") is not None: - plt.rc('text', usetex=True) - plt.rc('font', family='serif', size=11) - +# Prevent using LaTeX if it is not installed +try: + plt.rcParams.update({'text.usetex': True}) +except: + plt.rcParams.update({'text.usetex': False}) __all__ = ['Ackley1', 'Ackley4', 'Alpine1', 'Alpine2', 'Bohachevsky', 'Brent', 'Brown', 'CarromTable', 'ChungReynolds', 'Cigar', 'CosineMixture', 'CrossInTray', 'CrossLegTable', 'CrownedCross', 'Csendes', 'Deb1', 'Deb2', diff --git a/requirements.txt b/requirements.txt index 413762a..d253a07 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -contourpy==1.3.0 +contourpy==1.1.1 cycler==0.12.1 data==0.4 decorator==5.1.1