8000 MAINT, BUG: Final 1.14 formatting fixes by eric-wieser · Pull Request #10177 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

MAINT, BUG: Final 1.14 formatting fixes #10177

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

Merged
merged 6 commits into from
Dec 8, 2017

Conversation

eric-wieser
Copy link
Member

Follows on from gh-10176, and does the missed release notes edit for that and some other PRs.

Also tries to group the changes together in the release notes.

@eric-wieser eric-wieser added this to the 1.14.0 release milestone Dec 8, 2017
elements.
* The last line of an array string will never have more elements than earlier
lines.
* To summarization, the use of ``...`` to shorten long arrays:
Copy link
Member

Choose a reason for hiding this comment

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

summarization <- summarize.

Copy link
Member Author

Choose a reason for hiding this comment

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

I want the noun form here, since the other list items are nouns.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe "For summarization"

Copy link
Member

Choose a reason for hiding this comment

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

"to noun" doesn't read right, "to nounize" does, even though "nounize" isn't a word ;)

Copy link
Member Author
@eric-wieser eric-wieser Dec 8, 2017

Choose a reason for hiding this comment

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

This was intended to be read as "the changes are" ... "to summarization", which reads just fine. But perhaps that kind of continuation from list heading to item is confusing. I've replaced all of the "to" s with "for" s

and now instead show the shortest unique representation.
* The ``str`` of floating-point scalars is no longer truncated in python2.
* Non-finite complex scalars print like ``nanj`` instead of ``nan*j``.
* To floating-point types:
Copy link
Member

Choose a reason for hiding this comment

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

Indenting the list results in a line down the left hand side when rendered for documentation , which is why it wasn't indented before. The sublists need to be separated by blank lines. If you view the file you can see some of these problems.

Copy link
Member

Choose a reason for hiding this comment

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

Generally, "to" should be replaced by "for".

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for reminding me that github can render RST files.

* Float arrays printed in scientific notation no longer use fixed-precision,
and now instead show the shortest unique representation.
* The ``str`` of floating-point scalars is no longer truncated in python2.
* To other data types:
Copy link
Member

Choose a reason for hiding this comment

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

"For" other data types.

Copy link
10000
Member Author

Choose a reason for hiding this comment

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

I used "to" for consistency with the other headings

Copy link
Contributor
@mhvk mhvk left a comment

Choose a reason for hiding this comment

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

Looks all OK to me.

* To summarization, the use of ``...`` to shorten long arrays:
* A trailing comma is no longer inserted for ``str``.
Previously, ``str(np.arange(1001))`` gave
``'[ 0 1 2 ..., 998 999 1000]'``, which has an extra comma.
Copy link
Member

Choose a reason for hiding this comment

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

which <- that.

Copy link
Member

Choose a reason for hiding this comment

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

NVM, I think "which" is correct here.

* A trailing comma is no longer inserted for ``str``.
Previously, ``str(np.arange(1001))`` gave
``'[ 0 1 2 ..., 998 999 1000]'``, which has an extra comma.
* For arrays of 2-d and beyond, the ``...`` printed on its own line to
Copy link
Member

Choose a reason for hiding this comment

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

"is printed"? Missing period after "line".

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope, this is deliberate

Previously, ``str(np.arange(1001))`` gave
``'[ 0 1 2 ..., 998 999 1000]'``, which has an extra comma.
* For arrays of 2-d and beyond, the ``...`` printed on its own line to
summarize all but the last axis now has trailing newlines added to match
Copy link
Member

Choose a reason for hiding this comment

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

Comma after summarize.

Copy link
Member Author
@eric-wieser eric-wieser Dec 8, 2017

Choose a reason for hiding this comment

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

Also disagree here. "summarize all but the last axis" is the clause I want

``'[ 0 1 2 ..., 998 999 1000]'``, which has an extra comma.
* For arrays of 2-d and beyond, the ``...`` printed on its own line to
summarize all but the last axis now has trailing newlines added to match
the leading newlines, and the trailing space character removed.
Copy link
Member

Choose a reason for hiding this comment

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

"is removed"

Copy link
Member Author
@eric-wieser eric-wieser Dec 8, 2017

Choose a reason for hiding this comment

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

Not convinced - "the ... on its own line has the trailing space character removed". Perhaps "has" should be repeated for the second item, "and has the trailing space character removed".

Copy link
Member

Choose a reason for hiding this comment

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

The sentence is hard to read, I would just rework it somehow . Maybe

For arrays of 2-d and beyond, when ... is printed on its own line to summarize any but the last axis, trailing newlines are now added to match the leading newlines, and the trailing space character is removed.

Copy link
Member Author

Choose a reason for hiding this comment

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

To me, that seems to imply the newlines are added to the array, not to the ...

Copy link
Member Author

Choose a reason for hiding this comment

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

Parenthesize "(to summarize all but the last axis)"?

Copy link
Member

Choose a reason for hiding this comment

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

For arrays of 2-d and beyond, when ... is printed on its own line in order to summarize any but the last axis, newlines are now appended to that line to match its leading newlines, and a trailing space character is removed.

?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good. Can you fix up?

@charris
Copy link
Member
charris commented Dec 8, 2017

The release notes need fixing up.

@eric-wieser
Copy link
Member Author
eric-wieser commented Dec 8, 2017

Formatting and To/for fixed. Can I get you to make any remaining fixups (I didn't see the latest comments until after I committed). I'm not sure your remaining corrections are valid anyway

@ahaldane
Copy link
Member
ahaldane commented Dec 8, 2017

LGTM except that sentence.

@charris charris merged commit 5f01e54 into numpy:master Dec 8, 2017
@charris
Copy link
Member
charris commented Dec 8, 2017

Thanks Eric.

@jakirkham
Copy link
Contributor

So when is 1.14.0 scheduled to be released? Are there any RCs planned? Is there an issue I should be following for this sort of stuff?

@charris
Copy link
Member
charris commented Dec 8, 2017

@jakirkham I will try to get an rc1 release out tomorrow. When the final comes out will depend on how things go from there, but I wouldn't expect it to be out until Jan.

@jakirkham
Copy link
Contributor

Ok, well please ping me when the RC comes out. I'd like to put the dev package on conda-forge so that you can get some more feedback.

@charris charris changed the title Final 1.14 formatting fixes MAINT, BUG: Final 1.14 formatting fixes Jan 6, 2018
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.

5 participants
0