Skip to content

fix(arrow/tensor): default nil dimension names to empty strings#999

Open
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/tensor-nil-dimension-names
Open

fix(arrow/tensor): default nil dimension names to empty strings#999
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/tensor-nil-dimension-names

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

The tensor constructors document that nil dimension names are treated as empty strings, but the shared constructor left the slice nil. That makes DimName panic on an otherwise valid tensor.

This fills in one empty name per dimension and adds coverage for both DimNames and DimName.

Tests: go test ./arrow/tensor

@fallintoplace
fallintoplace requested a review from zeroshade as a code owner July 24, 2026 23:32
@fallintoplace fallintoplace changed the title fix(arrow/tensor): initialize missing dimension names fix(arrow/tensor): honor nil dimension names contract Jul 25, 2026
@fallintoplace fallintoplace changed the title fix(arrow/tensor): honor nil dimension names contract fix(arrow/tensor): treat nil dimension names as empty Jul 25, 2026
@fallintoplace fallintoplace changed the title fix(arrow/tensor): treat nil dimension names as empty fix(arrow/tensor): default nil dimension names to empty strings Jul 25, 2026
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