def onenormest(A, t=<NUM_LIT:2>, itmax=<NUM_LIT:5>, compute_v=False, compute_w=False):
<EOL>if len(A.shape) != <NUM_LIT:2> or A.shape[<NUM_LIT:0>] != A.shape[<NUM_LIT:1>]:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>n = A.shape[<NUM_LIT:1>]<EOL>if t >= n:<EOL><INDENT>A_explicit = np.asarray(aslinearoperator(A).matmat(np.identity(n)))<EOL>if A_explicit.shape != (n, n):<EOL><INDENT>raise Exception('<STR_LIT>',<EOL>'<STR_LIT>' + str(A_explicit.shape))<EOL><DEDENT>col_abs_sums = abs(A_explicit).sum(axis=<NUM_LIT:0>)<EOL>if col_abs_sums.shape != (n, ):<EOL><INDENT>raise Exception('<STR_LIT>',<EOL>'<STR_LIT>' + str(col_abs_sums.shape))<EOL><DEDENT>argmax_j = np.argmax(col_abs_sums)<EOL>v = elementary_vector(n, argmax_j)<EOL>w = A_explicit[:, argmax_j]<EOL>est = col_abs_sums[argmax_j]<EOL><DEDENT>else:<EOL><INDENT>est, v, w, nmults, nresamples = _onenormest_core(A, A.T, t, itmax)<EOL><DEDENT>if compute_v or compute_w:<EOL><INDENT>result = (est,)<EOL>if compute_v:<EOL><INDENT>result += (v,)<EOL><DEDENT>if compute_w:<EOL><INDENT>result += (w,)<EOL><DEDENT>return result<EOL><DEDENT>else:<EOL><INDENT>return est<EOL><DEDENT>
Compute a lower bound of the 1-norm of a sparse matrix.

Parameters
----------
A : ndarray or other linear operator
    A linear operator that can be transposed and that can
    produce matrix products.
t : int, optional
    A positive parameter controlling the tradeoff between
    accuracy versus time and memory usage.
    Larger values take longer and use more memory
    but give more accurate output.
itmax : int, optional
    Use at most this many iterations.
compute_v : bool, optional
    Request a norm-maximizing linear operator input vector if True.
compute_w : bool, optional
    Request a norm-maximizing linear operator output vector if True.

Returns
-------
est : float
    An underestimate of the 1-norm of the sparse matrix.
v : ndarray, optional
    The vector such that ||Av||_1 == est*||v||_1.
    It can be thought of as an input to the linear operator
    that gives an output with particularly large norm.
w : ndarray, optional
    The vector Av which has relatively large 1-norm.
    It can be thought of as an output of the linear operator
    that is relatively large in norm compared to the input.

Notes
-----
This is algorithm 2.4 of [1].

In [2] it is described as follows.
"This algorithm typically requires the evaluation of
about 4t matrix-vector products and almost invariably
produces a norm estimate (which is, in fact, a lower
bound on the norm) correct to within a factor 3."

.. versionadded:: 0.13.0

References
----------
.. [1] Nicholas J. Higham and Francoise Tisseur (2000),
       "A Block Algorithm for Matrix 1-Norm Estimation,
       with an Application to 1-Norm Pseudospectra."
       SIAM J. Matrix Anal. Appl. Vol. 21, No. 4, pp. 1185-1201.

.. [2] Awad H. Al-Mohy and Nicholas J. Higham (2009),
       "A new scaling and squaring algorithm for the matrix exponential."
       SIAM J. Matrix Anal. Appl. Vol. 31, No. 3, pp. 970-989.