-
-
Notifications
You must be signed in to change notification settings - Fork 11k
MAINT: avoid setting non-existing gufunc strides for keepdims=True. #11176
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
Corrects an overzealous change from the fixed core dimensions to the ones expanded for keepdims=True.
Would be nice if there were a test proving this is necessary. |
I don't think |
@mattip - I cannot test this, as it doesn't cause any problems - just a bit of extra memory allocated that may get an irrelevant value in it. But it was good to find it, as it showed that your @eric-wieser - the name is a bit beyond the scope of this PR, but how I see it is that the names not attached to the ufunc are explicitly meant for changes that are useful within the routine. In the frozen-dimension addition, Anyway, probably the wrong place to put this idea, since not relevant to this PR - which really is just a correction for a mistake I made in #11098. |
Still a bit stymied on this one, I admit. Even though I dived deeply into the code I only have an intuitive feel for when we use |
The underlying logic is that if one wants to access information in the ufunc (basically, Agreed that a name change may be useful, but perhaps as part of #11175 - this PR is really just meant as a correction for #11098 (and I'd like to have it in to avoid yet more rebases...). |
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.
Fixes a problem with PR #11098
Thanks Marten |
Corrects an overzealous change in #11098 from the fixed core dimensions to the ones expanded for
keepdims=True
. Since arrays were allocated, this wrong change caused no problems, but it was not needed and confused the heck out of myself...@charris: since this is a correction to stuff slated for 1.15, I set the milestone as such.
cc @mattip