Skip to content

Commit

Permalink
Fixed Parser namespace declaration in ipython extension
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Mar 23, 2016
1 parent d298063 commit 410106b
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions holoviews/ipython/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@

import param
from IPython import version_info
import numpy as np
import holoviews
from param import ipython as param_ext
from IPython.display import HTML

import holoviews
from ..core.options import Store
from ..core.options import Store, Cycle, Palette
from ..element.comparison import ComparisonTestCase
from ..interface.collector import Collector
from ..plotting.renderer import Renderer
Expand All @@ -16,8 +18,6 @@
from .display_hooks import set_display_hooks, OutputMagic
from .widgets import RunProgress

from param import ipython as param_ext

try:
if version_info[0] >= 4:
import nbformat # noqa (ensures availability)
Expand All @@ -30,12 +30,11 @@

try:
import pyparsing
from .parser import Parser
Parser.namespace = {'np': np, 'Cycle': Cycle, 'Palette': Palette}
except ImportError:
pyparsing = None
# Populating the namespace for keyword evaluation
from ..core.options import Cycle, Palette # noqa (namespace import)
import numpy as np # noqa (namespace import)
Parser.namespace = {'np': np, 'Cycle': Cycle, 'Palette': Palette}


Collector.interval_hook = RunProgress

Expand Down

0 comments on commit 410106b

Please sign in to comment.