summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/release/upcoming_changes/15997.improvement.rst16
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)