@@ -101,6 +101,8 @@ def __init__(self, obj, group, squeeze=False, grouper=None):
101
101
"""
102
102
from .dataset import as_dataset
103
103
104
+ if getattr (group , 'name' , None ) is None :
105
+ raise ValueError ('`group` must have a name' )
104
106
self ._stacked_dim = None
105
107
group_name = group .name
106
108
if group .ndim != 1 :
@@ -119,8 +121,6 @@ def __init__(self, obj, group, squeeze=False, grouper=None):
119
121
# we also need to rename the group name to avoid a conflict when
120
122
# concatenating
121
123
group_name += '_groups'
122
- if getattr (group , 'name' , None ) is None :
123
- raise ValueError ('`group` must have a name' )
124
124
if not hasattr (group , 'dims' ):
125
125
raise ValueError ("`group` must have a 'dims' attribute" )
126
126
group_dim , = group .dims
@@ -412,7 +412,7 @@ def _concat(self, applied, shortcut=False):
412
412
# peek at applied to determine which coordinate to stack over
413
413
applied_example , applied = peek_at (applied )
414
414
concat_dim , positions = self ._infer_concat_args (applied_example )
415
-
415
+ print ( 'concat_dim and positions' , concat_dim , positions )
416
416
if shortcut :
417
417
combined = self ._concat_shortcut (applied , concat_dim , positions )
418
418
else :
0 commit comments