Skip to content

improve error when broadcast failed due to axistype #45922

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

Merged

Conversation

Moelf
Copy link
Contributor

@Moelf Moelf commented Jul 4, 2022

fix #45921

@Moelf Moelf force-pushed the helpful_error_broadcast_mix_axis branch from e83bce1 to 4110374 Compare July 6, 2022 13:40
@inkydragon inkydragon added the error messages Better, more actionable error messages label Jul 8, 2022
@IanButterworth
Copy link
Member

Is this good to go?

@N5N3
Copy link
Member

N5N3 commented Jul 21, 2022

I'm not sure if it's a good idea to remove "broadcast" in the error message.
Also if we want to print the axes instead of size, it seems a good idea to drop the type info,.
1:1000 is clearer than Base.OneTo(1000) and it should be enough for DimensionMismatch, see also #41311

@vtjnash vtjnash force-pushed the helpful_error_broadcast_mix_axis branch from f29854b to 5cd8e8b Compare February 4, 2024 01:33
Co-authored-by: Jameson Nash <[email protected]>
@vtjnash vtjnash added the merge me PR is reviewed. Merge when all tests are passing label Feb 4, 2024
@IanButterworth IanButterworth merged commit 914de06 into JuliaLang:master Feb 5, 2024
@oscardssmith oscardssmith removed the merge me PR is reviewed. Merge when all tests are passing label Feb 5, 2024
@Moelf Moelf deleted the helpful_error_broadcast_mix_axis branch February 5, 2024 05:27
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.

Uninformative/confusing broadcast error with mixed indexing
7 participants