

def generic_check(self, x, y, desired):
    if isinstance(x, tuple):
        x = np.ones(x)
    if isinstance(y, tuple):
        y = np.ones(y)
    xx = size_check.dummy_array(x)
    yy = size_check.dummy_array(y)
    ops = ['+', '-', '/', '*', '<<', '>>']
    for op in ops:
        actual = eval((('xx' + op) + 'yy'))
        desired = desired
        assert_array_equal(actual, desired)

dataset/ETHPy150Open scipy/scipy/scipy/weave/tests/test_size_check.py TestDummyArray.generic_check/original