Skip to content

MAINT: Combine legacy sections of _formatArray - #10143

Merged
ahaldane merged 2 commits into
numpy:masterfrom
eric-wieser:combine-formatArray-legacy
Dec 1, 2017
Merged

ahaldane merged 2 commits into
numpy:masterfrom
eric-wieser:combine-formatArray-legacy

Conversation

@eric-wieser

Copy link
Copy Markdown
Member

This pulls together the changes in #10120, #9815, and #10129 into a more readable fix.

Now it's pretty easy to see the ways in which the legacy behavior was strange.

Comment thread numpy/core/arrayprint.py Outdated

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need, we already know that rank is not 0 or 1, and if it's any other value < 1 we have bigger problems.

Comment thread numpy/core/arrayprint.py Outdated

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already called rstrip above, so no point doing it again

@eric-wieser
eric-wieser force-pushed the combine-formatArray-legacy branch 2 times, most recently from 8a22a98 to 753291c Compare December 1, 2017 05:26
@ahaldane

ahaldane commented Dec 1, 2017

Copy link
Copy Markdown
Member

Looks good, just needs a rebase.

@mhvk mhvk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, quite a bit clearer.

@eric-wieser
eric-wieser force-pushed the combine-formatArray-legacy branch from 753291c to 4c28c8f Compare December 1, 2017 16:50
@eric-wieser

Copy link
Copy Markdown
Member Author

Rebased

@eric-wieser

Copy link
Copy Markdown
Member Author

Tests now passing

@ahaldane

ahaldane commented Dec 1, 2017

Copy link
Copy Markdown
Member

All right, merging. Nice cleanup!

@ahaldane
ahaldane merged commit 058abc1 into numpy:master Dec 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants