def test_sparse():
    from pybind11_tests import sparse_r, sparse_c, sparse_passthrough_r, sparse_passthrough_c

    assert_sparse_equal_ref(sparse_r())
    assert_sparse_equal_ref(sparse_c())
    assert_sparse_equal_ref(sparse_passthrough_r(sparse_r()))
    assert_sparse_equal_ref(sparse_passthrough_c(sparse_c()))
    assert_sparse_equal_ref(sparse_passthrough_r(sparse_c()))
    assert_sparse_equal_ref(sparse_passthrough_c(sparse_r()))
示例#2
0
def test_sparse():
    from pybind11_tests import sparse_r, sparse_c, sparse_copy_r, sparse_copy_c

    assert_sparse_equal_ref(sparse_r())
    assert_sparse_equal_ref(sparse_c())
    assert_sparse_equal_ref(sparse_copy_r(sparse_r()))
    assert_sparse_equal_ref(sparse_copy_c(sparse_c()))
    assert_sparse_equal_ref(sparse_copy_r(sparse_c()))
    assert_sparse_equal_ref(sparse_copy_c(sparse_r()))