Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message when source length is wrong in reshape #53883

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

LilithHafner
Copy link
Member

@LilithHafner LilithHafner commented Mar 28, 2024

I noticed this during last triage.

The check is that prod(new_dims) == length(source_array), so the error should state that dims must be consistent with length, not size. The whole point of reshape is that they need not be consistent with size.

@LilithHafner LilithHafner added the error messages Better, more actionable error messages label Mar 28, 2024
@mbauman mbauman added the merge me PR is reviewed. Merge when all tests are passing label Mar 28, 2024
@LilithHafner LilithHafner merged commit 6f51966 into master Mar 28, 2024
7 of 10 checks passed
@LilithHafner LilithHafner deleted the lh/reshape-length-error branch March 28, 2024 16:00
@LilithHafner LilithHafner removed the merge me PR is reviewed. Merge when all tests are passing label Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error messages Better, more actionable error messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants