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
MAINT: Add graceful handling of invalid initial brackets to elementwise bracket finding functions #20685
MAINT: Add graceful handling of invalid initial brackets to elementwise bracket finding functions #20685
Changes from 3 commits
681e498
6210882
506c9a4
ff9d69f
6636c3a
2d4657c
6d94e14
744b4e8
90b5bd0
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.
A special case that I don't really want to deal with is
xl0 == xr0 == true_root
: ( Maybe we should just add a note about it?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 haven't addressed this yet. I'd rather not deal with that case either. It looks like the documentation currently doesn't even mention that
xmin <= xl0 < xm0 < xr0 <= xmax
is needed. I think just adding a note about that should be enough; the behavior will be exactly as documented.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 just put things like this
when documenting the error codes. Do you think that's sufficient, or should this go somewhere else as well? I was thinking of putting it in the
Parameters
documentation, but wasn't sure where to include it, since it pertains to every one of these bracket parameters. I guess it could go in thexm0
section, stating that the parameters are defined below; or in thexmin, xmax
section.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 think we only need to have one example of each status code here; I'd prefer that rather than having one example of the first few code and many examples of the last code. My intent when writing this test was to show that the codes could all be different; it really is elementwise. There could be a separate function to test the logic for generating this status code with many different cases, if desired (i.e. all possible invalid orderings). But maybe the most natural example here would be to have everything in reverse order,
xmin > xl0 > xr0 > xmax
.