Skip to content

Commit 6635c22

Browse files
authored
Merge pull request #1375 from Libensemble/release/v_1.4.0
Final touches to notebooks
2 parents 6e77dc9 + 761fa09 commit 6635c22

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

examples/readme_notebook.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@
5959
"\n",
6060
" gen_specs = GenSpecs(\n",
6161
" gen_f=uniform_random_sample,\n",
62-
" outputs=[(\"x\", float, (2,))],\n",
62+
" outputs=[(\"x\", float, 2)],\n",
6363
" user={\n",
64-
" \"gen_batch_size\": 500,\n",
64+
" \"gen_batch_size\": 50,\n",
6565
" \"lb\": np.array([-3, -2]),\n",
6666
" \"ub\": np.array([3, 2]),\n",
6767
" },\n",
6868
" )\n",
6969
"\n",
70-
" exit_criteria = ExitCriteria(sim_max=101)\n",
70+
" exit_criteria = ExitCriteria(sim_max=100)\n",
7171
"\n",
7272
" sampling = Ensemble(\n",
7373
" libE_specs=libE_specs,\n",

examples/tutorials/simple_sine/sine_tutorial_notebook.ipynb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"metadata": {},
2525
"outputs": [],
2626
"source": [
27-
"pip install libensemble"
27+
"!pip install libensemble"
2828
]
2929
},
3030
{
@@ -155,7 +155,9 @@
155155
"outputs": [],
156156
"source": [
157157
"import numpy as np\n",
158+
"from pprint import pprint\n",
158159
"\n",
160+
"# If importing sim and gen from files\n",
159161
"# from sine_gen import gen_random_sample\n",
160162
"# from sine_sim import sim_find_sine\n",
161163
"\n",
@@ -201,8 +203,12 @@
201203
"metadata": {},
202204
"outputs": [],
203205
"source": [
204-
"print([i for i in H.dtype.fields])\n",
205-
"print(H[:16])"
206+
"# See first 16 results\n",
207+
"pprint(H[[\"sim_id\", \"x\", \"y\"]][:16])\n",
208+
"\n",
209+
"# To see all fields of H\n",
210+
"# print([i for i in H.dtype.fields])\n",
211+
"# print(H[:16])"
206212
]
207213
},
208214
{

0 commit comments

Comments
 (0)