-
-
Notifications
You must be signed in to change notification settings - Fork 11.2k
BUG: Copy meshgrid after broadcasting #8617
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
Conversation
44ea15d
to
4b2f725
Compare
Also, remove some unused variables
4b2f725
to
d932fcd
Compare
@@ -179,7 +179,7 @@ def _broadcast_shape(*args): | |||
supplied arrays against each other. | |||
""" | |||
if not args: | |||
raise ValueError('must provide at least one argument') | |||
return () | |||
# use the old-iterator because np.nditer does not handle size 0 arrays | |||
# consistently | |||
b = np.broadcast(*args[:32]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason that np.broadcast()
is forbidden? Seems to work just fine with the check for ndim >= 1
removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mhvk: So you'd be in favor of a separate PR that removes that restriction from the C code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I slightly misunderstood -- I agreed with your change here for sure. I'm less sure about messing with the C code, but this is mostly because quite a while ago, on earlier changes in stride_tricks
, there was the following #5371 (comment)
2cc1694
to
d9b26f8
Compare
This look all OK to me; missing only is a possible addition to the release notes (this one is probably a bit more important to add at all than #8618, which arguably is not something that people have to be specifically alerted to). |
AFAICT, this regression was introduced after 1.12. So it doesn't need to make it into 1.12.1, nor does it need a release note entry? |
Yes, you're right! So, I think we're set then, and I'll use my newly acquired powers... |
@mhvk: I'm curious, what's the upgrade path for acquiring some of those powers? Being able to stick labels on my PRs would be handy |
I just was asked a few days ago to join the team, so now I can set labels and merge... I do wonder whether it would not make sense to let everyone at least set labels on their own PRs. |
That's not possible given the not very granular permissions available:
Usually people don't ask but just continue sending and reviewing good PRs until a core dev finally wakes up and approaches them. However, people are very welcome to ask or express the ambition to join the core team (either in private to a core dev or publicly). And since you did just ask: your high activity level hasn't gone unnoticed @eric-wieser! I'll bring it up with the rest of the team and get back to you. |
I tried to find a description of how we manage commit rights works in https://docs.scipy.org/doc/numpy-dev/dev/, either in the contributor or governance section, but it's not explained. Will have a look at fixing that. |
Also, remove some unused variables
Fixes #8561