diff options
author | Ralf Gommers <ralf.gommers@googlemail.com> | 2012-03-03 21:20:13 +0100 |
---|---|---|
committer | Ralf Gommers <ralf.gommers@googlemail.com> | 2012-03-03 22:34:02 +0100 |
commit | f4dd54aa614b263950b7a57329eb0ab9a2f2eadf (patch) | |
tree | ef7178a9b7801f42c31290624faf76a1cf5b969c /numpy/core/numeric.py | |
parent | 91f87e1f613630ff0ad9864017f059afcd6e57f1 (diff) | |
download | numpy-f4dd54aa614b263950b7a57329eb0ab9a2f2eadf.tar.gz |
DOC: merge wiki doc edits.
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r-- | numpy/core/numeric.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index ba8fc1f52..bb13d573e 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -1663,12 +1663,11 @@ def fromfunction(function, shape, **kwargs): Parameters ---------- function : callable - The function is called with N parameters, each of which - represents the coordinates of the array varying along a - specific axis. For example, if `shape` were ``(2, 2)``, then - the parameters would be two arrays, ``[[0, 0], [1, 1]]`` and - ``[[0, 1], [0, 1]]``. `function` must be capable of operating on - arrays, and should return a scalar value. + The function is called with N parameters, where N is the rank of + `shape`. Each parameter represents the coordinates of the array + varying along a specific axis. For example, if `shape` + were ``(2, 2)``, then the parameters in turn be (0, 0), (0, 1), + (1, 0), (1, 1). shape : (N,) tuple of ints Shape of the output array, which also determines the shape of the coordinate arrays passed to `function`. @@ -1678,10 +1677,11 @@ def fromfunction(function, shape, **kwargs): Returns ------- - out : any + fromfunction : any The result of the call to `function` is passed back directly. - Therefore the type and shape of `out` is completely determined by - `function`. + Therefore the shape of `fromfunction` is completely determined by + `function`. If `function` returns a scalar value, the shape of + `fromfunction` would match the `shape` parameter. See Also -------- @@ -1689,7 +1689,7 @@ def fromfunction(function, shape, **kwargs): Notes ----- - Keywords other than `shape` and `dtype` are passed to `function`. + Keywords other than `dtype` are passed to `function`. Examples -------- @@ -1979,7 +1979,7 @@ def allclose(a, b, rtol=1.e-5, atol=1.e-8): Returns ------- - y : bool + allclose : bool Returns True if the two arrays are equal within the given tolerance; False otherwise. If either array contains NaN, then False is returned. @@ -2159,7 +2159,7 @@ def seterr(all=None, divide=None, over=None, under=None, invalid=None): See also -------- seterrcall : Set a callback function for the 'call' mode. - geterr, geterrcall + geterr, geterrcall, errstate Notes ----- |