-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Labels
Description
Currently sc.group fails if we select a coordinate name to group.
import scipp as sc
from scipp.data import table_xyz
da = table_xyz(100)
da.coords["str_coord"] = sc.array(dims=["row"], values=['a', 'b', 'c', 'd']*25)
da.group('str_coord') # AttributeError: 'scipp._scipp.core.ElementArrayView_string' object has no attribute 'size'But it works when the group-coordinate is given,
import scipp as sc
from scipp.data import table_xyz
da = table_xyz(100)
da.coords["str_coord"] = sc.array(dims=["row"], values=['a', 'b', 'c', 'd']*25)
da.group(sc.array(dims=['str_coord'], values=['a', 'b', 'c', 'd'])) # worksWe should also support selecting the coordinate name of string type coordinate for grouping.
Related to #290
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done