summaryrefslogtreecommitdiff
path: root/numpy/add_newdocs.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/add_newdocs.py')
-rw-r--r--numpy/add_newdocs.py93
1 files changed, 14 insertions, 79 deletions
diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py
index 6934cadcc..86ea4b8b6 100644
--- a/numpy/add_newdocs.py
+++ b/numpy/add_newdocs.py
@@ -3078,7 +3078,7 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('argsort',
add_newdoc('numpy.core.multiarray', 'ndarray', ('argpartition',
"""
- a.argpartition(kth, axis=-1, kind='quickselect', order=None)
+ a.argpartition(kth, axis=-1, kind='introselect', order=None)
Returns the indices that would partition this array.
@@ -4693,45 +4693,6 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('view',
#
##############################################################################
-add_newdoc('numpy.core.umath', 'frexp',
- """
- Return normalized fraction and exponent of 2 of input array, element-wise.
-
- Returns (`out1`, `out2`) from equation ``x` = out1 * 2**out2``.
-
- Parameters
- ----------
- x : array_like
- Input array.
-
- Returns
- -------
- (out1, out2) : tuple of ndarrays, (float, int)
- `out1` is a float array with values between -1 and 1.
- `out2` is an int array which represent the exponent of 2.
-
- See Also
- --------
- ldexp : Compute ``y = x1 * 2**x2``, the inverse of `frexp`.
-
- Notes
- -----
- Complex dtypes are not supported, they will raise a TypeError.
-
- Examples
- --------
- >>> x = np.arange(9)
- >>> y1, y2 = np.frexp(x)
- >>> y1
- array([ 0. , 0.5 , 0.5 , 0.75 , 0.5 , 0.625, 0.75 , 0.875,
- 0.5 ])
- >>> y2
- array([0, 1, 2, 2, 3, 3, 3, 3, 4])
- >>> y1 * 2**y2
- array([ 0., 1., 2., 3., 4., 5., 6., 7., 8.])
-
- """)
-
add_newdoc('numpy.core.umath', 'frompyfunc',
"""
frompyfunc(func, nin, nout)
@@ -4772,44 +4733,6 @@ add_newdoc('numpy.core.umath', 'frompyfunc',
""")
-add_newdoc('numpy.core.umath', 'ldexp',
- """
- Compute y = x1 * 2**x2.
-
- Parameters
- ----------
- x1 : array_like
- The array of multipliers.
- x2 : array_like
- The array of exponents.
-
- Returns
- -------
- y : array_like
- The output array, the result of ``x1 * 2**x2``.
-
- See Also
- --------
- frexp : Return (y1, y2) from ``x = y1 * 2**y2``, the inverse of `ldexp`.
-
- Notes
- -----
- Complex dtypes are not supported, they will raise a TypeError.
-
- `ldexp` is useful as the inverse of `frexp`, if used by itself it is
- more clear to simply use the expression ``x1 * 2**x2``.
-
- Examples
- --------
- >>> np.ldexp(5, np.arange(4))
- array([ 5., 10., 20., 40.], dtype=float32)
-
- >>> x = np.arange(6)
- >>> np.ldexp(*np.frexp(x))
- array([ 0., 1., 2., 3., 4., 5.])
-
- """)
-
add_newdoc('numpy.core.umath', 'geterrobj',
"""
geterrobj()
@@ -6195,7 +6118,19 @@ add_newdoc('numpy.core.multiarray', 'dtype', ('itemsize',
add_newdoc('numpy.core.multiarray', 'dtype', ('kind',
"""
- A character code (one of 'biufcSUV') identifying the general kind of data.
+ A character code (one of 'biufcOSUV') identifying the general kind of data.
+
+ = ======================
+ b boolean
+ i signed integer
+ u unsigned integer
+ f floating-point
+ c complex floating-point
+ O object
+ S (byte-)string
+ U Unicode
+ V void
+ = ======================
"""))