Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 6 additions & 15 deletions notebooks/Alhazen.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -826,15 +826,6 @@
" return count"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from numpy import nanmax, isnan"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -878,10 +869,10 @@
"\n",
" # Return maximum value encountered in tree, ignoring all NaNs\n",
" tree_values = [value] + [self.get_feature_value(c) for c in children]\n",
" if all(isnan(tree_values)):\n",
" if all(numpy.isnan(tree_values)):\n",
" return value\n",
" else:\n",
" return nanmax(tree_values)"
" return numpy.nanmax(tree_values)"
]
},
{
Expand Down Expand Up @@ -2901,7 +2892,7 @@
"metadata": {},
"outputs": [],
"source": [
"generate_samples = generate_samples_advanced"
"GENERATE_SAMPLES = generate_samples_advanced"
]
},
{
Expand Down Expand Up @@ -2934,7 +2925,7 @@
"\n",
"print('--generating samples--')\n",
"# samples = generate_samples(CALC_GRAMMAR, [testspec0, testspec1], 10)\n",
"samples = generate_samples(CALC_GRAMMAR, [testspec2], 10)\n",
"samples = GENERATE_SAMPLES(CALC_GRAMMAR, [testspec2], 10)\n",
"samples"
]
},
Expand Down Expand Up @@ -3120,7 +3111,7 @@
" print(f\" {spec.friendly()}\")\n",
"\n",
" # Step 4: Generate new inputs according to the new input specifications\n",
" new_samples = generate_samples(self._grammar,\n",
" new_samples = GENERATE_SAMPLES(self._grammar,\n",
" new_input_specifications,\n",
" self._generator_timeout)\n",
" if self._verbose:\n",
Expand Down Expand Up @@ -3523,7 +3514,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.8"
"version": "3.12.4"
},
"toc": {
"base_numbering": 1,
Expand Down
Loading