summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorSebastian Berg <sebastianb@nvidia.com>2022-12-06 13:01:11 +0100
committerSebastian Berg <sebastianb@nvidia.com>2022-12-06 20:02:37 +0100
commit2ac75e57bdc176860896e144533aa7ab42093d94 (patch)
tree2703e6e0e0a631e04ae08e0ac60e8d88ba522795 /numpy
parent928a7b40a40941c0c282cfad78c3a6021422a71c (diff)
downloadnumpy-2ac75e57bdc176860896e144533aa7ab42093d94.tar.gz
DOC: Fix doc `numpy.<exception>` to `numpy.exceptions.<exception>`
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/multiarray.py6
-rw-r--r--numpy/exceptions.py4
-rw-r--r--numpy/random/_generator.pyx2
3 files changed, 6 insertions, 6 deletions
diff --git a/numpy/core/multiarray.py b/numpy/core/multiarray.py
index 31b779783..636a6fbbd 100644
--- a/numpy/core/multiarray.py
+++ b/numpy/core/multiarray.py
@@ -1122,7 +1122,7 @@ def copyto(dst, src, casting=None, where=None):
>>> A
array([[4, 5, 6],
[7, 8, 9]])
-
+
"""
return (dst, src, where)
@@ -1345,7 +1345,7 @@ def shares_memory(a, b, max_work=None):
Raises
------
- numpy.TooHardError
+ numpy.exceptions.TooHardError
Exceeded max_work.
Returns
@@ -1379,7 +1379,7 @@ def shares_memory(a, b, max_work=None):
>>> np.shares_memory(x1, x2, max_work=1000)
Traceback (most recent call last):
...
- numpy.TooHardError: Exceeded max_work
+ numpy.exceptions.TooHardError: Exceeded max_work
Running ``np.shares_memory(x1, x2)`` without `max_work` set takes
around 1 minute for this case. It is possible to find problems
diff --git a/numpy/exceptions.py b/numpy/exceptions.py
index ca0a47c04..d2fe9257b 100644
--- a/numpy/exceptions.py
+++ b/numpy/exceptions.py
@@ -146,14 +146,14 @@ class AxisError(ValueError, IndexError):
>>> np.cumsum(array_1d, axis=1)
Traceback (most recent call last):
...
- numpy.AxisError: axis 1 is out of bounds for array of dimension 1
+ numpy.exceptions.AxisError: axis 1 is out of bounds for array of dimension 1
Negative axes are preserved:
>>> np.cumsum(array_1d, axis=-2)
Traceback (most recent call last):
...
- numpy.AxisError: axis -2 is out of bounds for array of dimension 1
+ numpy.exceptions.AxisError: axis -2 is out of bounds for array of dimension 1
The class constructor generally takes the axis and arrays'
dimensionality as arguments:
diff --git a/numpy/random/_generator.pyx b/numpy/random/_generator.pyx
index 266a05387..da66c1cac 100644
--- a/numpy/random/_generator.pyx
+++ b/numpy/random/_generator.pyx
@@ -4745,7 +4745,7 @@ cdef class Generator:
>>> rng.permutation("abc")
Traceback (most recent call last):
...
- numpy.AxisError: axis 0 is out of bounds for array of dimension 0
+ numpy.exceptions.AxisError: axis 0 is out of bounds for array of dimension 0
>>> arr = np.arange(9).reshape((3, 3))
>>> rng.permutation(arr, axis=1)