Skip to content

DOC: Summarize printing changes in release notes #10121

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 1 commit into from
Dec 4, 2017

Conversation

ahaldane
Copy link
Member

@ahaldane ahaldane commented Nov 29, 2017

Fixes #10058

Suggestions and modification welcome.

@ahaldane ahaldane added this to the 1.14.0 release milestone Nov 29, 2017
be uniquely specified, so ``float16`` will be shorter and ``float128``
longer. The ``str`` of ``float64`` scalars is no longer truncated in python2.
* ``NaT`` values in datetime arrays are now properly aligned
* ``MaskedArray`` arrays have a new single-line output mode for short arrays
Copy link
Member

@eric-wieser eric-wieser Nov 29, 2017

Choose a reason for hiding this comment

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

This isn't true - they always still always take multiple lines. What changed is they:

  • Show the dtype
  • Include commas
  • Correctly align wrapped arrays

* 0d arrays no longer have their own idiosyncratic implementations of ``str``
and ``repr``. The ``style`` argument to ``np.array2string`` is deprecated.
* Size-0 arrays with multiple dimensions like ``np.zeros((2,0,1))`` are
represented using ``empty`` instead of ``array``.
Copy link
Member

Choose a reason for hiding this comment

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

Pending on #10119, anyway...

* Size-0 arrays with multiple dimensions like ``np.zeros((2,0,1))`` are
represented using ``empty`` instead of ``array``.
* Arrays of ``object`` datatype containing python lists now clearly
represents the list using the ``list()`` function.
Copy link
Member

Choose a reason for hiding this comment

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

This isn't new - it was part of 1.13

* Arrays of ``bool`` datatype no longer print the datatype in the repr.
* The "dtype" part of ndarray reprs will now be printed on the next line
if there isn't space on the last line of array output.
* User-defined types now need to implement ``__str__`` and ``__repr__``
Copy link
Member

Choose a reason for hiding this comment

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

dtypes or "subclasses of np.generic" would be clearer

@eric-wieser
Copy link
Member

Don't forget the ..., in #9815

@ahaldane
Copy link
Member Author

updated

I removed the line about empty for now, we need to add it back if we go through with #10119

@eric-wieser
Copy link
Member

Looks good. Are there any other sections of the release notes that can be removed as a result of this list?

@eric-wieser
Copy link
Member

Maybe needs a note about #10129 now too

@mhvk
Copy link
Contributor

mhvk commented Dec 1, 2017

This reads very well!

@charris charris merged commit ce9f775 into numpy:master Dec 4, 2017
@charris
Copy link
Member

charris commented Dec 4, 2017

Thanks Allan. I noticed some spelling nits, but will run a spell checker over this before branching 1.14 and maybe make some other small changes.

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.

4 participants