summaryrefslogtreecommitdiff
path: root/numpy/lib
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/lib
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/lib')
-rw-r--r--numpy/lib/arraysetops.py6
-rw-r--r--numpy/lib/function_base.py18
-rw-r--r--numpy/lib/npyio.py1
3 files changed, 17 insertions, 8 deletions
diff --git a/numpy/lib/arraysetops.py b/numpy/lib/arraysetops.py
index 3dd97aecf..17dfa7567 100644
--- a/numpy/lib/arraysetops.py
+++ b/numpy/lib/arraysetops.py
@@ -114,10 +114,11 @@ def unique(ar, return_index=False, return_inverse=False, return_counts=False):
If True, also return the indices of the unique array that can be used
to reconstruct `ar`.
return_counts : bool, optional
- .. versionadded:: 1.9.0
If True, also return the number of times each unique value comes up
in `ar`.
+ .. versionadded:: 1.9.0
+
Returns
-------
unique : ndarray
@@ -129,10 +130,11 @@ def unique(ar, return_index=False, return_inverse=False, return_counts=False):
The indices to reconstruct the (flattened) original array from the
unique array. Only provided if `return_inverse` is True.
unique_counts : ndarray, optional
- .. versionadded:: 1.9.0
The number of times each of the unique values comes up in the
original array. Only provided if `return_counts` is True.
+ .. versionadded:: 1.9.0
+
See Also
--------
numpy.lib.arraysetops : Module with a number of other functions for
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index d4db4dab1..38a96707f 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -1146,11 +1146,12 @@ def interp(x, xp, fp, left=None, right=None, period=None):
Value to return for `x > xp[-1]`, default is `fp[-1]`.
period : None or float, optional
- .. versionadded:: 1.10.0
A period for the x-coordinates. This parameter allows the proper
interpolation of angular x-coordinates. Parameters `left` and `right`
are ignored if `period` is specified.
+ .. versionadded:: 1.10.0
+
Returns
-------
y : float or ndarray
@@ -1863,23 +1864,26 @@ def cov(m, y=None, rowvar=1, bias=0, ddof=None, fweights=None, aweights=None):
normalization is by ``N``. These values can be overridden by using the
keyword ``ddof`` in numpy versions >= 1.5.
ddof : int, optional
- .. versionadded:: 1.5
If not ``None`` the default value implied by `bias` is overridden.
Note that ``ddof=1`` will return the unbiased estimate, even if both
`fweights` and `aweights` are specified, and ``ddof=0`` will return
the simple average. See the notes for the details. The default value
is ``None``.
+
+ .. versionadded:: 1.5
fweights : array_like, int, optional
- .. versionadded:: 1.10
1-D array of integer freguency weights; the number of times each
observation vector should be repeated.
- aweights : array_like, optional
+
.. versionadded:: 1.10
+ aweights : array_like, optional
1-D array of observation vector weights. These relative weights are
typically large for observations considered "important" and smaller for
observations considered less "important". If ``ddof=0`` the array of
weights can be used to assign probabilities to observation vectors.
+ .. versionadded:: 1.10
+
Returns
-------
out : ndarray
@@ -2054,12 +2058,14 @@ def corrcoef(x, y=None, rowvar=1, bias=np._NoValue, ddof=np._NoValue):
is transposed: each column represents a variable, while the rows
contain observations.
bias : _NoValue, optional
- .. deprecated:: 1.10.0
Has no affect, do not use.
- ddof : _NoValue, optional
+
.. deprecated:: 1.10.0
+ ddof : _NoValue, optional
Has no affect, do not use.
+ .. deprecated:: 1.10.0
+
Returns
-------
R : ndarray
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py
index 271c6ab49..86d757630 100644
--- a/numpy/lib/npyio.py
+++ b/numpy/lib/npyio.py
@@ -745,6 +745,7 @@ def loadtxt(fname, dtype=float, comments='#', delimiter=None,
lines with missing values.
.. versionadded:: 1.10.0
+
The strings produced by the Python float.hex method can be used as
input for floats.