Permalink
Browse files

DOC: Regexp-assisted fix of lots of colons without spaces before them…

…, which results in wrong bolding and colon on web documentation, and some commas and spaces
  • Loading branch information...
1 parent e9f97c9 commit 19bdf23dd96c1657680bd31dea6f1f0fcd8462b6 @endolith endolith committed Sep 25, 2012
@@ -732,7 +732,7 @@ def newton_cotes(rn, equal=0):
The integer order for equally-spaced data or the relative positions of
the samples with the first sample at 0 and the last at N, where N+1 is
the length of `rn`. N is the order of the Newton-Cotes integration.
- equal: int, optional
+ equal : int, optional
Set to 1 to enforce equally spaced data.
Returns
@@ -42,14 +42,14 @@ def from_number(cls, n, min=None):
Parameters
----------
- n: int
+ n : int
max number one wants to be able to represent
- min: int
+ min : int
minimum number of characters to use for the format
Returns
-------
- res: IntFormat
+ res : IntFormat
IntFormat instance with reasonable (see Notes) computed width
Notes
@@ -102,14 +102,14 @@ def from_number(cls, n, min=None):
Parameters
----------
- n: float
+ n : float
max number one wants to be able to represent
- min: int
+ min : int
minimum number of characters to use for the format
Returns
-------
- res: ExpFormat
+ res : ExpFormat
ExpFormat instance with reasonable (see Notes) computed width
Notes
@@ -135,7 +135,7 @@ def __init__(self, width, significand, min=None, repeat=None):
"""\
Parameters
----------
- width: int
+ width : int
number of characters taken by the string (includes space).
"""
self.width = width
@@ -51,20 +51,20 @@ def from_data(cls, m, title="Default title", key="0", mxtype=None, fmt=None):
Parameters
----------
- m: sparse matrix
+ m : sparse matrix
the HBInfo instance will derive its parameters from m
- title: str
+ title : str
Title to put in the HB header
- key: str
+ key : str
Key
- mxtype: HBMatrixType
+ mxtype : HBMatrixType
type of the input matrix
- fmt: dict
+ fmt : dict
not implemented
Returns
-------
- hb_info: HBInfo instance
+ hb_info : HBInfo instance
"""
pointer = m.indptr
indices = m.indices
@@ -127,12 +127,12 @@ def from_file(cls, fid):
Parameters
----------
- fid: file-like matrix
+ fid : file-like matrix
File or file-like object containing a matrix in the HB format.
Returns
-------
- hb_info: HBInfo instance
+ hb_info : HBInfo instance
"""
# First line
line = fid.readline().strip("\n")
@@ -424,9 +424,9 @@ def __init__(self, file, hb_info=None):
Parameters
----------
- file: file-object
+ file : file-object
StringIO work as well
- hb_info: HBInfo
+ hb_info : HBInfo
Should be given as an argument for writing, in which case the file
should be writable.
"""
@@ -470,7 +470,7 @@ def hb_read(file):
Parameters
----------
- file: str-like or file-like
+ file : str-like or file-like
If a string-like object, file is the name of the file to read. If a
file-like object, the data are read from it.
@@ -508,12 +508,12 @@ def hb_write(file, m, hb_info=None):
Parameters
----------
- file: str-like or file-like
+ file : str-like or file-like
if a string-like object, file is the name of the file to read. If a
file-like object, the data are read from it.
- m: sparse-matrix
+ m : sparse-matrix
the sparse matrix to write
- hb_info: HBInfo
+ hb_info : HBInfo
contains the meta-data for write
Returns
View
@@ -677,7 +677,7 @@ def readsav(file_name, idict=None, python_dict=False,
Name of the IDL save file.
idict : dict, optional
Dictionary in which to insert .sav file variables
- python_dict: bool, optional
+ python_dict : bool, optional
By default, the object return is not a Python dictionary, but a
case-insensitive dictionary with item, attribute, and call access
to variables. To get a standard Python dictionary, set this option
View
@@ -584,7 +584,7 @@ def write_top(self, arr, name, is_global):
name : str, optional
name as it will appear in matlab workspace
default is empty string
- is_global : {False, True} optional
+ is_global : {False, True}, optional
whether variable will be global on load into matlab
"""
# these are set before the top-level header write, and unset at
View
@@ -228,7 +228,7 @@ def eigh(a, b=None, lower=True, eigvals_only=False, overwrite_a=False,
Indexes of the smallest and largest (in ascending order) eigenvalues
and corresponding eigenvectors to be returned: 0 <= lo < hi <= M-1.
If omitted, all eigenvalues and eigenvectors are returned.
- type: integer
+ type : integer
Specifies the problem type to be solved:
type = 1: a v[:,i] = w[i] b v[:,i]
type = 2: a b v[:,i] = w[i] v[:,i]
@@ -425,7 +425,7 @@ def eig_banded(a_band, lower=False, eigvals_only=False, overwrite_a_band=False,
(Default: calculate also eigenvectors)
overwrite_a_band:
Discard data in a_band (may enhance performance)
- select: {'a', 'v', 'i'}
+ select : {'a', 'v', 'i'}
Which eigenvalues to calculate
====== ========================================
@@ -604,7 +604,7 @@ def eigvalsh(a, b=None, lower=True, overwrite_a=False,
Indexes of the smallest and largest (in ascending order) eigenvalues
and corresponding eigenvectors to be returned: 0 <= lo < hi <= M-1.
If omitted, all eigenvalues and eigenvectors are returned.
- type: integer
+ type : integer
Specifies the problem type to be solved:
type = 1: a v[:,i] = w[i] b v[:,i]
type = 2: a b v[:,i] = w[i] v[:,i]
@@ -675,7 +675,7 @@ def eigvals_banded(a_band, lower=False, overwrite_a_band=False,
Is the matrix in the lower form. (Default is upper form)
overwrite_a_band:
Discard data in a_band (may enhance performance)
- select: {'a', 'v', 'i'}
+ select : {'a', 'v', 'i'}
Which eigenvalues to calculate
====== ========================================
@@ -195,7 +195,7 @@ def qr_multiply(a, c, mode='right', pivoting=False, conjugate=False,
than explicit conjugation.
overwrite_a : bool, optional
Whether data in a is overwritten (may improve performance)
- overwrite_c: bool, optional
+ overwrite_c : bool, optional
Whether data in c is overwritten (may improve performance).
If this is used, c must be big enough to keep the result,
i.e. c.shape[0] = a.shape[0] if mode is 'left'.
@@ -414,21 +414,21 @@ def _stats(input, labels=None, index=None, centered=False):
compatible with `input`; typically it is the same shape as `input`.
If `labels` is None, all nonzero values in `input` are treated as
the single labeled group.
- index: label or sequence of labels, optional
+ index : label or sequence of labels, optional
These are the labels of the groups for which the stats are computed.
If `index` is None, the stats are computed for the single group where
`labels` is greater than 0.
- centered: bool, optional
+ centered : bool, optional
If True, the centered sum of squares for each labeled group is
also returned. Default is False.
Returns
-------
- counts: int or ndarray of ints
+ counts : int or ndarray of ints
The number of elements in each labeled group.
- sums: scalar or ndarray of scalars
+ sums : scalar or ndarray of scalars
The sums of the values in each labeled group.
- sums_c: scalar or ndarray of scalars, optional
+ sums_c : scalar or ndarray of scalars, optional
The sums of mean-centered squares of the values in each labeled group.
This is only returned if `centered` is True.
@@ -818,15 +818,15 @@ def minimum(input, labels=None, index=None):
Parameters
----------
- input: array_like
+ input : array_like
Array_like of values. For each region specified by `labels`, the
minimal values of `input` over the region is computed.
- labels: array_like, optional
+ labels : array_like, optional
An array_like of integers marking different regions over which the
minimum value of `input` is to be computed. `labels` must have the
same shape as `input`. If `labels` is not specified, the minimum
over the whole array is returned.
- index: array_like, optional
+ index : array_like, optional
A list of region labels that are taken into account for computing the
minima. If index is None, the minimum over all elements where `labels`
is non-zero is returned.
@@ -956,15 +956,15 @@ def median(input, labels=None, index=None):
Parameters
----------
- input: array_like
+ input : array_like
Array_like of values. For each region specified by `labels`, the
median value of `input` over the region is computed.
- labels: array_like, optional
+ labels : array_like, optional
An array_like of integers marking different regions over which the
median value of `input` is to be computed. `labels` must have the
same shape as `input`. If `labels` is not specified, the median
over the whole array is returned.
- index: array_like, optional
+ index : array_like, optional
A list of region labels that are taken into account for computing the
medians. If index is None, the minimum over all elements where `labels`
is non-zero is returned.
@@ -71,7 +71,7 @@ def iterate_structure(structure, iterations, origin = None):
Returns
-------
- output: ndarray of bools
+ output : ndarray of bools
A new structuring element obtained by dilating `structure`
(`iterations` - 1) times with itself.
@@ -330,17 +330,17 @@ def binary_erosion(input, structure = None, iterations = 1, mask = None,
Array of the same shape as input, into which the output is placed.
By default, a new array is created.
- origin: int or tuple of ints, optional
+ origin : int or tuple of ints, optional
Placement of the filter, by default 0.
- border_value: int (cast to 0 or 1)
+ border_value : int (cast to 0 or 1)
Value at the border in the output array.
Returns
-------
- out: ndarray of bools
+ out : ndarray of bools
Erosion of the input by the structuring element.
@@ -1063,27 +1063,27 @@ def binary_fill_holes(input, structure = None, output = None, origin = 0):
Parameters
----------
- input: array_like
+ input : array_like
n-dimensional binary array with holes to be filled
- structure: array_like, optional
+ structure : array_like, optional
Structuring element used in the computation; large-size elements
make computations faster but may miss holes separated from the
background by thin regions. The default element (with a square
connectivity equal to one) yields the intuitive result where all
holes in the input have been filled.
- output: ndarray, optional
+ output : ndarray, optional
Array of the same shape as input, into which the output is placed.
By default, a new array is created.
- origin: int, tuple of ints, optional
+ origin : int, tuple of ints, optional
Position of the structuring element.
Returns
-------
- out: ndarray
+ out : ndarray
Transformation of the initial image `input` where holes have been
filled.
@@ -81,13 +81,13 @@ def minimize(fun, x0, args=(), method='BFGS', jac=None, hess=None,
constraints : dict or sequence of dict, optional
Constraints definition (only for COBYLA and SLSQP).
Each constraint is defined in a dictionary with fields:
- type: str
+ type : str
Constraint type: 'eq' for equality, 'ineq' for inequality.
- fun: callable
+ fun : callable
The function defining the constraint.
- jac: callable, optional
+ jac : callable, optional
The Jacobian of `fun` (only for SLSQP).
- args: sequence, optional
+ args : sequence, optional
Extra arguments to be passed to the function and Jacobian.
Equality constraint means that the constraint function result is to
be zero whereas inequality means that it is to be non-negative.
View
@@ -78,10 +78,10 @@ class Result(dict):
Description of the cause of the termination.
fun, jac, hess : ndarray
Values of objective function, Jacobian and Hessian (if available).
- nfev, njev, nhev: int
+ nfev, njev, nhev : int
Number of evaluations of the objective functions and of its
Jacobian and Hessian.
- nit: int
+ nit : int
Number of iterations performed by the optimizer.
maxcv : float
The maximum constraint violation.
@@ -605,19 +605,19 @@ def check_grad(func, grad, x0, *args):
Parameters
----------
- func: callable func(x0,*args)
+ func : callable func(x0,*args)
Function whose derivative is to be checked.
- grad: callable grad(x0, *args)
+ grad : callable grad(x0, *args)
Gradient of `func`.
- x0: ndarray
+ x0 : ndarray
Points to check `grad` against forward difference approximation of grad
using `func`.
- args: \*args, optional
+ args : \*args, optional
Extra arguments passed to `func` and `grad`.
Returns
-------
- err: float
+ err : float
The square root of the sum of squares (i.e. the 2-norm) of the
difference between ``grad(x0, *args)`` and the finite difference
approximation of `grad` using func at the points `x0`.
View
@@ -115,7 +115,7 @@ def fmin_tnc(func, x0, fprime=None, args=(), approx_grad=0,
(min, max) pairs for each element in x0, defining the
bounds on that parameter. Use None or +/-inf for one of
min or max when there is no bound in that direction.
- epsilon: float
+ epsilon : float
Used if approx_grad is True. The stepsize in a finite
difference approximation for fprime.
scale : list of floats
@@ -268,7 +268,7 @@ def _minimize_tnc(fun, x0, args=(), jac=None, bounds=None,
Newton (TNC) algorithm.
Options for the TNC algorithm are:
- eps: float
+ eps : float
Step size used for numerical approximation of the jacobian.
scale : list of floats
Scaling factors to apply to each variable. If None, the
Oops, something went wrong.

0 comments on commit 19bdf23

Please sign in to comment.