def pinv(A: LinearOperator, alg: Auto):
    """ Auto:
        - if A is small, use dense algorithms
        - if A is large, use iterative algorithms
    """
    match bool(np.prod(A.shape) <= _SIZE):
        case True:
            alg = LSTSQ()
        case False:
            alg = CG(**alg.__dict__)
    return pinv(A, alg)
 Auto:
        - if A is small, use dense algorithms
        - if A is large, use iterative algorithms
    
cola/linalg/inverse/pinv.py