summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
authorRalf Gommers <ralf.gommers@googlemail.com>2014-12-13 12:03:45 +0100
committerRalf Gommers <ralf.gommers@googlemail.com>2014-12-13 12:03:45 +0100
commit3ef77eea0d9c2cd76bc9b89b04a32f1322f842d5 (patch)
tree346e177b206896e2209351dafe7190e615a18a04 /numpy/core
parent2070ecf08a4727819b0268f761f6614a153e619c (diff)
parent1b908fc0f119f6d4137080d1db317b6b9c4e3e74 (diff)
downloadnumpy-3ef77eea0d9c2cd76bc9b89b04a32f1322f842d5.tar.gz
Merge pull request #5368 from tacaswell/sundry_doc_changes
Cleanups in documentation formatting.
Diffstat (limited to 'numpy/core')
-rw-r--r--numpy/core/code_generators/ufunc_docstrings.py32
-rw-r--r--numpy/core/defchararray.py12
-rw-r--r--numpy/core/fromnumeric.py2
-rw-r--r--numpy/core/numeric.py11
4 files changed, 29 insertions, 28 deletions
diff --git a/numpy/core/code_generators/ufunc_docstrings.py b/numpy/core/code_generators/ufunc_docstrings.py
index 1abbb666b..328e43ca6 100644
--- a/numpy/core/code_generators/ufunc_docstrings.py
+++ b/numpy/core/code_generators/ufunc_docstrings.py
@@ -686,7 +686,7 @@ add_newdoc('numpy.core.umath', 'ceil',
Returns
-------
- y : {ndarray, scalar}
+ y : ndarray or scalar
The ceiling of each element in `x`, with `float` dtype.
See Also
@@ -716,7 +716,7 @@ add_newdoc('numpy.core.umath', 'trunc',
Returns
-------
- y : {ndarray, scalar}
+ y : ndarray or scalar
The truncated value of each element in `x`.
See Also
@@ -931,7 +931,7 @@ add_newdoc('numpy.core.umath', 'divide',
Returns
-------
- y : {ndarray, scalar}
+ y : ndarray or scalar
The quotient ``x1/x2``, element-wise. Returns a scalar if
both ``x1`` and ``x2`` are scalars.
@@ -999,7 +999,7 @@ add_newdoc('numpy.core.umath', 'equal',
Returns
-------
- out : {ndarray, bool}
+ out : ndarray or bool
Output array of bools, or a single bool if x1 and x2 are scalars.
See Also
@@ -1172,7 +1172,7 @@ add_newdoc('numpy.core.umath', 'fabs',
Returns
-------
- y : {ndarray, scalar}
+ y : ndarray or scalar
The absolute values of `x`, the returned values are always floats.
See Also
@@ -1202,7 +1202,7 @@ add_newdoc('numpy.core.umath', 'floor',
Returns
-------
- y : {ndarray, scalar}
+ y : ndarray or scalar
The floor of each element in `x`.
See Also
@@ -1632,7 +1632,7 @@ add_newdoc('numpy.core.umath', 'isnan',
Returns
-------
- y : {ndarray, bool}
+ y : ndarray or bool
For scalar input, the result is a new boolean with value True if
the input is NaN; otherwise the value is False.
@@ -2046,7 +2046,7 @@ add_newdoc('numpy.core.umath', 'logical_and',
Returns
-------
- y : {ndarray, bool}
+ y : ndarray or bool
Boolean result with the same shape as `x1` and `x2` of the logical
AND operation on corresponding elements of `x1` and `x2`.
@@ -2112,7 +2112,7 @@ add_newdoc('numpy.core.umath', 'logical_or',
Returns
-------
- y : {ndarray, bool}
+ y : ndarray or bool
Boolean result with the same shape as `x1` and `x2` of the logical
OR operation on elements of `x1` and `x2`.
@@ -2193,7 +2193,7 @@ add_newdoc('numpy.core.umath', 'maximum',
Returns
-------
- y : {ndarray, scalar}
+ y : ndarray or scalar
The maximum of `x1` and `x2`, element-wise. Returns scalar if
both `x1` and `x2` are scalars.
@@ -2251,7 +2251,7 @@ add_newdoc('numpy.core.umath', 'minimum',
Returns
-------
- y : {ndarray, scalar}
+ y : ndarray or scalar
The minimum of `x1` and `x2`, element-wise. Returns scalar if
both `x1` and `x2` are scalars.
@@ -2309,7 +2309,7 @@ add_newdoc('numpy.core.umath', 'fmax',
Returns
-------
- y : {ndarray, scalar}
+ y : ndarray or scalar
The minimum of `x1` and `x2`, element-wise. Returns scalar if
both `x1` and `x2` are scalars.
@@ -2366,7 +2366,7 @@ add_newdoc('numpy.core.umath', 'fmin',
Returns
-------
- y : {ndarray, scalar}
+ y : ndarray or scalar
The minimum of `x1` and `x2`, element-wise. Returns scalar if
both `x1` and `x2` are scalars.
@@ -2780,7 +2780,7 @@ add_newdoc('numpy.core.umath', 'rint',
Returns
-------
- out : {ndarray, scalar}
+ out : ndarray or scalar
Output array is same shape and type as `x`.
See Also
@@ -3365,9 +3365,9 @@ add_newdoc('numpy.core.umath', 'frexp',
----------
x : array_like
Array of numbers to be decomposed.
- out1: ndarray, optional
+ out1 : ndarray, optional
Output array for the mantissa. Must have the same shape as `x`.
- out2: ndarray, optional
+ out2 : ndarray, optional
Output array for the exponent. Must have the same shape as `x`.
Returns
diff --git a/numpy/core/defchararray.py b/numpy/core/defchararray.py
index 121e32314..cc6cb5a38 100644
--- a/numpy/core/defchararray.py
+++ b/numpy/core/defchararray.py
@@ -109,7 +109,7 @@ def equal(x1, x2):
Returns
-------
- out : {ndarray, bool}
+ out : ndarray or bool
Output array of bools, or a single bool if x1 and x2 are scalars.
See Also
@@ -133,7 +133,7 @@ def not_equal(x1, x2):
Returns
-------
- out : {ndarray, bool}
+ out : ndarray or bool
Output array of bools, or a single bool if x1 and x2 are scalars.
See Also
@@ -158,7 +158,7 @@ def greater_equal(x1, x2):
Returns
-------
- out : {ndarray, bool}
+ out : ndarray or bool
Output array of bools, or a single bool if x1 and x2 are scalars.
See Also
@@ -182,7 +182,7 @@ def less_equal(x1, x2):
Returns
-------
- out : {ndarray, bool}
+ out : ndarray or bool
Output array of bools, or a single bool if x1 and x2 are scalars.
See Also
@@ -206,7 +206,7 @@ def greater(x1, x2):
Returns
-------
- out : {ndarray, bool}
+ out : ndarray or bool
Output array of bools, or a single bool if x1 and x2 are scalars.
See Also
@@ -230,7 +230,7 @@ def less(x1, x2):
Returns
-------
- out : {ndarray, bool}
+ out : ndarray or bool
Output array of bools, or a single bool if x1 and x2 are scalars.
See Also
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py
index bab7cdf4b..321deb014 100644
--- a/numpy/core/fromnumeric.py
+++ b/numpy/core/fromnumeric.py
@@ -357,7 +357,7 @@ def repeat(a, repeats, axis=None):
----------
a : array_like
Input array.
- repeats : {int, array of ints}
+ repeats : int or array of ints
The number of repetitions for each element. `repeats` is broadcasted
to fit the shape of the given axis.
axis : int, optional
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
index 30cba28f2..1847300dd 100644
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -1150,7 +1150,8 @@ def tensordot(a, b, axes=2):
----------
a, b : array_like, len(shape) >= 1
Tensors to "dot".
- axes : {integer_like, array_like}
+
+ axes : int or (2,) array_like
* integer_like
If an int N, sum over the last N axes of `a` and the first N axes
of `b` in order. The sizes of the corresponding axes must match.
@@ -1168,11 +1169,11 @@ def tensordot(a, b, axes=2):
``axes = 0`` : tensor product $a\otimes b$
``axes = 1`` : tensor dot product $a\cdot b$
``axes = 2`` : (default) tensor double contraction $a:b$
-
- When `axes` is integer_like, the sequence for evaluation will be: first
- the -Nth axis in `a` and 0th axis in `b`, and the -1th axis in `a` and
+
+ When `axes` is integer_like, the sequence for evaluation will be: first
+ the -Nth axis in `a` and 0th axis in `b`, and the -1th axis in `a` and
Nth axis in `b` last.
-
+
When there is more than one axis to sum over - and they are not the last
(first) axes of `a` (`b`) - the argument `axes` should consist of
two sequences of the same length, with the first axis to sum over given