summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorRalf Gommers <ralf.gommers@googlemail.com>2012-05-05 21:16:13 +0200
committerRalf Gommers <ralf.gommers@googlemail.com>2012-07-07 14:48:49 +0200
commit2c9981b61ca56b41a5e7b9fbe785b6b54727aea4 (patch)
tree30f093eeef4682ef9eadddfe98e3c4ef5280a244 /numpy
parent3445712afcd71d2a3d61973de45aa94c38613dd5 (diff)
downloadnumpy-2c9981b61ca56b41a5e7b9fbe785b6b54727aea4.tar.gz
DOC: merge wiki edits. Add percentile to statistics routines (ML suggestion).
Diffstat (limited to 'numpy')
-rw-r--r--numpy/add_newdocs.py22
-rw-r--r--numpy/core/numeric.py16
-rw-r--r--numpy/core/shape_base.py6
-rw-r--r--numpy/lib/function_base.py7
-rw-r--r--numpy/lib/npyio.py3
-rw-r--r--numpy/random/mtrand/mtrand.pyx26
-rw-r--r--numpy/testing/nosetester.py11
7 files changed, 56 insertions, 35 deletions
diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py
index f550e2d41..a416559db 100644
--- a/numpy/add_newdocs.py
+++ b/numpy/add_newdocs.py
@@ -1822,10 +1822,21 @@ add_newdoc('numpy.core.multiarray', 'result_type',
""")
-add_newdoc('numpy.core.multiarray','newbuffer',
- """newbuffer(size)
+add_newdoc('numpy.core.multiarray', 'newbuffer',
+ """
+ newbuffer(size)
+
+ Return a new uninitialized buffer object.
- Return a new uninitialized buffer object of size bytes
+ Parameters
+ ----------
+ size : int
+ Size in bytes of returned buffer object.
+
+ Returns
+ -------
+ newbuffer : buffer object
+ Returned, uninitialized buffer object of `size` bytes.
""")
@@ -3717,8 +3728,9 @@ add_newdoc('numpy.core.multiarray', 'copyto',
"""
copyto(dst, src, casting='same_kind', where=None, preservena=False)
- Copies values from `src` into `dst`, broadcasting as necessary.
- Raises a TypeError if the casting rule is violated, and if
+ Copies values from one array to another, broadcasting as necessary.
+
+ Raises a TypeError if the `casting` rule is violated, and if
`where` is provided, it selects which elements to copy.
.. versionadded:: 1.7.0
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
index a104db19c..45b998b61 100644
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -696,9 +696,10 @@ def correlate(a, v, mode='valid', old_behavior=False):
Refer to the `convolve` docstring. Note that the default
is `valid`, unlike `convolve`, which uses `full`.
old_behavior : bool
- If True, uses the old behavior from Numeric, (correlate(a,v) == correlate(v,
- a), and the conjugate is not taken for complex arrays). If False, uses
- the conventional signal processing definition (see note).
+ If True, uses the old behavior from Numeric,
+ (correlate(a,v) == correlate(v,a), and the conjugate is not taken
+ for complex arrays). If False, uses the conventional signal
+ processing definition.
See Also
--------
@@ -2344,7 +2345,14 @@ def setbufsize(size):
return old
def getbufsize():
- """Return the size of the buffer used in ufuncs.
+ """
+ Return the size of the buffer used in ufuncs.
+
+ Returns
+ -------
+ getbufsize : int
+ Size of ufunc buffer in bytes.
+
"""
return umath.geterrobj()[0]
diff --git a/numpy/core/shape_base.py b/numpy/core/shape_base.py
index 8a4c80e27..261379077 100644
--- a/numpy/core/shape_base.py
+++ b/numpy/core/shape_base.py
@@ -12,7 +12,7 @@ def atleast_1d(*arys):
Parameters
----------
- array1, array2, ... : array_like
+ arys1, arys2, ... : array_like
One or more input arrays.
Returns
@@ -61,7 +61,7 @@ def atleast_2d(*arys):
Parameters
----------
- array1, array2, ... : array_like
+ arys1, arys2, ... : array_like
One or more array-like sequences. Non-array inputs are converted
to arrays. Arrays that already have two or more dimensions are
preserved.
@@ -113,7 +113,7 @@ def atleast_3d(*arys):
Parameters
----------
- array1, array2, ... : array_like
+ arys1, arys2, ... : array_like
One or more array-like sequences. Non-array inputs are converted to
arrays. Arrays that already have three or more dimensions are
preserved.
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index f3df3b96b..6a457010b 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -1316,9 +1316,10 @@ def place(arr, mask, vals):
"""
Change elements of an array based on conditional and input values.
- Similar to ``np.copyto(arr, vals, where=mask)``, the difference is that `place`
- uses the first N elements of `vals`, where N is the number of True values
- in `mask`, while `copyto` uses the elements where `mask` is True.
+ Similar to ``np.copyto(arr, vals, where=mask)``, the difference is that
+ `place` uses the first N elements of `vals`, where N is the number of
+ True values in `mask`, while `copyto` uses the elements where `mask`
+ is True.
Note that `extract` does the exact opposite of `place`.
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py
index cb14e4963..b1e891f77 100644
--- a/numpy/lib/npyio.py
+++ b/numpy/lib/npyio.py
@@ -470,8 +470,7 @@ def savez(file, *args, **kwds):
--------
save : Save a single array to a binary file in NumPy format.
savetxt : Save an array to a file as plain text.
- numpy.savez_compressed : Save several arrays into a compressed .npz file
- format
+ savez_compressed : Save several arrays into a compressed .npz file format
Notes
-----
diff --git a/numpy/random/mtrand/mtrand.pyx b/numpy/random/mtrand/mtrand.pyx
index f88a1390f..a57f106e2 100644
--- a/numpy/random/mtrand/mtrand.pyx
+++ b/numpy/random/mtrand/mtrand.pyx
@@ -2178,13 +2178,13 @@ cdef class RandomState:
References
----------
- ..[1] NIST/SEMATECH e-Handbook of Statistical Methods, "Cauchy
+ .. [1] NIST/SEMATECH e-Handbook of Statistical Methods, "Cauchy
Distribution",
http://www.itl.nist.gov/div898/handbook/eda/section3/eda3663.htm
- ..[2] Weisstein, Eric W. "Cauchy Distribution." From MathWorld--A
+ .. [2] Weisstein, Eric W. "Cauchy Distribution." From MathWorld--A
Wolfram Web Resource.
http://mathworld.wolfram.com/CauchyDistribution.html
- ..[3] Wikipedia, "Cauchy distribution"
+ .. [3] Wikipedia, "Cauchy distribution"
http://en.wikipedia.org/wiki/Cauchy_distribution
Examples
@@ -2516,10 +2516,10 @@ cdef class RandomState:
See Also
--------
- scipy.stats.distributions.weibull : probability density function,
- distribution or cumulative density function, etc.
-
- gumbel, scipy.stats.distributions.genextreme
+ scipy.stats.distributions.weibull_max
+ scipy.stats.distributions.weibull_min
+ scipy.stats.distributions.genextreme
+ gumbel
Notes
-----
@@ -3159,9 +3159,9 @@ cdef class RandomState:
References
----------
- ..[1] Brighton Webs Ltd., Rayleigh Distribution,
+ .. [1] Brighton Webs Ltd., Rayleigh Distribution,
http://www.brighton-webs.co.uk/distributions/rayleigh.asp
- ..[2] Wikipedia, "Rayleigh distribution"
+ .. [2] Wikipedia, "Rayleigh distribution"
http://en.wikipedia.org/wiki/Rayleigh_distribution
Examples
@@ -3247,12 +3247,12 @@ cdef class RandomState:
References
----------
- ..[1] Brighton Webs Ltd., Wald Distribution,
+ .. [1] Brighton Webs Ltd., Wald Distribution,
http://www.brighton-webs.co.uk/distributions/wald.asp
- ..[2] Chhikara, Raj S., and Folks, J. Leroy, "The Inverse Gaussian
+ .. [2] Chhikara, Raj S., and Folks, J. Leroy, "The Inverse Gaussian
Distribution: Theory : Methodology, and Applications", CRC Press,
1988.
- ..[3] Wikipedia, "Wald distribution"
+ .. [3] Wikipedia, "Wald distribution"
http://en.wikipedia.org/wiki/Wald_distribution
Examples
@@ -3331,7 +3331,7 @@ cdef class RandomState:
References
----------
- ..[1] Wikipedia, "Triangular distribution"
+ .. [1] Wikipedia, "Triangular distribution"
http://en.wikipedia.org/wiki/Triangular_distribution
Examples
diff --git a/numpy/testing/nosetester.py b/numpy/testing/nosetester.py
index a776faa43..60fec35d6 100644
--- a/numpy/testing/nosetester.py
+++ b/numpy/testing/nosetester.py
@@ -119,11 +119,12 @@ class NoseTester(object):
Notes
-----
- The default for `raise_warnings` is ``(DeprecationWarning, RuntimeWarning)``
- for the master branch of NumPy, and ``()`` for maintenance branches and
- released versions. The purpose of this switching behavior is to catch as
- many warnings as possible during development, but not give problems for
- packaging of released versions.
+ The default for `raise_warnings` is
+ ``(DeprecationWarning, RuntimeWarning)`` for the master branch of NumPy,
+ and ``()`` for maintenance branches and released versions. The purpose
+ of this switching behavior is to catch as many warnings as possible
+ during development, but not give problems for packaging of released
+ versions.
"""
# Stuff to exclude from tests. These are from numpy.distutils