Skip to content

Commit

Permalink
Fix test. Use expected result computed by numpy.
Browse files Browse the repository at this point in the history
  • Loading branch information
sklam committed Mar 14, 2023
1 parent f6a4580 commit ae07d34
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions numba/tests/test_np_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2218,11 +2218,12 @@ def test_argpartition_basic(self):
cfunc = jit(nopython=True)(pyfunc)

d = np.array([], dtype=np.int64)
expected = pyfunc(d, 0)
got = cfunc(d, 0)
self.assertPreciseEqual(d, got)
self.assertPreciseEqual(expected, got)

d = np.ones(1, dtype=np.int64)
expected = np.zeros(1, dtype=np.int64)
expected = pyfunc(d, 0)
got = cfunc(d, 0)
self.assertPreciseEqual(expected, got)

Expand Down

0 comments on commit ae07d34

Please sign in to comment.