Skip to content

Commit

Permalink
DX: limit number of rendered amplitudes in notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed May 26, 2024
1 parent 0c397e1 commit 507066a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/serialization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"\n",
"import json\n",
"import logging\n",
"import os\n",
"\n",
"import jax.numpy as jnp\n",
"import matplotlib.pyplot as plt\n",
Expand Down Expand Up @@ -686,7 +687,13 @@
},
"outputs": [],
"source": [
"Math(aslatex(MODEL.amplitudes, terms_per_line=1))"
"if \"EXECUTE_NB\" in os.environ:\n",
" selected_amplitudes = MODEL.amplitudes\n",
"else:\n",
" selected_amplitudes = {\n",
" k: v for i, (k, v) in enumerate(MODEL.amplitudes.items()) if i < 2\n",
" }\n",
"Math(aslatex(selected_amplitudes, terms_per_line=1))"
]
},
{
Expand Down

0 comments on commit 507066a

Please sign in to comment.