We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2e248f5 + d70d826 commit b0aab9fCopy full SHA for b0aab9f
lib/matplotlib/backend_bases.py
@@ -1743,7 +1743,7 @@ def _fix_ipython_backend2gui(cls):
1743
# `ipython --auto`). This cannot be done at import time due to
1744
# ordering issues, so we do it when creating a canvas, and should only
1745
# be done once per class (hence the `lru_cache(1)`).
1746
- if "IPython" not in sys.modules:
+ if sys.modules.get("IPython") is None:
1747
return
1748
import IPython
1749
ip = IPython.get_ipython()
0 commit comments