Skip to content

Conversation

@d-v-b
Copy link
Contributor

@d-v-b d-v-b commented Feb 12, 2026

closes #3680

@github-actions github-actions bot added the needs release notes Automatically applied to PRs which haven't added release notes label Feb 12, 2026
@github-actions github-actions bot removed the needs release notes Automatically applied to PRs which haven't added release notes label Feb 12, 2026
@d-v-b d-v-b requested a review from a team February 12, 2026 19:53
Comment on lines 196 to 200
try:
data_tuple = tuple(data)
except TypeError as e:
msg = f"Expected an integer or an iterable of integers. Got {data} instead."
raise TypeError(msg) from e
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this be consolidated with L210?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's invalid stuff (dict keys, strings) that could come out of an iterable data and be converted to int without any error. If data is ["0", "1"], then tuple(int(x) for x in data) will not error, and then we are accepting strings as shapes, which I didn't want to do here. So I think we need to end up calling tuple twice.

@d-v-b d-v-b enabled auto-merge (squash) February 12, 2026 21:11
@d-v-b d-v-b merged commit a06318e into zarr-developers:main Feb 12, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't use numpy types for array shapes

2 participants