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

Fixes operands could not be broadcast error when the subscripts contain ellipsis and the operands are shapes. #236

Closed
wants to merge 2 commits into from

Conversation

nova77
Copy link

@nova77 nova77 commented Jun 14, 2024

Description

When the subscript contain ellipsis and operands are shape, we get the following error:

ValueError: operands could not be broadcast together with shapes (..)

This is due to the fact that the parser converts the operands into numpy arrays which have strict rules on comparison.

This PR addresses #235.

Todos

Notable points that this PR has either accomplished or will accomplish.

  • enforce operand shapes to be list of lists
  • adds a unittest to verify the fixed behavior

Status

  • Ready to go

…tain ellipsis and the operands are shapes.
@nova77 nova77 marked this pull request as ready for review June 14, 2024 18:02
@dgasmith
Copy link
Owner

This is a subtle bug related to a blocking issue in #204, where possibly_convert_to_numpy's behavior is incorrect and we're not quite normalizing on internal representations the way we should. I'll add your test to #204 and see if I fix this in a more robust way for the next release.

@dgasmith
Copy link
Owner

Yes, I can confirm #204 fixes it: 602e61b

@nova77
Copy link
Author

nova77 commented Jun 26, 2024

Wonderful. I'm happy to have it fixed either way.

@dgasmith
Copy link
Owner

dgasmith commented Jul 5, 2024

Closed by #204.

@dgasmith dgasmith closed this Jul 5, 2024
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