summaryrefslogtreecommitdiff
path: root/numpy/lib/shape_base.py
diff options
context:
space:
mode:
authorMatthias Bussonnier <bussonniermatthias@gmail.com>2021-01-25 22:22:49 -0800
committerMatthias Bussonnier <bussonniermatthias@gmail.com>2021-01-25 22:22:49 -0800
commitecec872d20612e975236e5c1e5a5800ef39c94ad (patch)
tree09a382ee233ff568b7dfff9bc26cad07be37dfd5 /numpy/lib/shape_base.py
parentc90cb814567b4f798e884b773fe96e42d8aa63de (diff)
downloadnumpy-ecec872d20612e975236e5c1e5a5800ef39c94ad.tar.gz
DOC: lib/shape_base numpydoc formatting.
Numpydoc parses parameter different depending on whether there is a space before the colon, for it to be properly interpreted as names and types; spaces need to be put on each side.
Diffstat (limited to 'numpy/lib/shape_base.py')
-rw-r--r--numpy/lib/shape_base.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/numpy/lib/shape_base.py b/numpy/lib/shape_base.py
index f0596444e..9dfeee527 100644
--- a/numpy/lib/shape_base.py
+++ b/numpy/lib/shape_base.py
@@ -69,13 +69,13 @@ def take_along_axis(arr, indices, axis):
Parameters
----------
- arr: ndarray (Ni..., M, Nk...)
+ arr : ndarray (Ni..., M, Nk...)
Source array
- indices: ndarray (Ni..., J, Nk...)
+ indices : ndarray (Ni..., J, Nk...)
Indices to take along each 1d slice of `arr`. This must match the
dimension of arr, but dimensions Ni and Nj only need to broadcast
against `arr`.
- axis: int
+ axis : int
The axis to take 1d slices along. If axis is None, the input array is
treated as if it had first been flattened to 1d, for consistency with
`sort` and `argsort`.
@@ -190,16 +190,16 @@ def put_along_axis(arr, indices, values, axis):
Parameters
----------
- arr: ndarray (Ni..., M, Nk...)
+ arr : ndarray (Ni..., M, Nk...)
Destination array.
- indices: ndarray (Ni..., J, Nk...)
+ indices : ndarray (Ni..., J, Nk...)
Indices to change along each 1d slice of `arr`. This must match the
dimension of arr, but dimensions in Ni and Nj may be 1 to broadcast
against `arr`.
- values: array_like (Ni..., J, Nk...)
+ values : array_like (Ni..., J, Nk...)
values to insert at those indices. Its shape and dimension are
broadcast to match that of `indices`.
- axis: int
+ axis : int
The axis to take 1d slices along. If axis is None, the destination
array is treated as if a flattened 1d view had been created of it.