예제 #1
0
def get_symbols_in(expr):
    import expresso.pycas as pc

    symbols = set()
    for e in pc.postorder_traversal(expr):
        if e.is_symbol:
            symbols.add(e)
    return symbols
예제 #2
0
def get_symbols_in(expr):
    import expresso.pycas as pc

    symbols = set()
    for e in pc.postorder_traversal(expr):
        if e.is_symbol:
            symbols.add(e)
    return symbols
예제 #3
0
def contains_unit(expr):
    for e in pc.postorder_traversal(expr):
        if e in base_units:
            return True
    return False
예제 #4
0
def contains_unit(expr):
    for e in pc.postorder_traversal(expr):
        if e in base_units:
            return True
    return False