Repository navigation
Conversation
Preserve decoded list and NumPy array values while wrapping scalar temporal values. Cover NumPy-backed DS roundtrips without changing element types or container identity.
CPBridge
approved these changes
Oct 24, 2026
Collaborator
|
Thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A one-value TCOORD POINT returns a scalar from
valueeven though the API describes a sequence of time points.Select the stored attribute as before and wrap scalar values in a one-element list. Preserve
None,MultiValue, decoded ordinary lists, and NumPy arrays without copying or converting their elements. This also prevents decoded multi-value sample positions or NumPy-backed offsets from becoming nested containers. No DICOM tag or constructor change.Testing
Reproduced the decoded-list failure with real pydicom/highdicom: 1 failed, 13 passed.
Added real serialized/read-back DS NumPy regressions for one and two offsets; the two-value case failed on the intermediate list-only correction.
Complete
tests/test_sr.py: 328 passed on Python 3.12, pydicom 3.0.2, NumPy 2.3.5, and pytest 9.0.3.Changed-file Flake8 and
git diff --check: passed.Tests check values, element types, DICOM multiplicity, and stored-container identity, and restore pydicom configuration in
finally.Hosted CI on
165dbc61ea100bbf711b96f618ec7e3020354648: all 13 checks passed, including all 12 OS/Python/dependency-matrix jobs and codespell. Unit matrix.The complete repository matrix was validated by hosted CI; local validation covered the full SR module and changed-file lint.
Compatibility
Consumers relying on the accidental scalar result will observe a container. Multi-value container identity and pydicom element types are preserved; DS and DT values are not stringified.