From 653a6fd443c237842d7a7069d929fb2892dbfe85 Mon Sep 17 00:00:00 2001 From: endolith Date: Tue, 25 Sep 2012 13:41:25 -0400 Subject: DOC: Used regex to find colons missing spaces which render wrong online, also other spacing or formatting mistakes --- numpy/lib/arraypad.py | 4 ++-- numpy/lib/function_base.py | 2 +- numpy/lib/index_tricks.py | 3 ++- numpy/lib/shape_base.py | 2 -- numpy/lib/utils.py | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) (limited to 'numpy/lib') 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 -- cgit v1.2.1 From 0d35127755ba6812e722a311bfab5e6523c444bb Mon Sep 17 00:00:00 2001 From: endolith Date: Tue, 19 Mar 2013 20:37:26 -0400 Subject: DOC: regex-assisted fixes of definition list formatting --- numpy/lib/_iotools.py | 5 +++-- numpy/lib/format.py | 2 +- numpy/lib/npyio.py | 2 +- numpy/lib/polynomial.py | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) (limited to 'numpy/lib') diff --git a/numpy/lib/_iotools.py b/numpy/lib/_iotools.py index aa3744204..dc07c3cd9 100644 --- a/numpy/lib/_iotools.py +++ b/numpy/lib/_iotools.py @@ -87,7 +87,8 @@ def has_nested_fields(ndtype): Raises ------ - AttributeError : If `ndtype` does not have a `names` attribute. + AttributeError + If `ndtype` does not have a `names` attribute. Examples -------- @@ -267,7 +268,7 @@ class NameValidator(object): * If 'lower', field names are converted to lower case. The default value is True. - replace_space: '_', optional + replace_space : '_', optional Character(s) used in replacement of white spaces. Notes diff --git a/numpy/lib/format.py b/numpy/lib/format.py index 9a558f40c..724125f1d 100644 --- a/numpy/lib/format.py +++ b/numpy/lib/format.py @@ -311,7 +311,7 @@ def read_array_header_1_0(fp): Raises ------ - ValueError : + ValueError If the data is invalid. """ diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py index ca410a24a..b6ae7ba01 100644 --- a/numpy/lib/npyio.py +++ b/numpy/lib/npyio.py @@ -283,7 +283,7 @@ def load(file, mmap_mode=None): file : file-like object or string The file to read. It must support ``seek()`` and ``read()`` methods. If the filename extension is ``.gz``, the file is first decompressed. - mmap_mode: {None, 'r+', 'r', 'w+', 'c'}, optional + mmap_mode : {None, 'r+', 'r', 'w+', 'c'}, optional If not None, then memory-map the file, using the given mode (see `numpy.memmap` for a detailed description of the modes). A memory-mapped array is kept on disk. However, it can be accessed diff --git a/numpy/lib/polynomial.py b/numpy/lib/polynomial.py index de83016e9..0720f7345 100644 --- a/numpy/lib/polynomial.py +++ b/numpy/lib/polynomial.py @@ -169,7 +169,7 @@ def roots(p): Raises ------ - ValueError : + ValueError When `p` cannot be converted to a rank-1 array. See also -- cgit v1.2.1