Skip to content

Commit

Permalink
Register h.Vector serialization function with Bokeh in notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
kbvw committed Aug 28, 2024
1 parent 45a7e6c commit 15be227
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions docs/docs_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ jupyter
nbconvert
myst_parser
matplotlib
# bokeh 3 seems to break docs notebooks
bokeh<3
bokeh
# do not check import of next line
ipython
plotnine
Expand Down
4 changes: 3 additions & 1 deletion docs/tutorials/ball-and-stick-1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1066,9 +1066,11 @@
"outputs": [],
"source": [
"from bokeh.io import output_notebook\n",
"from bokeh.core.serialization import Serializer",
"import bokeh.plotting as plt\n",
"\n",
"output_notebook()"
"output_notebook()",
"Serializer.register(h.Vector, lambda obj, serializer: [serializer.encode(item) for item in obj])"
]
},
{
Expand Down
2 changes: 0 additions & 2 deletions nrn_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ setuptools_scm
setuptools<=70.3.0
scikit-build
matplotlib
# bokeh 3 seems to break docs notebooks
bokeh<3
ipython
cython
packaging
Expand Down

0 comments on commit 15be227

Please sign in to comment.