def test_arithmetic_link_link():
    d = Data(x=[1, 2, 3, 4], y=[10, 20, 10, 20])
    x = d[d.id['x']]
    y = d[d.id['y']]
    xpy = d.id['x'] + d.id['y']
    xt3 = d.id['x'] * 3
    assert_array_equal(d[xpy + xt3], x + y + x * 3)
    assert_array_equal(d[xpy - xt3], x + y - x * 3)
    assert_array_equal(d[xpy * xt3], (x + y) * x * 3)
    assert_array_equal(d[xpy / xt3], (x + y) / (x * 3))
    assert_array_equal(d[xpy ** xt3], (x + y) ** (x * 3))
dataset/ETHPy150Open glue-viz/glue/glue/core/tests/test_component_link.py/test_arithmetic_link_link/original