Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
faster and simpler generic_norm2 #43256
base: master
Are you sure you want to change the base?
faster and simpler generic_norm2 #43256
Changes from 2 commits
3e696ed
604adc3
44509da
aedb519
b8c8b85
689032c
812bd57
4306643
3de392a
d9de30b
543f563
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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'm sad if we need to add a bunch of special-cased
missing
code to LinearAlgebra.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 know. We can leave out that test. It's just that the transition to
mapreduce
facilitatednorm
handle missing for certainp
s, without pulling*missing
to the surface.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.
Would
be preferable? (Which I think should be equivalent, but please do double-check.)
EDIT by @dkarrasch : one needs to avoid performing
maxabs == 0
because that throws aTypeError: non-boolean (Missing) used in boolean context
. Otherwise that would work, because of short-circuiting.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.
So that you get a notification: I modified @martinholters's suggestion, which I tested for
maxabs = missing
and it works.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.
Oh, and that same trick should make it possible to apply the same steps to
generic_normp
!