Skip to content

Add better error messages if axis/axes are not part of tensor (#6). - #20

Merged
benikm91 merged 1 commit into
mainfrom
nice-error-messages
Jan 2, 2026
Merged

Add better error messages if axis/axes are not part of tensor (#6).#20
benikm91 merged 1 commit into
mainfrom
nice-error-messages

Conversation

@benikm91

@benikm91 benikm91 commented Jan 1, 2026

Copy link
Copy Markdown
Collaborator

Main:

  • Add nice error messages if Axis is not in Tensor
image

This was combined with a clean-up effort to enable it.

  • ShapeTypeHelpers are now type classes that combine common cases into a single type class.
  • All operations were refactored to use these new types (rather than multiple making errors hard to write)
  • Zipvmap was cleaned up because the old Gemini implementation was weird.

Additionally

  • Test added for the compile messages to catch breaking changes.

@benikm91
benikm91 requested a review from marcelluethi January 1, 2026 11:56
@benikm91

benikm91 commented Jan 1, 2026

Copy link
Copy Markdown
Collaborator Author

closes #6

@benikm91
benikm91 force-pushed the nice-error-messages branch 2 times, most recently from b73a452 to edbab14 Compare January 1, 2026 19:40

@marcelluethi marcelluethi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for these changes. The code looks much cleaner now.
Good to merge, once the commented lines are removed.

export dimwit.tensor.TupleHelpers.*
export dimwit.tensor.Join
export Prime.*
// Export type helpers TODO should these be exported? They are quite internal

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should these be removed?

…his was combined with a clean up effort to allow for this. ShapeTypeHelpers are now type classes that combine common cases into a single type class. Zipvmap was cleaned up as old implementation from Gemini was weird.
@benikm91
benikm91 force-pushed the nice-error-messages branch from edbab14 to 2fcf831 Compare January 2, 2026 17:10
@benikm91
benikm91 merged commit 7c05935 into main Jan 2, 2026
1 check 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.

2 participants