def iddr_asvd(A, k):
A = np.asfortranarray(A)<EOL>m, n = A.shape<EOL>w = np.empty((<NUM_LIT:2>*k + <NUM_LIT>)*m + (<NUM_LIT:6>*k + <NUM_LIT>)*n + <NUM_LIT>*k**<NUM_LIT:2> + <NUM_LIT:100>, order='<STR_LIT:F>')<EOL>w_ = iddr_aidi(m, n, k)<EOL>w[:w_.size] = w_<EOL>U, V, S, ier = _id.iddr_asvd(A, k, w)<EOL>if ier != <NUM_LIT:0>:<EOL><INDENT>raise _RETCODE_ERROR<EOL><DEDENT>return U, V, S<EOL>
Compute SVD of a real matrix to a specified rank using random sampling.

:param A:
    Matrix.
:type A: :class:`numpy.ndarray`
:param k:
    Rank of SVD.
:type k: int

:return:
    Left singular vectors.
:rtype: :class:`numpy.ndarray`
:return:
    Right singular vectors.
:rtype: :class:`numpy.ndarray`
:return:
    Singular values.
:rtype: :class:`numpy.ndarray`