summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorendolith <endolith@gmail.com>2012-09-25 13:41:25 -0400
committerendolith <endolith@gmail.com>2013-03-19 20:15:28 -0400
commit653a6fd443c237842d7a7069d929fb2892dbfe85 (patch)
tree1d9fe3d524110403dddbabc159c42d7b5633cff9
parentbd7104cef45be9a4250cb67af9225c9606498a51 (diff)
downloadnumpy-653a6fd443c237842d7a7069d929fb2892dbfe85.tar.gz
DOC: Used regex to find colons missing spaces which render wrong online, also other spacing or formatting mistakes
-rw-r--r--doc/sphinxext/numpydoc/tests/test_docscrape.py5
-rw-r--r--numpy/add_newdocs.py18
-rw-r--r--numpy/build_utils/common.py5
-rw-r--r--numpy/core/code_generators/generate_umath.py11
-rw-r--r--numpy/core/code_generators/ufunc_docstrings.py8
-rw-r--r--numpy/core/fromnumeric.py1
-rw-r--r--numpy/core/setup_common.py5
-rw-r--r--numpy/distutils/command/config.py2
-rw-r--r--numpy/distutils/mingw32ccompiler.py9
-rw-r--r--numpy/distutils/misc_util.py60
-rw-r--r--numpy/lib/arraypad.py4
-rw-r--r--numpy/lib/function_base.py2
-rw-r--r--numpy/lib/index_tricks.py3
-rw-r--r--numpy/lib/shape_base.py2
-rw-r--r--numpy/lib/utils.py2
-rw-r--r--numpy/ma/core.py3
-rw-r--r--numpy/matrixlib/defmatrix.py4
-rw-r--r--numpy/polynomial/chebyshev.py4
-rw-r--r--numpy/polynomial/hermite.py2
-rw-r--r--numpy/polynomial/hermite_e.py4
-rw-r--r--numpy/polynomial/laguerre.py4
-rw-r--r--numpy/polynomial/legendre.py2
-rw-r--r--numpy/polynomial/polynomial.py2
-rw-r--r--numpy/random/mtrand/mtrand.pyx1
-rw-r--r--numpy/testing/utils.py2
25 files changed, 79 insertions, 86 deletions
diff --git a/doc/sphinxext/numpydoc/tests/test_docscrape.py b/doc/sphinxext/numpydoc/tests/test_docscrape.py
index 07ac68003..90e8345d4 100644
--- a/doc/sphinxext/numpydoc/tests/test_docscrape.py
+++ b/doc/sphinxext/numpydoc/tests/test_docscrape.py
@@ -25,7 +25,7 @@ doc_txt = '''\
(1+2+3)/3
- cov : (N,N) ndarray
+ cov : (N, N) ndarray
Covariance matrix of the distribution.
shape : tuple of ints
Given a shape of, for example, (m,n,k), m*n*k samples are
@@ -63,7 +63,6 @@ doc_txt = '''\
Notes
-----
-
Instead of specifying the full covariance matrix, popular
approximations include:
@@ -197,7 +196,7 @@ mean : (N,) ndarray
(1+2+3)/3
-cov : (N,N) ndarray
+cov : (N, N) ndarray
Covariance matrix of the distribution.
shape : tuple of ints
Given a shape of, for example, (m,n,k), m*n*k samples are
diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py
index b6ace230f..9486bbc7f 100644
--- a/numpy/add_newdocs.py
+++ b/numpy/add_newdocs.py
@@ -211,7 +211,7 @@ add_newdoc('numpy.core', 'nditer',
op_dtypes : dtype or tuple of dtype(s), optional
The required data type(s) of the operands. If copying or buffering
is enabled, the data will be converted to/from their original types.
- order : {'C', 'F', 'A', or 'K'}, optional
+ order : {'C', 'F', 'A', 'K'}, optional
Controls the iteration order. 'C' means C order, 'F' means
Fortran order, 'A' means 'F' order if all the arrays are Fortran
contiguous, 'C' order otherwise, and 'K' means as close to the
@@ -1503,7 +1503,7 @@ add_newdoc('numpy.core.multiarray', 'lexsort',
Parameters
----------
- keys : (k,N) array or tuple containing k (N,)-shaped sequences
+ keys : (k, N) array or tuple containing k (N,)-shaped sequences
The `k` different "columns" to be sorted. The last column (or row if
`keys` is a 2D array) is the primary sort key.
axis : int, optional
@@ -1598,7 +1598,6 @@ add_newdoc('numpy.core.multiarray', 'can_cast',
Examples
--------
-
Basic examples
>>> np.can_cast(np.int32, np.int64)
@@ -1978,7 +1977,7 @@ add_newdoc('numpy.core', 'einsum',
If provided, forces the calculation to use the data type specified.
Note that you may have to also give a more liberal `casting`
parameter to allow the conversions.
- order : {'C', 'F', 'A', or 'K'}, optional
+ order : {'C', 'F', 'A', 'K'}, optional
Controls the memory layout of the output. 'C' means it should
be C contiguous. 'F' means it should be Fortran contiguous,
'A' means it should be 'F' if the inputs are all 'F', 'C' otherwise.
@@ -3047,7 +3046,7 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('astype',
----------
dtype : str or dtype
Typecode or data-type to which the array is cast.
- order : {'C', 'F', 'A', or 'K'}, optional
+ order : {'C', 'F', 'A', 'K'}, optional
Controls the memory layout order of the result.
'C' means C order, 'F' means Fortran order, 'A'
means 'F' order if all the arrays are Fortran contiguous,
@@ -3083,7 +3082,7 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('astype',
Raises
------
- ComplexWarning :
+ ComplexWarning
When casting from complex to float or int. To avoid this,
one should use ``a.real.astype(t)``.
@@ -3110,12 +3109,12 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('byteswap',
Parameters
----------
- inplace: bool, optional
+ inplace : bool, optional
If ``True``, swap bytes in-place, default is ``False``.
Returns
-------
- out: ndarray
+ out : ndarray
The byteswapped array. If `inplace` is ``True``, this is
a view to self.
@@ -5058,7 +5057,6 @@ add_newdoc('numpy.lib._compiled_base', 'add_newdoc_ufunc',
Notes
-----
-
This method allocates memory for new_docstring on
the heap. Technically this creates a mempory leak, since this
memory will not be reclaimed until the end of the program
@@ -5900,7 +5898,6 @@ add_newdoc('numpy.core.multiarray', 'dtype', ('fields',
Examples
--------
-
>>> dt = np.dtype([('name', np.str_, 16), ('grades', np.float64, (2,))])
>>> print dt.fields
{'grades': (dtype(('float64',(2,))), 16), 'name': (dtype('|S16'), 0)}
@@ -6008,7 +6005,6 @@ add_newdoc('numpy.core.multiarray', 'dtype', ('names',
Examples
--------
-
>>> dt = np.dtype([('name', np.str_, 16), ('grades', np.float64, (2,))])
>>> dt.names
('name', 'grades')
diff --git a/numpy/build_utils/common.py b/numpy/build_utils/common.py
index 031a24583..eba509084 100644
--- a/numpy/build_utils/common.py
+++ b/numpy/build_utils/common.py
@@ -27,13 +27,14 @@ def pyod(filename):
Parameters
----------
- filename: str
+ filename : str
name of the file to get the dump from.
Returns
-------
- out: seq
+ out : seq
list of lines of od output
+
Note
----
We only implement enough to get the necessary information for long double
diff --git a/numpy/core/code_generators/generate_umath.py b/numpy/core/code_generators/generate_umath.py
index 6dd3d4876..ebbf63f20 100644
--- a/numpy/core/code_generators/generate_umath.py
+++ b/numpy/core/code_generators/generate_umath.py
@@ -96,12 +96,11 @@ class Ufunc(object):
Attributes
----------
-
- nin: number of input arguments
- nout: number of output arguments
- identity: identity element for a two-argument function
- docstring: docstring for the ufunc
- type_descriptions: list of TypeDescription objects
+ nin : number of input arguments
+ nout : number of output arguments
+ identity : identity element for a two-argument function
+ docstring : docstring for the ufunc
+ type_descriptions : list of TypeDescription objects
"""
def __init__(self, nin, nout, identity, docstring, typereso,
*type_descriptions):
diff --git a/numpy/core/code_generators/ufunc_docstrings.py b/numpy/core/code_generators/ufunc_docstrings.py
index 8e175160e..1ef8e997c 100644
--- a/numpy/core/code_generators/ufunc_docstrings.py
+++ b/numpy/core/code_generators/ufunc_docstrings.py
@@ -2800,7 +2800,7 @@ add_newdoc('numpy.core.umath', 'signbit',
Parameters
----------
- x: array_like
+ x : array_like
The input value(s).
out : ndarray, optional
Array into which the output is placed. Its type is preserved
@@ -2831,9 +2831,9 @@ add_newdoc('numpy.core.umath', 'copysign',
Parameters
----------
- x1: array_like
+ x1 : array_like
Values to change the sign of.
- x2: array_like
+ x2 : array_like
The sign of `x2` is copied to `x1`.
out : ndarray, optional
Array into which the output is placed. Its type is preserved and it
@@ -2896,7 +2896,7 @@ add_newdoc('numpy.core.umath', 'spacing',
Parameters
----------
- x1: array_like
+ x1 : array_like
Values to find the spacing of.
Returns
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py
index 9ca56ce27..da1048134 100644
--- a/numpy/core/fromnumeric.py
+++ b/numpy/core/fromnumeric.py
@@ -149,7 +149,6 @@ def reshape(a, newshape, order='C'):
Notes
-----
-
It is not always possible to change the shape of an array without
copying the data. If you want an error to be raise if the data is copied,
you should assign the new shape to the shape attribute of the array::
diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py
index 1afc71085..8c4a22a44 100644
--- a/numpy/core/setup_common.py
+++ b/numpy/core/setup_common.py
@@ -163,13 +163,14 @@ def pyod(filename):
Parameters
----------
- filename: str
+ filename : str
name of the file to get the dump from.
Returns
-------
- out: seq
+ out : seq
list of lines of od output
+
Note
----
We only implement enough to get the necessary information for long double
diff --git a/numpy/distutils/command/config.py b/numpy/distutils/command/config.py
index 3417fac44..78207895b 100644
--- a/numpy/distutils/command/config.py
+++ b/numpy/distutils/command/config.py
@@ -340,7 +340,7 @@ int main ()
Arguments
---------
- funcs: seq
+ funcs : seq
list of functions to test
include_dirs : seq
list of header paths
diff --git a/numpy/distutils/mingw32ccompiler.py b/numpy/distutils/mingw32ccompiler.py
index 10e3608ef..34a874933 100644
--- a/numpy/distutils/mingw32ccompiler.py
+++ b/numpy/distutils/mingw32ccompiler.py
@@ -513,10 +513,13 @@ def manifest_rc(name, type='dll'):
'exe').
Parameters
- ---------- name: str
+ ----------
+ name : str
name of the manifest file to embed
- type: str ('dll', 'exe')
- type of the binary which will embed the manifest"""
+ type : str {'dll', 'exe'}
+ type of the binary which will embed the manifest
+
+ """
if type == 'dll':
rctype = 2
elif type == 'exe':
diff --git a/numpy/distutils/misc_util.py b/numpy/distutils/misc_util.py
index 556668264..a082a6dae 100644
--- a/numpy/distutils/misc_util.py
+++ b/numpy/distutils/misc_util.py
@@ -878,14 +878,14 @@ class Configuration(object):
Parameters
----------
- subpackage_name: str,None
+ subpackage_name : str or None
Name of the subpackage to get the configuration. '*' in
subpackage_name is handled as a wildcard.
- subpackage_path: str
+ subpackage_path : str
If None, then the path is assumed to be the local path plus the
subpackage_name. If a setup.py file is not found in the
subpackage_path, then a default configuration is used.
- parent_name: str
+ parent_name : str
Parent name.
"""
if subpackage_name is None:
@@ -941,13 +941,13 @@ class Configuration(object):
Parameters
----------
- subpackage_name: str
+ subpackage_name : str
name of the subpackage
- subpackage_path: str
+ subpackage_path : str
if given, the subpackage path such as the subpackage is in
subpackage_path / subpackage_name. If None,the subpackage is
assumed to be located in the local path / subpackage_name.
- standalone: bool
+ standalone : bool
"""
if standalone:
@@ -985,10 +985,10 @@ class Configuration(object):
Parameters
----------
- data_path: seq,str
+ data_path : seq or str
Argument can be either
- * 2-sequence (<datadir suffix>,<path to data directory>)
+ * 2-sequence (<datadir suffix>, <path to data directory>)
* path to data directory where python datadir suffix defaults
to package dir.
@@ -1107,7 +1107,7 @@ class Configuration(object):
Parameters
----------
- files: sequence
+ files : sequence
Argument(s) can be either
* 2-sequence (<datadir prefix>,<path to data file(s)>)
@@ -1286,7 +1286,7 @@ class Configuration(object):
Parameters
----------
- files: str, seq
+ files : str or seq
Argument(s) can be either:
* 2-sequence (<includedir suffix>,<path to header file(s)>)
@@ -1341,9 +1341,9 @@ class Configuration(object):
Parameters
----------
- name: str
+ name : str
name of the extension
- sources: seq
+ sources : seq
list of the sources. The list of sources may contain functions
(called source generators) which must take an extension instance
and a build directory as inputs and return a source file or list of
@@ -1351,28 +1351,28 @@ class Configuration(object):
generated. If the Extension instance has no sources after
processing all source generators, then no extension module is
built.
- include_dirs:
- define_macros:
- undef_macros:
- library_dirs:
- libraries:
- runtime_library_dirs:
- extra_objects:
- extra_compile_args:
- extra_link_args:
- extra_f77_compile_args:
- extra_f90_compile_args:
- export_symbols:
- swig_opts:
- depends:
+ include_dirs :
+ define_macros :
+ undef_macros :
+ library_dirs :
+ libraries :
+ runtime_library_dirs :
+ extra_objects :
+ extra_compile_args :
+ extra_link_args :
+ extra_f77_compile_args :
+ extra_f90_compile_args :
+ export_symbols :
+ swig_opts :
+ depends :
The depends list contains paths to files or directories that the
sources of the extension module depend on. If any path in the
depends list is newer than the extension module, then the module
will be rebuilt.
- language:
- f2py_options:
- module_dirs:
- extra_info: dict,list
+ language :
+ f2py_options :
+ module_dirs :
+ extra_info : dict or list
dict or list of dict of keywords to be appended to keywords.
Notes
diff --git a/numpy/lib/arraypad.py b/numpy/lib/arraypad.py
index e6ebd97e4..042f587e0 100644
--- a/numpy/lib/arraypad.py
+++ b/numpy/lib/arraypad.py
@@ -619,10 +619,10 @@ def pad(array, pad_width, mode=None, **kwargs):
where
- vector: ndarray
+ vector : ndarray
A rank 1 array already padded with zeros. Padded values are
vector[:pad_tuple[0]] and vector[-pad_tuple[1]:].
- iaxis_pad_width: tuple
+ iaxis_pad_width : tuple
A 2-tuple of ints, iaxis_pad_width[0] represents the number of
values padded at the beginning of vector where
iaxis_pad_width[1] represents the number of values padded at
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index cd79dd67f..914d7b580 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -2917,7 +2917,7 @@ def median(a, axis=None, out=None, overwrite_input=False):
Alternative output array in which to place the result. It must
have the same shape and buffer length as the expected output,
but the type (of the output) will be cast if necessary.
- overwrite_input : bool optional
+ overwrite_input : bool, optional
If True, then allow use of memory of input array (a) for
calculations. The input array will be modified by the call to
median. This will save memory when you do not need to preserve
diff --git a/numpy/lib/index_tricks.py b/numpy/lib/index_tricks.py
index 9c58bf747..c77424f71 100644
--- a/numpy/lib/index_tricks.py
+++ b/numpy/lib/index_tricks.py
@@ -675,7 +675,8 @@ def fill_diagonal(a, val, wrap=False):
Value to be written on the diagonal, its type must be compatible with
that of the array a.
- wrap: bool For tall matrices in NumPy version up to 1.6.2, the
+ wrap : bool
+ For tall matrices in NumPy version up to 1.6.2, the
diagonal "wrapped" after N columns. You can have this behavior
with this option. This affect only tall matrices.
diff --git a/numpy/lib/shape_base.py b/numpy/lib/shape_base.py
index 575f6149d..fcabbace4 100644
--- a/numpy/lib/shape_base.py
+++ b/numpy/lib/shape_base.py
@@ -681,12 +681,10 @@ def kron(a,b):
See Also
--------
-
outer : The outer product
Notes
-----
-
The function assumes that the number of dimenensions of `a` and `b`
are the same, if necessary prepending the smallest with ones.
If `a.shape = (r0,r1,..,rN)` and `b.shape = (s0,s1,...,sN)`,
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py
index 2e70bfd15..d7492def8 100644
--- a/numpy/lib/utils.py
+++ b/numpy/lib/utils.py
@@ -835,7 +835,7 @@ def _lookfor_generate_cache(module, import_modules, regenerate):
Module for which to generate docstring cache
import_modules : bool
Whether to import sub-modules in packages.
- regenerate: bool
+ regenerate : bool
Re-generate the docstring cache
Returns
diff --git a/numpy/ma/core.py b/numpy/ma/core.py
index 371d5f302..5ab12e219 100644
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -630,7 +630,6 @@ def getdata(a, subok=True):
Examples
--------
-
>>> import numpy.ma as ma
>>> a = ma.masked_equal([[1,2],[3,4]], 2)
>>> a
@@ -1263,7 +1262,6 @@ def getmask(a):
Examples
--------
-
>>> import numpy.ma as ma
>>> a = ma.masked_equal([[1,2],[3,4]], 2)
>>> a
@@ -1325,7 +1323,6 @@ def getmaskarray(arr):
Examples
--------
-
>>> import numpy.ma as ma
>>> a = ma.masked_equal([[1,2],[3,4]], 2)
>>> a
diff --git a/numpy/matrixlib/defmatrix.py b/numpy/matrixlib/defmatrix.py
index f0299ee88..3ad4c826f 100644
--- a/numpy/matrixlib/defmatrix.py
+++ b/numpy/matrixlib/defmatrix.py
@@ -588,9 +588,9 @@ class matrix(N.ndarray):
Parameters
----------
- axis: int, optional
+ axis : int, optional
Axis along which logical OR is performed
- out: ndarray, optional
+ out : ndarray, optional
Output to existing array instead of creating new one, must have
same shape as expected output
diff --git a/numpy/polynomial/chebyshev.py b/numpy/polynomial/chebyshev.py
index 9576a4697..1c2a539bf 100644
--- a/numpy/polynomial/chebyshev.py
+++ b/numpy/polynomial/chebyshev.py
@@ -878,7 +878,7 @@ def chebder(c, m=1, scl=1, axis=0) :
Parameters
----------
- c: array_like
+ c : array_like
Array of Chebyshev series coefficients. If c is multidimensional
the different axis correspond to different variables with the
degree in each axis given by the corresponding index.
@@ -1437,7 +1437,7 @@ def chebvander(x, deg) :
Returns
-------
- vander: ndarray
+ vander : ndarray
The pseudo Vandermonde matrix. The shape of the returned matrix is
``x.shape + (deg + 1,)``, where The last index is the degree of the
corresponding Chebyshev polynomial. The dtype will be the same as
diff --git a/numpy/polynomial/hermite.py b/numpy/polynomial/hermite.py
index b410902ea..5929ee016 100644
--- a/numpy/polynomial/hermite.py
+++ b/numpy/polynomial/hermite.py
@@ -1201,7 +1201,7 @@ def hermvander(x, deg) :
Returns
-------
- vander: ndarray
+ vander : ndarray
The pseudo-Vandermonde matrix. The shape of the returned matrix is
``x.shape + (deg + 1,)``, where The last index is the degree of the
corresponding Hermite polynomial. The dtype will be the same as
diff --git a/numpy/polynomial/hermite_e.py b/numpy/polynomial/hermite_e.py
index 4d3bcd338..e2edaa36d 100644
--- a/numpy/polynomial/hermite_e.py
+++ b/numpy/polynomial/hermite_e.py
@@ -646,7 +646,7 @@ def hermeder(c, m=1, scl=1, axis=0) :
Parameters
----------
- c: array_like
+ c : array_like
Array of Hermite_e series coefficients. If `c` is multidimensional
the different axis correspond to different variables with the
degree in each axis given by the corresponding index.
@@ -1198,7 +1198,7 @@ def hermevander(x, deg) :
Returns
-------
- vander: ndarray
+ vander : ndarray
The pseudo-Vandermonde matrix. The shape of the returned matrix is
``x.shape + (deg + 1,)``, where The last index is the degree of the
corresponding HermiteE polynomial. The dtype will be the same as
diff --git a/numpy/polynomial/laguerre.py b/numpy/polynomial/laguerre.py
index 7b77ea819..f8604a6b4 100644
--- a/numpy/polynomial/laguerre.py
+++ b/numpy/polynomial/laguerre.py
@@ -644,7 +644,7 @@ def lagder(c, m=1, scl=1, axis=0) :
Parameters
----------
- c: array_like
+ c : array_like
Array of Laguerre series coefficients. If `c` is multidimensional
the different axis correspond to different variables with the
degree in each axis given by the corresponding index.
@@ -1201,7 +1201,7 @@ def lagvander(x, deg) :
Returns
-------
- vander: ndarray
+ vander : ndarray
The pseudo-Vandermonde matrix. The shape of the returned matrix is
``x.shape + (deg + 1,)``, where The last index is the degree of the
corresponding Laguerre polynomial. The dtype will be the same as
diff --git a/numpy/polynomial/legendre.py b/numpy/polynomial/legendre.py
index 5b88b6287..5a0a12cdb 100644
--- a/numpy/polynomial/legendre.py
+++ b/numpy/polynomial/legendre.py
@@ -1238,7 +1238,7 @@ def legvander(x, deg) :
Returns
-------
- vander: ndarray
+ vander : ndarray
The pseudo-Vandermonde matrix. The shape of the returned matrix is
``x.shape + (deg + 1,)``, where The last index is the degree of the
corresponding Legendre polynomial. The dtype will be the same as
diff --git a/numpy/polynomial/polynomial.py b/numpy/polynomial/polynomial.py
index e174fdd96..c9e35c2ff 100644
--- a/numpy/polynomial/polynomial.py
+++ b/numpy/polynomial/polynomial.py
@@ -485,7 +485,7 @@ def polyder(c, m=1, scl=1, axis=0):
Parameters
----------
- c: array_like
+ c : array_like
Array of polynomial coefficients. If c is multidimensional the
different axis correspond to different variables with the degree
in each axis given by the corresponding index.
diff --git a/numpy/random/mtrand/mtrand.pyx b/numpy/random/mtrand/mtrand.pyx
index 2d4d904bd..c45b85b59 100644
--- a/numpy/random/mtrand/mtrand.pyx
+++ b/numpy/random/mtrand/mtrand.pyx
@@ -1839,7 +1839,6 @@ cdef class RandomState:
Notes
-----
-
The F statistic is used to compare in-group variances to between-group
variances. Calculating the distribution depends on the sampling, and
so it is a function of the respective degrees of freedom in the
diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py
index 019adeb27..b0495af00 100644
--- a/numpy/testing/utils.py
+++ b/numpy/testing/utils.py
@@ -1298,7 +1298,7 @@ def nulp_diff(x, y, dtype=None):
Returns
-------
- nulp: array_like
+ nulp : array_like
number of representable floating point numbers between each item in x
and y.