diff options
author | Sebastian Berg <sebastianb@nvidia.com> | 2023-05-03 22:05:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-03 22:05:48 +0200 |
commit | 24acd973f91871a6fd21e1d4ba62a0ece99861f0 (patch) | |
tree | 87ebdf2510ef0d7c93a7b0fe101052b48316530f /numpy/core/tests | |
parent | c37a577c9df74e29c97a7bb010de0b37f83870bb (diff) | |
parent | be08e88c544ce6e1df093f649a3d9afbce9c4171 (diff) | |
download | numpy-24acd973f91871a6fd21e1d4ba62a0ece99861f0.tar.gz |
Merge pull request #23699 from ngoldbaum/repeat-remove-array-incref
MAINT: refactor PyArray_Repeat to avoid PyArray_INCREF
Diffstat (limited to 'numpy/core/tests')
-rw-r--r-- | numpy/core/tests/test_multiarray.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py index 984047c87..196c2dc13 100644 --- a/numpy/core/tests/test_multiarray.py +++ b/numpy/core/tests/test_multiarray.py @@ -1934,8 +1934,9 @@ class TestMethods: assert_array_equal(a2.prod(axis=-1), np.array([24, 1890, 600], ctype)) - def test_repeat(self): - m = np.array([1, 2, 3, 4, 5, 6]) + @pytest.mark.parametrize('dtype', [None, object]) + def test_repeat(self, dtype): + m = np.array([1, 2, 3, 4, 5, 6], dtype=dtype) m_rect = m.reshape((2, 3)) A = m.repeat([1, 3, 2, 1, 1, 2]) |