diff options
author | panpiort8 <dociebieaniuszlem@gmail.com> | 2020-05-20 16:33:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-20 16:33:47 +0200 |
commit | e29a94a9becbdeb0b8229c5395a70b2cbd971cf8 (patch) | |
tree | 9c5155ea87b9e3dda8b6c30e26b9c5f8df2b0701 | |
parent | b0e385f2df3b817c58a0ec043854e91151e984a6 (diff) | |
download | numpy-e29a94a9becbdeb0b8229c5395a70b2cbd971cf8.tar.gz |
Update doc/release/upcoming_changes/15997.improvement.rst
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
-rw-r--r-- | doc/release/upcoming_changes/15997.improvement.rst | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/doc/release/upcoming_changes/15997.improvement.rst b/doc/release/upcoming_changes/15997.improvement.rst index 7f150c3db..9b5feacb8 100644 --- a/doc/release/upcoming_changes/15997.improvement.rst +++ b/doc/release/upcoming_changes/15997.improvement.rst @@ -1,4 +1,12 @@ -Improve `repr(arr)` -------------------- -Now `repr(arr)` returns nicely formatted repr for arrays with objects with -multi-line reprs. +Object arrays containing multi-line objects have a more readable ``repr`` +------------------------------------------------------------------------- +If elements of an object array have a ``repr`` containing new lines, then the +wrapped lines will be aligned by column. Notably, this improves the ``repr`` of +nested arrays:: + + >>> np.array([np.eye(2), np.eye(3)], dtype=object) + array([array([[1., 0.], + [0., 1.]]), + array([[1., 0., 0.], + [0., 1., 0.], + [0., 0., 1.]])], dtype=object) |