Skip to content

Commit

Permalink
Update sparse/tests/test_backends.py
Browse files Browse the repository at this point in the history
Co-authored-by: Hameer Abbasi <2190658+hameerabbasi@users.noreply.github.com>
  • Loading branch information
mtsokol and hameerabbasi committed Apr 16, 2024
1 parent aba26bd commit 017cb7d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions sparse/tests/test_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,17 @@ def my_fun(tns1, tns2):
assert_equal(result.todense(), np.sum(2 * np_eye, axis=0))


@pytest.mark.parametrize("format", ["csc", "csr", "coo"])
def test_asarray(backend, format):
arr = np.eye(5)
@pytest.mark.parametrize("format, order", [("csc", "F"), ("csr", "C"), ("coo", "F"), ("coo", "C")])
def test_asarray(backend, format, order):
arr = np.eye(5, order=order)

result = sparse.asarray(arr, format=format)

assert_equal(result.todense(), arr)


@pytest.mark.parametrize("format_with_order", [("csc", "F"), ("csr", "C"), ("coo", "F"), ("coo", "C")])
def test_scipy_sparse_dispatch(backend, format_with_order):
format, order = format_with_order
@pytest.mark.parametrize("format, order", [("csc", "F"), ("csr", "C"), ("coo", "F"), ("coo", "C")])
def test_scipy_sparse_dispatch(backend, format, order):
x = np.eye(10, order=order) * 2
y = np.ones((10, 1), order=order)

Expand Down

0 comments on commit 017cb7d

Please sign in to comment.