Skip to content

DataGroup.__setitem__ fails to prevent non-string keys #3182

@SimonHeybrock

Description

@SimonHeybrock
import scipp as sc

ds = sc.DataGroup(a=sc.arange('x', 4))
ds[1] = sc.scalar(666)  # User expects to set a slice
ds._items  # Item with int key was added

Note that things such as DataGroup._repr_html_ raise a weird error with such a DataGroup.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions