diff options
author | Matti Picus <matti.picus@gmail.com> | 2020-05-20 18:18:02 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-20 18:18:02 +0300 |
commit | 84809accddc771d525319c227d78c0152b1f7874 (patch) | |
tree | 7651830b2f5c7dfe494382a45547415dd1053d9a /doc | |
parent | 78d7ab3d0c35cb8aa0cdf449e0db1472e6ad60dc (diff) | |
parent | e29a94a9becbdeb0b8229c5395a70b2cbd971cf8 (diff) | |
download | numpy-84809accddc771d525319c227d78c0152b1f7874.tar.gz |
Merge pull request #15997 from panpiort8/array_pretty_print
ENH: improve printing of arrays with multi-line reprs
Diffstat (limited to 'doc')
-rw-r--r-- | doc/release/upcoming_changes/15997.improvement.rst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/release/upcoming_changes/15997.improvement.rst b/doc/release/upcoming_changes/15997.improvement.rst new file mode 100644 index 000000000..9b5feacb8 --- /dev/null +++ b/doc/release/upcoming_changes/15997.improvement.rst @@ -0,0 +1,12 @@ +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) |