def pow(A: LinearOperator, alpha: Number, alg: Algorithm = Auto()):
    """ Computes the matrix power :math:`A^{\\alpha}` of an operator :math:`A`,
    where :math:`\\alpha` is the coefficient.

    Args:
        A (LinearOperator): The linear operator to compute f(A) with.
        alg (Algorithm): The algorithm to use (Auto, Eig, Eigh, Lanczos, Arnoldi).

    Returns:
        LinearOperator: a lazy instantiation of :math:`A^{\\alpha}`
    """
    # check if alpha is close to an integer
    if np.isclose(alpha, (k := int(np.round(alpha)))):
        if k == 0:
            return I_like(A)
        if k > 0 and k < 10:
            return product([A] * k)
        if k == -1:
            match alg:
                case Lanczos():
                    new_alg = CG(**alg.__dict__)
                case Arnoldi():
                    new_alg = GMRES(**alg.__dict__)
                case Eigh():
                    new_alg = Cholesky()
                case Eig():
                    new_alg = LU()
                case _:
                    new_alg = alg
            return inv(A, new_alg)
    return apply_unary(lambda x: x**alpha, A, alg)
 Computes the matrix power :math:`A^{\alpha}` of an operator :math:`A`,
    where :math:`\alpha` is the coefficient.

    Args:
        A (LinearOperator): The linear operator to compute f(A) with.
        alg (Algorithm): The algorithm to use (Auto, Eig, Eigh, Lanczos, Arnoldi).

    Returns:
        LinearOperator: a lazy instantiation of :math:`A^{\alpha}`
    
cola/linalg/unary/unary.py