Skip to content

Commit

Permalink
Simplify CSF test.
Browse files Browse the repository at this point in the history
  • Loading branch information
hameerabbasi committed Nov 15, 2024
1 parent 0b910b9 commit 2025824
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sparse/mlir_backend/tests/test_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,9 @@ def test_csf_format(dtype):
for actual, expected in zip(result_arrays, constituent_arrays, strict=True):
np.testing.assert_array_equal(actual, expected)

res_arrays = sparse.add(csf_array, csf_array).get_constituent_arrays()
expected_arrays = (pos_1, crd_1, pos_2, crd_2, data * 2)
for actual, expected in zip(res_arrays, expected_arrays, strict=True):
np.testing.assert_array_equal(actual, expected)
actual = sparse.add(csf_array, csf_array)
expected = sparse.from_constituent_arrays(format=format, arrays=(pos_1, crd_1, pos_2, crd_2, data * 2), shape=SHAPE)
assert_array_equal(expected, actual)


@parametrize_dtypes
Expand Down

0 comments on commit 2025824

Please sign in to comment.