Skip to content

Commit

Permalink
Backport #3061
Browse files Browse the repository at this point in the history
  • Loading branch information
JCGoran committed Jan 24, 2025
1 parent 6dbd4da commit 8fb7527
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
3 changes: 1 addition & 2 deletions docs/docs_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ jupyter
nbconvert
recommonmark
matplotlib
# bokeh 3 seems to break docs notebooks
bokeh<3
bokeh
# do not check import of next line
ipython
plotnine
Expand Down
3 changes: 1 addition & 2 deletions nrn_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ wheel
setuptools<=70.3.0
scikit-build
matplotlib
# bokeh 3 seems to break docs notebooks
bokeh<3
bokeh
ipython
cython
packaging
Expand Down
10 changes: 10 additions & 0 deletions share/lib/python/neuron/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1751,3 +1751,13 @@ def _mview_html_tree(hlist, inside_mechanisms_in_use=0):
if _get_ipython() is not None:
html_formatter = _get_ipython().display_formatter.formatters["text/html"]
html_formatter.for_type(hoc.HocObject, _hocobj_html)

# in case Bokeh is installed, register a serialization function for hoc.Vector
try:
from bokeh.core.serialization import Serializer

Serializer.register(
h.Vector, lambda obj, serializer: [serializer.encode(item) for item in obj]
)
except ImportError:
pass

0 comments on commit 8fb7527

Please sign in to comment.