summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core')
-rw-r--r--numpy/core/code_generators/ufunc_docstrings.py2
-rw-r--r--numpy/core/fromnumeric.py32
-rw-r--r--numpy/core/records.py10
3 files changed, 22 insertions, 22 deletions
diff --git a/numpy/core/code_generators/ufunc_docstrings.py b/numpy/core/code_generators/ufunc_docstrings.py
index 82cd6fb27..93e3d45fb 100644
--- a/numpy/core/code_generators/ufunc_docstrings.py
+++ b/numpy/core/code_generators/ufunc_docstrings.py
@@ -3596,7 +3596,7 @@ add_newdoc('numpy.core.umath', 'sqrt',
See Also
--------
- lib.scimath.sqrt
+ numpy.lib.scimath.sqrt
A version which returns complex numbers when given negative reals.
Notes
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py
index b07def736..b1524b891 100644
--- a/numpy/core/fromnumeric.py
+++ b/numpy/core/fromnumeric.py
@@ -460,7 +460,7 @@ def repeat(a, repeats, axis=None):
--------
tile : Tile an array.
unique : Find the unique elements of an array.
-
+
Examples
--------
>>> np.repeat(3, 4)
@@ -2007,8 +2007,8 @@ def compress(condition, a, axis=None, out=None):
--------
take, choose, diag, diagonal, select
ndarray.compress : Equivalent method in ndarray
- np.extract: Equivalent method when working on 1-D arrays
- ufuncs-output-type
+ extract: Equivalent method when working on 1-D arrays
+ :ref:`ufuncs-output-type`
Examples
--------
@@ -2082,7 +2082,7 @@ def clip(a, a_min, a_max, out=None, **kwargs):
See Also
--------
- ufuncs-output-type
+ :ref:`ufuncs-output-type`
Examples
--------
@@ -2278,7 +2278,7 @@ def any(a, axis=None, out=None, keepdims=np._NoValue):
the same shape as the expected output and its type is preserved
(e.g., if it is of type float, then it will remain so, returning
1.0 for True and 0.0 for False, regardless of the type of `a`).
- See `ufuncs-output-type` for more details.
+ See :ref:`ufuncs-output-type` for more details.
keepdims : bool, optional
If this is set to True, the axes which are reduced are left
@@ -2363,7 +2363,7 @@ def all(a, axis=None, out=None, keepdims=np._NoValue):
Alternate output array in which to place the result.
It must have the same shape as the expected output and its
type is preserved (e.g., if ``dtype(out)`` is float, the result
- will consist of 0.0's and 1.0's). See `ufuncs-output-type` for more
+ will consist of 0.0's and 1.0's). See :ref:`ufuncs-output-type` for more
details.
keepdims : bool, optional
@@ -2442,7 +2442,7 @@ def cumsum(a, axis=None, dtype=None, out=None):
out : ndarray, optional
Alternative output array in which to place the result. It must
have the same shape and buffer length as the expected output
- but the type will be cast if necessary. See `ufuncs-output-type` for
+ but the type will be cast if necessary. See :ref:`ufuncs-output-type` for
more details.
Returns
@@ -2613,7 +2613,7 @@ def amax(a, axis=None, out=None, keepdims=np._NoValue, initial=np._NoValue,
out : ndarray, optional
Alternative output array in which to place the result. Must
be of the same shape and buffer length as the expected output.
- See `ufuncs-output-type` for more details.
+ See :ref:`ufuncs-output-type` for more details.
keepdims : bool, optional
If this is set to True, the axes which are reduced are left
@@ -2738,7 +2738,7 @@ def amin(a, axis=None, out=None, keepdims=np._NoValue, initial=np._NoValue,
out : ndarray, optional
Alternative output array in which to place the result. Must
be of the same shape and buffer length as the expected output.
- See `ufuncs-output-type` for more details.
+ See :ref:`ufuncs-output-type` for more details.
keepdims : bool, optional
If this is set to True, the axes which are reduced are left
@@ -2948,7 +2948,7 @@ def prod(a, axis=None, dtype=None, out=None, keepdims=np._NoValue,
See Also
--------
ndarray.prod : equivalent method
- ufuncs-output-type
+ :ref:`ufuncs-output-type`
Notes
-----
@@ -3044,7 +3044,7 @@ def cumprod(a, axis=None, dtype=None, out=None):
See Also
--------
- ufuncs-output-type
+ :ref:`ufuncs-output-type`
Notes
-----
@@ -3190,7 +3190,7 @@ def around(a, decimals=0, out=None):
out : ndarray, optional
Alternative output array in which to place the result. It must have
the same shape as the expected output, but the type of the output
- values will be cast if necessary. See `ufuncs-output-type` for more
+ values will be cast if necessary. See :ref:`ufuncs-output-type` for more
details.
Returns
@@ -3305,7 +3305,7 @@ def mean(a, axis=None, dtype=None, out=None, keepdims=np._NoValue):
Alternate output array in which to place the result. The default
is ``None``; if provided, it must have the same shape as the
expected output, but the type will be cast if necessary.
- See `ufuncs-output-type` for more details.
+ See :ref:`ufuncs-output-type` for more details.
keepdims : bool, optional
If this is set to True, the axes which are reduced are left
@@ -3440,12 +3440,12 @@ def std(a, axis=None, dtype=None, out=None, ddof=0, keepdims=np._NoValue):
See Also
--------
var, mean, nanmean, nanstd, nanvar
- ufuncs-output-type
+ :ref:`ufuncs-output-type`
Notes
-----
The standard deviation is the square root of the average of the squared
- deviations from the mean, i.e., ``std = sqrt(mean(x))``, where
+ deviations from the mean, i.e., ``std = sqrt(mean(x))``, where
``x = abs(a - a.mean())**2``.
The average squared deviation is typically calculated as ``x.sum() / N``,
@@ -3566,7 +3566,7 @@ def var(a, axis=None, dtype=None, out=None, ddof=0, keepdims=np._NoValue):
See Also
--------
std, mean, nanmean, nanstd, nanvar
- ufuncs-output-type
+ :ref:`ufuncs-output-type`
Notes
-----
diff --git a/numpy/core/records.py b/numpy/core/records.py
index e95be0e3f..c2f6c6965 100644
--- a/numpy/core/records.py
+++ b/numpy/core/records.py
@@ -374,7 +374,7 @@ class recarray(ndarray):
See Also
--------
- rec.fromrecords : Construct a record array from data.
+ core.records.fromrecords : Construct a record array from data.
record : fundamental data-type for `recarray`.
format_parser : determine a data-type from formats, names, titles.
@@ -630,7 +630,7 @@ def fromarrays(arrayList, dtype=None, shape=None, formats=None,
>>> x1[1]=34
>>> r.a
array([1, 2, 3, 4])
-
+
>>> x1 = np.array([1, 2, 3, 4])
>>> x2 = np.array(['a', 'dd', 'xyz', '12'])
>>> x3 = np.array([1.1, 2, 3,4])
@@ -911,7 +911,7 @@ def fromfile(fd, dtype=None, shape=None, offset=0, formats=None,
shape = (shape,)
if hasattr(fd, 'readinto'):
- # GH issue 2504. fd supports io.RawIOBase or io.BufferedIOBase interface.
+ # GH issue 2504. fd supports io.RawIOBase or io.BufferedIOBase interface.
# Example of fd: gzip, BytesIO, BufferedReader
# file already opened
ctx = contextlib_nullcontext(fd)
@@ -958,7 +958,7 @@ def array(obj, dtype=None, shape=None, offset=0, strides=None, formats=None,
"""
Construct a record array from a wide-variety of objects.
- A general-purpose record array constructor that dispatches to the
+ A general-purpose record array constructor that dispatches to the
appropriate `recarray` creation function based on the inputs (see Notes).
Parameters
@@ -996,7 +996,7 @@ def array(obj, dtype=None, shape=None, offset=0, strides=None, formats=None,
`obj` is a string, then call the `fromstring` constructor. If `obj` is a
list or a tuple, then if the first object is an `~numpy.ndarray`, call
`fromarrays`, otherwise call `fromrecords`. If `obj` is a
- `~numpy.recarray`, then make a copy of the data in the recarray
+ `~numpy.recarray`, then make a copy of the data in the recarray
(if ``copy=True``) and use the new formats, names, and titles. If `obj`
is a file, then call `fromfile`. Finally, if obj is an `ndarray`, then
return ``obj.view(recarray)``, making a copy of the data if ``copy=True``.