Пример #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
Пример #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
Пример #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
Пример #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()
Пример #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()
Пример #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()
Пример #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
Пример #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
Пример #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