partition stringclasses 3
values | func_name stringlengths 1 134 | docstring stringlengths 1 46.9k | path stringlengths 4 223 | original_string stringlengths 75 104k | code stringlengths 75 104k | docstring_tokens listlengths 1 1.97k | repo stringlengths 7 55 | language stringclasses 1
value | url stringlengths 87 315 | code_tokens listlengths 19 28.4k | sha stringlengths 40 40 |
|---|---|---|---|---|---|---|---|---|---|---|---|
train | DimensionedPlot.compute_ranges | Given an object, a specific key, and the normalization options,
this method will find the specified normalization options on
the appropriate OptionTree, group the elements according to
the selected normalization option (i.e. either per frame or
over the whole animation) and finally compu... | holoviews/plotting/plot.py | def compute_ranges(self, obj, key, ranges):
"""
Given an object, a specific key, and the normalization options,
this method will find the specified normalization options on
the appropriate OptionTree, group the elements according to
the selected normalization option (i.e. either ... | def compute_ranges(self, obj, key, ranges):
"""
Given an object, a specific key, and the normalization options,
this method will find the specified normalization options on
the appropriate OptionTree, group the elements according to
the selected normalization option (i.e. either ... | [
"Given",
"an",
"object",
"a",
"specific",
"key",
"and",
"the",
"normalization",
"options",
"this",
"method",
"will",
"find",
"the",
"specified",
"normalization",
"options",
"on",
"the",
"appropriate",
"OptionTree",
"group",
"the",
"elements",
"according",
"to",
... | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/plot.py#L352-L393 | [
"def",
"compute_ranges",
"(",
"self",
",",
"obj",
",",
"key",
",",
"ranges",
")",
":",
"all_table",
"=",
"all",
"(",
"isinstance",
"(",
"el",
",",
"Table",
")",
"for",
"el",
"in",
"obj",
".",
"traverse",
"(",
"lambda",
"x",
":",
"x",
",",
"[",
"E... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | DimensionedPlot._get_norm_opts | Gets the normalization options for a LabelledData object by
traversing the object to find elements and their ids.
The id is then used to select the appropriate OptionsTree,
accumulating the normalization options into a dictionary.
Returns a dictionary of normalization options for each
... | holoviews/plotting/plot.py | def _get_norm_opts(self, obj):
"""
Gets the normalization options for a LabelledData object by
traversing the object to find elements and their ids.
The id is then used to select the appropriate OptionsTree,
accumulating the normalization options into a dictionary.
Return... | def _get_norm_opts(self, obj):
"""
Gets the normalization options for a LabelledData object by
traversing the object to find elements and their ids.
The id is then used to select the appropriate OptionsTree,
accumulating the normalization options into a dictionary.
Return... | [
"Gets",
"the",
"normalization",
"options",
"for",
"a",
"LabelledData",
"object",
"by",
"traversing",
"the",
"object",
"to",
"find",
"elements",
"and",
"their",
"ids",
".",
"The",
"id",
"is",
"then",
"used",
"to",
"select",
"the",
"appropriate",
"OptionsTree",
... | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/plot.py#L396-L439 | [
"def",
"_get_norm_opts",
"(",
"self",
",",
"obj",
")",
":",
"norm_opts",
"=",
"{",
"}",
"# Get all elements' type.group.label specs and ids",
"type_val_fn",
"=",
"lambda",
"x",
":",
"(",
"x",
".",
"id",
",",
"(",
"type",
"(",
"x",
")",
".",
"__name__",
","... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | DimensionedPlot._traverse_options | Traverses the supplied object getting all options in opts for
the specified opt_type and specs. Also takes into account the
plotting class defaults for plot options. If a keyfn is
supplied the returned options will be grouped by the returned
keys. | holoviews/plotting/plot.py | def _traverse_options(cls, obj, opt_type, opts, specs=None, keyfn=None, defaults=True):
"""
Traverses the supplied object getting all options in opts for
the specified opt_type and specs. Also takes into account the
plotting class defaults for plot options. If a keyfn is
supplied... | def _traverse_options(cls, obj, opt_type, opts, specs=None, keyfn=None, defaults=True):
"""
Traverses the supplied object getting all options in opts for
the specified opt_type and specs. Also takes into account the
plotting class defaults for plot options. If a keyfn is
supplied... | [
"Traverses",
"the",
"supplied",
"object",
"getting",
"all",
"options",
"in",
"opts",
"for",
"the",
"specified",
"opt_type",
"and",
"specs",
".",
"Also",
"takes",
"into",
"account",
"the",
"plotting",
"class",
"defaults",
"for",
"plot",
"options",
".",
"If",
... | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/plot.py#L527-L566 | [
"def",
"_traverse_options",
"(",
"cls",
",",
"obj",
",",
"opt_type",
",",
"opts",
",",
"specs",
"=",
"None",
",",
"keyfn",
"=",
"None",
",",
"defaults",
"=",
"True",
")",
":",
"def",
"lookup",
"(",
"x",
")",
":",
"\"\"\"\n Looks up options for o... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | DimensionedPlot._get_projection | Uses traversal to find the appropriate projection
for a nested object. Respects projections set on
Overlays before considering Element based settings,
before finally looking up the default projection on
the plot type. If more than one non-None projection
type is found an exceptio... | holoviews/plotting/plot.py | def _get_projection(cls, obj):
"""
Uses traversal to find the appropriate projection
for a nested object. Respects projections set on
Overlays before considering Element based settings,
before finally looking up the default projection on
the plot type. If more than one no... | def _get_projection(cls, obj):
"""
Uses traversal to find the appropriate projection
for a nested object. Respects projections set on
Overlays before considering Element based settings,
before finally looking up the default projection on
the plot type. If more than one no... | [
"Uses",
"traversal",
"to",
"find",
"the",
"appropriate",
"projection",
"for",
"a",
"nested",
"object",
".",
"Respects",
"projections",
"set",
"on",
"Overlays",
"before",
"considering",
"Element",
"based",
"settings",
"before",
"finally",
"looking",
"up",
"the",
... | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/plot.py#L569-L590 | [
"def",
"_get_projection",
"(",
"cls",
",",
"obj",
")",
":",
"isoverlay",
"=",
"lambda",
"x",
":",
"isinstance",
"(",
"x",
",",
"CompositeOverlay",
")",
"element3d",
"=",
"obj",
".",
"traverse",
"(",
"lambda",
"x",
":",
"x",
",",
"[",
"Element3D",
"]",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | DimensionedPlot.refresh | Refreshes the plot by rerendering it and then pushing
the updated data if the plot has an associated Comm. | holoviews/plotting/plot.py | def refresh(self, **kwargs):
"""
Refreshes the plot by rerendering it and then pushing
the updated data if the plot has an associated Comm.
"""
traverse_setter(self, '_force', True)
key = self.current_key if self.current_key else self.keys[0]
dim_streams = [stream... | def refresh(self, **kwargs):
"""
Refreshes the plot by rerendering it and then pushing
the updated data if the plot has an associated Comm.
"""
traverse_setter(self, '_force', True)
key = self.current_key if self.current_key else self.keys[0]
dim_streams = [stream... | [
"Refreshes",
"the",
"plot",
"by",
"rerendering",
"it",
"and",
"then",
"pushing",
"the",
"updated",
"data",
"if",
"the",
"plot",
"has",
"an",
"associated",
"Comm",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/plot.py#L601-L617 | [
"def",
"refresh",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"traverse_setter",
"(",
"self",
",",
"'_force'",
",",
"True",
")",
"key",
"=",
"self",
".",
"current_key",
"if",
"self",
".",
"current_key",
"else",
"self",
".",
"keys",
"[",
"0",
"]",... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | DimensionedPlot._trigger_refresh | Triggers update to a plot on a refresh event | holoviews/plotting/plot.py | def _trigger_refresh(self, key):
"Triggers update to a plot on a refresh event"
# Update if not top-level, batched or an ElementPlot
if not self.top_level or isinstance(self, GenericElementPlot):
self.update(key) | def _trigger_refresh(self, key):
"Triggers update to a plot on a refresh event"
# Update if not top-level, batched or an ElementPlot
if not self.top_level or isinstance(self, GenericElementPlot):
self.update(key) | [
"Triggers",
"update",
"to",
"a",
"plot",
"on",
"a",
"refresh",
"event"
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/plot.py#L620-L624 | [
"def",
"_trigger_refresh",
"(",
"self",
",",
"key",
")",
":",
"# Update if not top-level, batched or an ElementPlot",
"if",
"not",
"self",
".",
"top_level",
"or",
"isinstance",
"(",
"self",
",",
"GenericElementPlot",
")",
":",
"self",
".",
"update",
"(",
"key",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | DimensionedPlot.push | Pushes updated plot data via the Comm. | holoviews/plotting/plot.py | def push(self):
"""
Pushes updated plot data via the Comm.
"""
if self.comm is None:
raise Exception('Renderer does not have a comm.')
diff = self.renderer.diff(self)
self.comm.send(diff) | def push(self):
"""
Pushes updated plot data via the Comm.
"""
if self.comm is None:
raise Exception('Renderer does not have a comm.')
diff = self.renderer.diff(self)
self.comm.send(diff) | [
"Pushes",
"updated",
"plot",
"data",
"via",
"the",
"Comm",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/plot.py#L627-L634 | [
"def",
"push",
"(",
"self",
")",
":",
"if",
"self",
".",
"comm",
"is",
"None",
":",
"raise",
"Exception",
"(",
"'Renderer does not have a comm.'",
")",
"diff",
"=",
"self",
".",
"renderer",
".",
"diff",
"(",
"self",
")",
"self",
".",
"comm",
".",
"send... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | DimensionedPlot.init_comm | Initializes comm and attaches streams. | holoviews/plotting/plot.py | def init_comm(self):
"""
Initializes comm and attaches streams.
"""
if self.comm:
return self.comm
comm = None
if self.dynamic or self.renderer.widget_mode == 'live':
comm = self.renderer.comm_manager.get_server_comm()
return comm | def init_comm(self):
"""
Initializes comm and attaches streams.
"""
if self.comm:
return self.comm
comm = None
if self.dynamic or self.renderer.widget_mode == 'live':
comm = self.renderer.comm_manager.get_server_comm()
return comm | [
"Initializes",
"comm",
"and",
"attaches",
"streams",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/plot.py#L637-L646 | [
"def",
"init_comm",
"(",
"self",
")",
":",
"if",
"self",
".",
"comm",
":",
"return",
"self",
".",
"comm",
"comm",
"=",
"None",
"if",
"self",
".",
"dynamic",
"or",
"self",
".",
"renderer",
".",
"widget_mode",
"==",
"'live'",
":",
"comm",
"=",
"self",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | GenericElementPlot.get_zorder | Computes the z-order of element in the NdOverlay
taking into account possible batching of elements. | holoviews/plotting/plot.py | def get_zorder(self, overlay, key, el):
"""
Computes the z-order of element in the NdOverlay
taking into account possible batching of elements.
"""
spec = util.get_overlay_spec(overlay, key, el)
return self.ordering.index(spec) | def get_zorder(self, overlay, key, el):
"""
Computes the z-order of element in the NdOverlay
taking into account possible batching of elements.
"""
spec = util.get_overlay_spec(overlay, key, el)
return self.ordering.index(spec) | [
"Computes",
"the",
"z",
"-",
"order",
"of",
"element",
"in",
"the",
"NdOverlay",
"taking",
"into",
"account",
"possible",
"batching",
"of",
"elements",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/plot.py#L851-L857 | [
"def",
"get_zorder",
"(",
"self",
",",
"overlay",
",",
"key",
",",
"el",
")",
":",
"spec",
"=",
"util",
".",
"get_overlay_spec",
"(",
"overlay",
",",
"key",
",",
"el",
")",
"return",
"self",
".",
"ordering",
".",
"index",
"(",
"spec",
")"
] | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | GenericElementPlot._execute_hooks | Executes finalize hooks | holoviews/plotting/plot.py | def _execute_hooks(self, element):
"""
Executes finalize hooks
"""
if self.hooks and self.finalize_hooks:
self.param.warning(
"Supply either hooks or finalize_hooks not both, "
"using hooks and ignoring finalize_hooks.")
hooks = self.ho... | def _execute_hooks(self, element):
"""
Executes finalize hooks
"""
if self.hooks and self.finalize_hooks:
self.param.warning(
"Supply either hooks or finalize_hooks not both, "
"using hooks and ignoring finalize_hooks.")
hooks = self.ho... | [
"Executes",
"finalize",
"hooks"
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/plot.py#L886-L900 | [
"def",
"_execute_hooks",
"(",
"self",
",",
"element",
")",
":",
"if",
"self",
".",
"hooks",
"and",
"self",
".",
"finalize_hooks",
":",
"self",
".",
"param",
".",
"warning",
"(",
"\"Supply either hooks or finalize_hooks not both, \"",
"\"using hooks and ignoring finali... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | GenericElementPlot.get_padding | Computes padding along the axes taking into account the plot aspect. | holoviews/plotting/plot.py | def get_padding(self, extents):
"""
Computes padding along the axes taking into account the plot aspect.
"""
(x0, y0, z0, x1, y1, z1) = extents
padding = 0 if self.overlaid else self.padding
xpad, ypad, zpad = get_axis_padding(padding)
if not self.overlaid and not... | def get_padding(self, extents):
"""
Computes padding along the axes taking into account the plot aspect.
"""
(x0, y0, z0, x1, y1, z1) = extents
padding = 0 if self.overlaid else self.padding
xpad, ypad, zpad = get_axis_padding(padding)
if not self.overlaid and not... | [
"Computes",
"padding",
"along",
"the",
"axes",
"taking",
"into",
"account",
"the",
"plot",
"aspect",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/plot.py#L909-L924 | [
"def",
"get_padding",
"(",
"self",
",",
"extents",
")",
":",
"(",
"x0",
",",
"y0",
",",
"z0",
",",
"x1",
",",
"y1",
",",
"z1",
")",
"=",
"extents",
"padding",
"=",
"0",
"if",
"self",
".",
"overlaid",
"else",
"self",
".",
"padding",
"xpad",
",",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | GenericElementPlot.get_extents | Gets the extents for the axes from the current Element. The globally
computed ranges can optionally override the extents.
The extents are computed by combining the data ranges, extents
and dimension ranges. Each of these can be obtained individually
by setting the range_type to one of:
... | holoviews/plotting/plot.py | def get_extents(self, element, ranges, range_type='combined', xdim=None, ydim=None, zdim=None):
"""
Gets the extents for the axes from the current Element. The globally
computed ranges can optionally override the extents.
The extents are computed by combining the data ranges, extents
... | def get_extents(self, element, ranges, range_type='combined', xdim=None, ydim=None, zdim=None):
"""
Gets the extents for the axes from the current Element. The globally
computed ranges can optionally override the extents.
The extents are computed by combining the data ranges, extents
... | [
"Gets",
"the",
"extents",
"for",
"the",
"axes",
"from",
"the",
"current",
"Element",
".",
"The",
"globally",
"computed",
"ranges",
"can",
"optionally",
"override",
"the",
"extents",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/plot.py#L983-L1045 | [
"def",
"get_extents",
"(",
"self",
",",
"element",
",",
"ranges",
",",
"range_type",
"=",
"'combined'",
",",
"xdim",
"=",
"None",
",",
"ydim",
"=",
"None",
",",
"zdim",
"=",
"None",
")",
":",
"num",
"=",
"6",
"if",
"self",
".",
"projection",
"==",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | GenericOverlayPlot._apply_compositor | Given a HoloMap compute the appropriate (mapwise or framewise)
ranges in order to apply the Compositor collapse operations in
display mode (data collapse should already have happened). | holoviews/plotting/plot.py | def _apply_compositor(self, holomap, ranges=None, keys=None, dimensions=None):
"""
Given a HoloMap compute the appropriate (mapwise or framewise)
ranges in order to apply the Compositor collapse operations in
display mode (data collapse should already have happened).
"""
... | def _apply_compositor(self, holomap, ranges=None, keys=None, dimensions=None):
"""
Given a HoloMap compute the appropriate (mapwise or framewise)
ranges in order to apply the Compositor collapse operations in
display mode (data collapse should already have happened).
"""
... | [
"Given",
"a",
"HoloMap",
"compute",
"the",
"appropriate",
"(",
"mapwise",
"or",
"framewise",
")",
"ranges",
"in",
"order",
"to",
"apply",
"the",
"Compositor",
"collapse",
"operations",
"in",
"display",
"mode",
"(",
"data",
"collapse",
"should",
"already",
"hav... | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/plot.py#L1158-L1178 | [
"def",
"_apply_compositor",
"(",
"self",
",",
"holomap",
",",
"ranges",
"=",
"None",
",",
"keys",
"=",
"None",
",",
"dimensions",
"=",
"None",
")",
":",
"# Compute framewise normalization",
"defaultdim",
"=",
"holomap",
".",
"ndims",
"==",
"1",
"and",
"holom... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | GenericOverlayPlot._create_dynamic_subplots | Handles the creation of new subplots when a DynamicMap returns
a changing set of elements in an Overlay. | holoviews/plotting/plot.py | def _create_dynamic_subplots(self, key, items, ranges, **init_kwargs):
"""
Handles the creation of new subplots when a DynamicMap returns
a changing set of elements in an Overlay.
"""
length = self.style_grouping
group_fn = lambda x: (x.type.__name__, x.last.group, x.last... | def _create_dynamic_subplots(self, key, items, ranges, **init_kwargs):
"""
Handles the creation of new subplots when a DynamicMap returns
a changing set of elements in an Overlay.
"""
length = self.style_grouping
group_fn = lambda x: (x.type.__name__, x.last.group, x.last... | [
"Handles",
"the",
"creation",
"of",
"new",
"subplots",
"when",
"a",
"DynamicMap",
"returns",
"a",
"changing",
"set",
"of",
"elements",
"in",
"an",
"Overlay",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/plot.py#L1298-L1314 | [
"def",
"_create_dynamic_subplots",
"(",
"self",
",",
"key",
",",
"items",
",",
"ranges",
",",
"*",
"*",
"init_kwargs",
")",
":",
"length",
"=",
"self",
".",
"style_grouping",
"group_fn",
"=",
"lambda",
"x",
":",
"(",
"x",
".",
"type",
".",
"__name__",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | GenericOverlayPlot._update_subplot | Updates existing subplots when the subplot has been assigned
to plot an element that is not an exact match to the object
it was initially assigned. | holoviews/plotting/plot.py | def _update_subplot(self, subplot, spec):
"""
Updates existing subplots when the subplot has been assigned
to plot an element that is not an exact match to the object
it was initially assigned.
"""
# See if the precise spec has already been assigned a cyclic
# in... | def _update_subplot(self, subplot, spec):
"""
Updates existing subplots when the subplot has been assigned
to plot an element that is not an exact match to the object
it was initially assigned.
"""
# See if the precise spec has already been assigned a cyclic
# in... | [
"Updates",
"existing",
"subplots",
"when",
"the",
"subplot",
"has",
"been",
"assigned",
"to",
"plot",
"an",
"element",
"that",
"is",
"not",
"an",
"exact",
"match",
"to",
"the",
"object",
"it",
"was",
"initially",
"assigned",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/plot.py#L1317-L1338 | [
"def",
"_update_subplot",
"(",
"self",
",",
"subplot",
",",
"spec",
")",
":",
"# See if the precise spec has already been assigned a cyclic",
"# index otherwise generate a new one",
"if",
"spec",
"in",
"self",
".",
"cyclic_index_lookup",
":",
"cyclic_index",
"=",
"self",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | GenericOverlayPlot._get_subplot_extents | Iterates over all subplots and collects the extents of each. | holoviews/plotting/plot.py | def _get_subplot_extents(self, overlay, ranges, range_type):
"""
Iterates over all subplots and collects the extents of each.
"""
if range_type == 'combined':
extents = {'extents': [], 'soft': [], 'hard': [], 'data': []}
else:
extents = {range_type: []}
... | def _get_subplot_extents(self, overlay, ranges, range_type):
"""
Iterates over all subplots and collects the extents of each.
"""
if range_type == 'combined':
extents = {'extents': [], 'soft': [], 'hard': [], 'data': []}
else:
extents = {range_type: []}
... | [
"Iterates",
"over",
"all",
"subplots",
"and",
"collects",
"the",
"extents",
"of",
"each",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/plot.py#L1341-L1378 | [
"def",
"_get_subplot_extents",
"(",
"self",
",",
"overlay",
",",
"ranges",
",",
"range_type",
")",
":",
"if",
"range_type",
"==",
"'combined'",
":",
"extents",
"=",
"{",
"'extents'",
":",
"[",
"]",
",",
"'soft'",
":",
"[",
"]",
",",
"'hard'",
":",
"[",... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | GenericCompositePlot._get_frame | Creates a clone of the Layout with the nth-frame for each
Element. | holoviews/plotting/plot.py | def _get_frame(self, key):
"""
Creates a clone of the Layout with the nth-frame for each
Element.
"""
cached = self.current_key is None
layout_frame = self.layout.clone(shared_data=False)
if key == self.current_key and not self._force:
return self.curr... | def _get_frame(self, key):
"""
Creates a clone of the Layout with the nth-frame for each
Element.
"""
cached = self.current_key is None
layout_frame = self.layout.clone(shared_data=False)
if key == self.current_key and not self._force:
return self.curr... | [
"Creates",
"a",
"clone",
"of",
"the",
"Layout",
"with",
"the",
"nth",
"-",
"frame",
"for",
"each",
"Element",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/plot.py#L1460-L1480 | [
"def",
"_get_frame",
"(",
"self",
",",
"key",
")",
":",
"cached",
"=",
"self",
".",
"current_key",
"is",
"None",
"layout_frame",
"=",
"self",
".",
"layout",
".",
"clone",
"(",
"shared_data",
"=",
"False",
")",
"if",
"key",
"==",
"self",
".",
"current_k... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Parser._strip_commas | Strip out any leading/training commas from the token | holoviews/util/parser.py | def _strip_commas(cls, kw):
"Strip out any leading/training commas from the token"
kw = kw[:-1] if kw[-1]==',' else kw
return kw[1:] if kw[0]==',' else kw | def _strip_commas(cls, kw):
"Strip out any leading/training commas from the token"
kw = kw[:-1] if kw[-1]==',' else kw
return kw[1:] if kw[0]==',' else kw | [
"Strip",
"out",
"any",
"leading",
"/",
"training",
"commas",
"from",
"the",
"token"
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/util/parser.py#L44-L47 | [
"def",
"_strip_commas",
"(",
"cls",
",",
"kw",
")",
":",
"kw",
"=",
"kw",
"[",
":",
"-",
"1",
"]",
"if",
"kw",
"[",
"-",
"1",
"]",
"==",
"','",
"else",
"kw",
"return",
"kw",
"[",
"1",
":",
"]",
"if",
"kw",
"[",
"0",
"]",
"==",
"','",
"els... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Parser.collect_tokens | Collect the tokens from a (potentially) nested parse result. | holoviews/util/parser.py | def collect_tokens(cls, parseresult, mode):
"""
Collect the tokens from a (potentially) nested parse result.
"""
inner = '(%s)' if mode=='parens' else '[%s]'
if parseresult is None: return []
tokens = []
for token in parseresult.asList():
# If value is... | def collect_tokens(cls, parseresult, mode):
"""
Collect the tokens from a (potentially) nested parse result.
"""
inner = '(%s)' if mode=='parens' else '[%s]'
if parseresult is None: return []
tokens = []
for token in parseresult.asList():
# If value is... | [
"Collect",
"the",
"tokens",
"from",
"a",
"(",
"potentially",
")",
"nested",
"parse",
"result",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/util/parser.py#L63-L78 | [
"def",
"collect_tokens",
"(",
"cls",
",",
"parseresult",
",",
"mode",
")",
":",
"inner",
"=",
"'(%s)'",
"if",
"mode",
"==",
"'parens'",
"else",
"'[%s]'",
"if",
"parseresult",
"is",
"None",
":",
"return",
"[",
"]",
"tokens",
"=",
"[",
"]",
"for",
"token... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Parser.todict | Helper function to return dictionary given the parse results
from a pyparsing.nestedExpr object (containing keywords).
The ns is a dynamic namespace (typically the IPython Notebook
namespace) used to update the class-level namespace. | holoviews/util/parser.py | def todict(cls, parseresult, mode='parens', ns={}):
"""
Helper function to return dictionary given the parse results
from a pyparsing.nestedExpr object (containing keywords).
The ns is a dynamic namespace (typically the IPython Notebook
namespace) used to update the class-level ... | def todict(cls, parseresult, mode='parens', ns={}):
"""
Helper function to return dictionary given the parse results
from a pyparsing.nestedExpr object (containing keywords).
The ns is a dynamic namespace (typically the IPython Notebook
namespace) used to update the class-level ... | [
"Helper",
"function",
"to",
"return",
"dictionary",
"given",
"the",
"parse",
"results",
"from",
"a",
"pyparsing",
".",
"nestedExpr",
"object",
"(",
"containing",
"keywords",
")",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/util/parser.py#L81-L121 | [
"def",
"todict",
"(",
"cls",
",",
"parseresult",
",",
"mode",
"=",
"'parens'",
",",
"ns",
"=",
"{",
"}",
")",
":",
"grouped",
",",
"kwargs",
"=",
"[",
"]",
",",
"{",
"}",
"tokens",
"=",
"cls",
".",
"collect_tokens",
"(",
"parseresult",
",",
"mode",... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | OptsSpec.process_normalization | Given a normalization parse group (i.e. the contents of the
braces), validate the option list and compute the appropriate
integer value for the normalization plotting option. | holoviews/util/parser.py | def process_normalization(cls, parse_group):
"""
Given a normalization parse group (i.e. the contents of the
braces), validate the option list and compute the appropriate
integer value for the normalization plotting option.
"""
if ('norm_options' not in parse_group): retu... | def process_normalization(cls, parse_group):
"""
Given a normalization parse group (i.e. the contents of the
braces), validate the option list and compute the appropriate
integer value for the normalization plotting option.
"""
if ('norm_options' not in parse_group): retu... | [
"Given",
"a",
"normalization",
"parse",
"group",
"(",
"i",
".",
"e",
".",
"the",
"contents",
"of",
"the",
"braces",
")",
"validate",
"the",
"option",
"list",
"and",
"compute",
"the",
"appropriate",
"integer",
"value",
"for",
"the",
"normalization",
"plotting... | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/util/parser.py#L220-L258 | [
"def",
"process_normalization",
"(",
"cls",
",",
"parse_group",
")",
":",
"if",
"(",
"'norm_options'",
"not",
"in",
"parse_group",
")",
":",
"return",
"None",
"opts",
"=",
"parse_group",
"[",
"'norm_options'",
"]",
"[",
"0",
"]",
".",
"asList",
"(",
")",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | OptsSpec._group_paths_without_options | Given a parsed options specification as a list of groups, combine
groups without options with the first subsequent group which has
options.
A line of the form
'A B C [opts] D E [opts_2]'
results in
[({A, B, C}, [opts]), ({D, E}, [opts_2])] | holoviews/util/parser.py | def _group_paths_without_options(cls, line_parse_result):
"""
Given a parsed options specification as a list of groups, combine
groups without options with the first subsequent group which has
options.
A line of the form
'A B C [opts] D E [opts_2]'
results in
... | def _group_paths_without_options(cls, line_parse_result):
"""
Given a parsed options specification as a list of groups, combine
groups without options with the first subsequent group which has
options.
A line of the form
'A B C [opts] D E [opts_2]'
results in
... | [
"Given",
"a",
"parsed",
"options",
"specification",
"as",
"a",
"list",
"of",
"groups",
"combine",
"groups",
"without",
"options",
"with",
"the",
"first",
"subsequent",
"group",
"which",
"has",
"options",
".",
"A",
"line",
"of",
"the",
"form",
"A",
"B",
"C"... | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/util/parser.py#L262-L286 | [
"def",
"_group_paths_without_options",
"(",
"cls",
",",
"line_parse_result",
")",
":",
"active_pathspecs",
"=",
"set",
"(",
")",
"for",
"group",
"in",
"line_parse_result",
":",
"active_pathspecs",
".",
"add",
"(",
"group",
"[",
"'pathspec'",
"]",
")",
"has_optio... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | OptsSpec.apply_deprecations | Convert any potentially deprecated paths and issue appropriate warnings | holoviews/util/parser.py | def apply_deprecations(cls, path):
"Convert any potentially deprecated paths and issue appropriate warnings"
split = path.split('.')
msg = 'Element {old} deprecated. Use {new} instead.'
for old, new in cls.deprecations:
if split[0] == old:
parsewarning.warning... | def apply_deprecations(cls, path):
"Convert any potentially deprecated paths and issue appropriate warnings"
split = path.split('.')
msg = 'Element {old} deprecated. Use {new} instead.'
for old, new in cls.deprecations:
if split[0] == old:
parsewarning.warning... | [
"Convert",
"any",
"potentially",
"deprecated",
"paths",
"and",
"issue",
"appropriate",
"warnings"
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/util/parser.py#L292-L300 | [
"def",
"apply_deprecations",
"(",
"cls",
",",
"path",
")",
":",
"split",
"=",
"path",
".",
"split",
"(",
"'.'",
")",
"msg",
"=",
"'Element {old} deprecated. Use {new} instead.'",
"for",
"old",
",",
"new",
"in",
"cls",
".",
"deprecations",
":",
"if",
"split",... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | OptsSpec.parse | Parse an options specification, returning a dictionary with
path keys and {'plot':<options>, 'style':<options>} values. | holoviews/util/parser.py | def parse(cls, line, ns={}):
"""
Parse an options specification, returning a dictionary with
path keys and {'plot':<options>, 'style':<options>} values.
"""
parses = [p for p in cls.opts_spec.scanString(line)]
if len(parses) != 1:
raise SyntaxError("Invalid s... | def parse(cls, line, ns={}):
"""
Parse an options specification, returning a dictionary with
path keys and {'plot':<options>, 'style':<options>} values.
"""
parses = [p for p in cls.opts_spec.scanString(line)]
if len(parses) != 1:
raise SyntaxError("Invalid s... | [
"Parse",
"an",
"options",
"specification",
"returning",
"a",
"dictionary",
"with",
"path",
"keys",
"and",
"{",
"plot",
":",
"<options",
">",
"style",
":",
"<options",
">",
"}",
"values",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/util/parser.py#L304-L346 | [
"def",
"parse",
"(",
"cls",
",",
"line",
",",
"ns",
"=",
"{",
"}",
")",
":",
"parses",
"=",
"[",
"p",
"for",
"p",
"in",
"cls",
".",
"opts_spec",
".",
"scanString",
"(",
"line",
")",
"]",
"if",
"len",
"(",
"parses",
")",
"!=",
"1",
":",
"raise... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | OptsSpec.parse_options | Similar to parse but returns a list of Options objects instead
of the dictionary format. | holoviews/util/parser.py | def parse_options(cls, line, ns={}):
"""
Similar to parse but returns a list of Options objects instead
of the dictionary format.
"""
parsed = cls.parse(line, ns=ns)
options_list = []
for spec in sorted(parsed.keys()):
options = parsed[spec]
... | def parse_options(cls, line, ns={}):
"""
Similar to parse but returns a list of Options objects instead
of the dictionary format.
"""
parsed = cls.parse(line, ns=ns)
options_list = []
for spec in sorted(parsed.keys()):
options = parsed[spec]
... | [
"Similar",
"to",
"parse",
"but",
"returns",
"a",
"list",
"of",
"Options",
"objects",
"instead",
"of",
"the",
"dictionary",
"format",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/util/parser.py#L349-L362 | [
"def",
"parse_options",
"(",
"cls",
",",
"line",
",",
"ns",
"=",
"{",
"}",
")",
":",
"parsed",
"=",
"cls",
".",
"parse",
"(",
"line",
",",
"ns",
"=",
"ns",
")",
"options_list",
"=",
"[",
"]",
"for",
"spec",
"in",
"sorted",
"(",
"parsed",
".",
"... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | CompositorSpec.parse | Parse compositor specifications, returning a list Compositors | holoviews/util/parser.py | def parse(cls, line, ns={}):
"""
Parse compositor specifications, returning a list Compositors
"""
definitions = []
parses = [p for p in cls.compositor_spec.scanString(line)]
if len(parses) != 1:
raise SyntaxError("Invalid specification syntax.")
else... | def parse(cls, line, ns={}):
"""
Parse compositor specifications, returning a list Compositors
"""
definitions = []
parses = [p for p in cls.compositor_spec.scanString(line)]
if len(parses) != 1:
raise SyntaxError("Invalid specification syntax.")
else... | [
"Parse",
"compositor",
"specifications",
"returning",
"a",
"list",
"Compositors"
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/util/parser.py#L405-L438 | [
"def",
"parse",
"(",
"cls",
",",
"line",
",",
"ns",
"=",
"{",
"}",
")",
":",
"definitions",
"=",
"[",
"]",
"parses",
"=",
"[",
"p",
"for",
"p",
"in",
"cls",
".",
"compositor_spec",
".",
"scanString",
"(",
"line",
")",
"]",
"if",
"len",
"(",
"pa... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Normalization.get_ranges | Method to get the appropriate normalization range dictionary
given a key and element. | holoviews/operation/normalization.py | def get_ranges(self, element, key):
"""
Method to get the appropriate normalization range dictionary
given a key and element.
"""
keys = self.p['keys']
ranges = self.p['ranges']
if ranges == {}:
return {d.name: element.range(d.name, self.data_range)
... | def get_ranges(self, element, key):
"""
Method to get the appropriate normalization range dictionary
given a key and element.
"""
keys = self.p['keys']
ranges = self.p['ranges']
if ranges == {}:
return {d.name: element.range(d.name, self.data_range)
... | [
"Method",
"to",
"get",
"the",
"appropriate",
"normalization",
"range",
"dictionary",
"given",
"a",
"key",
"and",
"element",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/operation/normalization.py#L93-L119 | [
"def",
"get_ranges",
"(",
"self",
",",
"element",
",",
"key",
")",
":",
"keys",
"=",
"self",
".",
"p",
"[",
"'keys'",
"]",
"ranges",
"=",
"self",
".",
"p",
"[",
"'ranges'",
"]",
"if",
"ranges",
"==",
"{",
"}",
":",
"return",
"{",
"d",
".",
"nam... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Apply.aggregate | Applies a aggregate function to all ViewableElements.
See :py:meth:`Dimensioned.opts` and :py:meth:`Apply.__call__`
for more information. | holoviews/core/accessors.py | def aggregate(self, dimensions=None, function=None, spreadfn=None, **kwargs):
"""Applies a aggregate function to all ViewableElements.
See :py:meth:`Dimensioned.opts` and :py:meth:`Apply.__call__`
for more information.
"""
kwargs['_method_args'] = (dimensions, function, spreadfn... | def aggregate(self, dimensions=None, function=None, spreadfn=None, **kwargs):
"""Applies a aggregate function to all ViewableElements.
See :py:meth:`Dimensioned.opts` and :py:meth:`Apply.__call__`
for more information.
"""
kwargs['_method_args'] = (dimensions, function, spreadfn... | [
"Applies",
"a",
"aggregate",
"function",
"to",
"all",
"ViewableElements",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/accessors.py#L118-L125 | [
"def",
"aggregate",
"(",
"self",
",",
"dimensions",
"=",
"None",
",",
"function",
"=",
"None",
",",
"spreadfn",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"kwargs",
"[",
"'_method_args'",
"]",
"=",
"(",
"dimensions",
",",
"function",
",",
"spreadf... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Apply.reduce | Applies a reduce function to all ViewableElement objects.
See :py:meth:`Dimensioned.opts` and :py:meth:`Apply.__call__`
for more information. | holoviews/core/accessors.py | def reduce(self, dimensions=[], function=None, spreadfn=None, **kwargs):
"""Applies a reduce function to all ViewableElement objects.
See :py:meth:`Dimensioned.opts` and :py:meth:`Apply.__call__`
for more information.
"""
kwargs['_method_args'] = (dimensions, function, spreadfn)... | def reduce(self, dimensions=[], function=None, spreadfn=None, **kwargs):
"""Applies a reduce function to all ViewableElement objects.
See :py:meth:`Dimensioned.opts` and :py:meth:`Apply.__call__`
for more information.
"""
kwargs['_method_args'] = (dimensions, function, spreadfn)... | [
"Applies",
"a",
"reduce",
"function",
"to",
"all",
"ViewableElement",
"objects",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/accessors.py#L136-L143 | [
"def",
"reduce",
"(",
"self",
",",
"dimensions",
"=",
"[",
"]",
",",
"function",
"=",
"None",
",",
"spreadfn",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"kwargs",
"[",
"'_method_args'",
"]",
"=",
"(",
"dimensions",
",",
"function",
",",
"spread... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Redim.replace_dimensions | Replaces dimensions in list with dictionary of overrides.
Args:
dimensions: List of dimensions
overrides: Dictionary of dimension specs indexed by name
Returns:
list: List of dimensions with replacements applied | holoviews/core/accessors.py | def replace_dimensions(cls, dimensions, overrides):
"""Replaces dimensions in list with dictionary of overrides.
Args:
dimensions: List of dimensions
overrides: Dictionary of dimension specs indexed by name
Returns:
list: List of dimensions with replacements... | def replace_dimensions(cls, dimensions, overrides):
"""Replaces dimensions in list with dictionary of overrides.
Args:
dimensions: List of dimensions
overrides: Dictionary of dimension specs indexed by name
Returns:
list: List of dimensions with replacements... | [
"Replaces",
"dimensions",
"in",
"list",
"with",
"dictionary",
"of",
"overrides",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/accessors.py#L170-L204 | [
"def",
"replace_dimensions",
"(",
"cls",
",",
"dimensions",
",",
"overrides",
")",
":",
"from",
".",
"dimension",
"import",
"Dimension",
"replaced",
"=",
"[",
"]",
"for",
"d",
"in",
"dimensions",
":",
"if",
"d",
".",
"name",
"in",
"overrides",
":",
"over... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Redim._filter_cache | Returns a filtered version of the DynamicMap cache leaving only
keys consistently with the newly specified values | holoviews/core/accessors.py | def _filter_cache(self, dmap, kdims):
"""
Returns a filtered version of the DynamicMap cache leaving only
keys consistently with the newly specified values
"""
filtered = []
for key, value in dmap.data.items():
if not any(kd.values and v not in kd.values for k... | def _filter_cache(self, dmap, kdims):
"""
Returns a filtered version of the DynamicMap cache leaving only
keys consistently with the newly specified values
"""
filtered = []
for key, value in dmap.data.items():
if not any(kd.values and v not in kd.values for k... | [
"Returns",
"a",
"filtered",
"version",
"of",
"the",
"DynamicMap",
"cache",
"leaving",
"only",
"keys",
"consistently",
"with",
"the",
"newly",
"specified",
"values"
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/accessors.py#L207-L216 | [
"def",
"_filter_cache",
"(",
"self",
",",
"dmap",
",",
"kdims",
")",
":",
"filtered",
"=",
"[",
"]",
"for",
"key",
",",
"value",
"in",
"dmap",
".",
"data",
".",
"items",
"(",
")",
":",
"if",
"not",
"any",
"(",
"kd",
".",
"values",
"and",
"v",
"... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Opts.get | Returns the corresponding Options object.
Args:
group: The options group. Flattens across groups if None.
backend: Current backend if None otherwise chosen backend.
Returns:
Options object associated with the object containing the
applied option keywords... | holoviews/core/accessors.py | def get(self, group=None, backend=None):
"""Returns the corresponding Options object.
Args:
group: The options group. Flattens across groups if None.
backend: Current backend if None otherwise chosen backend.
Returns:
Options object associated with the objec... | def get(self, group=None, backend=None):
"""Returns the corresponding Options object.
Args:
group: The options group. Flattens across groups if None.
backend: Current backend if None otherwise chosen backend.
Returns:
Options object associated with the objec... | [
"Returns",
"the",
"corresponding",
"Options",
"object",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/accessors.py#L317-L335 | [
"def",
"get",
"(",
"self",
",",
"group",
"=",
"None",
",",
"backend",
"=",
"None",
")",
":",
"from",
".",
"options",
"import",
"Store",
",",
"Options",
"keywords",
"=",
"{",
"}",
"groups",
"=",
"Options",
".",
"_option_groups",
"if",
"group",
"is",
"... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Opts.info | Prints a repr of the object including any applied options.
Args:
show_defaults: Whether to include default options | holoviews/core/accessors.py | def info(self, show_defaults=False):
"""Prints a repr of the object including any applied options.
Args:
show_defaults: Whether to include default options
"""
pprinter = PrettyPrinter(show_options=True, show_defaults=show_defaults)
print(pprinter.pprint(self._obj)) | def info(self, show_defaults=False):
"""Prints a repr of the object including any applied options.
Args:
show_defaults: Whether to include default options
"""
pprinter = PrettyPrinter(show_options=True, show_defaults=show_defaults)
print(pprinter.pprint(self._obj)) | [
"Prints",
"a",
"repr",
"of",
"the",
"object",
"including",
"any",
"applied",
"options",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/accessors.py#L408-L415 | [
"def",
"info",
"(",
"self",
",",
"show_defaults",
"=",
"False",
")",
":",
"pprinter",
"=",
"PrettyPrinter",
"(",
"show_options",
"=",
"True",
",",
"show_defaults",
"=",
"show_defaults",
")",
"print",
"(",
"pprinter",
".",
"pprint",
"(",
"self",
".",
"_obj"... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Interface.cast | Given a list of Dataset objects, cast them to the specified
datatype (by default the format matching the current interface)
with the given cast_type (if specified). | holoviews/core/data/interface.py | def cast(cls, datasets, datatype=None, cast_type=None):
"""
Given a list of Dataset objects, cast them to the specified
datatype (by default the format matching the current interface)
with the given cast_type (if specified).
"""
datatype = datatype or cls.datatype
... | def cast(cls, datasets, datatype=None, cast_type=None):
"""
Given a list of Dataset objects, cast them to the specified
datatype (by default the format matching the current interface)
with the given cast_type (if specified).
"""
datatype = datatype or cls.datatype
... | [
"Given",
"a",
"list",
"of",
"Dataset",
"objects",
"cast",
"them",
"to",
"the",
"specified",
"datatype",
"(",
"by",
"default",
"the",
"format",
"matching",
"the",
"current",
"interface",
")",
"with",
"the",
"given",
"cast_type",
"(",
"if",
"specified",
")",
... | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/data/interface.py#L156-L168 | [
"def",
"cast",
"(",
"cls",
",",
"datasets",
",",
"datatype",
"=",
"None",
",",
"cast_type",
"=",
"None",
")",
":",
"datatype",
"=",
"datatype",
"or",
"cls",
".",
"datatype",
"cast",
"=",
"[",
"]",
"for",
"ds",
"in",
"datasets",
":",
"if",
"cast_type"... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Interface.select_mask | Given a Dataset object and a dictionary with dimension keys and
selection keys (i.e tuple ranges, slices, sets, lists or literals)
return a boolean mask over the rows in the Dataset object that
have been selected. | holoviews/core/data/interface.py | def select_mask(cls, dataset, selection):
"""
Given a Dataset object and a dictionary with dimension keys and
selection keys (i.e tuple ranges, slices, sets, lists or literals)
return a boolean mask over the rows in the Dataset object that
have been selected.
"""
... | def select_mask(cls, dataset, selection):
"""
Given a Dataset object and a dictionary with dimension keys and
selection keys (i.e tuple ranges, slices, sets, lists or literals)
return a boolean mask over the rows in the Dataset object that
have been selected.
"""
... | [
"Given",
"a",
"Dataset",
"object",
"and",
"a",
"dictionary",
"with",
"dimension",
"keys",
"and",
"selection",
"keys",
"(",
"i",
".",
"e",
"tuple",
"ranges",
"slices",
"sets",
"lists",
"or",
"literals",
")",
"return",
"a",
"boolean",
"mask",
"over",
"the",
... | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/data/interface.py#L278-L314 | [
"def",
"select_mask",
"(",
"cls",
",",
"dataset",
",",
"selection",
")",
":",
"mask",
"=",
"np",
".",
"ones",
"(",
"len",
"(",
"dataset",
")",
",",
"dtype",
"=",
"np",
".",
"bool",
")",
"for",
"dim",
",",
"k",
"in",
"selection",
".",
"items",
"("... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Interface.indexed | Given a Dataset object and selection to be applied returns
boolean to indicate whether a scalar value has been indexed. | holoviews/core/data/interface.py | def indexed(cls, dataset, selection):
"""
Given a Dataset object and selection to be applied returns
boolean to indicate whether a scalar value has been indexed.
"""
selected = list(selection.keys())
all_scalar = all((not isinstance(sel, (tuple, slice, set, list))
... | def indexed(cls, dataset, selection):
"""
Given a Dataset object and selection to be applied returns
boolean to indicate whether a scalar value has been indexed.
"""
selected = list(selection.keys())
all_scalar = all((not isinstance(sel, (tuple, slice, set, list))
... | [
"Given",
"a",
"Dataset",
"object",
"and",
"selection",
"to",
"be",
"applied",
"returns",
"boolean",
"to",
"indicate",
"whether",
"a",
"scalar",
"value",
"has",
"been",
"indexed",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/data/interface.py#L318-L327 | [
"def",
"indexed",
"(",
"cls",
",",
"dataset",
",",
"selection",
")",
":",
"selected",
"=",
"list",
"(",
"selection",
".",
"keys",
"(",
")",
")",
"all_scalar",
"=",
"all",
"(",
"(",
"not",
"isinstance",
"(",
"sel",
",",
"(",
"tuple",
",",
"slice",
"... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Interface.concatenate | Utility function to concatenate an NdMapping of Dataset objects. | holoviews/core/data/interface.py | def concatenate(cls, datasets, datatype=None, new_type=None):
"""
Utility function to concatenate an NdMapping of Dataset objects.
"""
from . import Dataset, default_datatype
new_type = new_type or Dataset
if isinstance(datasets, NdMapping):
dimensions = datas... | def concatenate(cls, datasets, datatype=None, new_type=None):
"""
Utility function to concatenate an NdMapping of Dataset objects.
"""
from . import Dataset, default_datatype
new_type = new_type or Dataset
if isinstance(datasets, NdMapping):
dimensions = datas... | [
"Utility",
"function",
"to",
"concatenate",
"an",
"NdMapping",
"of",
"Dataset",
"objects",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/data/interface.py#L350-L385 | [
"def",
"concatenate",
"(",
"cls",
",",
"datasets",
",",
"datatype",
"=",
"None",
",",
"new_type",
"=",
"None",
")",
":",
"from",
".",
"import",
"Dataset",
",",
"default_datatype",
"new_type",
"=",
"new_type",
"or",
"Dataset",
"if",
"isinstance",
"(",
"data... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | BarPlot.get_extents | Make adjustments to plot extents by computing
stacked bar heights, adjusting the bar baseline
and forcing the x-axis to be categorical. | holoviews/plotting/plotly/chart.py | def get_extents(self, element, ranges, range_type='combined'):
"""
Make adjustments to plot extents by computing
stacked bar heights, adjusting the bar baseline
and forcing the x-axis to be categorical.
"""
if self.batched:
overlay = self.current_frame
... | def get_extents(self, element, ranges, range_type='combined'):
"""
Make adjustments to plot extents by computing
stacked bar heights, adjusting the bar baseline
and forcing the x-axis to be categorical.
"""
if self.batched:
overlay = self.current_frame
... | [
"Make",
"adjustments",
"to",
"plot",
"extents",
"by",
"computing",
"stacked",
"bar",
"heights",
"adjusting",
"the",
"bar",
"baseline",
"and",
"forcing",
"the",
"x",
"-",
"axis",
"to",
"be",
"categorical",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/plotly/chart.py#L175-L214 | [
"def",
"get_extents",
"(",
"self",
",",
"element",
",",
"ranges",
",",
"range_type",
"=",
"'combined'",
")",
":",
"if",
"self",
".",
"batched",
":",
"overlay",
"=",
"self",
".",
"current_frame",
"element",
"=",
"Bars",
"(",
"overlay",
".",
"table",
"(",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | XArrayInterface.unpack_scalar | Given a dataset object and data in the appropriate format for
the interface, return a simple scalar. | holoviews/core/data/xarray.py | def unpack_scalar(cls, dataset, data):
"""
Given a dataset object and data in the appropriate format for
the interface, return a simple scalar.
"""
if (len(data.data_vars) == 1 and
len(data[dataset.vdims[0].name].shape) == 0):
return data[dataset.vdims[0].... | def unpack_scalar(cls, dataset, data):
"""
Given a dataset object and data in the appropriate format for
the interface, return a simple scalar.
"""
if (len(data.data_vars) == 1 and
len(data[dataset.vdims[0].name].shape) == 0):
return data[dataset.vdims[0].... | [
"Given",
"a",
"dataset",
"object",
"and",
"data",
"in",
"the",
"appropriate",
"format",
"for",
"the",
"interface",
"return",
"a",
"simple",
"scalar",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/data/xarray.py#L337-L345 | [
"def",
"unpack_scalar",
"(",
"cls",
",",
"dataset",
",",
"data",
")",
":",
"if",
"(",
"len",
"(",
"data",
".",
"data_vars",
")",
"==",
"1",
"and",
"len",
"(",
"data",
"[",
"dataset",
".",
"vdims",
"[",
"0",
"]",
".",
"name",
"]",
".",
"shape",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | MultiDimensionalMapping._item_check | Applies optional checks to individual data elements before
they are inserted ensuring that they are of a certain
type. Subclassed may implement further element restrictions. | holoviews/core/ndmapping.py | def _item_check(self, dim_vals, data):
"""
Applies optional checks to individual data elements before
they are inserted ensuring that they are of a certain
type. Subclassed may implement further element restrictions.
"""
if not self._check_items:
return
... | def _item_check(self, dim_vals, data):
"""
Applies optional checks to individual data elements before
they are inserted ensuring that they are of a certain
type. Subclassed may implement further element restrictions.
"""
if not self._check_items:
return
... | [
"Applies",
"optional",
"checks",
"to",
"individual",
"data",
"elements",
"before",
"they",
"are",
"inserted",
"ensuring",
"that",
"they",
"are",
"of",
"a",
"certain",
"type",
".",
"Subclassed",
"may",
"implement",
"further",
"element",
"restrictions",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L128-L149 | [
"def",
"_item_check",
"(",
"self",
",",
"dim_vals",
",",
"data",
")",
":",
"if",
"not",
"self",
".",
"_check_items",
":",
"return",
"elif",
"self",
".",
"data_type",
"is",
"not",
"None",
"and",
"not",
"isinstance",
"(",
"data",
",",
"self",
".",
"data_... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | MultiDimensionalMapping._add_item | Adds item to the data, applying dimension types and ensuring
key conforms to Dimension type and values. | holoviews/core/ndmapping.py | def _add_item(self, dim_vals, data, sort=True, update=True):
"""
Adds item to the data, applying dimension types and ensuring
key conforms to Dimension type and values.
"""
sort = sort and self.sort
if not isinstance(dim_vals, tuple):
dim_vals = (dim_vals,)
... | def _add_item(self, dim_vals, data, sort=True, update=True):
"""
Adds item to the data, applying dimension types and ensuring
key conforms to Dimension type and values.
"""
sort = sort and self.sort
if not isinstance(dim_vals, tuple):
dim_vals = (dim_vals,)
... | [
"Adds",
"item",
"to",
"the",
"data",
"applying",
"dimension",
"types",
"and",
"ensuring",
"key",
"conforms",
"to",
"Dimension",
"type",
"and",
"values",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L152-L181 | [
"def",
"_add_item",
"(",
"self",
",",
"dim_vals",
",",
"data",
",",
"sort",
"=",
"True",
",",
"update",
"=",
"True",
")",
":",
"sort",
"=",
"sort",
"and",
"self",
".",
"sort",
"if",
"not",
"isinstance",
"(",
"dim_vals",
",",
"tuple",
")",
":",
"dim... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | MultiDimensionalMapping._apply_key_type | If a type is specified by the corresponding key dimension,
this method applies the type to the supplied key. | holoviews/core/ndmapping.py | def _apply_key_type(self, keys):
"""
If a type is specified by the corresponding key dimension,
this method applies the type to the supplied key.
"""
typed_key = ()
for dim, key in zip(self.kdims, keys):
key_type = dim.type
if key_type is None:
... | def _apply_key_type(self, keys):
"""
If a type is specified by the corresponding key dimension,
this method applies the type to the supplied key.
"""
typed_key = ()
for dim, key in zip(self.kdims, keys):
key_type = dim.type
if key_type is None:
... | [
"If",
"a",
"type",
"is",
"specified",
"by",
"the",
"corresponding",
"key",
"dimension",
"this",
"method",
"applies",
"the",
"type",
"to",
"the",
"supplied",
"key",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L184-L204 | [
"def",
"_apply_key_type",
"(",
"self",
",",
"keys",
")",
":",
"typed_key",
"=",
"(",
")",
"for",
"dim",
",",
"key",
"in",
"zip",
"(",
"self",
".",
"kdims",
",",
"keys",
")",
":",
"key_type",
"=",
"dim",
".",
"type",
"if",
"key_type",
"is",
"None",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | MultiDimensionalMapping._split_index | Partitions key into key and deep dimension groups. If only key
indices are supplied, the data is indexed with an empty tuple.
Keys with indices than there are dimensions will be padded. | holoviews/core/ndmapping.py | def _split_index(self, key):
"""
Partitions key into key and deep dimension groups. If only key
indices are supplied, the data is indexed with an empty tuple.
Keys with indices than there are dimensions will be padded.
"""
if not isinstance(key, tuple):
key = ... | def _split_index(self, key):
"""
Partitions key into key and deep dimension groups. If only key
indices are supplied, the data is indexed with an empty tuple.
Keys with indices than there are dimensions will be padded.
"""
if not isinstance(key, tuple):
key = ... | [
"Partitions",
"key",
"into",
"key",
"and",
"deep",
"dimension",
"groups",
".",
"If",
"only",
"key",
"indices",
"are",
"supplied",
"the",
"data",
"is",
"indexed",
"with",
"an",
"empty",
"tuple",
".",
"Keys",
"with",
"indices",
"than",
"there",
"are",
"dimen... | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L207-L231 | [
"def",
"_split_index",
"(",
"self",
",",
"key",
")",
":",
"if",
"not",
"isinstance",
"(",
"key",
",",
"tuple",
")",
":",
"key",
"=",
"(",
"key",
",",
")",
"elif",
"key",
"==",
"(",
")",
":",
"return",
"(",
")",
",",
"(",
")",
"if",
"key",
"["... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | MultiDimensionalMapping._dataslice | Returns slice of data element if the item is deep
indexable. Warns if attempting to slice an object that has not
been declared deep indexable. | holoviews/core/ndmapping.py | def _dataslice(self, data, indices):
"""
Returns slice of data element if the item is deep
indexable. Warns if attempting to slice an object that has not
been declared deep indexable.
"""
if self._deep_indexable and isinstance(data, Dimensioned) and indices:
r... | def _dataslice(self, data, indices):
"""
Returns slice of data element if the item is deep
indexable. Warns if attempting to slice an object that has not
been declared deep indexable.
"""
if self._deep_indexable and isinstance(data, Dimensioned) and indices:
r... | [
"Returns",
"slice",
"of",
"data",
"element",
"if",
"the",
"item",
"is",
"deep",
"indexable",
".",
"Warns",
"if",
"attempting",
"to",
"slice",
"an",
"object",
"that",
"has",
"not",
"been",
"declared",
"deep",
"indexable",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L234-L245 | [
"def",
"_dataslice",
"(",
"self",
",",
"data",
",",
"indices",
")",
":",
"if",
"self",
".",
"_deep_indexable",
"and",
"isinstance",
"(",
"data",
",",
"Dimensioned",
")",
"and",
"indices",
":",
"return",
"data",
"[",
"indices",
"]",
"elif",
"len",
"(",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | MultiDimensionalMapping.clone | Clones the object, overriding data and parameters.
Args:
data: New data replacing the existing data
shared_data (bool, optional): Whether to use existing data
new_type (optional): Type to cast object to
link (bool, optional): Whether clone should be linked
... | holoviews/core/ndmapping.py | def clone(self, data=None, shared_data=True, *args, **overrides):
"""Clones the object, overriding data and parameters.
Args:
data: New data replacing the existing data
shared_data (bool, optional): Whether to use existing data
new_type (optional): Type to cast objec... | def clone(self, data=None, shared_data=True, *args, **overrides):
"""Clones the object, overriding data and parameters.
Args:
data: New data replacing the existing data
shared_data (bool, optional): Whether to use existing data
new_type (optional): Type to cast objec... | [
"Clones",
"the",
"object",
"overriding",
"data",
"and",
"parameters",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L253-L271 | [
"def",
"clone",
"(",
"self",
",",
"data",
"=",
"None",
",",
"shared_data",
"=",
"True",
",",
"*",
"args",
",",
"*",
"*",
"overrides",
")",
":",
"with",
"item_check",
"(",
"not",
"shared_data",
"and",
"self",
".",
"_check_items",
")",
":",
"return",
"... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | MultiDimensionalMapping.groupby | Groups object by one or more dimensions
Applies groupby operation over the specified dimensions
returning an object of type container_type (expected to be
dictionary-like) containing the groups.
Args:
dimensions: Dimension(s) to group by
container_type: Type to ... | holoviews/core/ndmapping.py | def groupby(self, dimensions, container_type=None, group_type=None, **kwargs):
"""Groups object by one or more dimensions
Applies groupby operation over the specified dimensions
returning an object of type container_type (expected to be
dictionary-like) containing the groups.
A... | def groupby(self, dimensions, container_type=None, group_type=None, **kwargs):
"""Groups object by one or more dimensions
Applies groupby operation over the specified dimensions
returning an object of type container_type (expected to be
dictionary-like) containing the groups.
A... | [
"Groups",
"object",
"by",
"one",
"or",
"more",
"dimensions"
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L274-L302 | [
"def",
"groupby",
"(",
"self",
",",
"dimensions",
",",
"container_type",
"=",
"None",
",",
"group_type",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"self",
".",
"ndims",
"==",
"1",
":",
"self",
".",
"param",
".",
"warning",
"(",
"'Cannot s... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | MultiDimensionalMapping.add_dimension | Adds a dimension and its values to the object
Requires the dimension name or object, the desired position in
the key dimensions and a key value scalar or sequence of the
same length as the existing keys.
Args:
dimension: Dimension or dimension spec to add
dim_po... | holoviews/core/ndmapping.py | def add_dimension(self, dimension, dim_pos, dim_val, vdim=False, **kwargs):
"""Adds a dimension and its values to the object
Requires the dimension name or object, the desired position in
the key dimensions and a key value scalar or sequence of the
same length as the existing keys.
... | def add_dimension(self, dimension, dim_pos, dim_val, vdim=False, **kwargs):
"""Adds a dimension and its values to the object
Requires the dimension name or object, the desired position in
the key dimensions and a key value scalar or sequence of the
same length as the existing keys.
... | [
"Adds",
"a",
"dimension",
"and",
"its",
"values",
"to",
"the",
"object"
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L305-L358 | [
"def",
"add_dimension",
"(",
"self",
",",
"dimension",
",",
"dim_pos",
",",
"dim_val",
",",
"vdim",
"=",
"False",
",",
"*",
"*",
"kwargs",
")",
":",
"dimension",
"=",
"asdim",
"(",
"dimension",
")",
"if",
"dimension",
"in",
"self",
".",
"dimensions",
"... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | MultiDimensionalMapping.drop_dimension | Drops dimension(s) from keys
Args:
dimensions: Dimension(s) to drop
Returns:
Clone of object with with dropped dimension(s) | holoviews/core/ndmapping.py | def drop_dimension(self, dimensions):
"""Drops dimension(s) from keys
Args:
dimensions: Dimension(s) to drop
Returns:
Clone of object with with dropped dimension(s)
"""
dimensions = [dimensions] if np.isscalar(dimensions) else dimensions
dims = [... | def drop_dimension(self, dimensions):
"""Drops dimension(s) from keys
Args:
dimensions: Dimension(s) to drop
Returns:
Clone of object with with dropped dimension(s)
"""
dimensions = [dimensions] if np.isscalar(dimensions) else dimensions
dims = [... | [
"Drops",
"dimension",
"(",
"s",
")",
"from",
"keys"
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L361-L375 | [
"def",
"drop_dimension",
"(",
"self",
",",
"dimensions",
")",
":",
"dimensions",
"=",
"[",
"dimensions",
"]",
"if",
"np",
".",
"isscalar",
"(",
"dimensions",
")",
"else",
"dimensions",
"dims",
"=",
"[",
"d",
"for",
"d",
"in",
"self",
".",
"kdims",
"if"... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | MultiDimensionalMapping.dimension_values | Return the values along the requested dimension.
Args:
dimension: The dimension to return values for
expanded (bool, optional): Whether to expand values
Whether to return the expanded values, behavior depends
on the type of data:
* Colum... | holoviews/core/ndmapping.py | def dimension_values(self, dimension, expanded=True, flat=True):
"""Return the values along the requested dimension.
Args:
dimension: The dimension to return values for
expanded (bool, optional): Whether to expand values
Whether to return the expanded values, beh... | def dimension_values(self, dimension, expanded=True, flat=True):
"""Return the values along the requested dimension.
Args:
dimension: The dimension to return values for
expanded (bool, optional): Whether to expand values
Whether to return the expanded values, beh... | [
"Return",
"the",
"values",
"along",
"the",
"requested",
"dimension",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L378-L403 | [
"def",
"dimension_values",
"(",
"self",
",",
"dimension",
",",
"expanded",
"=",
"True",
",",
"flat",
"=",
"True",
")",
":",
"dimension",
"=",
"self",
".",
"get_dimension",
"(",
"dimension",
",",
"strict",
"=",
"True",
")",
"if",
"dimension",
"in",
"self"... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | MultiDimensionalMapping.reindex | Reindexes object dropping static or supplied kdims
Creates a new object with a reordered or reduced set of key
dimensions. By default drops all non-varying key dimensions.
Reducing the number of key dimensions will discard information
from the keys. All data values are accessible in th... | holoviews/core/ndmapping.py | def reindex(self, kdims=[], force=False):
"""Reindexes object dropping static or supplied kdims
Creates a new object with a reordered or reduced set of key
dimensions. By default drops all non-varying key dimensions.
Reducing the number of key dimensions will discard information
... | def reindex(self, kdims=[], force=False):
"""Reindexes object dropping static or supplied kdims
Creates a new object with a reordered or reduced set of key
dimensions. By default drops all non-varying key dimensions.
Reducing the number of key dimensions will discard information
... | [
"Reindexes",
"object",
"dropping",
"static",
"or",
"supplied",
"kdims"
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L406-L449 | [
"def",
"reindex",
"(",
"self",
",",
"kdims",
"=",
"[",
"]",
",",
"force",
"=",
"False",
")",
":",
"old_kdims",
"=",
"[",
"d",
".",
"name",
"for",
"d",
"in",
"self",
".",
"kdims",
"]",
"if",
"not",
"isinstance",
"(",
"kdims",
",",
"list",
")",
"... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | MultiDimensionalMapping.info | Prints information about the Dimensioned object, including the
number and type of objects contained within it and information
about its dimensions. | holoviews/core/ndmapping.py | def info(self):
"""
Prints information about the Dimensioned object, including the
number and type of objects contained within it and information
about its dimensions.
"""
if (len(self.values()) > 0):
info_str = self.__class__.__name__ +\
... | def info(self):
"""
Prints information about the Dimensioned object, including the
number and type of objects contained within it and information
about its dimensions.
"""
if (len(self.values()) > 0):
info_str = self.__class__.__name__ +\
... | [
"Prints",
"information",
"about",
"the",
"Dimensioned",
"object",
"including",
"the",
"number",
"and",
"type",
"of",
"objects",
"contained",
"within",
"it",
"and",
"information",
"about",
"its",
"dimensions",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L465-L489 | [
"def",
"info",
"(",
"self",
")",
":",
"if",
"(",
"len",
"(",
"self",
".",
"values",
"(",
")",
")",
">",
"0",
")",
":",
"info_str",
"=",
"self",
".",
"__class__",
".",
"__name__",
"+",
"\" containing %d items of type %s\\n\"",
"%",
"(",
"len",
"(",
"s... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | MultiDimensionalMapping.update | Merges other item with this object
Args:
other: Object containing items to merge into this object
Must be a dictionary or NdMapping type | holoviews/core/ndmapping.py | def update(self, other):
"""Merges other item with this object
Args:
other: Object containing items to merge into this object
Must be a dictionary or NdMapping type
"""
if isinstance(other, NdMapping):
dims = [d for d in other.kdims if d not in se... | def update(self, other):
"""Merges other item with this object
Args:
other: Object containing items to merge into this object
Must be a dictionary or NdMapping type
"""
if isinstance(other, NdMapping):
dims = [d for d in other.kdims if d not in se... | [
"Merges",
"other",
"item",
"with",
"this",
"object"
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L492-L510 | [
"def",
"update",
"(",
"self",
",",
"other",
")",
":",
"if",
"isinstance",
"(",
"other",
",",
"NdMapping",
")",
":",
"dims",
"=",
"[",
"d",
"for",
"d",
"in",
"other",
".",
"kdims",
"if",
"d",
"not",
"in",
"self",
".",
"kdims",
"]",
"if",
"len",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | MultiDimensionalMapping.keys | Returns the keys of all the elements. | holoviews/core/ndmapping.py | def keys(self):
" Returns the keys of all the elements."
if self.ndims == 1:
return [k[0] for k in self.data.keys()]
else:
return list(self.data.keys()) | def keys(self):
" Returns the keys of all the elements."
if self.ndims == 1:
return [k[0] for k in self.data.keys()]
else:
return list(self.data.keys()) | [
"Returns",
"the",
"keys",
"of",
"all",
"the",
"elements",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L513-L518 | [
"def",
"keys",
"(",
"self",
")",
":",
"if",
"self",
".",
"ndims",
"==",
"1",
":",
"return",
"[",
"k",
"[",
"0",
"]",
"for",
"k",
"in",
"self",
".",
"data",
".",
"keys",
"(",
")",
"]",
"else",
":",
"return",
"list",
"(",
"self",
".",
"data",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | MultiDimensionalMapping.items | Returns all elements as a list in (key,value) format. | holoviews/core/ndmapping.py | def items(self):
"Returns all elements as a list in (key,value) format."
return list(zip(list(self.keys()), list(self.values()))) | def items(self):
"Returns all elements as a list in (key,value) format."
return list(zip(list(self.keys()), list(self.values()))) | [
"Returns",
"all",
"elements",
"as",
"a",
"list",
"in",
"(",
"key",
"value",
")",
"format",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L526-L528 | [
"def",
"items",
"(",
"self",
")",
":",
"return",
"list",
"(",
"zip",
"(",
"list",
"(",
"self",
".",
"keys",
"(",
")",
")",
",",
"list",
"(",
"self",
".",
"values",
"(",
")",
")",
")",
")"
] | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | MultiDimensionalMapping.pop | Standard pop semantics for all mapping types | holoviews/core/ndmapping.py | def pop(self, key, default=None):
"Standard pop semantics for all mapping types"
if not isinstance(key, tuple): key = (key,)
return self.data.pop(key, default) | def pop(self, key, default=None):
"Standard pop semantics for all mapping types"
if not isinstance(key, tuple): key = (key,)
return self.data.pop(key, default) | [
"Standard",
"pop",
"semantics",
"for",
"all",
"mapping",
"types"
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L541-L544 | [
"def",
"pop",
"(",
"self",
",",
"key",
",",
"default",
"=",
"None",
")",
":",
"if",
"not",
"isinstance",
"(",
"key",
",",
"tuple",
")",
":",
"key",
"=",
"(",
"key",
",",
")",
"return",
"self",
".",
"data",
".",
"pop",
"(",
"key",
",",
"default"... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | MultiDimensionalMapping.table | Deprecated method to convert an MultiDimensionalMapping of
Elements to a Table. | holoviews/core/ndmapping.py | def table(self, datatype=None, **kwargs):
"""
Deprecated method to convert an MultiDimensionalMapping of
Elements to a Table.
"""
if config.future_deprecations:
self.param.warning("The table method is deprecated and should no "
"longer b... | def table(self, datatype=None, **kwargs):
"""
Deprecated method to convert an MultiDimensionalMapping of
Elements to a Table.
"""
if config.future_deprecations:
self.param.warning("The table method is deprecated and should no "
"longer b... | [
"Deprecated",
"method",
"to",
"convert",
"an",
"MultiDimensionalMapping",
"of",
"Elements",
"to",
"a",
"Table",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L586-L601 | [
"def",
"table",
"(",
"self",
",",
"datatype",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"config",
".",
"future_deprecations",
":",
"self",
".",
"param",
".",
"warning",
"(",
"\"The table method is deprecated and should no \"",
"\"longer be used. If usi... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | MultiDimensionalMapping.dframe | Deprecated method to convert a MultiDimensionalMapping to
a pandas DataFrame. Conversion to a dataframe now only
supported by specific subclasses such as UniformNdMapping
types. | holoviews/core/ndmapping.py | def dframe(self):
"""
Deprecated method to convert a MultiDimensionalMapping to
a pandas DataFrame. Conversion to a dataframe now only
supported by specific subclasses such as UniformNdMapping
types.
"""
self.param.warning("The MultiDimensionalMapping.dframe metho... | def dframe(self):
"""
Deprecated method to convert a MultiDimensionalMapping to
a pandas DataFrame. Conversion to a dataframe now only
supported by specific subclasses such as UniformNdMapping
types.
"""
self.param.warning("The MultiDimensionalMapping.dframe metho... | [
"Deprecated",
"method",
"to",
"convert",
"a",
"MultiDimensionalMapping",
"to",
"a",
"pandas",
"DataFrame",
".",
"Conversion",
"to",
"a",
"dataframe",
"now",
"only",
"supported",
"by",
"specific",
"subclasses",
"such",
"as",
"UniformNdMapping",
"types",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L604-L621 | [
"def",
"dframe",
"(",
"self",
")",
":",
"self",
".",
"param",
".",
"warning",
"(",
"\"The MultiDimensionalMapping.dframe method is \"",
"\"deprecated and should no longer be used. \"",
"\"Use a more specific subclass which does support \"",
"\"the dframe method instead, e.g. a HoloMap.... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | NdMapping._expand_slice | Expands slices containing steps into a list. | holoviews/core/ndmapping.py | def _expand_slice(self, indices):
"""
Expands slices containing steps into a list.
"""
keys = list(self.data.keys())
expanded = []
for idx, ind in enumerate(indices):
if isinstance(ind, slice) and ind.step is not None:
dim_ind = slice(ind.start... | def _expand_slice(self, indices):
"""
Expands slices containing steps into a list.
"""
keys = list(self.data.keys())
expanded = []
for idx, ind in enumerate(indices):
if isinstance(ind, slice) and ind.step is not None:
dim_ind = slice(ind.start... | [
"Expands",
"slices",
"containing",
"steps",
"into",
"a",
"list",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L683-L704 | [
"def",
"_expand_slice",
"(",
"self",
",",
"indices",
")",
":",
"keys",
"=",
"list",
"(",
"self",
".",
"data",
".",
"keys",
"(",
")",
")",
"expanded",
"=",
"[",
"]",
"for",
"idx",
",",
"ind",
"in",
"enumerate",
"(",
"indices",
")",
":",
"if",
"isi... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | NdMapping._generate_conditions | Generates filter conditions used for slicing the data structure. | holoviews/core/ndmapping.py | def _generate_conditions(self, map_slice):
"""
Generates filter conditions used for slicing the data structure.
"""
conditions = []
for dim, dim_slice in zip(self.kdims, map_slice):
if isinstance(dim_slice, slice):
start, stop = dim_slice.start, dim_sl... | def _generate_conditions(self, map_slice):
"""
Generates filter conditions used for slicing the data structure.
"""
conditions = []
for dim, dim_slice in zip(self.kdims, map_slice):
if isinstance(dim_slice, slice):
start, stop = dim_slice.start, dim_sl... | [
"Generates",
"filter",
"conditions",
"used",
"for",
"slicing",
"the",
"data",
"structure",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L715-L750 | [
"def",
"_generate_conditions",
"(",
"self",
",",
"map_slice",
")",
":",
"conditions",
"=",
"[",
"]",
"for",
"dim",
",",
"dim_slice",
"in",
"zip",
"(",
"self",
".",
"kdims",
",",
"map_slice",
")",
":",
"if",
"isinstance",
"(",
"dim_slice",
",",
"slice",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | UniformNdMapping.clone | Clones the object, overriding data and parameters.
Args:
data: New data replacing the existing data
shared_data (bool, optional): Whether to use existing data
new_type (optional): Type to cast object to
link (bool, optional): Whether clone should be linked
... | holoviews/core/ndmapping.py | def clone(self, data=None, shared_data=True, new_type=None, link=True,
*args, **overrides):
"""Clones the object, overriding data and parameters.
Args:
data: New data replacing the existing data
shared_data (bool, optional): Whether to use existing data
... | def clone(self, data=None, shared_data=True, new_type=None, link=True,
*args, **overrides):
"""Clones the object, overriding data and parameters.
Args:
data: New data replacing the existing data
shared_data (bool, optional): Whether to use existing data
... | [
"Clones",
"the",
"object",
"overriding",
"data",
"and",
"parameters",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L814-L855 | [
"def",
"clone",
"(",
"self",
",",
"data",
"=",
"None",
",",
"shared_data",
"=",
"True",
",",
"new_type",
"=",
"None",
",",
"link",
"=",
"True",
",",
"*",
"args",
",",
"*",
"*",
"overrides",
")",
":",
"settings",
"=",
"dict",
"(",
"self",
".",
"ge... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | UniformNdMapping.dframe | Convert dimension values to DataFrame.
Returns a pandas dataframe of columns along each dimension,
either completely flat or indexed by key dimensions.
Args:
dimensions: Dimensions to return as columns
multi_index: Convert key dimensions to (multi-)index
Return... | holoviews/core/ndmapping.py | def dframe(self, dimensions=None, multi_index=False):
"""Convert dimension values to DataFrame.
Returns a pandas dataframe of columns along each dimension,
either completely flat or indexed by key dimensions.
Args:
dimensions: Dimensions to return as columns
mul... | def dframe(self, dimensions=None, multi_index=False):
"""Convert dimension values to DataFrame.
Returns a pandas dataframe of columns along each dimension,
either completely flat or indexed by key dimensions.
Args:
dimensions: Dimensions to return as columns
mul... | [
"Convert",
"dimension",
"values",
"to",
"DataFrame",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L858-L904 | [
"def",
"dframe",
"(",
"self",
",",
"dimensions",
"=",
"None",
",",
"multi_index",
"=",
"False",
")",
":",
"import",
"pandas",
"as",
"pd",
"if",
"dimensions",
"is",
"None",
":",
"outer_dimensions",
"=",
"self",
".",
"kdims",
"inner_dimensions",
"=",
"None",... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | UniformNdMapping.group | Group inherited from items | holoviews/core/ndmapping.py | def group(self):
"Group inherited from items"
if self._group:
return self._group
group = get_ndmapping_label(self, 'group') if len(self) else None
if group is None:
return type(self).__name__
return group | def group(self):
"Group inherited from items"
if self._group:
return self._group
group = get_ndmapping_label(self, 'group') if len(self) else None
if group is None:
return type(self).__name__
return group | [
"Group",
"inherited",
"from",
"items"
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L908-L915 | [
"def",
"group",
"(",
"self",
")",
":",
"if",
"self",
".",
"_group",
":",
"return",
"self",
".",
"_group",
"group",
"=",
"get_ndmapping_label",
"(",
"self",
",",
"'group'",
")",
"if",
"len",
"(",
"self",
")",
"else",
"None",
"if",
"group",
"is",
"None... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | UniformNdMapping.label | Label inherited from items | holoviews/core/ndmapping.py | def label(self):
"Label inherited from items"
if self._label:
return self._label
else:
if len(self):
label = get_ndmapping_label(self, 'label')
return '' if label is None else label
else:
return '' | def label(self):
"Label inherited from items"
if self._label:
return self._label
else:
if len(self):
label = get_ndmapping_label(self, 'label')
return '' if label is None else label
else:
return '' | [
"Label",
"inherited",
"from",
"items"
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L927-L936 | [
"def",
"label",
"(",
"self",
")",
":",
"if",
"self",
".",
"_label",
":",
"return",
"self",
".",
"_label",
"else",
":",
"if",
"len",
"(",
"self",
")",
":",
"label",
"=",
"get_ndmapping_label",
"(",
"self",
",",
"'label'",
")",
"return",
"''",
"if",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | UniformNdMapping.type | The type of elements stored in the mapping. | holoviews/core/ndmapping.py | def type(self):
"The type of elements stored in the mapping."
if self._type is None and len(self):
self._type = self.values()[0].__class__
return self._type | def type(self):
"The type of elements stored in the mapping."
if self._type is None and len(self):
self._type = self.values()[0].__class__
return self._type | [
"The",
"type",
"of",
"elements",
"stored",
"in",
"the",
"mapping",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/ndmapping.py#L947-L951 | [
"def",
"type",
"(",
"self",
")",
":",
"if",
"self",
".",
"_type",
"is",
"None",
"and",
"len",
"(",
"self",
")",
":",
"self",
".",
"_type",
"=",
"self",
".",
"values",
"(",
")",
"[",
"0",
"]",
".",
"__class__",
"return",
"self",
".",
"_type"
] | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Dataset.closest | Snaps coordinate(s) to closest coordinate in Dataset
Args:
coords: List of coordinates expressed as tuples
**kwargs: Coordinates defined as keyword pairs
Returns:
List of tuples of the snapped coordinates
Raises:
NotImplementedError: Raised if s... | holoviews/core/data/__init__.py | def closest(self, coords=[], **kwargs):
"""Snaps coordinate(s) to closest coordinate in Dataset
Args:
coords: List of coordinates expressed as tuples
**kwargs: Coordinates defined as keyword pairs
Returns:
List of tuples of the snapped coordinates
R... | def closest(self, coords=[], **kwargs):
"""Snaps coordinate(s) to closest coordinate in Dataset
Args:
coords: List of coordinates expressed as tuples
**kwargs: Coordinates defined as keyword pairs
Returns:
List of tuples of the snapped coordinates
R... | [
"Snaps",
"coordinate",
"(",
"s",
")",
"to",
"closest",
"coordinate",
"in",
"Dataset"
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/data/__init__.py#L219-L247 | [
"def",
"closest",
"(",
"self",
",",
"coords",
"=",
"[",
"]",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"self",
".",
"ndims",
">",
"1",
":",
"raise",
"NotImplementedError",
"(",
"\"Closest method currently only \"",
"\"implemented for 1D Elements\"",
")",
"if",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Dataset.sort | Sorts the data by the values along the supplied dimensions.
Args:
by: Dimension(s) to sort by
reverse (bool, optional): Reverse sort order
Returns:
Sorted Dataset | holoviews/core/data/__init__.py | def sort(self, by=None, reverse=False):
"""
Sorts the data by the values along the supplied dimensions.
Args:
by: Dimension(s) to sort by
reverse (bool, optional): Reverse sort order
Returns:
Sorted Dataset
"""
if by is None:
... | def sort(self, by=None, reverse=False):
"""
Sorts the data by the values along the supplied dimensions.
Args:
by: Dimension(s) to sort by
reverse (bool, optional): Reverse sort order
Returns:
Sorted Dataset
"""
if by is None:
... | [
"Sorts",
"the",
"data",
"by",
"the",
"values",
"along",
"the",
"supplied",
"dimensions",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/data/__init__.py#L250-L266 | [
"def",
"sort",
"(",
"self",
",",
"by",
"=",
"None",
",",
"reverse",
"=",
"False",
")",
":",
"if",
"by",
"is",
"None",
":",
"by",
"=",
"self",
".",
"kdims",
"elif",
"not",
"isinstance",
"(",
"by",
",",
"list",
")",
":",
"by",
"=",
"[",
"by",
"... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Dataset.range | Return the lower and upper bounds of values along dimension.
Args:
dimension: The dimension to compute the range on.
data_range (bool): Compute range from data values
dimension_range (bool): Include Dimension ranges
Whether to include Dimension range and soft... | holoviews/core/data/__init__.py | def range(self, dim, data_range=True, dimension_range=True):
"""Return the lower and upper bounds of values along dimension.
Args:
dimension: The dimension to compute the range on.
data_range (bool): Compute range from data values
dimension_range (bool): Include Dime... | def range(self, dim, data_range=True, dimension_range=True):
"""Return the lower and upper bounds of values along dimension.
Args:
dimension: The dimension to compute the range on.
data_range (bool): Compute range from data values
dimension_range (bool): Include Dime... | [
"Return",
"the",
"lower",
"and",
"upper",
"bounds",
"of",
"values",
"along",
"dimension",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/data/__init__.py#L269-L294 | [
"def",
"range",
"(",
"self",
",",
"dim",
",",
"data_range",
"=",
"True",
",",
"dimension_range",
"=",
"True",
")",
":",
"dim",
"=",
"self",
".",
"get_dimension",
"(",
"dim",
")",
"if",
"dim",
"is",
"None",
"or",
"(",
"not",
"data_range",
"and",
"not"... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Dataset.add_dimension | Adds a dimension and its values to the Dataset
Requires the dimension name or object, the desired position in
the key dimensions and a key value scalar or array of values,
matching the length o shape of the Dataset.
Args:
dimension: Dimension or dimension spec to add
... | holoviews/core/data/__init__.py | def add_dimension(self, dimension, dim_pos, dim_val, vdim=False, **kwargs):
"""Adds a dimension and its values to the Dataset
Requires the dimension name or object, the desired position in
the key dimensions and a key value scalar or array of values,
matching the length o shape of the D... | def add_dimension(self, dimension, dim_pos, dim_val, vdim=False, **kwargs):
"""Adds a dimension and its values to the Dataset
Requires the dimension name or object, the desired position in
the key dimensions and a key value scalar or array of values,
matching the length o shape of the D... | [
"Adds",
"a",
"dimension",
"and",
"its",
"values",
"to",
"the",
"Dataset"
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/data/__init__.py#L297-L335 | [
"def",
"add_dimension",
"(",
"self",
",",
"dimension",
",",
"dim_pos",
",",
"dim_val",
",",
"vdim",
"=",
"False",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"isinstance",
"(",
"dimension",
",",
"(",
"util",
".",
"basestring",
",",
"tuple",
")",
")",
":... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Dataset.select | Applies selection by dimension name
Applies a selection along the dimensions of the object using
keyword arguments. The selection may be narrowed to certain
objects using selection_specs. For container objects the
selection will be applied to all children as well.
Selections ma... | holoviews/core/data/__init__.py | def select(self, selection_specs=None, **selection):
"""Applies selection by dimension name
Applies a selection along the dimensions of the object using
keyword arguments. The selection may be narrowed to certain
objects using selection_specs. For container objects the
selection... | def select(self, selection_specs=None, **selection):
"""Applies selection by dimension name
Applies a selection along the dimensions of the object using
keyword arguments. The selection may be narrowed to certain
objects using selection_specs. For container objects the
selection... | [
"Applies",
"selection",
"by",
"dimension",
"name"
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/data/__init__.py#L338-L389 | [
"def",
"select",
"(",
"self",
",",
"selection_specs",
"=",
"None",
",",
"*",
"*",
"selection",
")",
":",
"if",
"selection_specs",
"is",
"not",
"None",
"and",
"not",
"isinstance",
"(",
"selection_specs",
",",
"(",
"list",
",",
"tuple",
")",
")",
":",
"s... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Dataset.reindex | Reindexes Dataset dropping static or supplied kdims
Creates a new object with a reordered or reduced set of key
dimensions. By default drops all non-varying key dimensions.x
Args:
kdims (optional): New list of key dimensionsx
vdims (optional): New list of value dimensio... | holoviews/core/data/__init__.py | def reindex(self, kdims=None, vdims=None):
"""Reindexes Dataset dropping static or supplied kdims
Creates a new object with a reordered or reduced set of key
dimensions. By default drops all non-varying key dimensions.x
Args:
kdims (optional): New list of key dimensionsx
... | def reindex(self, kdims=None, vdims=None):
"""Reindexes Dataset dropping static or supplied kdims
Creates a new object with a reordered or reduced set of key
dimensions. By default drops all non-varying key dimensions.x
Args:
kdims (optional): New list of key dimensionsx
... | [
"Reindexes",
"Dataset",
"dropping",
"static",
"or",
"supplied",
"kdims"
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/data/__init__.py#L392-L436 | [
"def",
"reindex",
"(",
"self",
",",
"kdims",
"=",
"None",
",",
"vdims",
"=",
"None",
")",
":",
"gridded",
"=",
"self",
".",
"interface",
".",
"gridded",
"scalars",
"=",
"[",
"]",
"if",
"gridded",
":",
"coords",
"=",
"[",
"(",
"d",
",",
"self",
".... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Dataset.sample | Samples values at supplied coordinates.
Allows sampling of element with a list of coordinates matching
the key dimensions, returning a new object containing just the
selected samples. Supports multiple signatures:
Sampling with a list of coordinates, e.g.:
ds.sample([(0, 0... | holoviews/core/data/__init__.py | def sample(self, samples=[], bounds=None, closest=True, **kwargs):
"""Samples values at supplied coordinates.
Allows sampling of element with a list of coordinates matching
the key dimensions, returning a new object containing just the
selected samples. Supports multiple signatures:
... | def sample(self, samples=[], bounds=None, closest=True, **kwargs):
"""Samples values at supplied coordinates.
Allows sampling of element with a list of coordinates matching
the key dimensions, returning a new object containing just the
selected samples. Supports multiple signatures:
... | [
"Samples",
"values",
"at",
"supplied",
"coordinates",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/data/__init__.py#L483-L585 | [
"def",
"sample",
"(",
"self",
",",
"samples",
"=",
"[",
"]",
",",
"bounds",
"=",
"None",
",",
"closest",
"=",
"True",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"kwargs",
"and",
"samples",
"!=",
"[",
"]",
":",
"raise",
"Exception",
"(",
"'Supply expl... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Dataset.reduce | Applies reduction along the specified dimension(s).
Allows reducing the values along one or more key dimension
with the supplied function. Supports two signatures:
Reducing with a list of dimensions, e.g.:
ds.reduce(['x'], np.mean)
Defining a reduction using keywords, e.g... | holoviews/core/data/__init__.py | def reduce(self, dimensions=[], function=None, spreadfn=None, **reductions):
"""Applies reduction along the specified dimension(s).
Allows reducing the values along one or more key dimension
with the supplied function. Supports two signatures:
Reducing with a list of dimensions, e.g.:
... | def reduce(self, dimensions=[], function=None, spreadfn=None, **reductions):
"""Applies reduction along the specified dimension(s).
Allows reducing the values along one or more key dimension
with the supplied function. Supports two signatures:
Reducing with a list of dimensions, e.g.:
... | [
"Applies",
"reduction",
"along",
"the",
"specified",
"dimension",
"(",
"s",
")",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/data/__init__.py#L588-L620 | [
"def",
"reduce",
"(",
"self",
",",
"dimensions",
"=",
"[",
"]",
",",
"function",
"=",
"None",
",",
"spreadfn",
"=",
"None",
",",
"*",
"*",
"reductions",
")",
":",
"if",
"any",
"(",
"dim",
"in",
"self",
".",
"vdims",
"for",
"dim",
"in",
"dimensions"... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Dataset.aggregate | Aggregates data on the supplied dimensions.
Aggregates over the supplied key dimensions with the defined
function.
Args:
dimensions: Dimension(s) to aggregate on
Default to all key dimensions
function: Aggregation function to apply, e.g. numpy.mean
... | holoviews/core/data/__init__.py | def aggregate(self, dimensions=None, function=None, spreadfn=None, **kwargs):
"""Aggregates data on the supplied dimensions.
Aggregates over the supplied key dimensions with the defined
function.
Args:
dimensions: Dimension(s) to aggregate on
Default to all ... | def aggregate(self, dimensions=None, function=None, spreadfn=None, **kwargs):
"""Aggregates data on the supplied dimensions.
Aggregates over the supplied key dimensions with the defined
function.
Args:
dimensions: Dimension(s) to aggregate on
Default to all ... | [
"Aggregates",
"data",
"on",
"the",
"supplied",
"dimensions",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/data/__init__.py#L623-L685 | [
"def",
"aggregate",
"(",
"self",
",",
"dimensions",
"=",
"None",
",",
"function",
"=",
"None",
",",
"spreadfn",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"function",
"is",
"None",
":",
"raise",
"ValueError",
"(",
"\"The aggregate method require... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Dataset.groupby | Groups object by one or more dimensions
Applies groupby operation over the specified dimensions
returning an object of type container_type (expected to be
dictionary-like) containing the groups.
Args:
dimensions: Dimension(s) to group by
container_type: Type to ... | holoviews/core/data/__init__.py | def groupby(self, dimensions=[], container_type=HoloMap, group_type=None,
dynamic=False, **kwargs):
"""Groups object by one or more dimensions
Applies groupby operation over the specified dimensions
returning an object of type container_type (expected to be
dictionary-li... | def groupby(self, dimensions=[], container_type=HoloMap, group_type=None,
dynamic=False, **kwargs):
"""Groups object by one or more dimensions
Applies groupby operation over the specified dimensions
returning an object of type container_type (expected to be
dictionary-li... | [
"Groups",
"object",
"by",
"one",
"or",
"more",
"dimensions"
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/data/__init__.py#L688-L735 | [
"def",
"groupby",
"(",
"self",
",",
"dimensions",
"=",
"[",
"]",
",",
"container_type",
"=",
"HoloMap",
",",
"group_type",
"=",
"None",
",",
"dynamic",
"=",
"False",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"not",
"isinstance",
"(",
"dimensions",
",",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Dataset.dimension_values | Return the values along the requested dimension.
Args:
dimension: The dimension to return values for
expanded (bool, optional): Whether to expand values
Whether to return the expanded values, behavior depends
on the type of data:
* Colum... | holoviews/core/data/__init__.py | def dimension_values(self, dimension, expanded=True, flat=True):
"""Return the values along the requested dimension.
Args:
dimension: The dimension to return values for
expanded (bool, optional): Whether to expand values
Whether to return the expanded values, beh... | def dimension_values(self, dimension, expanded=True, flat=True):
"""Return the values along the requested dimension.
Args:
dimension: The dimension to return values for
expanded (bool, optional): Whether to expand values
Whether to return the expanded values, beh... | [
"Return",
"the",
"values",
"along",
"the",
"requested",
"dimension",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/data/__init__.py#L753-L770 | [
"def",
"dimension_values",
"(",
"self",
",",
"dimension",
",",
"expanded",
"=",
"True",
",",
"flat",
"=",
"True",
")",
":",
"dim",
"=",
"self",
".",
"get_dimension",
"(",
"dimension",
",",
"strict",
"=",
"True",
")",
"return",
"self",
".",
"interface",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Dataset.get_dimension_type | Get the type of the requested dimension.
Type is determined by Dimension.type attribute or common
type of the dimension values, otherwise None.
Args:
dimension: Dimension to look up by name or by index
Returns:
Declared type of values along the dimension | holoviews/core/data/__init__.py | def get_dimension_type(self, dim):
"""Get the type of the requested dimension.
Type is determined by Dimension.type attribute or common
type of the dimension values, otherwise None.
Args:
dimension: Dimension to look up by name or by index
Returns:
Decl... | def get_dimension_type(self, dim):
"""Get the type of the requested dimension.
Type is determined by Dimension.type attribute or common
type of the dimension values, otherwise None.
Args:
dimension: Dimension to look up by name or by index
Returns:
Decl... | [
"Get",
"the",
"type",
"of",
"the",
"requested",
"dimension",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/data/__init__.py#L773-L788 | [
"def",
"get_dimension_type",
"(",
"self",
",",
"dim",
")",
":",
"dim_obj",
"=",
"self",
".",
"get_dimension",
"(",
"dim",
")",
"if",
"dim_obj",
"and",
"dim_obj",
".",
"type",
"is",
"not",
"None",
":",
"return",
"dim_obj",
".",
"type",
"return",
"self",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Dataset.dframe | Convert dimension values to DataFrame.
Returns a pandas dataframe of columns along each dimension,
either completely flat or indexed by key dimensions.
Args:
dimensions: Dimensions to return as columns
multi_index: Convert key dimensions to (multi-)index
Return... | holoviews/core/data/__init__.py | def dframe(self, dimensions=None, multi_index=False):
"""Convert dimension values to DataFrame.
Returns a pandas dataframe of columns along each dimension,
either completely flat or indexed by key dimensions.
Args:
dimensions: Dimensions to return as columns
mul... | def dframe(self, dimensions=None, multi_index=False):
"""Convert dimension values to DataFrame.
Returns a pandas dataframe of columns along each dimension,
either completely flat or indexed by key dimensions.
Args:
dimensions: Dimensions to return as columns
mul... | [
"Convert",
"dimension",
"values",
"to",
"DataFrame",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/data/__init__.py#L791-L811 | [
"def",
"dframe",
"(",
"self",
",",
"dimensions",
"=",
"None",
",",
"multi_index",
"=",
"False",
")",
":",
"if",
"dimensions",
"is",
"None",
":",
"dimensions",
"=",
"[",
"d",
".",
"name",
"for",
"d",
"in",
"self",
".",
"dimensions",
"(",
")",
"]",
"... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Dataset.columns | Convert dimension values to a dictionary.
Returns a dictionary of column arrays along each dimension
of the element.
Args:
dimensions: Dimensions to return as columns
Returns:
Dictionary of arrays for each dimension | holoviews/core/data/__init__.py | def columns(self, dimensions=None):
"""Convert dimension values to a dictionary.
Returns a dictionary of column arrays along each dimension
of the element.
Args:
dimensions: Dimensions to return as columns
Returns:
Dictionary of arrays for each dimensio... | def columns(self, dimensions=None):
"""Convert dimension values to a dictionary.
Returns a dictionary of column arrays along each dimension
of the element.
Args:
dimensions: Dimensions to return as columns
Returns:
Dictionary of arrays for each dimensio... | [
"Convert",
"dimension",
"values",
"to",
"a",
"dictionary",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/data/__init__.py#L814-L830 | [
"def",
"columns",
"(",
"self",
",",
"dimensions",
"=",
"None",
")",
":",
"if",
"dimensions",
"is",
"None",
":",
"dimensions",
"=",
"self",
".",
"dimensions",
"(",
")",
"else",
":",
"dimensions",
"=",
"[",
"self",
".",
"get_dimension",
"(",
"d",
",",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Dataset.clone | Clones the object, overriding data and parameters.
Args:
data: New data replacing the existing data
shared_data (bool, optional): Whether to use existing data
new_type (optional): Type to cast object to
*args: Additional arguments to pass to constructor
... | holoviews/core/data/__init__.py | def clone(self, data=None, shared_data=True, new_type=None, *args, **overrides):
"""Clones the object, overriding data and parameters.
Args:
data: New data replacing the existing data
shared_data (bool, optional): Whether to use existing data
new_type (optional): Typ... | def clone(self, data=None, shared_data=True, new_type=None, *args, **overrides):
"""Clones the object, overriding data and parameters.
Args:
data: New data replacing the existing data
shared_data (bool, optional): Whether to use existing data
new_type (optional): Typ... | [
"Clones",
"the",
"object",
"overriding",
"data",
"and",
"parameters",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/data/__init__.py#L839-L855 | [
"def",
"clone",
"(",
"self",
",",
"data",
"=",
"None",
",",
"shared_data",
"=",
"True",
",",
"new_type",
"=",
"None",
",",
"*",
"args",
",",
"*",
"*",
"overrides",
")",
":",
"if",
"'datatype'",
"not",
"in",
"overrides",
":",
"datatypes",
"=",
"[",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | _rc_context | Context manager that temporarily overrides the pyplot rcParams. | holoviews/plotting/mpl/plot.py | def _rc_context(rcparams):
"""
Context manager that temporarily overrides the pyplot rcParams.
"""
deprecated = ['text.latex.unicode', 'examples.directory']
old_rcparams = {k: mpl.rcParams[k] for k in mpl.rcParams.keys()
if mpl_version < '3.0' or k not in deprecated}
mpl.rcPa... | def _rc_context(rcparams):
"""
Context manager that temporarily overrides the pyplot rcParams.
"""
deprecated = ['text.latex.unicode', 'examples.directory']
old_rcparams = {k: mpl.rcParams[k] for k in mpl.rcParams.keys()
if mpl_version < '3.0' or k not in deprecated}
mpl.rcPa... | [
"Context",
"manager",
"that",
"temporarily",
"overrides",
"the",
"pyplot",
"rcParams",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/mpl/plot.py#L26-L39 | [
"def",
"_rc_context",
"(",
"rcparams",
")",
":",
"deprecated",
"=",
"[",
"'text.latex.unicode'",
",",
"'examples.directory'",
"]",
"old_rcparams",
"=",
"{",
"k",
":",
"mpl",
".",
"rcParams",
"[",
"k",
"]",
"for",
"k",
"in",
"mpl",
".",
"rcParams",
".",
"... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | mpl_rc_context | Decorator for MPLPlot methods applying the matplotlib rc params
in the plots fig_rcparams while when method is called. | holoviews/plotting/mpl/plot.py | def mpl_rc_context(f):
"""
Decorator for MPLPlot methods applying the matplotlib rc params
in the plots fig_rcparams while when method is called.
"""
def wrapper(self, *args, **kwargs):
with _rc_context(self.fig_rcparams):
return f(self, *args, **kwargs)
return wrapper | def mpl_rc_context(f):
"""
Decorator for MPLPlot methods applying the matplotlib rc params
in the plots fig_rcparams while when method is called.
"""
def wrapper(self, *args, **kwargs):
with _rc_context(self.fig_rcparams):
return f(self, *args, **kwargs)
return wrapper | [
"Decorator",
"for",
"MPLPlot",
"methods",
"applying",
"the",
"matplotlib",
"rc",
"params",
"in",
"the",
"plots",
"fig_rcparams",
"while",
"when",
"method",
"is",
"called",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/mpl/plot.py#L41-L49 | [
"def",
"mpl_rc_context",
"(",
"f",
")",
":",
"def",
"wrapper",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"with",
"_rc_context",
"(",
"self",
".",
"fig_rcparams",
")",
":",
"return",
"f",
"(",
"self",
",",
"*",
"args",
",",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | MPLPlot._init_axis | Return an axis which may need to be initialized from
a new figure. | holoviews/plotting/mpl/plot.py | def _init_axis(self, fig, axis):
"""
Return an axis which may need to be initialized from
a new figure.
"""
if not fig and self._create_fig:
fig = plt.figure()
l, b, r, t = self.fig_bounds
inches = self.fig_inches
fig.subplots_adjus... | def _init_axis(self, fig, axis):
"""
Return an axis which may need to be initialized from
a new figure.
"""
if not fig and self._create_fig:
fig = plt.figure()
l, b, r, t = self.fig_bounds
inches = self.fig_inches
fig.subplots_adjus... | [
"Return",
"an",
"axis",
"which",
"may",
"need",
"to",
"be",
"initialized",
"from",
"a",
"new",
"figure",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/mpl/plot.py#L154-L176 | [
"def",
"_init_axis",
"(",
"self",
",",
"fig",
",",
"axis",
")",
":",
"if",
"not",
"fig",
"and",
"self",
".",
"_create_fig",
":",
"fig",
"=",
"plt",
".",
"figure",
"(",
")",
"l",
",",
"b",
",",
"r",
",",
"t",
"=",
"self",
".",
"fig_bounds",
"inc... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | MPLPlot._finalize_axis | General method to finalize the axis and plot. | holoviews/plotting/mpl/plot.py | def _finalize_axis(self, key):
"""
General method to finalize the axis and plot.
"""
if 'title' in self.handles:
self.handles['title'].set_visible(self.show_title)
self.drawn = True
if self.subplot:
return self.handles['axis']
else:
... | def _finalize_axis(self, key):
"""
General method to finalize the axis and plot.
"""
if 'title' in self.handles:
self.handles['title'].set_visible(self.show_title)
self.drawn = True
if self.subplot:
return self.handles['axis']
else:
... | [
"General",
"method",
"to",
"finalize",
"the",
"axis",
"and",
"plot",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/mpl/plot.py#L206-L220 | [
"def",
"_finalize_axis",
"(",
"self",
",",
"key",
")",
":",
"if",
"'title'",
"in",
"self",
".",
"handles",
":",
"self",
".",
"handles",
"[",
"'title'",
"]",
".",
"set_visible",
"(",
"self",
".",
"show_title",
")",
"self",
".",
"drawn",
"=",
"True",
"... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | MPLPlot.anim | Method to return a matplotlib animation. The start and stop
frames may be specified as well as the fps. | holoviews/plotting/mpl/plot.py | def anim(self, start=0, stop=None, fps=30):
"""
Method to return a matplotlib animation. The start and stop
frames may be specified as well as the fps.
"""
figure = self.state or self.initialize_plot()
anim = animation.FuncAnimation(figure, self.update_frame,
... | def anim(self, start=0, stop=None, fps=30):
"""
Method to return a matplotlib animation. The start and stop
frames may be specified as well as the fps.
"""
figure = self.state or self.initialize_plot()
anim = animation.FuncAnimation(figure, self.update_frame,
... | [
"Method",
"to",
"return",
"a",
"matplotlib",
"animation",
".",
"The",
"start",
"and",
"stop",
"frames",
"may",
"be",
"specified",
"as",
"well",
"as",
"the",
"fps",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/mpl/plot.py#L227-L238 | [
"def",
"anim",
"(",
"self",
",",
"start",
"=",
"0",
",",
"stop",
"=",
"None",
",",
"fps",
"=",
"30",
")",
":",
"figure",
"=",
"self",
".",
"state",
"or",
"self",
".",
"initialize_plot",
"(",
")",
"anim",
"=",
"animation",
".",
"FuncAnimation",
"(",... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | AdjointLayoutPlot.initialize_plot | Plot all the views contained in the AdjointLayout Object using axes
appropriate to the layout configuration. All the axes are
supplied by LayoutPlot - the purpose of the call is to
invoke subplots with correct options and styles and hide any
empty axes as necessary. | holoviews/plotting/mpl/plot.py | def initialize_plot(self, ranges=None):
"""
Plot all the views contained in the AdjointLayout Object using axes
appropriate to the layout configuration. All the axes are
supplied by LayoutPlot - the purpose of the call is to
invoke subplots with correct options and styles and hid... | def initialize_plot(self, ranges=None):
"""
Plot all the views contained in the AdjointLayout Object using axes
appropriate to the layout configuration. All the axes are
supplied by LayoutPlot - the purpose of the call is to
invoke subplots with correct options and styles and hid... | [
"Plot",
"all",
"the",
"views",
"contained",
"in",
"the",
"AdjointLayout",
"Object",
"using",
"axes",
"appropriate",
"to",
"the",
"layout",
"configuration",
".",
"All",
"the",
"axes",
"are",
"supplied",
"by",
"LayoutPlot",
"-",
"the",
"purpose",
"of",
"the",
... | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/mpl/plot.py#L641-L661 | [
"def",
"initialize_plot",
"(",
"self",
",",
"ranges",
"=",
"None",
")",
":",
"for",
"pos",
"in",
"self",
".",
"view_positions",
":",
"# Pos will be one of 'main', 'top' or 'right' or None",
"view",
"=",
"self",
".",
"layout",
".",
"get",
"(",
"pos",
",",
"None... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | AdjointLayoutPlot.adjust_positions | Make adjustments to the positions of subplots (if available)
relative to the main plot axes as required.
This method is called by LayoutPlot after an initial pass
used to position all the Layouts together. This method allows
LayoutPlots to make final adjustments to the axis positions. | holoviews/plotting/mpl/plot.py | def adjust_positions(self, redraw=True):
"""
Make adjustments to the positions of subplots (if available)
relative to the main plot axes as required.
This method is called by LayoutPlot after an initial pass
used to position all the Layouts together. This method allows
L... | def adjust_positions(self, redraw=True):
"""
Make adjustments to the positions of subplots (if available)
relative to the main plot axes as required.
This method is called by LayoutPlot after an initial pass
used to position all the Layouts together. This method allows
L... | [
"Make",
"adjustments",
"to",
"the",
"positions",
"of",
"subplots",
"(",
"if",
"available",
")",
"relative",
"to",
"the",
"main",
"plot",
"axes",
"as",
"required",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/mpl/plot.py#L664-L709 | [
"def",
"adjust_positions",
"(",
"self",
",",
"redraw",
"=",
"True",
")",
":",
"checks",
"=",
"[",
"self",
".",
"view_positions",
",",
"self",
".",
"subaxes",
",",
"self",
".",
"subplots",
"]",
"right",
"=",
"all",
"(",
"'right'",
"in",
"check",
"for",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | LayoutPlot._compute_gridspec | Computes the tallest and widest cell for each row and column
by examining the Layouts in the GridSpace. The GridSpec is then
instantiated and the LayoutPlots are configured with the
appropriate embedded layout_types. The first element of the
returned tuple is a dictionary of all the Layo... | holoviews/plotting/mpl/plot.py | def _compute_gridspec(self, layout):
"""
Computes the tallest and widest cell for each row and column
by examining the Layouts in the GridSpace. The GridSpec is then
instantiated and the LayoutPlots are configured with the
appropriate embedded layout_types. The first element of t... | def _compute_gridspec(self, layout):
"""
Computes the tallest and widest cell for each row and column
by examining the Layouts in the GridSpace. The GridSpec is then
instantiated and the LayoutPlots are configured with the
appropriate embedded layout_types. The first element of t... | [
"Computes",
"the",
"tallest",
"and",
"widest",
"cell",
"for",
"each",
"row",
"and",
"column",
"by",
"examining",
"the",
"Layouts",
"in",
"the",
"GridSpace",
".",
"The",
"GridSpec",
"is",
"then",
"instantiated",
"and",
"the",
"LayoutPlots",
"are",
"configured",... | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/mpl/plot.py#L775-L980 | [
"def",
"_compute_gridspec",
"(",
"self",
",",
"layout",
")",
":",
"layout_items",
"=",
"layout",
".",
"grid_items",
"(",
")",
"layout_dimensions",
"=",
"layout",
".",
"kdims",
"if",
"isinstance",
"(",
"layout",
",",
"NdLayout",
")",
"else",
"None",
"layouts"... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | LayoutPlot.grid_situate | Situate the current AdjointLayoutPlot in a LayoutPlot. The
LayoutPlot specifies a layout_type into which the AdjointLayoutPlot
must be embedded. This enclosing layout is guaranteed to have
enough cells to display all the views.
Based on this enforced layout format, a starting index
... | holoviews/plotting/mpl/plot.py | def grid_situate(self, current_idx, layout_type, subgrid_width):
"""
Situate the current AdjointLayoutPlot in a LayoutPlot. The
LayoutPlot specifies a layout_type into which the AdjointLayoutPlot
must be embedded. This enclosing layout is guaranteed to have
enough cells to displa... | def grid_situate(self, current_idx, layout_type, subgrid_width):
"""
Situate the current AdjointLayoutPlot in a LayoutPlot. The
LayoutPlot specifies a layout_type into which the AdjointLayoutPlot
must be embedded. This enclosing layout is guaranteed to have
enough cells to displa... | [
"Situate",
"the",
"current",
"AdjointLayoutPlot",
"in",
"a",
"LayoutPlot",
".",
"The",
"LayoutPlot",
"specifies",
"a",
"layout_type",
"into",
"which",
"the",
"AdjointLayoutPlot",
"must",
"be",
"embedded",
".",
"This",
"enclosing",
"layout",
"is",
"guaranteed",
"to... | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/mpl/plot.py#L983-L1014 | [
"def",
"grid_situate",
"(",
"self",
",",
"current_idx",
",",
"layout_type",
",",
"subgrid_width",
")",
":",
"# Set the layout configuration as situated in a NdLayout",
"if",
"layout_type",
"==",
"'Single'",
":",
"start",
",",
"inds",
"=",
"current_idx",
"+",
"1",
",... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | LayoutPlot._create_subplots | Plot all the views contained in the AdjointLayout Object using axes
appropriate to the layout configuration. All the axes are
supplied by LayoutPlot - the purpose of the call is to
invoke subplots with correct options and styles and hide any
empty axes as necessary. | holoviews/plotting/mpl/plot.py | def _create_subplots(self, layout, positions, layout_dimensions, ranges, axes={}, num=1, create=True):
"""
Plot all the views contained in the AdjointLayout Object using axes
appropriate to the layout configuration. All the axes are
supplied by LayoutPlot - the purpose of the call is to
... | def _create_subplots(self, layout, positions, layout_dimensions, ranges, axes={}, num=1, create=True):
"""
Plot all the views contained in the AdjointLayout Object using axes
appropriate to the layout configuration. All the axes are
supplied by LayoutPlot - the purpose of the call is to
... | [
"Plot",
"all",
"the",
"views",
"contained",
"in",
"the",
"AdjointLayout",
"Object",
"using",
"axes",
"appropriate",
"to",
"the",
"layout",
"configuration",
".",
"All",
"the",
"axes",
"are",
"supplied",
"by",
"LayoutPlot",
"-",
"the",
"purpose",
"of",
"the",
... | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/plotting/mpl/plot.py#L1017-L1083 | [
"def",
"_create_subplots",
"(",
"self",
",",
"layout",
",",
"positions",
",",
"layout_dimensions",
",",
"ranges",
",",
"axes",
"=",
"{",
"}",
",",
"num",
"=",
"1",
",",
"create",
"=",
"True",
")",
":",
"subplots",
"=",
"{",
"}",
"projections",
"=",
"... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | triggering_streams | Temporarily declares the streams as being in a triggered state.
Needed by DynamicMap to determine whether to memoize on a Callable,
i.e. if a stream has memoization disabled and is in triggered state
Callable should disable lookup in the memoization cache. This is
done by the dynamicmap_memoization cont... | holoviews/streams.py | def triggering_streams(streams):
"""
Temporarily declares the streams as being in a triggered state.
Needed by DynamicMap to determine whether to memoize on a Callable,
i.e. if a stream has memoization disabled and is in triggered state
Callable should disable lookup in the memoization cache. This i... | def triggering_streams(streams):
"""
Temporarily declares the streams as being in a triggered state.
Needed by DynamicMap to determine whether to memoize on a Callable,
i.e. if a stream has memoization disabled and is in triggered state
Callable should disable lookup in the memoization cache. This i... | [
"Temporarily",
"declares",
"the",
"streams",
"as",
"being",
"in",
"a",
"triggered",
"state",
".",
"Needed",
"by",
"DynamicMap",
"to",
"determine",
"whether",
"to",
"memoize",
"on",
"a",
"Callable",
"i",
".",
"e",
".",
"if",
"a",
"stream",
"has",
"memoizati... | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/streams.py#L24-L40 | [
"def",
"triggering_streams",
"(",
"streams",
")",
":",
"for",
"stream",
"in",
"streams",
":",
"stream",
".",
"_triggering",
"=",
"True",
"try",
":",
"yield",
"except",
":",
"raise",
"finally",
":",
"for",
"stream",
"in",
"streams",
":",
"stream",
".",
"_... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Stream.define | Utility to quickly and easily declare Stream classes. Designed
for interactive use such as notebooks and shouldn't replace
parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each
keyword becomes a parameter. If the valu... | holoviews/streams.py | def define(cls, name, **kwargs):
"""
Utility to quickly and easily declare Stream classes. Designed
for interactive use such as notebooks and shouldn't replace
parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where ... | def define(cls, name, **kwargs):
"""
Utility to quickly and easily declare Stream classes. Designed
for interactive use such as notebooks and shouldn't replace
parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where ... | [
"Utility",
"to",
"quickly",
"and",
"easily",
"declare",
"Stream",
"classes",
".",
"Designed",
"for",
"interactive",
"use",
"such",
"as",
"notebooks",
"and",
"shouldn",
"t",
"replace",
"parameterized",
"class",
"definitions",
"in",
"source",
"code",
"that",
"is",... | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/streams.py#L86-L124 | [
"def",
"define",
"(",
"cls",
",",
"name",
",",
"*",
"*",
"kwargs",
")",
":",
"params",
"=",
"{",
"'name'",
":",
"param",
".",
"String",
"(",
"default",
"=",
"name",
")",
"}",
"for",
"k",
",",
"v",
"in",
"kwargs",
".",
"items",
"(",
")",
":",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Stream.trigger | Given a list of streams, collect all the stream parameters into
a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a
subscriber may be set multiple times across streams but only
needs to be called once. | holoviews/streams.py | def trigger(cls, streams):
"""
Given a list of streams, collect all the stream parameters into
a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a
subscriber may be set multiple times across streams but only
... | def trigger(cls, streams):
"""
Given a list of streams, collect all the stream parameters into
a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a
subscriber may be set multiple times across streams but only
... | [
"Given",
"a",
"list",
"of",
"streams",
"collect",
"all",
"the",
"stream",
"parameters",
"into",
"a",
"dictionary",
"and",
"pass",
"it",
"to",
"the",
"union",
"set",
"of",
"subscribers",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/streams.py#L128-L171 | [
"def",
"trigger",
"(",
"cls",
",",
"streams",
")",
":",
"# Union of stream contents",
"items",
"=",
"[",
"stream",
".",
"contents",
".",
"items",
"(",
")",
"for",
"stream",
"in",
"set",
"(",
"streams",
")",
"]",
"union",
"=",
"[",
"kv",
"for",
"kvs",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Stream._process_streams | Processes a list of streams promoting Parameterized objects and
methods to Param based streams. | holoviews/streams.py | def _process_streams(cls, streams):
"""
Processes a list of streams promoting Parameterized objects and
methods to Param based streams.
"""
parameterizeds = defaultdict(set)
valid, invalid = [], []
for s in streams:
if isinstance(s, Stream):
... | def _process_streams(cls, streams):
"""
Processes a list of streams promoting Parameterized objects and
methods to Param based streams.
"""
parameterizeds = defaultdict(set)
valid, invalid = [], []
for s in streams:
if isinstance(s, Stream):
... | [
"Processes",
"a",
"list",
"of",
"streams",
"promoting",
"Parameterized",
"objects",
"and",
"methods",
"to",
"Param",
"based",
"streams",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/streams.py#L179-L214 | [
"def",
"_process_streams",
"(",
"cls",
",",
"streams",
")",
":",
"parameterizeds",
"=",
"defaultdict",
"(",
"set",
")",
"valid",
",",
"invalid",
"=",
"[",
"]",
",",
"[",
"]",
"for",
"s",
"in",
"streams",
":",
"if",
"isinstance",
"(",
"s",
",",
"Strea... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Stream.subscribers | Property returning the subscriber list | holoviews/streams.py | def subscribers(self):
"""Property returning the subscriber list"""
return [s for p, s in sorted(self._subscribers, key=lambda x: x[0])] | def subscribers(self):
"""Property returning the subscriber list"""
return [s for p, s in sorted(self._subscribers, key=lambda x: x[0])] | [
"Property",
"returning",
"the",
"subscriber",
"list"
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/streams.py#L259-L261 | [
"def",
"subscribers",
"(",
"self",
")",
":",
"return",
"[",
"s",
"for",
"p",
",",
"s",
"in",
"sorted",
"(",
"self",
".",
"_subscribers",
",",
"key",
"=",
"lambda",
"x",
":",
"x",
"[",
"0",
"]",
")",
"]"
] | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Stream.clear | Clear all subscribers registered to this stream.
The default policy of 'all' clears all subscribers. If policy is
set to 'user', only subscribers defined by the user are cleared
(precedence between zero and one). A policy of 'internal' clears
subscribers with precedence greater than uni... | holoviews/streams.py | def clear(self, policy='all'):
"""
Clear all subscribers registered to this stream.
The default policy of 'all' clears all subscribers. If policy is
set to 'user', only subscribers defined by the user are cleared
(precedence between zero and one). A policy of 'internal' clears
... | def clear(self, policy='all'):
"""
Clear all subscribers registered to this stream.
The default policy of 'all' clears all subscribers. If policy is
set to 'user', only subscribers defined by the user are cleared
(precedence between zero and one). A policy of 'internal' clears
... | [
"Clear",
"all",
"subscribers",
"registered",
"to",
"this",
"stream",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/streams.py#L264-L283 | [
"def",
"clear",
"(",
"self",
",",
"policy",
"=",
"'all'",
")",
":",
"policies",
"=",
"[",
"'all'",
",",
"'user'",
",",
"'internal'",
"]",
"if",
"policy",
"not",
"in",
"policies",
":",
"raise",
"ValueError",
"(",
"'Policy for clearing subscribers must be one of... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Stream.reset | Resets stream parameters to their defaults. | holoviews/streams.py | def reset(self):
"""
Resets stream parameters to their defaults.
"""
with util.disable_constant(self):
for k, p in self.params().items():
if k != 'name':
setattr(self, k, p.default) | def reset(self):
"""
Resets stream parameters to their defaults.
"""
with util.disable_constant(self):
for k, p in self.params().items():
if k != 'name':
setattr(self, k, p.default) | [
"Resets",
"stream",
"parameters",
"to",
"their",
"defaults",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/streams.py#L286-L293 | [
"def",
"reset",
"(",
"self",
")",
":",
"with",
"util",
".",
"disable_constant",
"(",
"self",
")",
":",
"for",
"k",
",",
"p",
"in",
"self",
".",
"params",
"(",
")",
".",
"items",
"(",
")",
":",
"if",
"k",
"!=",
"'name'",
":",
"setattr",
"(",
"se... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Stream.add_subscriber | Register a callable subscriber to this stream which will be
invoked either when event is called or when this stream is
passed to the trigger classmethod.
Precedence allows the subscriber ordering to be
controlled. Users should only add subscribers with precedence
between zero an... | holoviews/streams.py | def add_subscriber(self, subscriber, precedence=0):
"""
Register a callable subscriber to this stream which will be
invoked either when event is called or when this stream is
passed to the trigger classmethod.
Precedence allows the subscriber ordering to be
controlled. U... | def add_subscriber(self, subscriber, precedence=0):
"""
Register a callable subscriber to this stream which will be
invoked either when event is called or when this stream is
passed to the trigger classmethod.
Precedence allows the subscriber ordering to be
controlled. U... | [
"Register",
"a",
"callable",
"subscriber",
"to",
"this",
"stream",
"which",
"will",
"be",
"invoked",
"either",
"when",
"event",
"is",
"called",
"or",
"when",
"this",
"stream",
"is",
"passed",
"to",
"the",
"trigger",
"classmethod",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/streams.py#L296-L310 | [
"def",
"add_subscriber",
"(",
"self",
",",
"subscriber",
",",
"precedence",
"=",
"0",
")",
":",
"if",
"not",
"callable",
"(",
"subscriber",
")",
":",
"raise",
"TypeError",
"(",
"'Subscriber must be a callable.'",
")",
"self",
".",
"_subscribers",
".",
"append"... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Stream.rename | The rename method allows stream parameters to be allocated to
new names to avoid clashes with other stream parameters of the
same name. Returns a new clone of the stream instance with the
specified name mapping. | holoviews/streams.py | def rename(self, **mapping):
"""
The rename method allows stream parameters to be allocated to
new names to avoid clashes with other stream parameters of the
same name. Returns a new clone of the stream instance with the
specified name mapping.
"""
params = {k: v ... | def rename(self, **mapping):
"""
The rename method allows stream parameters to be allocated to
new names to avoid clashes with other stream parameters of the
same name. Returns a new clone of the stream instance with the
specified name mapping.
"""
params = {k: v ... | [
"The",
"rename",
"method",
"allows",
"stream",
"parameters",
"to",
"be",
"allocated",
"to",
"new",
"names",
"to",
"avoid",
"clashes",
"with",
"other",
"stream",
"parameters",
"of",
"the",
"same",
"name",
".",
"Returns",
"a",
"new",
"clone",
"of",
"the",
"s... | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/streams.py#L324-L334 | [
"def",
"rename",
"(",
"self",
",",
"*",
"*",
"mapping",
")",
":",
"params",
"=",
"{",
"k",
":",
"v",
"for",
"k",
",",
"v",
"in",
"self",
".",
"get_param_values",
"(",
")",
"if",
"k",
"!=",
"'name'",
"}",
"return",
"self",
".",
"__class__",
"(",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Stream._set_stream_parameters | Sets the stream parameters which are expected to be declared
constant. | holoviews/streams.py | def _set_stream_parameters(self, **kwargs):
"""
Sets the stream parameters which are expected to be declared
constant.
"""
with util.disable_constant(self):
self.param.set_param(**kwargs) | def _set_stream_parameters(self, **kwargs):
"""
Sets the stream parameters which are expected to be declared
constant.
"""
with util.disable_constant(self):
self.param.set_param(**kwargs) | [
"Sets",
"the",
"stream",
"parameters",
"which",
"are",
"expected",
"to",
"be",
"declared",
"constant",
"."
] | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/streams.py#L384-L390 | [
"def",
"_set_stream_parameters",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"with",
"util",
".",
"disable_constant",
"(",
"self",
")",
":",
"self",
".",
"param",
".",
"set_param",
"(",
"*",
"*",
"kwargs",
")"
] | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
train | Stream.update | The update method updates the stream parameters (without any
renaming applied) in response to some event. If the stream has a
custom transform method, this is applied to transform the
parameter values accordingly.
To update and trigger, use the event method. | holoviews/streams.py | def update(self, **kwargs):
"""
The update method updates the stream parameters (without any
renaming applied) in response to some event. If the stream has a
custom transform method, this is applied to transform the
parameter values accordingly.
To update and trigger, us... | def update(self, **kwargs):
"""
The update method updates the stream parameters (without any
renaming applied) in response to some event. If the stream has a
custom transform method, this is applied to transform the
parameter values accordingly.
To update and trigger, us... | [
"The",
"update",
"method",
"updates",
"the",
"stream",
"parameters",
"(",
"without",
"any",
"renaming",
"applied",
")",
"in",
"response",
"to",
"some",
"event",
".",
"If",
"the",
"stream",
"has",
"a",
"custom",
"transform",
"method",
"this",
"is",
"applied",... | pyviz/holoviews | python | https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/streams.py#L399-L411 | [
"def",
"update",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"self",
".",
"_set_stream_parameters",
"(",
"*",
"*",
"kwargs",
")",
"transformed",
"=",
"self",
".",
"transform",
"(",
")",
"if",
"transformed",
":",
"self",
".",
"_set_stream_parameters",
... | ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.