def estimate_spectral_norm_diff(A, B, its=<NUM_LIT:20>):
from scipy.sparse.linalg import aslinearoperator<EOL>A = aslinearoperator(A)<EOL>B = aslinearoperator(B)<EOL>m, n = A.shape<EOL>matvec1 = lambda x: A. matvec(x)<EOL>matveca1 = lambda x: A.rmatvec(x)<EOL>matvec2 = lambda x: B. matvec(x)<EOL>matveca2 = lambda x: B.rmatvec(x)<EOL>if _is_real(A):<EOL><INDENT>return backend.idd_diffsnorm(<EOL>m, n, matveca1, matveca2, matvec1, matvec2, its=its)<EOL><DEDENT>else:<EOL><INDENT>return backend.idz_diffsnorm(<EOL>m, n, matveca1, matveca2, matvec1, matvec2, its=its)<EOL><DEDENT>
Estimate spectral norm of the difference of two matrices by the randomized
power method.

..  This function automatically detects the matrix data type and calls the
    appropriate backend. For details, see :func:`backend.idd_diffsnorm` and
    :func:`backend.idz_diffsnorm`.

Parameters
----------
A : :class:`scipy.sparse.linalg.LinearOperator`
    First matrix given as a :class:`scipy.sparse.linalg.LinearOperator` with the
    `matvec` and `rmatvec` methods (to apply the matrix and its adjoint).
B : :class:`scipy.sparse.linalg.LinearOperator`
    Second matrix given as a :class:`scipy.sparse.linalg.LinearOperator` with
    the `matvec` and `rmatvec` methods (to apply the matrix and its adjoint).
its : int
    Number of power method iterations.

Returns
-------
float
    Spectral norm estimate of matrix difference.