72b9ef8fe0d617149db5241b7197c0e8486f9557,opt_einsum/tests/test_sharing.py,,test_sharing_value,#Any#,14

Before Change


@pytest.mark.parametrize("backend", ["numpy", torch_if_found])
def test_sharing_value(backend):
    w = np.random.normal(size=(2, 3, 4))
    x = np.random.normal(size=(3, 4, 5))
    y = np.random.normal(size=(4, 5, 6))
    z = np.random.normal(size=(5, 6, 7))
    expr = "abc,bcd,cde,def->af"

After Change


def test_sharing_value(backend):
    eq = "abc,bcd,cde,def->af"
    views = helpers.build_views(eq)
    shapes = [v.shape for v in views]
    expr = contract_expression(eq, *shapes)

    expected = expr(*views, backend=backend)
    with shared_intermediates():
        actual = expr(*views, backend=backend)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: dgasmith/opt_einsum
Commit Name: 72b9ef8fe0d617149db5241b7197c0e8486f9557
Time: 2018-08-20
Author: fritzo@uber.com
File Name: opt_einsum/tests/test_sharing.py
Class Name:
Method Name: test_sharing_value


Project Name: dgasmith/opt_einsum
Commit Name: 72b9ef8fe0d617149db5241b7197c0e8486f9557
Time: 2018-08-20
Author: fritzo@uber.com
File Name: opt_einsum/tests/test_sharing.py
Class Name:
Method Name: test_chain_2


Project Name: dgasmith/opt_einsum
Commit Name: 72b9ef8fe0d617149db5241b7197c0e8486f9557
Time: 2018-08-20
Author: fritzo@uber.com
File Name: opt_einsum/tests/test_sharing.py
Class Name:
Method Name: test_chain