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

MAINT: Adjust type promotion in linalg.norm #10368

Merged
merged 2 commits into from Jan 12, 2018

Conversation

Projects
None yet
3 participants
@eric-wieser
Copy link
Member

commented Jan 11, 2018

Relates to #10364.

Unfortunately the failing case there still doesn't work when the result is a scalar, due to falling afoul of #10322. We fix this by just not making any promise about the scalar case.

That seems pretty reasonable to me, since numpy makes it very hard to keep float32 scalars around anyway.

@charris

This comment has been minimized.

Copy link
Member

commented Jan 11, 2018

I added the backport candidate label on account of the change to the release notes.

@mhvk

mhvk approved these changes Jan 11, 2018

Copy link
Contributor

left a comment

Looks all OK to me

@mhvk

This comment has been minimized.

Copy link
Contributor

commented Jan 11, 2018

But the failures of course suggest there is a problem...

@eric-wieser

This comment has been minimized.

Copy link
Member Author

commented Jan 11, 2018

Failures are caused by #10374

@eric-wieser eric-wieser force-pushed the eric-wieser:fix-10364 branch from b61ec46 to bdf226c Jan 11, 2018

@@ -24,7 +24,7 @@
add, multiply, sqrt, maximum, fastCopyAndTranspose, sum, isfinite, size,
finfo, errstate, geterrobj, longdouble, moveaxis, amin, amax, product, abs,
broadcast, atleast_2d, intp, asanyarray, object_, ones, matmul,
swapaxes, divide, count_nonzero
swapaxes, divide, count_nonzero, reciprocal

This comment has been minimized.

Copy link
@mhvk

mhvk Jan 11, 2018

Contributor

Don't need reciprocal any more...

@mhvk

This comment has been minimized.

Copy link
Contributor

commented Jan 11, 2018

Apart from the nitpick, would seem ready to go in.

BUG: Avoid unintentional promotion to `float`, and do ops in place fo…
…r speed

Fixes gh-10364, partly by adjusting the promise in the release notes
@eric-wieser

This comment has been minimized.

Copy link
Member Author

commented Jan 12, 2018

Updated with the nit fix

@eric-wieser eric-wieser force-pushed the eric-wieser:fix-10364 branch from bdf226c to 04896b0 Jan 12, 2018

@mhvk

This comment has been minimized.

Copy link
Contributor

commented Jan 12, 2018

OK, will merge now.

@mhvk mhvk merged commit 1adca6e into numpy:maintenance/1.14.x Jan 12, 2018

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
lgtm analysis: Python No alert changes
Details
@eric-wieser

This comment has been minimized.

Copy link
Member Author

commented Jan 12, 2018

Needs a forward port, which can be done through the GitHub UI alone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.