From 2ac75e57bdc176860896e144533aa7ab42093d94 Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Tue, 6 Dec 2022 13:01:11 +0100 Subject: DOC: Fix doc `numpy.` to `numpy.exceptions.` --- numpy/core/multiarray.py | 6 +++--- numpy/exceptions.py | 4 ++-- numpy/random/_generator.pyx | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'numpy') 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) -- cgit v1.2.1