holoviews.core.data.multipath module#
- class holoviews.core.data.multipath.MultiInterface(*, name)[source]#
Bases:
Interface
MultiInterface allows wrapping around a list of tabular datasets including dataframes, the columnar dictionary format or 2D tabular NumPy arrays. Using the split method the list of tabular data can be split into individual datasets.
The interface makes the data appear a list of tabular datasets as a single dataset. The interface may be used to represent geometries so the behavior depends on the type of geometry being represented.
Parameter Definitions
- classmethod isscalar(dataset, dim, per_geom=False)[source]#
Tests if dimension is scalar in each subpath.
- classmethod length(dataset)[source]#
Returns the length of the multi-tabular dataset making it appear like a single array of concatenated subpaths separated by NaN values.
- classmethod select(dataset, selection_mask=None, **selection)[source]#
Applies selectiong on all the subpaths.
- classmethod select_paths(dataset, index)[source]#
Allows selecting paths with usual NumPy slicing index.
- classmethod shape(dataset)[source]#
Returns the shape of all subpaths, making it appear like a single array of concatenated subpaths separated by NaN values.
- holoviews.core.data.multipath.ensure_ring(geom, values=None)[source]#
Ensure the (multi-)geometry forms a ring.
Checks the start- and end-point of each geometry to ensure they form a ring, if not the start point is inserted at the end point. If a values array is provided (which must match the geometry in length) then the insertion will occur on the values instead, ensuring that they will match the ring geometry.
Parameters#
- geom
2-D array of geometry coordinates
- values
Optional array of values
Returns#
Array where values have been inserted and ring closing indexes