Source code for holoviews.__init__

from __future__ import print_function, absolute_import
import os, sys, pydoc

import numpy as np # noqa (API import)
import param

__version__ = param.Version(release=(1,8,4), fpath=__file__,
                            commit="$Format:%h$", reponame='holoviews')

from .core import archive, config                        # noqa (API import)
from .core.dimension import OrderedDict, Dimension       # noqa (API import)
from .core.boundingregion import BoundingBox             # noqa (API import)
from .core.options import (Options, Store, Cycle,        # noqa (API import)
                           Palette, StoreOptions)
from .core.layout import *                               # noqa (API import)
from .core.element import *                              # noqa (API import)
from .core.overlay import *                              # noqa (API import)
from .core.tree import *                                 # noqa (API import)
from .core.spaces import (HoloMap, Callable, DynamicMap, # noqa (API import)
                          GridSpace, GridMatrix)

from .operation import Operation                         # noqa (API import)
from .operation import ElementOperation                  # noqa (Deprecated API import)
from .element import *                                   # noqa (API import)
from .element import __all__ as elements_list
from . import util # noqa (API import)
from .util import extension, renderer, output, opts # noqa (API import)

# Suppress warnings generated by NumPy in matplotlib
# Expected to be fixed in next matplotlib release
import warnings
                        message="elementwise comparison failed; returning scalar instead")

    import IPython                 # noqa (API import)
    from .ipython import notebook_extension
    extension = notebook_extension # noqa (name remapping)
except ImportError as e:
    class notebook_extension(param.ParameterizedFunction):
        def __call__(self, *args, **opts): # noqa (dummy signature)
            raise Exception("IPython notebook not available: use hv.extension instead.")

# A single holoviews.rc file may be executed if found.
for rcfile in [os.environ.get("HOLOVIEWSRC", ''),
                                            '..', 'holoviews.rc')),
    filename = os.path.expanduser(rcfile)
    if os.path.isfile(filename):
        with open(filename) as f:
            code = compile(, filename, 'exec')
            except Exception as e:
                print("Warning: Could not load %r [%r]" % (filename, str(e)))

[docs]def help(obj, visualization=True, ansi=True, backend=None, recursive=False, pattern=None): """ Extended version of the built-in help that supports parameterized functions and objects. A pattern (regular expression) may be used to filter the output and if recursive is set to True, documentation for the supplied object is shown. Note that the recursive option will only work with an object instance and not a class. If ansi is set to False, all ANSI color codes are stripped out. """ backend = backend if backend else Store.current_backend info =, ansi=ansi, backend=backend, visualization=visualization, recursive=recursive, pattern=pattern, elements=elements_list) msg = ( "\nTo view the visualization options applicable to this " "object or class, use:\n\n" ", visualization=True)\n\n") if info: print((msg if visualization is False else '') + info) else: