Skip to content

Commit

Permalink
Improved docstrings in /core/traversal.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jlstevens committed Feb 7, 2015
1 parent 00f4c87 commit 4f56fb6
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions holoviews/core/traversal.py
@@ -1,6 +1,7 @@
"""
Advanced utilities for traversing nesting/hierarchical Dimensioned
objects either to inspect the structure of their declared dimensions.
objects either to inspect the structure of their declared dimensions
or mutate the matching elements.
"""

from operator import itemgetter
Expand All @@ -15,10 +16,9 @@ def create_ndkey(length, indexes, values):

def uniform(obj):
"""
Finds all common dimension keys in the object
including subsets of dimensions. If there are
is no common subset of dimensions, None is
returned.
Finds all common dimension keys in the object including subsets of
dimensions. If there are is no common subset of dimensions, None
is returned.
"""
dim_groups = obj.traverse(lambda x: tuple(x.key_dimensions),
('HoloMap',))
Expand All @@ -30,10 +30,12 @@ def uniform(obj):

def unique_dimkeys(obj, default_dim='Frame'):
"""
Finds all common dimension keys in the object
including subsets of dimensions. If there are
is no common subset of dimensions, None is
returned.
Finds all common dimension keys in the object including subsets of
dimensions. If there are is no common subset of dimensions, None
is returned.
Returns the list of dimensions followed by the list of unique
keys.
"""
from .ndmapping import NdMapping
key_dims = obj.traverse(lambda x: (tuple(x.key_dimensions),
Expand Down

0 comments on commit 4f56fb6

Please sign in to comment.