Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cross2d wrong doc. reference (issue #6276) #6277

Merged
merged 7 commits into from
Sep 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion numba/np/arraymath.py
Original file line number Diff line number Diff line change
Expand Up @@ -4395,7 +4395,7 @@ def impl(a, b):
raise ValueError((
"Dimensions for both inputs is 2.\n"
"Please replace your numpy.cross(a, b) call with "
"numba.numpy_extensions.cross2d(a, b)."
"a call to `cross2d(a, b)` from `numba.np.extensions`."
))
return impl

Expand Down
9 changes: 7 additions & 2 deletions numba/tests/test_np_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from numba.core.errors import TypingError
from numba.core.config import IS_WIN32, IS_32BITS
from numba.core.utils import pysignature
from numba.np.arraymath import cross2d
from numba.np.extensions import cross2d
from numba.tests.support import (TestCase, CompilationCache, MemoryLeakMixin,
needs_blas, skip_ppc64le_issue4026)
import unittest
Expand Down Expand Up @@ -3587,7 +3587,12 @@ def test_cross_exceptions(self):
np.array((3, 4))
)
self.assertIn(
'Dimensions for both inputs is 2',
'Dimensions for both inputs is 2.',
str(raises.exception)
)

self.assertIn(
'`cross2d(a, b)` from `numba.np.extensions`.',
str(raises.exception)
)

Expand Down