Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 681bfd0

Browse filesBrowse files
committed
Merge pull request #4939 from jenshnielsen/jupyter4import
MNT: fix Jupyter shim warning
2 parents 37f7df6 + fee873c commit 681bfd0
Copy full SHA for 681bfd0

File tree

Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed

‎lib/matplotlib/backends/backend_nbagg.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_nbagg.py
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@
1414
import tornado.ioloop
1515

1616
from IPython.display import display, Javascript, HTML
17-
from IPython.kernel.comm import Comm
17+
try:
18+
# Jupyter/IPython 4.x or later
19+
from ipykernel.comm import Comm
20+
except ImportError:
21+
# Jupyter/IPython 3.x or earlier
22+
from IPython.kernel.comm import Comm
1823

1924
from matplotlib import rcParams
2025
from matplotlib.figure import Figure

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.