Skip to content

test(dtype): cover unicode fields in the structured default scalar test - #4496

Merged
d-v-b merged 1 commit into
zarr-developers:mainfrom
d-v-b:test/struct-default-scalar-unicode
Oct 9, 2026
Merged

d-v-b merged 1 commit into
zarr-developers:mainfrom
d-v-b:test/struct-default-scalar-unicode

Conversation

@d-v-b

@d-v-b d-v-b commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

🤖 AI text below 🤖

Structured data types now default string (S, U) and raw-bytes (V) fields to zero bytes. Before, an array with a raw-bytes field failed to create without an explicit fill value, and string fields defaulted to "0".

Summary

This is a follow-up to #4495. Moving from np.array([0], dtype)[0] to np.zeros(1, dtype)[0] also changed the default of U fields from '0' to '', but the test and the changelog entry only named S and V. This PR adds U4 to the parametrized test and rewords the unreleased changes/4495.bugfix.md entry.

For reviewers

There is no new fragment, because the behavior change already ships under #4495. The agent checked that all three test cases fail on the parent of #4495 and pass on main. No library code changes.

Author attestation

  • I am a human, these are my changes, and I have reviewed and understood every change and can explain why each is correct.

TODO

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions (no API change)
  • New/modified features documented in docs/user-guide/*.md (no feature change)
  • Changes documented as a new file in changes/ (edits the unreleased 4495.bugfix.md instead)
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

🤖 Generated with Claude Code

zarr-developers#4495 also changed the default of `U` fields in structured dtypes from
"0" to "". Add `U4` to the regression test and name string fields in
the changelog entry.

Assisted-by: ClaudeCode:claude-opus-5-5
@d-v-b
d-v-b marked this pull request as ready for review October 9, 2026 10:16
@d-v-b

d-v-b commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

teeny follow-up to #4495

@d-v-b
d-v-b merged commit 19e84dc into zarr-developers:main Oct 9, 2026
33 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.

1 participant