Skip to content

Commit 18a7914

Browse files
committed
feature : if CI, max_iteration = 10
to save Continuous Integration time
1 parent a77a7d4 commit 18a7914

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

10_root_finding/50_fixed_point_iteration.ipynb

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,24 @@
215215
"metadata": {},
216216
"outputs": [],
217217
"source": [
218-
"def fixed_point_iteration(g, x_initial, epsilon, max_iterations=1000):\n",
218+
"import os\n",
219+
"\n",
220+
"# to save CI time\n",
221+
"if os.getenv('CI', False):\n",
222+
" max_iterations = 10\n",
223+
"else:\n",
224+
" max_iterations = 1000\n",
225+
"\n"
226+
]
227+
},
228+
{
229+
"cell_type": "code",
230+
"execution_count": null,
231+
"id": "f326a9c5",
232+
"metadata": {},
233+
"outputs": [],
234+
"source": [
235+
"def fixed_point_iteration(g, x_initial, epsilon, max_iterations=max_iterations):\n",
219236
" \"\"\"\n",
220237
" Fixed-Point Iteration Method\n",
221238
"\n",

0 commit comments

Comments
 (0)