8000 Merge pull request #24752 from liang3zy22/somerefwarn3 · numpy/numpy@7f7dac7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7f7dac7

Browse files
authored
Merge pull request #24752 from liang3zy22/somerefwarn3
DOC: Fix reference warning in some rst files
2 parents 08fbb43 + 3c99c6f commit 7f7dac7

File tree

3 files changed

+15
-22
lines changed

3 files changed

+15
-22
lines changed

doc/source/reference/arrays.classes.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ Character arrays (:mod:`numpy.char`)
477477
single: character arrays
478478

479479
.. note::
480-
The `chararray` class exists for backwards compatibility with
480+
The `~numpy.char.chararray` class exists for backwards compatibility with
481481
Numarray, it is not recommended for new development. Starting from numpy
482482
1.4, if one needs arrays of strings, it is recommended to use arrays of
483483
`dtype` `object_`, `bytes_` or `str_`, and use the free functions
@@ -488,13 +488,13 @@ These are enhanced arrays of either :class:`str_` type or
488488
:class:`ndarray`, but specially-define the operations ``+``, ``*``,
489489
and ``%`` on a (broadcasting) element-by-element basis. These
490490
operations are not available on the standard :class:`ndarray` of
491-
character type. In addition, the :class:`chararray` has all of the
491+
character type. In addition, the :class:`~numpy.char.chararray` has all of the
492492
standard :class:`str` (and :class:`bytes`) methods,
493493
executing them on an element-by-element basis. Perhaps the easiest
494494
way to create a chararray is to use :meth:`self.view(chararray)
495495
<ndarray.view>` where *self* is an ndarray of str or unicode
496496
data-type. However, a chararray can also be created using the
497-
:meth:`numpy.char.chararray` constructor, or via the
497+
:meth:`~numpy.char.chararray` constructor, or via the
498498
:func:`numpy.char.array <core.defchararray.array>` function:
499499

500500
.. autosummary::

numpy/core/defchararray.py

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -410,9 +410,6 @@ def mod(a, values):
410410
out : ndarray
411411
Output array of str or unicode, depending on input types
412412
413-
See Also
414-
--------
415-
str.__mod__
416413
417414
"""
418415
return _to_bytes_or_str_array(
@@ -1931,10 +1928,10 @@ class chararray(ndarray):
19311928
The `chararray` class exists for backwards compatibility with
19321929
Numarray, it is not recommended for new development. Starting from numpy
19331930
1.4, if one needs arrays of strings, it is recommended to use arrays of
1934-
`dtype` `object_`, `bytes_` or `str_`, and use the free functions
1931+
`dtype` `~numpy.object_`, `~numpy.bytes_` or `~numpy.str_`, and use the free functions
19351932
in the `numpy.char` module for fast vectorized string operations.
19361933
1937-
Versus a NumPy array of dtype `bytes_` or `str_`, this
1934+
Versus a NumPy array of dtype `~numpy.bytes_` or `~numpy.str_`, this
19381935
class adds the following functionality:
19391936
19401937
1) values automatically have whitespace removed from the end
@@ -2036,7 +2033,7 @@ class adds the following functionality:
20362033
Fixed stride displacement from the beginning of an axis?
20372034
Default is 0. Needs to be >=0.
20382035
strides : array_like of ints, optional
2039-
Strides for the array (see `ndarray.strides` for full description).
2036+
Strides for the array (see `~numpy.ndarray.strides` for full description).
20402037
Default is None.
20412038
order : {'C', 'F'}, optional
20422039
The order in which the array data is stored in memory: 'C' ->
@@ -2731,13 +2728,13 @@ def isdecimal(self):
27312728
@set_module("numpy.char")
27322729
def array(obj, itemsize=None, copy=True, unicode=None, order=None):
27332730
"""
2734-
Create a `chararray`.
2731+
Create a `~numpy.char.chararray`.
27352732
27362733
.. note::
27372734
This class is provided for numarray backward-compatibility.
27382735
New code (not concerned with numarray compatibility) should use
27392736
arrays of type `bytes_` or `str_` and use the free functions
2740-
in :mod:`numpy.char <numpy.core.defchararray>` for fast
2737+
in :mod:`numpy.char` for fast
27412738
vectorized string operations instead.
27422739
27432740
Versus a NumPy array of dtype `bytes_` or `str_`, this
@@ -2750,7 +2747,7 @@ class adds the following functionality:
27502747
end when comparing values
27512748
27522749
3) vectorized string operations are provided as methods
2753-
(e.g. `~chararray.endswith`) and infix operators (e.g. ``+, *, %``)
2750+
(e.g. `chararray.endswith <numpy.char.chararray.endswith>`) and infix operators (e.g. ``+, *, %``)
27542751
27552752
Parameters
27562753
----------
@@ -2771,11 +2768,11 @@ class adds the following functionality:
27712768
requirements (`itemsize`, unicode, `order`, etc.).
27722769
27732770
unicode : bool, optional
2774-
When true, the resulting `chararray` can contain Unicode
2771+
When true, the resulting `~numpy.char.chararray` can contain Unicode
27752772
characters, when false only 8-bit characters. If unicode is
27762773
None and `obj` is one of the following:
27772774
2778-
- a `chararray`,
2775+
- a `~numpy.char.chararray`,
27792776
- an ndarray of type `str_` or `unicode_`
27802777
- a Python str or unicode object,
27812778
@@ -2865,7 +2862,7 @@ class adds the following functionality:
28652862
@set_module("numpy.char")
28662863
def asarray(obj, itemsize=None, unicode=None, order=None):
28672864
"""
2868-
Convert the input to a `chararray`, copying the data only if
2865+
Convert the input to a `~numpy.char.chararray`, copying the data only if
28692866
necessary.
28702867
28712868
Versus a NumPy array of dtype `bytes_` or `str_`, this
@@ -2878,7 +2875,7 @@ class adds the following functionality:
28782875
end when comparing values
28792876
28802877
3) vectorized string operations are provided as methods
2881-
(e.g. `~chararray.endswith`) and infix operators
2878+
(e.g. `chararray.endswith <numpy.char.chararray.endswith>`) and infix operators
28822879
(e.g. ``+``, ``*``, ``%``)
28832880
28842881
Parameters
@@ -2894,11 +2891,11 @@ class adds the following functionality:
28942891
chunked into `itemsize` pieces.
28952892
28962893
unicode : bool, optional
2897-
When true, the resulting `chararray` can contain Unicode
2894+
When true, the resulting `~numpy.char.chararray` can contain Unicode
28982895
characters, when false only 8-bit characters. If unicode is
28992896
None and `obj` is one of the following:
29002897
2901-
- a `chararray`,
2898+
- a `~numpy.char.chararray`,
29022899
- an ndarray of type `str_` or `unicode_`
29032900
- a Python str or unicode object,
29042901

numpy/core/numeric.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -671,9 +671,6 @@ def correlate(a, v, mode='valid'):
671671
mode : {'valid', 'same', 'full'}, optional
672672
Refer to the `convolve` docstring. Note that the default
673673
is 'valid', unlike `convolve`, which uses 'full'.
674-
old_behavior : bool
675-
`old_behavior` was removed in NumPy 1.10. If you need the old
676-
behavior, use `multiarray.correlate`.
677674
678675
Returns
679676
-------
@@ -683,7 +680,6 @@ def correlate(a, v, mode='valid'):
683680
See Also
684681
--------
685682
convolve : Discrete, linear convolution of two one-dimensional sequences.
686-
multiarray.correlate : Old, no conjugate, version of correlate.
687683
scipy.signal.correlate : uses FFT which has superior performance on large arrays.
688684
689685
Notes

0 commit comments

Comments
 (0)
0