summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2015-07-01 23:36:38 -0600
committerCharles Harris <charlesr.harris@gmail.com>2015-07-01 23:40:56 -0600
commitf5e9adbbf87903e42d03bb3dd5f86b70a89e930c (patch)
treed35f5116d0ce8c579b583cda4a3ee32c541fb6bd /numpy/core
parentf940a9e434e2ba39328361336711502895a42194 (diff)
downloadnumpy-f5e9adbbf87903e42d03bb3dd5f86b70a89e930c.tar.gz
DOC: Fix docstring warnings in documetation generation.
Most of these fixes involve putting blank lines around .. versionadded:: x.x.x and .. deprecated:: x.x.x Some of the examples were also fixed.
Diffstat (limited to 'numpy/core')
-rw-r--r--numpy/core/defchararray.py2
-rw-r--r--numpy/core/fromnumeric.py3
-rw-r--r--numpy/core/numeric.py19
3 files changed, 16 insertions, 8 deletions
diff --git a/numpy/core/defchararray.py b/numpy/core/defchararray.py
index 92ea8209c..ead11e8d8 100644
--- a/numpy/core/defchararray.py
+++ b/numpy/core/defchararray.py
@@ -2652,7 +2652,7 @@ def asarray(obj, itemsize=None, unicode=None, order=None):
end when comparing values
3) vectorized string operations are provided as methods
- (e.g. `str.endswith`) and infix operators (e.g. +, *, %)
+ (e.g. `str.endswith`) and infix operators (e.g. ``+``, ``*``,``%``)
Parameters
----------
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py
index b6a28ec9b..10626fe9f 100644
--- a/numpy/core/fromnumeric.py
+++ b/numpy/core/fromnumeric.py
@@ -1049,10 +1049,11 @@ def searchsorted(a, v, side='left', sorter=None):
If 'right', return the last such index. If there is no suitable
index, return either 0 or N (where N is the length of `a`).
sorter : 1-D array_like, optional
- .. versionadded:: 1.7.0
Optional array of integer indices that sort array a into ascending
order. They are typically the result of argsort.
+ .. versionadded:: 1.7.0
+
Returns
-------
indices : array of ints
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
index f29b750f6..f7b0f49fa 100644
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -89,14 +89,16 @@ def zeros_like(a, dtype=None, order='K', subok=True):
The shape and data-type of `a` define these same attributes of
the returned array.
dtype : data-type, optional
- .. versionadded:: 1.6.0
Overrides the data type of the result.
- order : {'C', 'F', 'A', or 'K'}, optional
+
.. versionadded:: 1.6.0
+ order : {'C', 'F', 'A', or 'K'}, optional
Overrides the memory layout of the result. 'C' means C-order,
'F' means F-order, 'A' means 'F' if `a` is Fortran contiguous,
'C' otherwise. 'K' means match the layout of `a` as closely
as possible.
+
+ .. versionadded:: 1.6.0
subok : bool, optional.
If True, then the newly created array will use the sub-class
type of 'a', otherwise it will be a base-class array. Defaults
@@ -195,14 +197,16 @@ def ones_like(a, dtype=None, order='K', subok=True):
The shape and data-type of `a` define these same attributes of
the returned array.
dtype : data-type, optional
- .. versionadded:: 1.6.0
Overrides the data type of the result.
- order : {'C', 'F', 'A', or 'K'}, optional
+
.. versionadded:: 1.6.0
+ order : {'C', 'F', 'A', or 'K'}, optional
Overrides the memory layout of the result. 'C' means C-order,
'F' means F-order, 'A' means 'F' if `a` is Fortran contiguous,
'C' otherwise. 'K' means match the layout of `a` as closely
as possible.
+
+ .. versionadded:: 1.6.0
subok : bool, optional.
If True, then the newly created array will use the sub-class
type of 'a', otherwise it will be a base-class array. Defaults
@@ -1016,9 +1020,10 @@ def outer(a, b, out=None):
Second input vector. Input is flattened if
not already 1-dimensional.
out : (M, N) ndarray, optional
- .. versionadded:: 1.9.0
A location where the result is stored
+ .. versionadded:: 1.9.0
+
Returns
-------
out : (M, N) ndarray
@@ -1494,6 +1499,7 @@ def cross(a, b, axisa=-1, axisb=-1, axisc=-1, axis=None):
Notes
-----
.. versionadded:: 1.9.0
+
Supports full broadcasting of the inputs.
Examples
@@ -2222,10 +2228,11 @@ def allclose(a, b, rtol=1.e-5, atol=1.e-8, equal_nan=False):
atol : float
The absolute tolerance parameter (see Notes).
equal_nan : bool
- .. versionadded:: 1.10.0
Whether to compare NaN's as equal. If True, NaN's in `a` will be
considered equal to NaN's in `b` in the output array.
+ .. versionadded:: 1.10.0
+
Returns
-------
allclose : bool