예제 #1
0
def test_experimental_lambify():
    x = Symbol('x')
    f = lambdify([x], Max(x, 5))
    # XXX should f be tested? If f(2) is attempted, an
    # error is raised because a complex produced during wrapping of the arg
    # is being compared with an int.
    assert Max(2, 5) == 5
    assert Max(5, 7) == 7

    x = Symbol('x-3')
    f = lambdify([x], x + 1)
    assert f(1) == 2
예제 #2
0
def test_experimental_lambify():
    x = Symbol('x')
    f = lambdify([x], Max(x, 5))
    # XXX should f be tested? If f(2) is attempted, an
    # error is raised because a complex produced during wrapping of the arg
    # is being compared with an int.
    assert Max(2, 5) == 5
    assert Max(5, 7) == 7

    x = Symbol('x-3')
    f = lambdify([x], x + 1)
    assert f(1) == 2
예제 #3
0
def test_experimental_lambify():
    x = Symbol('x')
    lambdify([x], Max(x, 5))
    assert Max(2, 5) == 5
    assert Max(7, 5) == 7
예제 #4
0
def test_experimental_lambify():
    x = Symbol('x')
    lambdify([x], Max(x, 5))
    assert Max(2, 5) == 5
    assert Max(7, 5) == 7