diff options
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/lib/_iotools.py | 9 | ||||
-rw-r--r-- | numpy/lib/financial.py | 1 | ||||
-rw-r--r-- | numpy/lib/polynomial.py | 6 | ||||
-rw-r--r-- | numpy/lib/twodim_base.py | 1 | ||||
-rw-r--r-- | numpy/lib/type_check.py | 1 |
5 files changed, 7 insertions, 11 deletions
diff --git a/numpy/lib/_iotools.py b/numpy/lib/_iotools.py index e24583ec1..0bef8e5b9 100644 --- a/numpy/lib/_iotools.py +++ b/numpy/lib/_iotools.py @@ -42,7 +42,7 @@ def _to_filehandle(fname, flag='r', return_opened=False): """ Returns the filehandle corresponding to a string or a file. If the string ends in '.gz', the file is automatically unzipped. - + Parameters ---------- fname : string, filehandle @@ -512,11 +512,11 @@ class StringConverter: """ Upgrade the mapper of a StringConverter by adding a new function and its corresponding default. - - The input function (or sequence of functions) and its associated default + + The input function (or sequence of functions) and its associated default value (if any) is inserted in penultimate position of the mapper. The corresponding type is estimated from the dtype of the default value. - + Parameters ---------- func : var @@ -835,4 +835,3 @@ def easy_dtype(ndtype, names=None, defaultfmt="f%i", **validationargs): else: ndtype.names = validate(ndtype.names, defaultfmt=defaultfmt) return ndtype - diff --git a/numpy/lib/financial.py b/numpy/lib/financial.py index 55ed2839e..861892b63 100644 --- a/numpy/lib/financial.py +++ b/numpy/lib/financial.py @@ -655,4 +655,3 @@ def mirr(values, finance_rate, reinvest_rate): numer = np.abs(npv(reinvest_rate, values*pos))*(1 + reinvest_rate) denom = np.abs(npv(finance_rate, values*neg))*(1 + finance_rate) return (numer/denom)**(1.0/(n - 1))*(1 + reinvest_rate) - 1 - diff --git a/numpy/lib/polynomial.py b/numpy/lib/polynomial.py index f3146d691..94da4784c 100644 --- a/numpy/lib/polynomial.py +++ b/numpy/lib/polynomial.py @@ -93,12 +93,12 @@ def poly(seq_of_zeros): >>> np.poly((0, 0, 0)) # Multiple root example array([1, 0, 0, 0]) - + The line above represents z**3 + 0*z**2 + 0*z + 0. >>> np.poly((-1./2, 0, 1./2)) array([ 1. , 0. , -0.25, 0. ]) - + The line above represents z**3 - z/4 >>> np.poly((np.random.random(1.)[0], 0, np.random.random(1.)[0])) @@ -940,7 +940,7 @@ class poly1d(object): array([-1.+1.41421356j, -1.-1.41421356j]) >>> p(p.r) array([ -4.44089210e-16+0.j, -4.44089210e-16+0.j]) - + These numbers in the previous line represent (0, 0) to machine precision Show the coefficients: diff --git a/numpy/lib/twodim_base.py b/numpy/lib/twodim_base.py index 5e89e606b..d95a59e3f 100644 --- a/numpy/lib/twodim_base.py +++ b/numpy/lib/twodim_base.py @@ -887,4 +887,3 @@ def triu_indices_from(arr, k=0): if not (arr.ndim == 2 and arr.shape[0] == arr.shape[1]): raise ValueError("input array must be 2-d and square") return triu_indices(arr.shape[0],k) - diff --git a/numpy/lib/type_check.py b/numpy/lib/type_check.py index 24701574a..024542ccc 100644 --- a/numpy/lib/type_check.py +++ b/numpy/lib/type_check.py @@ -645,4 +645,3 @@ def datetime_data(dtype): _unitnum2name = ctypes.cast(ctypes.c_void_p(result), ctypes.POINTER(ctypes.c_char_p)) return (_unitnum2name[base], struct.num, struct.den, struct.events) - |