Skip to content

Commit

Permalink
Corrected test_argsort_ndarray test with unique generated random values
Browse files Browse the repository at this point in the history
  • Loading branch information
antonwolfy committed Mar 26, 2024
1 parent 8c97a8d commit 5c82abf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test_sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ def test_argsort_axis(self, axis):
@pytest.mark.parametrize("dtype", get_all_dtypes())
@pytest.mark.parametrize("axis", [None, -2, -1, 0, 1])
def test_argsort_ndarray(self, dtype, axis):
a = numpy.random.uniform(-10, 10, 12)
if dtype and issubclass(dtype, numpy.integer):
a = numpy.random.choice(
numpy.arange(-10, 10), replace=False, size=12
)
else:
a = numpy.random.uniform(-10, 10, 12)
np_array = numpy.array(a, dtype=dtype).reshape(6, 2)
dp_array = dpnp.array(np_array)

Expand Down

0 comments on commit 5c82abf

Please sign in to comment.