We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7850ac commit 5551ae6Copy full SHA for 5551ae6
sparse/numba_backend/tests/test_coo.py
@@ -1934,8 +1934,11 @@ def test_repeat(ndim, repeats):
1934
rng = np.random.default_rng()
1935
shape = tuple(rng.integers(1, 4) for _ in range(ndim))
1936
a = rng.integers(1, 10, size=shape)
1937
+ with pytest.raises(TypeError, match="`a` must be a SparseArray"):
1938
+ sparse.repeat(a, repeats=2)
1939
sparse_a = COO.from_numpy(a)
-
1940
+ with pytest.raises(Exception, match="`repeats` must be an integer"):
1941
+ sparse.repeat(sparse_a, repeats=[2, 2, 2])
1942
for axis in range(ndim):
1943
expected = np.repeat(a, repeats=repeats, axis=axis)
1944
result_sparse = sparse.repeat(sparse_a, repeats=repeats, axis=axis)
0 commit comments