Skip to content

Commit

Permalink
Merge pull request #6277 from jeertmans/master
Browse files Browse the repository at this point in the history
fix: cross2d wrong doc. reference (issue #6276)
  • Loading branch information
sklam committed Sep 24, 2020
2 parents cb7fb76 + fe81fcc commit 38ecdf9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
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

0 comments on commit 38ecdf9

Please sign in to comment.