Skip to content

Commit

Permalink
remove random.seed in favor of np.random.seed (#1391)
Browse files Browse the repository at this point in the history
* remove random.see in favor of np.random.seed

* added import numpy as np import
  • Loading branch information
PaulJonasJost authored May 7, 2024
1 parent 80ae7fa commit cf3cbc5
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 97 deletions.
6 changes: 2 additions & 4 deletions doc/example/amici.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"source": [
"# import\n",
"import logging\n",
"import random\n",
"import tempfile\n",
"from pprint import pprint\n",
"\n",
Expand All @@ -57,7 +56,8 @@
"mpl.rcParams[\"figure.dpi\"] = 100\n",
"mpl.rcParams[\"font.size\"] = 18\n",
"\n",
"random.seed(1912)\n",
"# Set seed for reproducibility\n",
"np.random.seed(1912)\n",
"\n",
"\n",
"# name of the model that will also be the name of the python module\n",
Expand Down Expand Up @@ -929,8 +929,6 @@
"outputs": [],
"source": [
"%%time\n",
"# Set seed for reproducibility\n",
"np.random.seed(1)\n",
"result = optimize.minimize(\n",
" problem=problem,\n",
" optimizer=optimizer,\n",
Expand Down
Loading

0 comments on commit cf3cbc5

Please sign in to comment.