Esempio n. 1
0
def inverse(x):
    if descriptors.is_lazy(x):
        return lazy_expressions.lazy_function("inverse", inverse) (x)
    assert hasattr(x,'invert') and hasattr(x,'copy')
    cop = x.copy() 
    cop.invert()
    return cop
Esempio n. 2
0
def inverse(x):
    if descriptors.is_lazy(x):
        return lazy_expressions.lazy_function("inverse", inverse)(x)
    assert hasattr(x, 'invert') and hasattr(x, 'copy')
    cop = x.copy()
    cop.invert()
    return cop
Esempio n. 3
0
def inverse(x):
    if isinstance(x,(lazy_expressions.lazy_expr,lazy_expressions.lazy_expr_terminal)) : 
        return lazy_expressions.lazy_function("inverse", inverse) (x)
    assert hasattr(x,'invert') and hasattr(x,'copy')
    cop = x.copy() 
    cop.invert()
    return cop
Esempio n. 4
0
def transpose(x):
    """
    Return the transpose of a Green's function
    """
    if descriptors.is_lazy(x):
        return lazy_expressions.lazy_function("transpose", transpose) (x)
    assert hasattr(x,'transpose')
    return x.transpose()
Esempio n. 5
0
def conjugate(x):
    """
    Return the conjugate of a Green's function
    """
    if descriptors.is_lazy(x):
        return lazy_expressions.lazy_function("conjugate", conjugate) (x)
    assert hasattr(x,'conjugate')
    return x.conjugate()
Esempio n. 6
0
def inverse(x):
    """
    Return the inverse of a Green's function
    """
    if descriptors.is_lazy(x):
        return lazy_expressions.lazy_function("inverse", inverse) (x)
    assert hasattr(x,'inverse')
    return x.inverse()
Esempio n. 7
0
def inverse(x):
    if isinstance(
            x,
        (lazy_expressions.lazy_expr, lazy_expressions.lazy_expr_terminal)):
        return lazy_expressions.lazy_function("inverse", inverse)(x)
    assert hasattr(x, 'invert') and hasattr(x, 'copy')
    cop = x.copy()
    cop.invert()
    return cop
Esempio n. 8
0
def inverse(x):
    """
    Compute the inverse of a Green's function and return this.
    """
    if descriptors.is_lazy(x):
        return lazy_expressions.lazy_function("inverse", inverse)(x)
    assert hasattr(x, "invert") and hasattr(x, "copy")
    cop = x.copy()
    cop.invert()
    return cop
Esempio n. 9
0
def inverse(x):
    """
    Compute the inverse of a Green's function and return this.
    """
    if descriptors.is_lazy(x):
        return lazy_expressions.lazy_function("inverse", inverse)(x)
    assert hasattr(x, 'invert') and hasattr(x, 'copy')
    cop = x.copy()
    cop.invert()
    return cop