Repository navigation
BUG: stray comma should be preserved for legacy printing - #10120
Merged
Merged
Conversation
eric-wieser
reviewed
Nov 29, 2017
Member
There was a problem hiding this comment.
It felt a lot cleaner to me to do this concatenation here - can lecacy be forwarded to _formatArray instead?
ahaldane
force-pushed
the
legacy_stray_comma
branch
from
November 29, 2017 05:04
e3d92b5 to
b49b20f
Compare
Member
Author
|
Updated. |
eric-wieser
reviewed
Nov 29, 2017
| def _formatArray(a, format_function, rank, max_line_len, | ||
| next_line_prefix, separator, edge_items, summary_insert): | ||
| def _formatArray(a, format_function, rank, max_line_len, next_line_prefix, | ||
| separator, edge_items, summary_insert, legacy): |
Member
There was a problem hiding this comment.
Maybe default to =False, just in case anyone is relying on these internals? Not that we have to support them, but it's easy to do so.
Member
There was a problem hiding this comment.
Actually, I want to gut this whole function to fix #9816, so let's leave this as is
eric-wieser
reviewed
Nov 29, 2017
|
|
||
| def test_legacy_stray_comma(self): | ||
| np.set_printoptions(legacy='1.13') | ||
| assert_equal(str(np.arange(10000)), '[ 0 1 2 ..., 9997 9998 9999]') |
Member
There was a problem hiding this comment.
Needs a try-finally, maybe? Or does this have cleanup?
Member
|
Nevermind, all looks good. Thanks! |
Contributor
|
Thanks everyone! The scikit-learn doctests now pass on numpy master with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #10059