@@ -652,6 +652,7 @@ def __hash__(self):
652
652
# hashing them directly
653
653
#XXX: but we might want to include that normalization feature in
654
654
# to_tick directly, instead of using to_key explicitly here
655
+ # different name or axis hash to the same thing !
655
656
return hash (to_tick (to_key (self .key )))
656
657
657
658
def __eq__ (self , other ):
@@ -920,9 +921,10 @@ def full_key(self, key):
920
921
# handle keys containing ValueGroups (at potentially wrong places)
921
922
if any (isinstance (axis_key , ValueGroup ) for axis_key in key ):
922
923
#XXX: support ValueGroup without axis?
923
- listkey = [(axis_key .axis .name
924
- if isinstance (axis_key , ValueGroup )
925
- else axis_name , axis_key )
924
+ # extract axis name from ValueGroup keys
925
+ listkey = [(axis_key .axis .name if isinstance (axis_key , ValueGroup )
926
+ else axis_name ,
927
+ axis_key )
926
928
for axis_key , axis_name in zip (key , self .axes_names )]
927
929
dupe_axes = list (duplicates (k for k , v in listkey ))
928
930
if dupe_axes :
@@ -1311,6 +1313,9 @@ def translated_key(self, key):
1311
1313
for axis , k in zip (self .axes , key ))
1312
1314
1313
1315
def _df_axis_level (self , axis ):
1316
+ """
1317
+ translates LArray Axis spec into a Pandas axis + level
1318
+ """
1314
1319
axis_idx = self .axes .index (axis )
1315
1320
index_ndim = self ._df_index_ndim
1316
1321
if axis_idx < index_ndim :
0 commit comments