@@ -5416,16 +5416,20 @@ def insert(arr, obj, values, axis=None):
5416
5416
5417
5417
Notes
5418
5418
-----
5419
- Note that for higher dimensional inserts ``obj=0`` behaves very differently
5420
- from ``obj=[0]`` just like ``arr[:,0,:] = values`` is different from
5421
- ``arr[:,[0],:] = values``. This difference arises due to the broadcasting
5422
- rules and axis manipulation in NumPy:
5419
+ Note that for higher dimensional inserts ``obj=0`` behaves very
5420
+ differently from ``obj=[0]`` just like ``arr[:,0,:] = values`` is
5421
+ different from ``arr[:,[0],:] = values``.
5422
+ This difference arises due to the broadcasting rules and
5423
+ axis manipulation in NumPy:
5423
5424
5424
- - Using `obj=0` specifies a single position, leading to direct insertion along the specified axis.
5425
- - Using `obj=[0]` treats the index as a list, which results in different broadcasting behavior and can affect how values are inserted.
5426
-
5427
- For a more detailed explanation of broadcasting and indexing, refer to the
5428
- :ref:`NumPy documentation on indexing <basics.indexing>` and :ref:`broadcasting <basics.broadcasting>`.
5425
+ - Using `obj=0` specifies a single position, leading to direct
5426
+ insertion along the specified axis.
5427
+ - Using `obj=[0]` treats the index as a list, which results in different
5428
+ broadcasting behavior and can affect how values are inserted.
5429
+
5430
+ For a more detailed explanation of broadcasting and indexing,
5431
+ refer to the :ref:`NumPy documentation on indexing <basics.indexing>` and
5432
+ :ref:`broadcasting <basics.broadcasting>`.
5429
5433
5430
5434
Examples
5431
5435
--------
0 commit comments