Skip to content

Commit 2223882

Browse files
committed
15 / 20 : skip intermediate plot if CI to accelerate testing
1 parent c994f09 commit 2223882

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

15_optimization/020_Curve_Fitting.ipynb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,14 @@
2323
"metadata": {},
2424
"outputs": [],
2525
"source": [
26+
"import os\n",
27+
"\n",
28+
"\n",
2629
"import matplotlib.pyplot as plt\n",
2730
"import numpy as np\n",
2831
"import scipy.optimize as so\n",
32+
"\n",
33+
"\n",
2934
"np.random.seed()\n",
3035
"\n"
3136
]
@@ -301,10 +306,11 @@
301306
"def curve_fitting_plot(coefs:np.ndarray, x:np.ndarray, y:np.ndarray) -> float:\n",
302307
" result = calc_cost(coefs, x, y)\n",
303308
"\n",
304-
" plot_curve_fitting(coefs, x, y)\n",
309+
" if not os.getenv('CI', False):\n",
310+
" plot_curve_fitting(coefs, x, y)\n",
305311
"\n",
306-
" plt.show()\n",
307-
" plt.close();\n",
312+
" plt.show()\n",
313+
" plt.close();\n",
308314
"\n",
309315
" return result\n",
310316
"\n"

0 commit comments

Comments
 (0)