diff --git a/ckpts/universal/global_step40/zero/12.attention.query_key_value.weight/exp_avg_sq.pt b/ckpts/universal/global_step40/zero/12.attention.query_key_value.weight/exp_avg_sq.pt new file mode 100644 index 0000000000000000000000000000000000000000..7b924d162114161f16b107bfbfa8178dae018edc --- /dev/null +++ b/ckpts/universal/global_step40/zero/12.attention.query_key_value.weight/exp_avg_sq.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:10f3cebbb478bb752167118e6a0af324ac532c7c0d500958e9c5258796ce17c5 +size 50332843 diff --git a/ckpts/universal/global_step40/zero/23.input_layernorm.weight/exp_avg.pt b/ckpts/universal/global_step40/zero/23.input_layernorm.weight/exp_avg.pt new file mode 100644 index 0000000000000000000000000000000000000000..453f8215dbb1858cc5106fa25cde0c9cec8c30a8 --- /dev/null +++ b/ckpts/universal/global_step40/zero/23.input_layernorm.weight/exp_avg.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2343a989650c15c172222c95076f35974a024aef3672b056d027c2d28bb8700b +size 9372 diff --git a/ckpts/universal/global_step40/zero/7.mlp.dense_4h_to_h.weight/fp32.pt b/ckpts/universal/global_step40/zero/7.mlp.dense_4h_to_h.weight/fp32.pt new file mode 100644 index 0000000000000000000000000000000000000000..bcd410baec2a4ad34aa17c7cf94f6912fdf36c00 --- /dev/null +++ b/ckpts/universal/global_step40/zero/7.mlp.dense_4h_to_h.weight/fp32.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd40e1abab1e22068aceec0ccc4d41ed4a3a681f707d91dea84e0c87750af14c +size 33555533 diff --git a/venv/lib/python3.10/site-packages/scipy/linalg.pxd b/venv/lib/python3.10/site-packages/scipy/linalg.pxd new file mode 100644 index 0000000000000000000000000000000000000000..c7c49f9ad8f4c90ee93725fdcdbe73c2e7f5aacd --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg.pxd @@ -0,0 +1 @@ +from scipy.linalg cimport cython_blas, cython_lapack diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/__init__.py b/venv/lib/python3.10/site-packages/scipy/linalg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9381d7a02c15a3234f38ee4bdee5d12d11d4afd1 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/__init__.py @@ -0,0 +1,236 @@ +""" +==================================== +Linear algebra (:mod:`scipy.linalg`) +==================================== + +.. currentmodule:: scipy.linalg + +.. toctree:: + :hidden: + + linalg.blas + linalg.cython_blas + linalg.cython_lapack + linalg.interpolative + linalg.lapack + +Linear algebra functions. + +.. eventually, we should replace the numpy.linalg HTML link with just `numpy.linalg` + +.. seealso:: + + `numpy.linalg `__ + for more linear algebra functions. Note that + although `scipy.linalg` imports most of them, identically named + functions from `scipy.linalg` may offer more or slightly differing + functionality. + + +Basics +====== + +.. autosummary:: + :toctree: generated/ + + inv - Find the inverse of a square matrix + solve - Solve a linear system of equations + solve_banded - Solve a banded linear system + solveh_banded - Solve a Hermitian or symmetric banded system + solve_circulant - Solve a circulant system + solve_triangular - Solve a triangular matrix + solve_toeplitz - Solve a toeplitz matrix + matmul_toeplitz - Multiply a Toeplitz matrix with an array. + det - Find the determinant of a square matrix + norm - Matrix and vector norm + lstsq - Solve a linear least-squares problem + pinv - Pseudo-inverse (Moore-Penrose) using lstsq + pinvh - Pseudo-inverse of hermitian matrix + kron - Kronecker product of two arrays + khatri_rao - Khatri-Rao product of two arrays + orthogonal_procrustes - Solve an orthogonal Procrustes problem + matrix_balance - Balance matrix entries with a similarity transformation + subspace_angles - Compute the subspace angles between two matrices + bandwidth - Return the lower and upper bandwidth of an array + issymmetric - Check if a square 2D array is symmetric + ishermitian - Check if a square 2D array is Hermitian + LinAlgError + LinAlgWarning + +Eigenvalue Problems +=================== + +.. autosummary:: + :toctree: generated/ + + eig - Find the eigenvalues and eigenvectors of a square matrix + eigvals - Find just the eigenvalues of a square matrix + eigh - Find the e-vals and e-vectors of a Hermitian or symmetric matrix + eigvalsh - Find just the eigenvalues of a Hermitian or symmetric matrix + eig_banded - Find the eigenvalues and eigenvectors of a banded matrix + eigvals_banded - Find just the eigenvalues of a banded matrix + eigh_tridiagonal - Find the eigenvalues and eigenvectors of a tridiagonal matrix + eigvalsh_tridiagonal - Find just the eigenvalues of a tridiagonal matrix + +Decompositions +============== + +.. autosummary:: + :toctree: generated/ + + lu - LU decomposition of a matrix + lu_factor - LU decomposition returning unordered matrix and pivots + lu_solve - Solve Ax=b using back substitution with output of lu_factor + svd - Singular value decomposition of a matrix + svdvals - Singular values of a matrix + diagsvd - Construct matrix of singular values from output of svd + orth - Construct orthonormal basis for the range of A using svd + null_space - Construct orthonormal basis for the null space of A using svd + ldl - LDL.T decomposition of a Hermitian or a symmetric matrix. + cholesky - Cholesky decomposition of a matrix + cholesky_banded - Cholesky decomp. of a sym. or Hermitian banded matrix + cho_factor - Cholesky decomposition for use in solving a linear system + cho_solve - Solve previously factored linear system + cho_solve_banded - Solve previously factored banded linear system + polar - Compute the polar decomposition. + qr - QR decomposition of a matrix + qr_multiply - QR decomposition and multiplication by Q + qr_update - Rank k QR update + qr_delete - QR downdate on row or column deletion + qr_insert - QR update on row or column insertion + rq - RQ decomposition of a matrix + qz - QZ decomposition of a pair of matrices + ordqz - QZ decomposition of a pair of matrices with reordering + schur - Schur decomposition of a matrix + rsf2csf - Real to complex Schur form + hessenberg - Hessenberg form of a matrix + cdf2rdf - Complex diagonal form to real diagonal block form + cossin - Cosine sine decomposition of a unitary or orthogonal matrix + +.. seealso:: + + `scipy.linalg.interpolative` -- Interpolative matrix decompositions + + +Matrix Functions +================ + +.. autosummary:: + :toctree: generated/ + + expm - Matrix exponential + logm - Matrix logarithm + cosm - Matrix cosine + sinm - Matrix sine + tanm - Matrix tangent + coshm - Matrix hyperbolic cosine + sinhm - Matrix hyperbolic sine + tanhm - Matrix hyperbolic tangent + signm - Matrix sign + sqrtm - Matrix square root + funm - Evaluating an arbitrary matrix function + expm_frechet - Frechet derivative of the matrix exponential + expm_cond - Relative condition number of expm in the Frobenius norm + fractional_matrix_power - Fractional matrix power + + +Matrix Equation Solvers +======================= + +.. autosummary:: + :toctree: generated/ + + solve_sylvester - Solve the Sylvester matrix equation + solve_continuous_are - Solve the continuous-time algebraic Riccati equation + solve_discrete_are - Solve the discrete-time algebraic Riccati equation + solve_continuous_lyapunov - Solve the continuous-time Lyapunov equation + solve_discrete_lyapunov - Solve the discrete-time Lyapunov equation + + +Sketches and Random Projections +=============================== + +.. autosummary:: + :toctree: generated/ + + clarkson_woodruff_transform - Applies the Clarkson Woodruff Sketch (a.k.a CountMin Sketch) + +Special Matrices +================ + +.. autosummary:: + :toctree: generated/ + + block_diag - Construct a block diagonal matrix from submatrices + circulant - Circulant matrix + companion - Companion matrix + convolution_matrix - Convolution matrix + dft - Discrete Fourier transform matrix + fiedler - Fiedler matrix + fiedler_companion - Fiedler companion matrix + hadamard - Hadamard matrix of order 2**n + hankel - Hankel matrix + helmert - Helmert matrix + hilbert - Hilbert matrix + invhilbert - Inverse Hilbert matrix + leslie - Leslie matrix + pascal - Pascal matrix + invpascal - Inverse Pascal matrix + toeplitz - Toeplitz matrix + +Low-level routines +================== + +.. autosummary:: + :toctree: generated/ + + get_blas_funcs + get_lapack_funcs + find_best_blas_type + +.. seealso:: + + `scipy.linalg.blas` -- Low-level BLAS functions + + `scipy.linalg.lapack` -- Low-level LAPACK functions + + `scipy.linalg.cython_blas` -- Low-level BLAS functions for Cython + + `scipy.linalg.cython_lapack` -- Low-level LAPACK functions for Cython + +""" # noqa: E501 + +from ._misc import * +from ._cythonized_array_utils import * +from ._basic import * +from ._decomp import * +from ._decomp_lu import * +from ._decomp_ldl import * +from ._decomp_cholesky import * +from ._decomp_qr import * +from ._decomp_qz import * +from ._decomp_svd import * +from ._decomp_schur import * +from ._decomp_polar import * +from ._matfuncs import * +from .blas import * +from .lapack import * +from ._special_matrices import * +from ._solvers import * +from ._procrustes import * +from ._decomp_update import * +from ._sketches import * +from ._decomp_cossin import * + +# Deprecated namespaces, to be removed in v2.0.0 +from . import ( + decomp, decomp_cholesky, decomp_lu, decomp_qr, decomp_svd, decomp_schur, + basic, misc, special_matrices, matfuncs, +) + +__all__ = [s for s in dir() if not s.startswith('_')] + + +from scipy._lib._testutils import PytestTester +test = PytestTester(__name__) +del PytestTester diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/__init__.cpython-310.pyc b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0ddb168072af06169c50c05dd1e266256d4c5f23 Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/__init__.cpython-310.pyc differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp.cpython-310.pyc b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fa9943b9a8a2199a996ba91c5d372a0641457665 Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp.cpython-310.pyc differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_cholesky.cpython-310.pyc b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_cholesky.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..17368df34dd6124a2c7633ae411d987ac1e12070 Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_cholesky.cpython-310.pyc differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_ldl.cpython-310.pyc b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_ldl.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..39411d2a72133698a5b1036e1853c6fdd984a63d Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_ldl.cpython-310.pyc differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_polar.cpython-310.pyc b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_polar.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c9e8551ba7fafefd7777e6a3c28c2ff25f5ad2ad Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_polar.cpython-310.pyc differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_schur.cpython-310.pyc b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_schur.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..beb685e5d873b9f0f768eb13c21840264b6ca1ae Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_schur.cpython-310.pyc differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_svd.cpython-310.pyc b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_svd.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4953ccaa2020395bf651b711196687abad18f02f Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_svd.cpython-310.pyc differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_expm_frechet.cpython-310.pyc b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_expm_frechet.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..43a9054d1a87fdf68c6d1fe5e8d3d3b8fe5662f6 Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_expm_frechet.cpython-310.pyc differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_procrustes.cpython-310.pyc b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_procrustes.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2ff58c2e25df1b040be1cdee38891b0d260ab96d Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_procrustes.cpython-310.pyc differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_solvers.cpython-310.pyc b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_solvers.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8efaa7ec9c69db921aa6779bef97b259601f8feb Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_solvers.cpython-310.pyc differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_special_matrices.cpython-310.pyc b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_special_matrices.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..78597c0e05acbf37997db27c4e7651a611cea329 Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_special_matrices.cpython-310.pyc differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/decomp.cpython-310.pyc b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/decomp.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d8f40dd9ad5233ea1558aa1eba95a7eb67eef772 Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/decomp.cpython-310.pyc differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/decomp_cholesky.cpython-310.pyc b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/decomp_cholesky.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..68027f213f3970f3e3489fde47ef28fed9f2f96f Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/decomp_cholesky.cpython-310.pyc differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/lapack.cpython-310.pyc b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/lapack.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ccc2c98170cca475a7649cd9201be0853250d159 Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/lapack.cpython-310.pyc differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/misc.cpython-310.pyc b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/misc.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1685657d7f4c52e88796ad772f45ee95ede7e604 Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/misc.cpython-310.pyc differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/special_matrices.cpython-310.pyc b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/special_matrices.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5d8f039aebab9cfd3f0215a8709ce900cc37f503 Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/special_matrices.cpython-310.pyc differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_basic.py b/venv/lib/python3.10/site-packages/scipy/linalg/_basic.py new file mode 100644 index 0000000000000000000000000000000000000000..d561b71d93302820f82eb30a293917b3c31dc243 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_basic.py @@ -0,0 +1,1919 @@ +# +# Author: Pearu Peterson, March 2002 +# +# w/ additions by Travis Oliphant, March 2002 +# and Jake Vanderplas, August 2012 + +from warnings import warn +from itertools import product +import numpy as np +from numpy import atleast_1d, atleast_2d +from .lapack import get_lapack_funcs, _compute_lwork +from ._misc import LinAlgError, _datacopied, LinAlgWarning +from ._decomp import _asarray_validated +from . import _decomp, _decomp_svd +from ._solve_toeplitz import levinson +from ._cythonized_array_utils import find_det_from_lu +from scipy._lib.deprecation import _NoValue, _deprecate_positional_args + +__all__ = ['solve', 'solve_triangular', 'solveh_banded', 'solve_banded', + 'solve_toeplitz', 'solve_circulant', 'inv', 'det', 'lstsq', + 'pinv', 'pinvh', 'matrix_balance', 'matmul_toeplitz'] + + +# The numpy facilities for type-casting checks are too slow for small sized +# arrays and eat away the time budget for the checkups. Here we set a +# precomputed dict container of the numpy.can_cast() table. + +# It can be used to determine quickly what a dtype can be cast to LAPACK +# compatible types, i.e., 'float32, float64, complex64, complex128'. +# Then it can be checked via "casting_dict[arr.dtype.char]" +lapack_cast_dict = {x: ''.join([y for y in 'fdFD' if np.can_cast(x, y)]) + for x in np.typecodes['All']} + + +# Linear equations +def _solve_check(n, info, lamch=None, rcond=None): + """ Check arguments during the different steps of the solution phase """ + if info < 0: + raise ValueError(f'LAPACK reported an illegal value in {-info}-th argument.') + elif 0 < info: + raise LinAlgError('Matrix is singular.') + + if lamch is None: + return + E = lamch('E') + if rcond < E: + warn(f'Ill-conditioned matrix (rcond={rcond:.6g}): ' + 'result may not be accurate.', + LinAlgWarning, stacklevel=3) + + +def solve(a, b, lower=False, overwrite_a=False, + overwrite_b=False, check_finite=True, assume_a='gen', + transposed=False): + """ + Solves the linear equation set ``a @ x == b`` for the unknown ``x`` + for square `a` matrix. + + If the data matrix is known to be a particular type then supplying the + corresponding string to ``assume_a`` key chooses the dedicated solver. + The available options are + + =================== ======== + generic matrix 'gen' + symmetric 'sym' + hermitian 'her' + positive definite 'pos' + =================== ======== + + If omitted, ``'gen'`` is the default structure. + + The datatype of the arrays define which solver is called regardless + of the values. In other words, even when the complex array entries have + precisely zero imaginary parts, the complex solver will be called based + on the data type of the array. + + Parameters + ---------- + a : (N, N) array_like + Square input data + b : (N, NRHS) array_like + Input data for the right hand side. + lower : bool, default: False + Ignored if ``assume_a == 'gen'`` (the default). If True, the + calculation uses only the data in the lower triangle of `a`; + entries above the diagonal are ignored. If False (default), the + calculation uses only the data in the upper triangle of `a`; entries + below the diagonal are ignored. + overwrite_a : bool, default: False + Allow overwriting data in `a` (may enhance performance). + overwrite_b : bool, default: False + Allow overwriting data in `b` (may enhance performance). + check_finite : bool, default: True + Whether to check that the input matrices contain only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + assume_a : str, {'gen', 'sym', 'her', 'pos'} + Valid entries are explained above. + transposed : bool, default: False + If True, solve ``a.T @ x == b``. Raises `NotImplementedError` + for complex `a`. + + Returns + ------- + x : (N, NRHS) ndarray + The solution array. + + Raises + ------ + ValueError + If size mismatches detected or input a is not square. + LinAlgError + If the matrix is singular. + LinAlgWarning + If an ill-conditioned input a is detected. + NotImplementedError + If transposed is True and input a is a complex matrix. + + Notes + ----- + If the input b matrix is a 1-D array with N elements, when supplied + together with an NxN input a, it is assumed as a valid column vector + despite the apparent size mismatch. This is compatible with the + numpy.dot() behavior and the returned result is still 1-D array. + + The generic, symmetric, Hermitian and positive definite solutions are + obtained via calling ?GESV, ?SYSV, ?HESV, and ?POSV routines of + LAPACK respectively. + + Examples + -------- + Given `a` and `b`, solve for `x`: + + >>> import numpy as np + >>> a = np.array([[3, 2, 0], [1, -1, 0], [0, 5, 1]]) + >>> b = np.array([2, 4, -1]) + >>> from scipy import linalg + >>> x = linalg.solve(a, b) + >>> x + array([ 2., -2., 9.]) + >>> np.dot(a, x) == b + array([ True, True, True], dtype=bool) + + """ + # Flags for 1-D or N-D right-hand side + b_is_1D = False + + a1 = atleast_2d(_asarray_validated(a, check_finite=check_finite)) + b1 = atleast_1d(_asarray_validated(b, check_finite=check_finite)) + n = a1.shape[0] + + overwrite_a = overwrite_a or _datacopied(a1, a) + overwrite_b = overwrite_b or _datacopied(b1, b) + + if a1.shape[0] != a1.shape[1]: + raise ValueError('Input a needs to be a square matrix.') + + if n != b1.shape[0]: + # Last chance to catch 1x1 scalar a and 1-D b arrays + if not (n == 1 and b1.size != 0): + raise ValueError('Input b has to have same number of rows as ' + 'input a') + + # accommodate empty arrays + if b1.size == 0: + return np.asfortranarray(b1.copy()) + + # regularize 1-D b arrays to 2D + if b1.ndim == 1: + if n == 1: + b1 = b1[None, :] + else: + b1 = b1[:, None] + b_is_1D = True + + if assume_a not in ('gen', 'sym', 'her', 'pos'): + raise ValueError(f'{assume_a} is not a recognized matrix structure') + + # for a real matrix, describe it as "symmetric", not "hermitian" + # (lapack doesn't know what to do with real hermitian matrices) + if assume_a == 'her' and not np.iscomplexobj(a1): + assume_a = 'sym' + + # Get the correct lamch function. + # The LAMCH functions only exists for S and D + # So for complex values we have to convert to real/double. + if a1.dtype.char in 'fF': # single precision + lamch = get_lapack_funcs('lamch', dtype='f') + else: + lamch = get_lapack_funcs('lamch', dtype='d') + + # Currently we do not have the other forms of the norm calculators + # lansy, lanpo, lanhe. + # However, in any case they only reduce computations slightly... + lange = get_lapack_funcs('lange', (a1,)) + + # Since the I-norm and 1-norm are the same for symmetric matrices + # we can collect them all in this one call + # Note however, that when issuing 'gen' and form!='none', then + # the I-norm should be used + if transposed: + trans = 1 + norm = 'I' + if np.iscomplexobj(a1): + raise NotImplementedError('scipy.linalg.solve can currently ' + 'not solve a^T x = b or a^H x = b ' + 'for complex matrices.') + else: + trans = 0 + norm = '1' + + anorm = lange(norm, a1) + + # Generalized case 'gesv' + if assume_a == 'gen': + gecon, getrf, getrs = get_lapack_funcs(('gecon', 'getrf', 'getrs'), + (a1, b1)) + lu, ipvt, info = getrf(a1, overwrite_a=overwrite_a) + _solve_check(n, info) + x, info = getrs(lu, ipvt, b1, + trans=trans, overwrite_b=overwrite_b) + _solve_check(n, info) + rcond, info = gecon(lu, anorm, norm=norm) + # Hermitian case 'hesv' + elif assume_a == 'her': + hecon, hesv, hesv_lw = get_lapack_funcs(('hecon', 'hesv', + 'hesv_lwork'), (a1, b1)) + lwork = _compute_lwork(hesv_lw, n, lower) + lu, ipvt, x, info = hesv(a1, b1, lwork=lwork, + lower=lower, + overwrite_a=overwrite_a, + overwrite_b=overwrite_b) + _solve_check(n, info) + rcond, info = hecon(lu, ipvt, anorm) + # Symmetric case 'sysv' + elif assume_a == 'sym': + sycon, sysv, sysv_lw = get_lapack_funcs(('sycon', 'sysv', + 'sysv_lwork'), (a1, b1)) + lwork = _compute_lwork(sysv_lw, n, lower) + lu, ipvt, x, info = sysv(a1, b1, lwork=lwork, + lower=lower, + overwrite_a=overwrite_a, + overwrite_b=overwrite_b) + _solve_check(n, info) + rcond, info = sycon(lu, ipvt, anorm) + # Positive definite case 'posv' + else: + pocon, posv = get_lapack_funcs(('pocon', 'posv'), + (a1, b1)) + lu, x, info = posv(a1, b1, lower=lower, + overwrite_a=overwrite_a, + overwrite_b=overwrite_b) + _solve_check(n, info) + rcond, info = pocon(lu, anorm) + + _solve_check(n, info, lamch, rcond) + + if b_is_1D: + x = x.ravel() + + return x + + +def solve_triangular(a, b, trans=0, lower=False, unit_diagonal=False, + overwrite_b=False, check_finite=True): + """ + Solve the equation `a x = b` for `x`, assuming a is a triangular matrix. + + Parameters + ---------- + a : (M, M) array_like + A triangular matrix + b : (M,) or (M, N) array_like + Right-hand side matrix in `a x = b` + lower : bool, optional + Use only data contained in the lower triangle of `a`. + Default is to use upper triangle. + trans : {0, 1, 2, 'N', 'T', 'C'}, optional + Type of system to solve: + + ======== ========= + trans system + ======== ========= + 0 or 'N' a x = b + 1 or 'T' a^T x = b + 2 or 'C' a^H x = b + ======== ========= + unit_diagonal : bool, optional + If True, diagonal elements of `a` are assumed to be 1 and + will not be referenced. + overwrite_b : bool, optional + Allow overwriting data in `b` (may enhance performance) + check_finite : bool, optional + Whether to check that the input matrices contain only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + x : (M,) or (M, N) ndarray + Solution to the system `a x = b`. Shape of return matches `b`. + + Raises + ------ + LinAlgError + If `a` is singular + + Notes + ----- + .. versionadded:: 0.9.0 + + Examples + -------- + Solve the lower triangular system a x = b, where:: + + [3 0 0 0] [4] + a = [2 1 0 0] b = [2] + [1 0 1 0] [4] + [1 1 1 1] [2] + + >>> import numpy as np + >>> from scipy.linalg import solve_triangular + >>> a = np.array([[3, 0, 0, 0], [2, 1, 0, 0], [1, 0, 1, 0], [1, 1, 1, 1]]) + >>> b = np.array([4, 2, 4, 2]) + >>> x = solve_triangular(a, b, lower=True) + >>> x + array([ 1.33333333, -0.66666667, 2.66666667, -1.33333333]) + >>> a.dot(x) # Check the result + array([ 4., 2., 4., 2.]) + + """ + + a1 = _asarray_validated(a, check_finite=check_finite) + b1 = _asarray_validated(b, check_finite=check_finite) + if len(a1.shape) != 2 or a1.shape[0] != a1.shape[1]: + raise ValueError('expected square matrix') + if a1.shape[0] != b1.shape[0]: + raise ValueError(f'shapes of a {a1.shape} and b {b1.shape} are incompatible') + overwrite_b = overwrite_b or _datacopied(b1, b) + + trans = {'N': 0, 'T': 1, 'C': 2}.get(trans, trans) + trtrs, = get_lapack_funcs(('trtrs',), (a1, b1)) + if a1.flags.f_contiguous or trans == 2: + x, info = trtrs(a1, b1, overwrite_b=overwrite_b, lower=lower, + trans=trans, unitdiag=unit_diagonal) + else: + # transposed system is solved since trtrs expects Fortran ordering + x, info = trtrs(a1.T, b1, overwrite_b=overwrite_b, lower=not lower, + trans=not trans, unitdiag=unit_diagonal) + + if info == 0: + return x + if info > 0: + raise LinAlgError("singular matrix: resolution failed at diagonal %d" % + (info-1)) + raise ValueError('illegal value in %dth argument of internal trtrs' % + (-info)) + + +def solve_banded(l_and_u, ab, b, overwrite_ab=False, overwrite_b=False, + check_finite=True): + """ + Solve the equation a x = b for x, assuming a is banded matrix. + + The matrix a is stored in `ab` using the matrix diagonal ordered form:: + + ab[u + i - j, j] == a[i,j] + + Example of `ab` (shape of a is (6,6), `u` =1, `l` =2):: + + * a01 a12 a23 a34 a45 + a00 a11 a22 a33 a44 a55 + a10 a21 a32 a43 a54 * + a20 a31 a42 a53 * * + + Parameters + ---------- + (l, u) : (integer, integer) + Number of non-zero lower and upper diagonals + ab : (`l` + `u` + 1, M) array_like + Banded matrix + b : (M,) or (M, K) array_like + Right-hand side + overwrite_ab : bool, optional + Discard data in `ab` (may enhance performance) + overwrite_b : bool, optional + Discard data in `b` (may enhance performance) + check_finite : bool, optional + Whether to check that the input matrices contain only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + x : (M,) or (M, K) ndarray + The solution to the system a x = b. Returned shape depends on the + shape of `b`. + + Examples + -------- + Solve the banded system a x = b, where:: + + [5 2 -1 0 0] [0] + [1 4 2 -1 0] [1] + a = [0 1 3 2 -1] b = [2] + [0 0 1 2 2] [2] + [0 0 0 1 1] [3] + + There is one nonzero diagonal below the main diagonal (l = 1), and + two above (u = 2). The diagonal banded form of the matrix is:: + + [* * -1 -1 -1] + ab = [* 2 2 2 2] + [5 4 3 2 1] + [1 1 1 1 *] + + >>> import numpy as np + >>> from scipy.linalg import solve_banded + >>> ab = np.array([[0, 0, -1, -1, -1], + ... [0, 2, 2, 2, 2], + ... [5, 4, 3, 2, 1], + ... [1, 1, 1, 1, 0]]) + >>> b = np.array([0, 1, 2, 2, 3]) + >>> x = solve_banded((1, 2), ab, b) + >>> x + array([-2.37288136, 3.93220339, -4. , 4.3559322 , -1.3559322 ]) + + """ + + a1 = _asarray_validated(ab, check_finite=check_finite, as_inexact=True) + b1 = _asarray_validated(b, check_finite=check_finite, as_inexact=True) + # Validate shapes. + if a1.shape[-1] != b1.shape[0]: + raise ValueError("shapes of ab and b are not compatible.") + (nlower, nupper) = l_and_u + if nlower + nupper + 1 != a1.shape[0]: + raise ValueError("invalid values for the number of lower and upper " + "diagonals: l+u+1 (%d) does not equal ab.shape[0] " + "(%d)" % (nlower + nupper + 1, ab.shape[0])) + + overwrite_b = overwrite_b or _datacopied(b1, b) + if a1.shape[-1] == 1: + b2 = np.array(b1, copy=(not overwrite_b)) + b2 /= a1[1, 0] + return b2 + if nlower == nupper == 1: + overwrite_ab = overwrite_ab or _datacopied(a1, ab) + gtsv, = get_lapack_funcs(('gtsv',), (a1, b1)) + du = a1[0, 1:] + d = a1[1, :] + dl = a1[2, :-1] + du2, d, du, x, info = gtsv(dl, d, du, b1, overwrite_ab, overwrite_ab, + overwrite_ab, overwrite_b) + else: + gbsv, = get_lapack_funcs(('gbsv',), (a1, b1)) + a2 = np.zeros((2*nlower + nupper + 1, a1.shape[1]), dtype=gbsv.dtype) + a2[nlower:, :] = a1 + lu, piv, x, info = gbsv(nlower, nupper, a2, b1, overwrite_ab=True, + overwrite_b=overwrite_b) + if info == 0: + return x + if info > 0: + raise LinAlgError("singular matrix") + raise ValueError('illegal value in %d-th argument of internal ' + 'gbsv/gtsv' % -info) + + +def solveh_banded(ab, b, overwrite_ab=False, overwrite_b=False, lower=False, + check_finite=True): + """ + Solve equation a x = b. a is Hermitian positive-definite banded matrix. + + Uses Thomas' Algorithm, which is more efficient than standard LU + factorization, but should only be used for Hermitian positive-definite + matrices. + + The matrix ``a`` is stored in `ab` either in lower diagonal or upper + diagonal ordered form: + + ab[u + i - j, j] == a[i,j] (if upper form; i <= j) + ab[ i - j, j] == a[i,j] (if lower form; i >= j) + + Example of `ab` (shape of ``a`` is (6, 6), number of upper diagonals, + ``u`` =2):: + + upper form: + * * a02 a13 a24 a35 + * a01 a12 a23 a34 a45 + a00 a11 a22 a33 a44 a55 + + lower form: + a00 a11 a22 a33 a44 a55 + a10 a21 a32 a43 a54 * + a20 a31 a42 a53 * * + + Cells marked with * are not used. + + Parameters + ---------- + ab : (``u`` + 1, M) array_like + Banded matrix + b : (M,) or (M, K) array_like + Right-hand side + overwrite_ab : bool, optional + Discard data in `ab` (may enhance performance) + overwrite_b : bool, optional + Discard data in `b` (may enhance performance) + lower : bool, optional + Is the matrix in the lower form. (Default is upper form) + check_finite : bool, optional + Whether to check that the input matrices contain only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + x : (M,) or (M, K) ndarray + The solution to the system ``a x = b``. Shape of return matches shape + of `b`. + + Notes + ----- + In the case of a non-positive definite matrix ``a``, the solver + `solve_banded` may be used. + + Examples + -------- + Solve the banded system ``A x = b``, where:: + + [ 4 2 -1 0 0 0] [1] + [ 2 5 2 -1 0 0] [2] + A = [-1 2 6 2 -1 0] b = [2] + [ 0 -1 2 7 2 -1] [3] + [ 0 0 -1 2 8 2] [3] + [ 0 0 0 -1 2 9] [3] + + >>> import numpy as np + >>> from scipy.linalg import solveh_banded + + ``ab`` contains the main diagonal and the nonzero diagonals below the + main diagonal. That is, we use the lower form: + + >>> ab = np.array([[ 4, 5, 6, 7, 8, 9], + ... [ 2, 2, 2, 2, 2, 0], + ... [-1, -1, -1, -1, 0, 0]]) + >>> b = np.array([1, 2, 2, 3, 3, 3]) + >>> x = solveh_banded(ab, b, lower=True) + >>> x + array([ 0.03431373, 0.45938375, 0.05602241, 0.47759104, 0.17577031, + 0.34733894]) + + + Solve the Hermitian banded system ``H x = b``, where:: + + [ 8 2-1j 0 0 ] [ 1 ] + H = [2+1j 5 1j 0 ] b = [1+1j] + [ 0 -1j 9 -2-1j] [1-2j] + [ 0 0 -2+1j 6 ] [ 0 ] + + In this example, we put the upper diagonals in the array ``hb``: + + >>> hb = np.array([[0, 2-1j, 1j, -2-1j], + ... [8, 5, 9, 6 ]]) + >>> b = np.array([1, 1+1j, 1-2j, 0]) + >>> x = solveh_banded(hb, b) + >>> x + array([ 0.07318536-0.02939412j, 0.11877624+0.17696461j, + 0.10077984-0.23035393j, -0.00479904-0.09358128j]) + + """ + a1 = _asarray_validated(ab, check_finite=check_finite) + b1 = _asarray_validated(b, check_finite=check_finite) + # Validate shapes. + if a1.shape[-1] != b1.shape[0]: + raise ValueError("shapes of ab and b are not compatible.") + + overwrite_b = overwrite_b or _datacopied(b1, b) + overwrite_ab = overwrite_ab or _datacopied(a1, ab) + + if a1.shape[0] == 2: + ptsv, = get_lapack_funcs(('ptsv',), (a1, b1)) + if lower: + d = a1[0, :].real + e = a1[1, :-1] + else: + d = a1[1, :].real + e = a1[0, 1:].conj() + d, du, x, info = ptsv(d, e, b1, overwrite_ab, overwrite_ab, + overwrite_b) + else: + pbsv, = get_lapack_funcs(('pbsv',), (a1, b1)) + c, x, info = pbsv(a1, b1, lower=lower, overwrite_ab=overwrite_ab, + overwrite_b=overwrite_b) + if info > 0: + raise LinAlgError("%dth leading minor not positive definite" % info) + if info < 0: + raise ValueError('illegal value in %dth argument of internal ' + 'pbsv' % -info) + return x + + +def solve_toeplitz(c_or_cr, b, check_finite=True): + """Solve a Toeplitz system using Levinson Recursion + + The Toeplitz matrix has constant diagonals, with c as its first column + and r as its first row. If r is not given, ``r == conjugate(c)`` is + assumed. + + Parameters + ---------- + c_or_cr : array_like or tuple of (array_like, array_like) + The vector ``c``, or a tuple of arrays (``c``, ``r``). Whatever the + actual shape of ``c``, it will be converted to a 1-D array. If not + supplied, ``r = conjugate(c)`` is assumed; in this case, if c[0] is + real, the Toeplitz matrix is Hermitian. r[0] is ignored; the first row + of the Toeplitz matrix is ``[c[0], r[1:]]``. Whatever the actual shape + of ``r``, it will be converted to a 1-D array. + b : (M,) or (M, K) array_like + Right-hand side in ``T x = b``. + check_finite : bool, optional + Whether to check that the input matrices contain only finite numbers. + Disabling may give a performance gain, but may result in problems + (result entirely NaNs) if the inputs do contain infinities or NaNs. + + Returns + ------- + x : (M,) or (M, K) ndarray + The solution to the system ``T x = b``. Shape of return matches shape + of `b`. + + See Also + -------- + toeplitz : Toeplitz matrix + + Notes + ----- + The solution is computed using Levinson-Durbin recursion, which is faster + than generic least-squares methods, but can be less numerically stable. + + Examples + -------- + Solve the Toeplitz system T x = b, where:: + + [ 1 -1 -2 -3] [1] + T = [ 3 1 -1 -2] b = [2] + [ 6 3 1 -1] [2] + [10 6 3 1] [5] + + To specify the Toeplitz matrix, only the first column and the first + row are needed. + + >>> import numpy as np + >>> c = np.array([1, 3, 6, 10]) # First column of T + >>> r = np.array([1, -1, -2, -3]) # First row of T + >>> b = np.array([1, 2, 2, 5]) + + >>> from scipy.linalg import solve_toeplitz, toeplitz + >>> x = solve_toeplitz((c, r), b) + >>> x + array([ 1.66666667, -1. , -2.66666667, 2.33333333]) + + Check the result by creating the full Toeplitz matrix and + multiplying it by `x`. We should get `b`. + + >>> T = toeplitz(c, r) + >>> T.dot(x) + array([ 1., 2., 2., 5.]) + + """ + # If numerical stability of this algorithm is a problem, a future + # developer might consider implementing other O(N^2) Toeplitz solvers, + # such as GKO (https://www.jstor.org/stable/2153371) or Bareiss. + + r, c, b, dtype, b_shape = _validate_args_for_toeplitz_ops( + c_or_cr, b, check_finite, keep_b_shape=True) + + # Form a 1-D array of values to be used in the matrix, containing a + # reversed copy of r[1:], followed by c. + vals = np.concatenate((r[-1:0:-1], c)) + if b is None: + raise ValueError('illegal value, `b` is a required argument') + + if b.ndim == 1: + x, _ = levinson(vals, np.ascontiguousarray(b)) + else: + x = np.column_stack([levinson(vals, np.ascontiguousarray(b[:, i]))[0] + for i in range(b.shape[1])]) + x = x.reshape(*b_shape) + + return x + + +def _get_axis_len(aname, a, axis): + ax = axis + if ax < 0: + ax += a.ndim + if 0 <= ax < a.ndim: + return a.shape[ax] + raise ValueError(f"'{aname}axis' entry is out of bounds") + + +def solve_circulant(c, b, singular='raise', tol=None, + caxis=-1, baxis=0, outaxis=0): + """Solve C x = b for x, where C is a circulant matrix. + + `C` is the circulant matrix associated with the vector `c`. + + The system is solved by doing division in Fourier space. The + calculation is:: + + x = ifft(fft(b) / fft(c)) + + where `fft` and `ifft` are the fast Fourier transform and its inverse, + respectively. For a large vector `c`, this is *much* faster than + solving the system with the full circulant matrix. + + Parameters + ---------- + c : array_like + The coefficients of the circulant matrix. + b : array_like + Right-hand side matrix in ``a x = b``. + singular : str, optional + This argument controls how a near singular circulant matrix is + handled. If `singular` is "raise" and the circulant matrix is + near singular, a `LinAlgError` is raised. If `singular` is + "lstsq", the least squares solution is returned. Default is "raise". + tol : float, optional + If any eigenvalue of the circulant matrix has an absolute value + that is less than or equal to `tol`, the matrix is considered to be + near singular. If not given, `tol` is set to:: + + tol = abs_eigs.max() * abs_eigs.size * np.finfo(np.float64).eps + + where `abs_eigs` is the array of absolute values of the eigenvalues + of the circulant matrix. + caxis : int + When `c` has dimension greater than 1, it is viewed as a collection + of circulant vectors. In this case, `caxis` is the axis of `c` that + holds the vectors of circulant coefficients. + baxis : int + When `b` has dimension greater than 1, it is viewed as a collection + of vectors. In this case, `baxis` is the axis of `b` that holds the + right-hand side vectors. + outaxis : int + When `c` or `b` are multidimensional, the value returned by + `solve_circulant` is multidimensional. In this case, `outaxis` is + the axis of the result that holds the solution vectors. + + Returns + ------- + x : ndarray + Solution to the system ``C x = b``. + + Raises + ------ + LinAlgError + If the circulant matrix associated with `c` is near singular. + + See Also + -------- + circulant : circulant matrix + + Notes + ----- + For a 1-D vector `c` with length `m`, and an array `b` + with shape ``(m, ...)``, + + solve_circulant(c, b) + + returns the same result as + + solve(circulant(c), b) + + where `solve` and `circulant` are from `scipy.linalg`. + + .. versionadded:: 0.16.0 + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import solve_circulant, solve, circulant, lstsq + + >>> c = np.array([2, 2, 4]) + >>> b = np.array([1, 2, 3]) + >>> solve_circulant(c, b) + array([ 0.75, -0.25, 0.25]) + + Compare that result to solving the system with `scipy.linalg.solve`: + + >>> solve(circulant(c), b) + array([ 0.75, -0.25, 0.25]) + + A singular example: + + >>> c = np.array([1, 1, 0, 0]) + >>> b = np.array([1, 2, 3, 4]) + + Calling ``solve_circulant(c, b)`` will raise a `LinAlgError`. For the + least square solution, use the option ``singular='lstsq'``: + + >>> solve_circulant(c, b, singular='lstsq') + array([ 0.25, 1.25, 2.25, 1.25]) + + Compare to `scipy.linalg.lstsq`: + + >>> x, resid, rnk, s = lstsq(circulant(c), b) + >>> x + array([ 0.25, 1.25, 2.25, 1.25]) + + A broadcasting example: + + Suppose we have the vectors of two circulant matrices stored in an array + with shape (2, 5), and three `b` vectors stored in an array with shape + (3, 5). For example, + + >>> c = np.array([[1.5, 2, 3, 0, 0], [1, 1, 4, 3, 2]]) + >>> b = np.arange(15).reshape(-1, 5) + + We want to solve all combinations of circulant matrices and `b` vectors, + with the result stored in an array with shape (2, 3, 5). When we + disregard the axes of `c` and `b` that hold the vectors of coefficients, + the shapes of the collections are (2,) and (3,), respectively, which are + not compatible for broadcasting. To have a broadcast result with shape + (2, 3), we add a trivial dimension to `c`: ``c[:, np.newaxis, :]`` has + shape (2, 1, 5). The last dimension holds the coefficients of the + circulant matrices, so when we call `solve_circulant`, we can use the + default ``caxis=-1``. The coefficients of the `b` vectors are in the last + dimension of the array `b`, so we use ``baxis=-1``. If we use the + default `outaxis`, the result will have shape (5, 2, 3), so we'll use + ``outaxis=-1`` to put the solution vectors in the last dimension. + + >>> x = solve_circulant(c[:, np.newaxis, :], b, baxis=-1, outaxis=-1) + >>> x.shape + (2, 3, 5) + >>> np.set_printoptions(precision=3) # For compact output of numbers. + >>> x + array([[[-0.118, 0.22 , 1.277, -0.142, 0.302], + [ 0.651, 0.989, 2.046, 0.627, 1.072], + [ 1.42 , 1.758, 2.816, 1.396, 1.841]], + [[ 0.401, 0.304, 0.694, -0.867, 0.377], + [ 0.856, 0.758, 1.149, -0.412, 0.831], + [ 1.31 , 1.213, 1.603, 0.042, 1.286]]]) + + Check by solving one pair of `c` and `b` vectors (cf. ``x[1, 1, :]``): + + >>> solve_circulant(c[1], b[1, :]) + array([ 0.856, 0.758, 1.149, -0.412, 0.831]) + + """ + c = np.atleast_1d(c) + nc = _get_axis_len("c", c, caxis) + b = np.atleast_1d(b) + nb = _get_axis_len("b", b, baxis) + if nc != nb: + raise ValueError(f'Shapes of c {c.shape} and b {b.shape} are incompatible') + + fc = np.fft.fft(np.moveaxis(c, caxis, -1), axis=-1) + abs_fc = np.abs(fc) + if tol is None: + # This is the same tolerance as used in np.linalg.matrix_rank. + tol = abs_fc.max(axis=-1) * nc * np.finfo(np.float64).eps + if tol.shape != (): + tol.shape = tol.shape + (1,) + else: + tol = np.atleast_1d(tol) + + near_zeros = abs_fc <= tol + is_near_singular = np.any(near_zeros) + if is_near_singular: + if singular == 'raise': + raise LinAlgError("near singular circulant matrix.") + else: + # Replace the small values with 1 to avoid errors in the + # division fb/fc below. + fc[near_zeros] = 1 + + fb = np.fft.fft(np.moveaxis(b, baxis, -1), axis=-1) + + q = fb / fc + + if is_near_singular: + # `near_zeros` is a boolean array, same shape as `c`, that is + # True where `fc` is (near) zero. `q` is the broadcasted result + # of fb / fc, so to set the values of `q` to 0 where `fc` is near + # zero, we use a mask that is the broadcast result of an array + # of True values shaped like `b` with `near_zeros`. + mask = np.ones_like(b, dtype=bool) & near_zeros + q[mask] = 0 + + x = np.fft.ifft(q, axis=-1) + if not (np.iscomplexobj(c) or np.iscomplexobj(b)): + x = x.real + if outaxis != -1: + x = np.moveaxis(x, -1, outaxis) + return x + + +# matrix inversion +def inv(a, overwrite_a=False, check_finite=True): + """ + Compute the inverse of a matrix. + + Parameters + ---------- + a : array_like + Square matrix to be inverted. + overwrite_a : bool, optional + Discard data in `a` (may improve performance). Default is False. + check_finite : bool, optional + Whether to check that the input matrix contains only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + ainv : ndarray + Inverse of the matrix `a`. + + Raises + ------ + LinAlgError + If `a` is singular. + ValueError + If `a` is not square, or not 2D. + + Examples + -------- + >>> import numpy as np + >>> from scipy import linalg + >>> a = np.array([[1., 2.], [3., 4.]]) + >>> linalg.inv(a) + array([[-2. , 1. ], + [ 1.5, -0.5]]) + >>> np.dot(a, linalg.inv(a)) + array([[ 1., 0.], + [ 0., 1.]]) + + """ + a1 = _asarray_validated(a, check_finite=check_finite) + if len(a1.shape) != 2 or a1.shape[0] != a1.shape[1]: + raise ValueError('expected square matrix') + overwrite_a = overwrite_a or _datacopied(a1, a) + getrf, getri, getri_lwork = get_lapack_funcs(('getrf', 'getri', + 'getri_lwork'), + (a1,)) + lu, piv, info = getrf(a1, overwrite_a=overwrite_a) + if info == 0: + lwork = _compute_lwork(getri_lwork, a1.shape[0]) + + # XXX: the following line fixes curious SEGFAULT when + # benchmarking 500x500 matrix inverse. This seems to + # be a bug in LAPACK ?getri routine because if lwork is + # minimal (when using lwork[0] instead of lwork[1]) then + # all tests pass. Further investigation is required if + # more such SEGFAULTs occur. + lwork = int(1.01 * lwork) + inv_a, info = getri(lu, piv, lwork=lwork, overwrite_lu=1) + if info > 0: + raise LinAlgError("singular matrix") + if info < 0: + raise ValueError('illegal value in %d-th argument of internal ' + 'getrf|getri' % -info) + return inv_a + + +# Determinant + +def det(a, overwrite_a=False, check_finite=True): + """ + Compute the determinant of a matrix + + The determinant is a scalar that is a function of the associated square + matrix coefficients. The determinant value is zero for singular matrices. + + Parameters + ---------- + a : (..., M, M) array_like + Input array to compute determinants for. + overwrite_a : bool, optional + Allow overwriting data in a (may enhance performance). + check_finite : bool, optional + Whether to check that the input matrix contains only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + det : (...) float or complex + Determinant of `a`. For stacked arrays, a scalar is returned for each + (m, m) slice in the last two dimensions of the input. For example, an + input of shape (p, q, m, m) will produce a result of shape (p, q). If + all dimensions are 1 a scalar is returned regardless of ndim. + + Notes + ----- + The determinant is computed by performing an LU factorization of the + input with LAPACK routine 'getrf', and then calculating the product of + diagonal entries of the U factor. + + Even the input array is single precision (float32 or complex64), the result + will be returned in double precision (float64 or complex128) to prevent + overflows. + + Examples + -------- + >>> import numpy as np + >>> from scipy import linalg + >>> a = np.array([[1,2,3], [4,5,6], [7,8,9]]) # A singular matrix + >>> linalg.det(a) + 0.0 + >>> b = np.array([[0,2,3], [4,5,6], [7,8,9]]) + >>> linalg.det(b) + 3.0 + >>> # An array with the shape (3, 2, 2, 2) + >>> c = np.array([[[[1., 2.], [3., 4.]], + ... [[5., 6.], [7., 8.]]], + ... [[[9., 10.], [11., 12.]], + ... [[13., 14.], [15., 16.]]], + ... [[[17., 18.], [19., 20.]], + ... [[21., 22.], [23., 24.]]]]) + >>> linalg.det(c) # The resulting shape is (3, 2) + array([[-2., -2.], + [-2., -2.], + [-2., -2.]]) + >>> linalg.det(c[0, 0]) # Confirm the (0, 0) slice, [[1, 2], [3, 4]] + -2.0 + """ + # The goal is to end up with a writable contiguous array to pass to Cython + + # First we check and make arrays. + a1 = np.asarray_chkfinite(a) if check_finite else np.asarray(a) + if a1.ndim < 2: + raise ValueError('The input array must be at least two-dimensional.') + if a1.shape[-1] != a1.shape[-2]: + raise ValueError('Last 2 dimensions of the array must be square' + f' but received shape {a1.shape}.') + + # Also check if dtype is LAPACK compatible + if a1.dtype.char not in 'fdFD': + dtype_char = lapack_cast_dict[a1.dtype.char] + if not dtype_char: # No casting possible + raise TypeError(f'The dtype "{a1.dtype.name}" cannot be cast ' + 'to float(32, 64) or complex(64, 128).') + + a1 = a1.astype(dtype_char[0]) # makes a copy, free to scratch + overwrite_a = True + + # Empty array has determinant 1 because math. + if min(*a1.shape) == 0: + if a1.ndim == 2: + return np.float64(1.) + else: + return np.ones(shape=a1.shape[:-2], dtype=np.float64) + + # Scalar case + if a1.shape[-2:] == (1, 1): + # Either ndarray with spurious singletons or a single element + if max(*a1.shape) > 1: + temp = np.squeeze(a1) + if a1.dtype.char in 'dD': + return temp + else: + return (temp.astype('d') if a1.dtype.char == 'f' else + temp.astype('D')) + else: + return (np.float64(a1.item()) if a1.dtype.char in 'fd' else + np.complex128(a1.item())) + + # Then check overwrite permission + if not _datacopied(a1, a): # "a" still alive through "a1" + if not overwrite_a: + # Data belongs to "a" so make a copy + a1 = a1.copy(order='C') + # else: Do nothing we'll use "a" if possible + # else: a1 has its own data thus free to scratch + + # Then layout checks, might happen that overwrite is allowed but original + # array was read-only or non-C-contiguous. + if not (a1.flags['C_CONTIGUOUS'] and a1.flags['WRITEABLE']): + a1 = a1.copy(order='C') + + if a1.ndim == 2: + det = find_det_from_lu(a1) + # Convert float, complex to to NumPy scalars + return (np.float64(det) if np.isrealobj(det) else np.complex128(det)) + + # loop over the stacked array, and avoid overflows for single precision + # Cf. np.linalg.det(np.diag([1e+38, 1e+38]).astype(np.float32)) + dtype_char = a1.dtype.char + if dtype_char in 'fF': + dtype_char = 'd' if dtype_char.islower() else 'D' + + det = np.empty(a1.shape[:-2], dtype=dtype_char) + for ind in product(*[range(x) for x in a1.shape[:-2]]): + det[ind] = find_det_from_lu(a1[ind]) + return det + + +# Linear Least Squares +def lstsq(a, b, cond=None, overwrite_a=False, overwrite_b=False, + check_finite=True, lapack_driver=None): + """ + Compute least-squares solution to equation Ax = b. + + Compute a vector x such that the 2-norm ``|b - A x|`` is minimized. + + Parameters + ---------- + a : (M, N) array_like + Left-hand side array + b : (M,) or (M, K) array_like + Right hand side array + cond : float, optional + Cutoff for 'small' singular values; used to determine effective + rank of a. Singular values smaller than + ``cond * largest_singular_value`` are considered zero. + overwrite_a : bool, optional + Discard data in `a` (may enhance performance). Default is False. + overwrite_b : bool, optional + Discard data in `b` (may enhance performance). Default is False. + check_finite : bool, optional + Whether to check that the input matrices contain only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + lapack_driver : str, optional + Which LAPACK driver is used to solve the least-squares problem. + Options are ``'gelsd'``, ``'gelsy'``, ``'gelss'``. Default + (``'gelsd'``) is a good choice. However, ``'gelsy'`` can be slightly + faster on many problems. ``'gelss'`` was used historically. It is + generally slow but uses less memory. + + .. versionadded:: 0.17.0 + + Returns + ------- + x : (N,) or (N, K) ndarray + Least-squares solution. + residues : (K,) ndarray or float + Square of the 2-norm for each column in ``b - a x``, if ``M > N`` and + ``rank(A) == n`` (returns a scalar if ``b`` is 1-D). Otherwise a + (0,)-shaped array is returned. + rank : int + Effective rank of `a`. + s : (min(M, N),) ndarray or None + Singular values of `a`. The condition number of ``a`` is + ``s[0] / s[-1]``. + + Raises + ------ + LinAlgError + If computation does not converge. + + ValueError + When parameters are not compatible. + + See Also + -------- + scipy.optimize.nnls : linear least squares with non-negativity constraint + + Notes + ----- + When ``'gelsy'`` is used as a driver, `residues` is set to a (0,)-shaped + array and `s` is always ``None``. + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import lstsq + >>> import matplotlib.pyplot as plt + + Suppose we have the following data: + + >>> x = np.array([1, 2.5, 3.5, 4, 5, 7, 8.5]) + >>> y = np.array([0.3, 1.1, 1.5, 2.0, 3.2, 6.6, 8.6]) + + We want to fit a quadratic polynomial of the form ``y = a + b*x**2`` + to this data. We first form the "design matrix" M, with a constant + column of 1s and a column containing ``x**2``: + + >>> M = x[:, np.newaxis]**[0, 2] + >>> M + array([[ 1. , 1. ], + [ 1. , 6.25], + [ 1. , 12.25], + [ 1. , 16. ], + [ 1. , 25. ], + [ 1. , 49. ], + [ 1. , 72.25]]) + + We want to find the least-squares solution to ``M.dot(p) = y``, + where ``p`` is a vector with length 2 that holds the parameters + ``a`` and ``b``. + + >>> p, res, rnk, s = lstsq(M, y) + >>> p + array([ 0.20925829, 0.12013861]) + + Plot the data and the fitted curve. + + >>> plt.plot(x, y, 'o', label='data') + >>> xx = np.linspace(0, 9, 101) + >>> yy = p[0] + p[1]*xx**2 + >>> plt.plot(xx, yy, label='least squares fit, $y = a + bx^2$') + >>> plt.xlabel('x') + >>> plt.ylabel('y') + >>> plt.legend(framealpha=1, shadow=True) + >>> plt.grid(alpha=0.25) + >>> plt.show() + + """ + a1 = _asarray_validated(a, check_finite=check_finite) + b1 = _asarray_validated(b, check_finite=check_finite) + if len(a1.shape) != 2: + raise ValueError('Input array a should be 2D') + m, n = a1.shape + if len(b1.shape) == 2: + nrhs = b1.shape[1] + else: + nrhs = 1 + if m != b1.shape[0]: + raise ValueError('Shape mismatch: a and b should have the same number' + f' of rows ({m} != {b1.shape[0]}).') + if m == 0 or n == 0: # Zero-sized problem, confuses LAPACK + x = np.zeros((n,) + b1.shape[1:], dtype=np.common_type(a1, b1)) + if n == 0: + residues = np.linalg.norm(b1, axis=0)**2 + else: + residues = np.empty((0,)) + return x, residues, 0, np.empty((0,)) + + driver = lapack_driver + if driver is None: + driver = lstsq.default_lapack_driver + if driver not in ('gelsd', 'gelsy', 'gelss'): + raise ValueError('LAPACK driver "%s" is not found' % driver) + + lapack_func, lapack_lwork = get_lapack_funcs((driver, + '%s_lwork' % driver), + (a1, b1)) + real_data = True if (lapack_func.dtype.kind == 'f') else False + + if m < n: + # need to extend b matrix as it will be filled with + # a larger solution matrix + if len(b1.shape) == 2: + b2 = np.zeros((n, nrhs), dtype=lapack_func.dtype) + b2[:m, :] = b1 + else: + b2 = np.zeros(n, dtype=lapack_func.dtype) + b2[:m] = b1 + b1 = b2 + + overwrite_a = overwrite_a or _datacopied(a1, a) + overwrite_b = overwrite_b or _datacopied(b1, b) + + if cond is None: + cond = np.finfo(lapack_func.dtype).eps + + if driver in ('gelss', 'gelsd'): + if driver == 'gelss': + lwork = _compute_lwork(lapack_lwork, m, n, nrhs, cond) + v, x, s, rank, work, info = lapack_func(a1, b1, cond, lwork, + overwrite_a=overwrite_a, + overwrite_b=overwrite_b) + + elif driver == 'gelsd': + if real_data: + lwork, iwork = _compute_lwork(lapack_lwork, m, n, nrhs, cond) + x, s, rank, info = lapack_func(a1, b1, lwork, + iwork, cond, False, False) + else: # complex data + lwork, rwork, iwork = _compute_lwork(lapack_lwork, m, n, + nrhs, cond) + x, s, rank, info = lapack_func(a1, b1, lwork, rwork, iwork, + cond, False, False) + if info > 0: + raise LinAlgError("SVD did not converge in Linear Least Squares") + if info < 0: + raise ValueError('illegal value in %d-th argument of internal %s' + % (-info, lapack_driver)) + resids = np.asarray([], dtype=x.dtype) + if m > n: + x1 = x[:n] + if rank == n: + resids = np.sum(np.abs(x[n:])**2, axis=0) + x = x1 + return x, resids, rank, s + + elif driver == 'gelsy': + lwork = _compute_lwork(lapack_lwork, m, n, nrhs, cond) + jptv = np.zeros((a1.shape[1], 1), dtype=np.int32) + v, x, j, rank, info = lapack_func(a1, b1, jptv, cond, + lwork, False, False) + if info < 0: + raise ValueError("illegal value in %d-th argument of internal " + "gelsy" % -info) + if m > n: + x1 = x[:n] + x = x1 + return x, np.array([], x.dtype), rank, None + + +lstsq.default_lapack_driver = 'gelsd' + + +@_deprecate_positional_args(version="1.14") +def pinv(a, *, atol=None, rtol=None, return_rank=False, check_finite=True, + cond=_NoValue, rcond=_NoValue): + """ + Compute the (Moore-Penrose) pseudo-inverse of a matrix. + + Calculate a generalized inverse of a matrix using its + singular-value decomposition ``U @ S @ V`` in the economy mode and picking + up only the columns/rows that are associated with significant singular + values. + + If ``s`` is the maximum singular value of ``a``, then the + significance cut-off value is determined by ``atol + rtol * s``. Any + singular value below this value is assumed insignificant. + + Parameters + ---------- + a : (M, N) array_like + Matrix to be pseudo-inverted. + atol : float, optional + Absolute threshold term, default value is 0. + + .. versionadded:: 1.7.0 + + rtol : float, optional + Relative threshold term, default value is ``max(M, N) * eps`` where + ``eps`` is the machine precision value of the datatype of ``a``. + + .. versionadded:: 1.7.0 + + return_rank : bool, optional + If True, return the effective rank of the matrix. + check_finite : bool, optional + Whether to check that the input matrix contains only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + cond, rcond : float, optional + In older versions, these values were meant to be used as ``atol`` with + ``rtol=0``. If both were given ``rcond`` overwrote ``cond`` and hence + the code was not correct. Thus using these are strongly discouraged and + the tolerances above are recommended instead. In fact, if provided, + atol, rtol takes precedence over these keywords. + + .. deprecated:: 1.7.0 + Deprecated in favor of ``rtol`` and ``atol`` parameters above and + will be removed in SciPy 1.14.0. + + .. versionchanged:: 1.3.0 + Previously the default cutoff value was just ``eps*f`` where ``f`` + was ``1e3`` for single precision and ``1e6`` for double precision. + + Returns + ------- + B : (N, M) ndarray + The pseudo-inverse of matrix `a`. + rank : int + The effective rank of the matrix. Returned if `return_rank` is True. + + Raises + ------ + LinAlgError + If SVD computation does not converge. + + See Also + -------- + pinvh : Moore-Penrose pseudoinverse of a hermitian matrix. + + Notes + ----- + If ``A`` is invertible then the Moore-Penrose pseudoinverse is exactly + the inverse of ``A`` [1]_. If ``A`` is not invertible then the + Moore-Penrose pseudoinverse computes the ``x`` solution to ``Ax = b`` such + that ``||Ax - b||`` is minimized [1]_. + + References + ---------- + .. [1] Penrose, R. (1956). On best approximate solutions of linear matrix + equations. Mathematical Proceedings of the Cambridge Philosophical + Society, 52(1), 17-19. doi:10.1017/S0305004100030929 + + Examples + -------- + + Given an ``m x n`` matrix ``A`` and an ``n x m`` matrix ``B`` the four + Moore-Penrose conditions are: + + 1. ``ABA = A`` (``B`` is a generalized inverse of ``A``), + 2. ``BAB = B`` (``A`` is a generalized inverse of ``B``), + 3. ``(AB)* = AB`` (``AB`` is hermitian), + 4. ``(BA)* = BA`` (``BA`` is hermitian) [1]_. + + Here, ``A*`` denotes the conjugate transpose. The Moore-Penrose + pseudoinverse is a unique ``B`` that satisfies all four of these + conditions and exists for any ``A``. Note that, unlike the standard + matrix inverse, ``A`` does not have to be a square matrix or have + linearly independent columns/rows. + + As an example, we can calculate the Moore-Penrose pseudoinverse of a + random non-square matrix and verify it satisfies the four conditions. + + >>> import numpy as np + >>> from scipy import linalg + >>> rng = np.random.default_rng() + >>> A = rng.standard_normal((9, 6)) + >>> B = linalg.pinv(A) + >>> np.allclose(A @ B @ A, A) # Condition 1 + True + >>> np.allclose(B @ A @ B, B) # Condition 2 + True + >>> np.allclose((A @ B).conj().T, A @ B) # Condition 3 + True + >>> np.allclose((B @ A).conj().T, B @ A) # Condition 4 + True + + """ + a = _asarray_validated(a, check_finite=check_finite) + u, s, vh = _decomp_svd.svd(a, full_matrices=False, check_finite=False) + t = u.dtype.char.lower() + maxS = np.max(s) + + if rcond is not _NoValue or cond is not _NoValue: + warn('Use of the "cond" and "rcond" keywords are deprecated and ' + 'will be removed in SciPy 1.14.0. Use "atol" and ' + '"rtol" keywords instead', DeprecationWarning, stacklevel=2) + + # backwards compatible only atol and rtol are both missing + if ((rcond not in (_NoValue, None) or cond not in (_NoValue, None)) + and (atol is None) and (rtol is None)): + atol = rcond if rcond not in (_NoValue, None) else cond + rtol = 0. + + atol = 0. if atol is None else atol + rtol = max(a.shape) * np.finfo(t).eps if (rtol is None) else rtol + + if (atol < 0.) or (rtol < 0.): + raise ValueError("atol and rtol values must be positive.") + + val = atol + maxS * rtol + rank = np.sum(s > val) + + u = u[:, :rank] + u /= s[:rank] + B = (u @ vh[:rank]).conj().T + + if return_rank: + return B, rank + else: + return B + + +def pinvh(a, atol=None, rtol=None, lower=True, return_rank=False, + check_finite=True): + """ + Compute the (Moore-Penrose) pseudo-inverse of a Hermitian matrix. + + Calculate a generalized inverse of a complex Hermitian/real symmetric + matrix using its eigenvalue decomposition and including all eigenvalues + with 'large' absolute value. + + Parameters + ---------- + a : (N, N) array_like + Real symmetric or complex hermetian matrix to be pseudo-inverted + + atol : float, optional + Absolute threshold term, default value is 0. + + .. versionadded:: 1.7.0 + + rtol : float, optional + Relative threshold term, default value is ``N * eps`` where + ``eps`` is the machine precision value of the datatype of ``a``. + + .. versionadded:: 1.7.0 + + lower : bool, optional + Whether the pertinent array data is taken from the lower or upper + triangle of `a`. (Default: lower) + return_rank : bool, optional + If True, return the effective rank of the matrix. + check_finite : bool, optional + Whether to check that the input matrix contains only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + B : (N, N) ndarray + The pseudo-inverse of matrix `a`. + rank : int + The effective rank of the matrix. Returned if `return_rank` is True. + + Raises + ------ + LinAlgError + If eigenvalue algorithm does not converge. + + See Also + -------- + pinv : Moore-Penrose pseudoinverse of a matrix. + + Examples + -------- + + For a more detailed example see `pinv`. + + >>> import numpy as np + >>> from scipy.linalg import pinvh + >>> rng = np.random.default_rng() + >>> a = rng.standard_normal((9, 6)) + >>> a = np.dot(a, a.T) + >>> B = pinvh(a) + >>> np.allclose(a, a @ B @ a) + True + >>> np.allclose(B, B @ a @ B) + True + + """ + a = _asarray_validated(a, check_finite=check_finite) + s, u = _decomp.eigh(a, lower=lower, check_finite=False) + t = u.dtype.char.lower() + maxS = np.max(np.abs(s)) + + atol = 0. if atol is None else atol + rtol = max(a.shape) * np.finfo(t).eps if (rtol is None) else rtol + + if (atol < 0.) or (rtol < 0.): + raise ValueError("atol and rtol values must be positive.") + + val = atol + maxS * rtol + above_cutoff = (abs(s) > val) + + psigma_diag = 1.0 / s[above_cutoff] + u = u[:, above_cutoff] + + B = (u * psigma_diag) @ u.conj().T + + if return_rank: + return B, len(psigma_diag) + else: + return B + + +def matrix_balance(A, permute=True, scale=True, separate=False, + overwrite_a=False): + """ + Compute a diagonal similarity transformation for row/column balancing. + + The balancing tries to equalize the row and column 1-norms by applying + a similarity transformation such that the magnitude variation of the + matrix entries is reflected to the scaling matrices. + + Moreover, if enabled, the matrix is first permuted to isolate the upper + triangular parts of the matrix and, again if scaling is also enabled, + only the remaining subblocks are subjected to scaling. + + The balanced matrix satisfies the following equality + + .. math:: + + B = T^{-1} A T + + The scaling coefficients are approximated to the nearest power of 2 + to avoid round-off errors. + + Parameters + ---------- + A : (n, n) array_like + Square data matrix for the balancing. + permute : bool, optional + The selector to define whether permutation of A is also performed + prior to scaling. + scale : bool, optional + The selector to turn on and off the scaling. If False, the matrix + will not be scaled. + separate : bool, optional + This switches from returning a full matrix of the transformation + to a tuple of two separate 1-D permutation and scaling arrays. + overwrite_a : bool, optional + This is passed to xGEBAL directly. Essentially, overwrites the result + to the data. It might increase the space efficiency. See LAPACK manual + for details. This is False by default. + + Returns + ------- + B : (n, n) ndarray + Balanced matrix + T : (n, n) ndarray + A possibly permuted diagonal matrix whose nonzero entries are + integer powers of 2 to avoid numerical truncation errors. + scale, perm : (n,) ndarray + If ``separate`` keyword is set to True then instead of the array + ``T`` above, the scaling and the permutation vectors are given + separately as a tuple without allocating the full array ``T``. + + Notes + ----- + This algorithm is particularly useful for eigenvalue and matrix + decompositions and in many cases it is already called by various + LAPACK routines. + + The algorithm is based on the well-known technique of [1]_ and has + been modified to account for special cases. See [2]_ for details + which have been implemented since LAPACK v3.5.0. Before this version + there are corner cases where balancing can actually worsen the + conditioning. See [3]_ for such examples. + + The code is a wrapper around LAPACK's xGEBAL routine family for matrix + balancing. + + .. versionadded:: 0.19.0 + + References + ---------- + .. [1] B.N. Parlett and C. Reinsch, "Balancing a Matrix for + Calculation of Eigenvalues and Eigenvectors", Numerische Mathematik, + Vol.13(4), 1969, :doi:`10.1007/BF02165404` + .. [2] R. James, J. Langou, B.R. Lowery, "On matrix balancing and + eigenvector computation", 2014, :arxiv:`1401.5766` + .. [3] D.S. Watkins. A case where balancing is harmful. + Electron. Trans. Numer. Anal, Vol.23, 2006. + + Examples + -------- + >>> import numpy as np + >>> from scipy import linalg + >>> x = np.array([[1,2,0], [9,1,0.01], [1,2,10*np.pi]]) + + >>> y, permscale = linalg.matrix_balance(x) + >>> np.abs(x).sum(axis=0) / np.abs(x).sum(axis=1) + array([ 3.66666667, 0.4995005 , 0.91312162]) + + >>> np.abs(y).sum(axis=0) / np.abs(y).sum(axis=1) + array([ 1.2 , 1.27041742, 0.92658316]) # may vary + + >>> permscale # only powers of 2 (0.5 == 2^(-1)) + array([[ 0.5, 0. , 0. ], # may vary + [ 0. , 1. , 0. ], + [ 0. , 0. , 1. ]]) + + """ + + A = np.atleast_2d(_asarray_validated(A, check_finite=True)) + + if not np.equal(*A.shape): + raise ValueError('The data matrix for balancing should be square.') + + gebal = get_lapack_funcs(('gebal'), (A,)) + B, lo, hi, ps, info = gebal(A, scale=scale, permute=permute, + overwrite_a=overwrite_a) + + if info < 0: + raise ValueError('xGEBAL exited with the internal error ' + f'"illegal value in argument number {-info}.". See ' + 'LAPACK documentation for the xGEBAL error codes.') + + # Separate the permutations from the scalings and then convert to int + scaling = np.ones_like(ps, dtype=float) + scaling[lo:hi+1] = ps[lo:hi+1] + + # gebal uses 1-indexing + ps = ps.astype(int, copy=False) - 1 + n = A.shape[0] + perm = np.arange(n) + + # LAPACK permutes with the ordering n --> hi, then 0--> lo + if hi < n: + for ind, x in enumerate(ps[hi+1:][::-1], 1): + if n-ind == x: + continue + perm[[x, n-ind]] = perm[[n-ind, x]] + + if lo > 0: + for ind, x in enumerate(ps[:lo]): + if ind == x: + continue + perm[[x, ind]] = perm[[ind, x]] + + if separate: + return B, (scaling, perm) + + # get the inverse permutation + iperm = np.empty_like(perm) + iperm[perm] = np.arange(n) + + return B, np.diag(scaling)[iperm, :] + + +def _validate_args_for_toeplitz_ops(c_or_cr, b, check_finite, keep_b_shape, + enforce_square=True): + """Validate arguments and format inputs for toeplitz functions + + Parameters + ---------- + c_or_cr : array_like or tuple of (array_like, array_like) + The vector ``c``, or a tuple of arrays (``c``, ``r``). Whatever the + actual shape of ``c``, it will be converted to a 1-D array. If not + supplied, ``r = conjugate(c)`` is assumed; in this case, if c[0] is + real, the Toeplitz matrix is Hermitian. r[0] is ignored; the first row + of the Toeplitz matrix is ``[c[0], r[1:]]``. Whatever the actual shape + of ``r``, it will be converted to a 1-D array. + b : (M,) or (M, K) array_like + Right-hand side in ``T x = b``. + check_finite : bool + Whether to check that the input matrices contain only finite numbers. + Disabling may give a performance gain, but may result in problems + (result entirely NaNs) if the inputs do contain infinities or NaNs. + keep_b_shape : bool + Whether to convert a (M,) dimensional b into a (M, 1) dimensional + matrix. + enforce_square : bool, optional + If True (default), this verifies that the Toeplitz matrix is square. + + Returns + ------- + r : array + 1d array corresponding to the first row of the Toeplitz matrix. + c: array + 1d array corresponding to the first column of the Toeplitz matrix. + b: array + (M,), (M, 1) or (M, K) dimensional array, post validation, + corresponding to ``b``. + dtype: numpy datatype + ``dtype`` stores the datatype of ``r``, ``c`` and ``b``. If any of + ``r``, ``c`` or ``b`` are complex, ``dtype`` is ``np.complex128``, + otherwise, it is ``np.float``. + b_shape: tuple + Shape of ``b`` after passing it through ``_asarray_validated``. + + """ + + if isinstance(c_or_cr, tuple): + c, r = c_or_cr + c = _asarray_validated(c, check_finite=check_finite).ravel() + r = _asarray_validated(r, check_finite=check_finite).ravel() + else: + c = _asarray_validated(c_or_cr, check_finite=check_finite).ravel() + r = c.conjugate() + + if b is None: + raise ValueError('`b` must be an array, not None.') + + b = _asarray_validated(b, check_finite=check_finite) + b_shape = b.shape + + is_not_square = r.shape[0] != c.shape[0] + if (enforce_square and is_not_square) or b.shape[0] != r.shape[0]: + raise ValueError('Incompatible dimensions.') + + is_cmplx = np.iscomplexobj(r) or np.iscomplexobj(c) or np.iscomplexobj(b) + dtype = np.complex128 if is_cmplx else np.float64 + r, c, b = (np.asarray(i, dtype=dtype) for i in (r, c, b)) + + if b.ndim == 1 and not keep_b_shape: + b = b.reshape(-1, 1) + elif b.ndim != 1: + b = b.reshape(b.shape[0], -1) + + return r, c, b, dtype, b_shape + + +def matmul_toeplitz(c_or_cr, x, check_finite=False, workers=None): + """Efficient Toeplitz Matrix-Matrix Multiplication using FFT + + This function returns the matrix multiplication between a Toeplitz + matrix and a dense matrix. + + The Toeplitz matrix has constant diagonals, with c as its first column + and r as its first row. If r is not given, ``r == conjugate(c)`` is + assumed. + + Parameters + ---------- + c_or_cr : array_like or tuple of (array_like, array_like) + The vector ``c``, or a tuple of arrays (``c``, ``r``). Whatever the + actual shape of ``c``, it will be converted to a 1-D array. If not + supplied, ``r = conjugate(c)`` is assumed; in this case, if c[0] is + real, the Toeplitz matrix is Hermitian. r[0] is ignored; the first row + of the Toeplitz matrix is ``[c[0], r[1:]]``. Whatever the actual shape + of ``r``, it will be converted to a 1-D array. + x : (M,) or (M, K) array_like + Matrix with which to multiply. + check_finite : bool, optional + Whether to check that the input matrices contain only finite numbers. + Disabling may give a performance gain, but may result in problems + (result entirely NaNs) if the inputs do contain infinities or NaNs. + workers : int, optional + To pass to scipy.fft.fft and ifft. Maximum number of workers to use + for parallel computation. If negative, the value wraps around from + ``os.cpu_count()``. See scipy.fft.fft for more details. + + Returns + ------- + T @ x : (M,) or (M, K) ndarray + The result of the matrix multiplication ``T @ x``. Shape of return + matches shape of `x`. + + See Also + -------- + toeplitz : Toeplitz matrix + solve_toeplitz : Solve a Toeplitz system using Levinson Recursion + + Notes + ----- + The Toeplitz matrix is embedded in a circulant matrix and the FFT is used + to efficiently calculate the matrix-matrix product. + + Because the computation is based on the FFT, integer inputs will + result in floating point outputs. This is unlike NumPy's `matmul`, + which preserves the data type of the input. + + This is partly based on the implementation that can be found in [1]_, + licensed under the MIT license. More information about the method can be + found in reference [2]_. References [3]_ and [4]_ have more reference + implementations in Python. + + .. versionadded:: 1.6.0 + + References + ---------- + .. [1] Jacob R Gardner, Geoff Pleiss, David Bindel, Kilian + Q Weinberger, Andrew Gordon Wilson, "GPyTorch: Blackbox Matrix-Matrix + Gaussian Process Inference with GPU Acceleration" with contributions + from Max Balandat and Ruihan Wu. Available online: + https://github.com/cornellius-gp/gpytorch + + .. [2] J. Demmel, P. Koev, and X. Li, "A Brief Survey of Direct Linear + Solvers". In Z. Bai, J. Demmel, J. Dongarra, A. Ruhe, and H. van der + Vorst, editors. Templates for the Solution of Algebraic Eigenvalue + Problems: A Practical Guide. SIAM, Philadelphia, 2000. Available at: + http://www.netlib.org/utk/people/JackDongarra/etemplates/node384.html + + .. [3] R. Scheibler, E. Bezzam, I. Dokmanic, Pyroomacoustics: A Python + package for audio room simulations and array processing algorithms, + Proc. IEEE ICASSP, Calgary, CA, 2018. + https://github.com/LCAV/pyroomacoustics/blob/pypi-release/ + pyroomacoustics/adaptive/util.py + + .. [4] Marano S, Edwards B, Ferrari G and Fah D (2017), "Fitting + Earthquake Spectra: Colored Noise and Incomplete Data", Bulletin of + the Seismological Society of America., January, 2017. Vol. 107(1), + pp. 276-291. + + Examples + -------- + Multiply the Toeplitz matrix T with matrix x:: + + [ 1 -1 -2 -3] [1 10] + T = [ 3 1 -1 -2] x = [2 11] + [ 6 3 1 -1] [2 11] + [10 6 3 1] [5 19] + + To specify the Toeplitz matrix, only the first column and the first + row are needed. + + >>> import numpy as np + >>> c = np.array([1, 3, 6, 10]) # First column of T + >>> r = np.array([1, -1, -2, -3]) # First row of T + >>> x = np.array([[1, 10], [2, 11], [2, 11], [5, 19]]) + + >>> from scipy.linalg import toeplitz, matmul_toeplitz + >>> matmul_toeplitz((c, r), x) + array([[-20., -80.], + [ -7., -8.], + [ 9., 85.], + [ 33., 218.]]) + + Check the result by creating the full Toeplitz matrix and + multiplying it by ``x``. + + >>> toeplitz(c, r) @ x + array([[-20, -80], + [ -7, -8], + [ 9, 85], + [ 33, 218]]) + + The full matrix is never formed explicitly, so this routine + is suitable for very large Toeplitz matrices. + + >>> n = 1000000 + >>> matmul_toeplitz([1] + [0]*(n-1), np.ones(n)) + array([1., 1., 1., ..., 1., 1., 1.]) + + """ + + from ..fft import fft, ifft, rfft, irfft + + r, c, x, dtype, x_shape = _validate_args_for_toeplitz_ops( + c_or_cr, x, check_finite, keep_b_shape=False, enforce_square=False) + n, m = x.shape + + T_nrows = len(c) + T_ncols = len(r) + p = T_nrows + T_ncols - 1 # equivalent to len(embedded_col) + + embedded_col = np.concatenate((c, r[-1:0:-1])) + + if np.iscomplexobj(embedded_col) or np.iscomplexobj(x): + fft_mat = fft(embedded_col, axis=0, workers=workers).reshape(-1, 1) + fft_x = fft(x, n=p, axis=0, workers=workers) + + mat_times_x = ifft(fft_mat*fft_x, axis=0, + workers=workers)[:T_nrows, :] + else: + # Real inputs; using rfft is faster + fft_mat = rfft(embedded_col, axis=0, workers=workers).reshape(-1, 1) + fft_x = rfft(x, n=p, axis=0, workers=workers) + + mat_times_x = irfft(fft_mat*fft_x, axis=0, + workers=workers, n=p)[:T_nrows, :] + + return_shape = (T_nrows,) if len(x_shape) == 1 else (T_nrows, m) + return mat_times_x.reshape(*return_shape) diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_blas_subroutines.h b/venv/lib/python3.10/site-packages/scipy/linalg/_blas_subroutines.h new file mode 100644 index 0000000000000000000000000000000000000000..d1d9308b8e8e9e6ebf30bb6acd5b028c1c929d7b --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_blas_subroutines.h @@ -0,0 +1,164 @@ +/* +This file was generated by _generate_pyx.py. +Do not edit this file directly. +*/ + +#include "fortran_defs.h" +#include "npy_cblas.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void BLAS_FUNC(caxpy)(int *n, npy_complex64 *ca, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy); +void BLAS_FUNC(ccopy)(int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy); +void (cdotcwrp_)(npy_complex64 *out, int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy); +void (cdotuwrp_)(npy_complex64 *out, int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy); +void BLAS_FUNC(cgbmv)(char *trans, int *m, int *n, int *kl, int *ku, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy); +void BLAS_FUNC(cgemm)(char *transa, char *transb, int *m, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *beta, npy_complex64 *c, int *ldc); +void BLAS_FUNC(cgemv)(char *trans, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy); +void BLAS_FUNC(cgerc)(int *m, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, npy_complex64 *a, int *lda); +void BLAS_FUNC(cgeru)(int *m, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, npy_complex64 *a, int *lda); +void BLAS_FUNC(chbmv)(char *uplo, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy); +void BLAS_FUNC(chemm)(char *side, char *uplo, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *beta, npy_complex64 *c, int *ldc); +void BLAS_FUNC(chemv)(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy); +void BLAS_FUNC(cher)(char *uplo, int *n, float *alpha, npy_complex64 *x, int *incx, npy_complex64 *a, int *lda); +void BLAS_FUNC(cher2)(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, npy_complex64 *a, int *lda); +void BLAS_FUNC(cher2k)(char *uplo, char *trans, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, float *beta, npy_complex64 *c, int *ldc); +void BLAS_FUNC(cherk)(char *uplo, char *trans, int *n, int *k, float *alpha, npy_complex64 *a, int *lda, float *beta, npy_complex64 *c, int *ldc); +void BLAS_FUNC(chpmv)(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *ap, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy); +void BLAS_FUNC(chpr)(char *uplo, int *n, float *alpha, npy_complex64 *x, int *incx, npy_complex64 *ap); +void BLAS_FUNC(chpr2)(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, npy_complex64 *ap); +void BLAS_FUNC(crotg)(npy_complex64 *ca, npy_complex64 *cb, float *c, npy_complex64 *s); +void BLAS_FUNC(cscal)(int *n, npy_complex64 *ca, npy_complex64 *cx, int *incx); +void BLAS_FUNC(csrot)(int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy, float *c, float *s); +void BLAS_FUNC(csscal)(int *n, float *sa, npy_complex64 *cx, int *incx); +void BLAS_FUNC(cswap)(int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy); +void BLAS_FUNC(csymm)(char *side, char *uplo, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *beta, npy_complex64 *c, int *ldc); +void BLAS_FUNC(csyr2k)(char *uplo, char *trans, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *beta, npy_complex64 *c, int *ldc); +void BLAS_FUNC(csyrk)(char *uplo, char *trans, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *beta, npy_complex64 *c, int *ldc); +void BLAS_FUNC(ctbmv)(char *uplo, char *trans, char *diag, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx); +void BLAS_FUNC(ctbsv)(char *uplo, char *trans, char *diag, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx); +void BLAS_FUNC(ctpmv)(char *uplo, char *trans, char *diag, int *n, npy_complex64 *ap, npy_complex64 *x, int *incx); +void BLAS_FUNC(ctpsv)(char *uplo, char *trans, char *diag, int *n, npy_complex64 *ap, npy_complex64 *x, int *incx); +void BLAS_FUNC(ctrmm)(char *side, char *uplo, char *transa, char *diag, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb); +void BLAS_FUNC(ctrmv)(char *uplo, char *trans, char *diag, int *n, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx); +void BLAS_FUNC(ctrsm)(char *side, char *uplo, char *transa, char *diag, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb); +void BLAS_FUNC(ctrsv)(char *uplo, char *trans, char *diag, int *n, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx); +double BLAS_FUNC(dasum)(int *n, double *dx, int *incx); +void BLAS_FUNC(daxpy)(int *n, double *da, double *dx, int *incx, double *dy, int *incy); +double BLAS_FUNC(dcabs1)(npy_complex128 *z); +void BLAS_FUNC(dcopy)(int *n, double *dx, int *incx, double *dy, int *incy); +double BLAS_FUNC(ddot)(int *n, double *dx, int *incx, double *dy, int *incy); +void BLAS_FUNC(dgbmv)(char *trans, int *m, int *n, int *kl, int *ku, double *alpha, double *a, int *lda, double *x, int *incx, double *beta, double *y, int *incy); +void BLAS_FUNC(dgemm)(char *transa, char *transb, int *m, int *n, int *k, double *alpha, double *a, int *lda, double *b, int *ldb, double *beta, double *c, int *ldc); +void BLAS_FUNC(dgemv)(char *trans, int *m, int *n, double *alpha, double *a, int *lda, double *x, int *incx, double *beta, double *y, int *incy); +void BLAS_FUNC(dger)(int *m, int *n, double *alpha, double *x, int *incx, double *y, int *incy, double *a, int *lda); +double BLAS_FUNC(dnrm2)(int *n, double *x, int *incx); +void BLAS_FUNC(drot)(int *n, double *dx, int *incx, double *dy, int *incy, double *c, double *s); +void BLAS_FUNC(drotg)(double *da, double *db, double *c, double *s); +void BLAS_FUNC(drotm)(int *n, double *dx, int *incx, double *dy, int *incy, double *dparam); +void BLAS_FUNC(drotmg)(double *dd1, double *dd2, double *dx1, double *dy1, double *dparam); +void BLAS_FUNC(dsbmv)(char *uplo, int *n, int *k, double *alpha, double *a, int *lda, double *x, int *incx, double *beta, double *y, int *incy); +void BLAS_FUNC(dscal)(int *n, double *da, double *dx, int *incx); +double BLAS_FUNC(dsdot)(int *n, float *sx, int *incx, float *sy, int *incy); +void BLAS_FUNC(dspmv)(char *uplo, int *n, double *alpha, double *ap, double *x, int *incx, double *beta, double *y, int *incy); +void BLAS_FUNC(dspr)(char *uplo, int *n, double *alpha, double *x, int *incx, double *ap); +void BLAS_FUNC(dspr2)(char *uplo, int *n, double *alpha, double *x, int *incx, double *y, int *incy, double *ap); +void BLAS_FUNC(dswap)(int *n, double *dx, int *incx, double *dy, int *incy); +void BLAS_FUNC(dsymm)(char *side, char *uplo, int *m, int *n, double *alpha, double *a, int *lda, double *b, int *ldb, double *beta, double *c, int *ldc); +void BLAS_FUNC(dsymv)(char *uplo, int *n, double *alpha, double *a, int *lda, double *x, int *incx, double *beta, double *y, int *incy); +void BLAS_FUNC(dsyr)(char *uplo, int *n, double *alpha, double *x, int *incx, double *a, int *lda); +void BLAS_FUNC(dsyr2)(char *uplo, int *n, double *alpha, double *x, int *incx, double *y, int *incy, double *a, int *lda); +void BLAS_FUNC(dsyr2k)(char *uplo, char *trans, int *n, int *k, double *alpha, double *a, int *lda, double *b, int *ldb, double *beta, double *c, int *ldc); +void BLAS_FUNC(dsyrk)(char *uplo, char *trans, int *n, int *k, double *alpha, double *a, int *lda, double *beta, double *c, int *ldc); +void BLAS_FUNC(dtbmv)(char *uplo, char *trans, char *diag, int *n, int *k, double *a, int *lda, double *x, int *incx); +void BLAS_FUNC(dtbsv)(char *uplo, char *trans, char *diag, int *n, int *k, double *a, int *lda, double *x, int *incx); +void BLAS_FUNC(dtpmv)(char *uplo, char *trans, char *diag, int *n, double *ap, double *x, int *incx); +void BLAS_FUNC(dtpsv)(char *uplo, char *trans, char *diag, int *n, double *ap, double *x, int *incx); +void BLAS_FUNC(dtrmm)(char *side, char *uplo, char *transa, char *diag, int *m, int *n, double *alpha, double *a, int *lda, double *b, int *ldb); +void BLAS_FUNC(dtrmv)(char *uplo, char *trans, char *diag, int *n, double *a, int *lda, double *x, int *incx); +void BLAS_FUNC(dtrsm)(char *side, char *uplo, char *transa, char *diag, int *m, int *n, double *alpha, double *a, int *lda, double *b, int *ldb); +void BLAS_FUNC(dtrsv)(char *uplo, char *trans, char *diag, int *n, double *a, int *lda, double *x, int *incx); +double BLAS_FUNC(dzasum)(int *n, npy_complex128 *zx, int *incx); +double BLAS_FUNC(dznrm2)(int *n, npy_complex128 *x, int *incx); +int BLAS_FUNC(icamax)(int *n, npy_complex64 *cx, int *incx); +int BLAS_FUNC(idamax)(int *n, double *dx, int *incx); +int BLAS_FUNC(isamax)(int *n, float *sx, int *incx); +int BLAS_FUNC(izamax)(int *n, npy_complex128 *zx, int *incx); +int BLAS_FUNC(lsame)(char *ca, char *cb); +float BLAS_FUNC(sasum)(int *n, float *sx, int *incx); +void BLAS_FUNC(saxpy)(int *n, float *sa, float *sx, int *incx, float *sy, int *incy); +float BLAS_FUNC(scasum)(int *n, npy_complex64 *cx, int *incx); +float BLAS_FUNC(scnrm2)(int *n, npy_complex64 *x, int *incx); +void BLAS_FUNC(scopy)(int *n, float *sx, int *incx, float *sy, int *incy); +float BLAS_FUNC(sdot)(int *n, float *sx, int *incx, float *sy, int *incy); +float BLAS_FUNC(sdsdot)(int *n, float *sb, float *sx, int *incx, float *sy, int *incy); +void BLAS_FUNC(sgbmv)(char *trans, int *m, int *n, int *kl, int *ku, float *alpha, float *a, int *lda, float *x, int *incx, float *beta, float *y, int *incy); +void BLAS_FUNC(sgemm)(char *transa, char *transb, int *m, int *n, int *k, float *alpha, float *a, int *lda, float *b, int *ldb, float *beta, float *c, int *ldc); +void BLAS_FUNC(sgemv)(char *trans, int *m, int *n, float *alpha, float *a, int *lda, float *x, int *incx, float *beta, float *y, int *incy); +void BLAS_FUNC(sger)(int *m, int *n, float *alpha, float *x, int *incx, float *y, int *incy, float *a, int *lda); +float BLAS_FUNC(snrm2)(int *n, float *x, int *incx); +void BLAS_FUNC(srot)(int *n, float *sx, int *incx, float *sy, int *incy, float *c, float *s); +void BLAS_FUNC(srotg)(float *sa, float *sb, float *c, float *s); +void BLAS_FUNC(srotm)(int *n, float *sx, int *incx, float *sy, int *incy, float *sparam); +void BLAS_FUNC(srotmg)(float *sd1, float *sd2, float *sx1, float *sy1, float *sparam); +void BLAS_FUNC(ssbmv)(char *uplo, int *n, int *k, float *alpha, float *a, int *lda, float *x, int *incx, float *beta, float *y, int *incy); +void BLAS_FUNC(sscal)(int *n, float *sa, float *sx, int *incx); +void BLAS_FUNC(sspmv)(char *uplo, int *n, float *alpha, float *ap, float *x, int *incx, float *beta, float *y, int *incy); +void BLAS_FUNC(sspr)(char *uplo, int *n, float *alpha, float *x, int *incx, float *ap); +void BLAS_FUNC(sspr2)(char *uplo, int *n, float *alpha, float *x, int *incx, float *y, int *incy, float *ap); +void BLAS_FUNC(sswap)(int *n, float *sx, int *incx, float *sy, int *incy); +void BLAS_FUNC(ssymm)(char *side, char *uplo, int *m, int *n, float *alpha, float *a, int *lda, float *b, int *ldb, float *beta, float *c, int *ldc); +void BLAS_FUNC(ssymv)(char *uplo, int *n, float *alpha, float *a, int *lda, float *x, int *incx, float *beta, float *y, int *incy); +void BLAS_FUNC(ssyr)(char *uplo, int *n, float *alpha, float *x, int *incx, float *a, int *lda); +void BLAS_FUNC(ssyr2)(char *uplo, int *n, float *alpha, float *x, int *incx, float *y, int *incy, float *a, int *lda); +void BLAS_FUNC(ssyr2k)(char *uplo, char *trans, int *n, int *k, float *alpha, float *a, int *lda, float *b, int *ldb, float *beta, float *c, int *ldc); +void BLAS_FUNC(ssyrk)(char *uplo, char *trans, int *n, int *k, float *alpha, float *a, int *lda, float *beta, float *c, int *ldc); +void BLAS_FUNC(stbmv)(char *uplo, char *trans, char *diag, int *n, int *k, float *a, int *lda, float *x, int *incx); +void BLAS_FUNC(stbsv)(char *uplo, char *trans, char *diag, int *n, int *k, float *a, int *lda, float *x, int *incx); +void BLAS_FUNC(stpmv)(char *uplo, char *trans, char *diag, int *n, float *ap, float *x, int *incx); +void BLAS_FUNC(stpsv)(char *uplo, char *trans, char *diag, int *n, float *ap, float *x, int *incx); +void BLAS_FUNC(strmm)(char *side, char *uplo, char *transa, char *diag, int *m, int *n, float *alpha, float *a, int *lda, float *b, int *ldb); +void BLAS_FUNC(strmv)(char *uplo, char *trans, char *diag, int *n, float *a, int *lda, float *x, int *incx); +void BLAS_FUNC(strsm)(char *side, char *uplo, char *transa, char *diag, int *m, int *n, float *alpha, float *a, int *lda, float *b, int *ldb); +void BLAS_FUNC(strsv)(char *uplo, char *trans, char *diag, int *n, float *a, int *lda, float *x, int *incx); +void BLAS_FUNC(zaxpy)(int *n, npy_complex128 *za, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy); +void BLAS_FUNC(zcopy)(int *n, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy); +void (zdotcwrp_)(npy_complex128 *out, int *n, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy); +void (zdotuwrp_)(npy_complex128 *out, int *n, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy); +void BLAS_FUNC(zdrot)(int *n, npy_complex128 *cx, int *incx, npy_complex128 *cy, int *incy, double *c, double *s); +void BLAS_FUNC(zdscal)(int *n, double *da, npy_complex128 *zx, int *incx); +void BLAS_FUNC(zgbmv)(char *trans, int *m, int *n, int *kl, int *ku, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy); +void BLAS_FUNC(zgemm)(char *transa, char *transb, int *m, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *beta, npy_complex128 *c, int *ldc); +void BLAS_FUNC(zgemv)(char *trans, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy); +void BLAS_FUNC(zgerc)(int *m, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, npy_complex128 *a, int *lda); +void BLAS_FUNC(zgeru)(int *m, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, npy_complex128 *a, int *lda); +void BLAS_FUNC(zhbmv)(char *uplo, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy); +void BLAS_FUNC(zhemm)(char *side, char *uplo, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *beta, npy_complex128 *c, int *ldc); +void BLAS_FUNC(zhemv)(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy); +void BLAS_FUNC(zher)(char *uplo, int *n, double *alpha, npy_complex128 *x, int *incx, npy_complex128 *a, int *lda); +void BLAS_FUNC(zher2)(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, npy_complex128 *a, int *lda); +void BLAS_FUNC(zher2k)(char *uplo, char *trans, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, double *beta, npy_complex128 *c, int *ldc); +void BLAS_FUNC(zherk)(char *uplo, char *trans, int *n, int *k, double *alpha, npy_complex128 *a, int *lda, double *beta, npy_complex128 *c, int *ldc); +void BLAS_FUNC(zhpmv)(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *ap, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy); +void BLAS_FUNC(zhpr)(char *uplo, int *n, double *alpha, npy_complex128 *x, int *incx, npy_complex128 *ap); +void BLAS_FUNC(zhpr2)(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, npy_complex128 *ap); +void BLAS_FUNC(zrotg)(npy_complex128 *ca, npy_complex128 *cb, double *c, npy_complex128 *s); +void BLAS_FUNC(zscal)(int *n, npy_complex128 *za, npy_complex128 *zx, int *incx); +void BLAS_FUNC(zswap)(int *n, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy); +void BLAS_FUNC(zsymm)(char *side, char *uplo, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *beta, npy_complex128 *c, int *ldc); +void BLAS_FUNC(zsyr2k)(char *uplo, char *trans, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *beta, npy_complex128 *c, int *ldc); +void BLAS_FUNC(zsyrk)(char *uplo, char *trans, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *beta, npy_complex128 *c, int *ldc); +void BLAS_FUNC(ztbmv)(char *uplo, char *trans, char *diag, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx); +void BLAS_FUNC(ztbsv)(char *uplo, char *trans, char *diag, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx); +void BLAS_FUNC(ztpmv)(char *uplo, char *trans, char *diag, int *n, npy_complex128 *ap, npy_complex128 *x, int *incx); +void BLAS_FUNC(ztpsv)(char *uplo, char *trans, char *diag, int *n, npy_complex128 *ap, npy_complex128 *x, int *incx); +void BLAS_FUNC(ztrmm)(char *side, char *uplo, char *transa, char *diag, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb); +void BLAS_FUNC(ztrmv)(char *uplo, char *trans, char *diag, int *n, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx); +void BLAS_FUNC(ztrsm)(char *side, char *uplo, char *transa, char *diag, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb); +void BLAS_FUNC(ztrsv)(char *uplo, char *trans, char *diag, int *n, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx); + +#ifdef __cplusplus +} +#endif diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_cythonized_array_utils.cpython-310-x86_64-linux-gnu.so b/venv/lib/python3.10/site-packages/scipy/linalg/_cythonized_array_utils.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..9a3d9c8de436abe431b2bbc74d990c2d74526242 Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/_cythonized_array_utils.cpython-310-x86_64-linux-gnu.so differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_cythonized_array_utils.pxd b/venv/lib/python3.10/site-packages/scipy/linalg/_cythonized_array_utils.pxd new file mode 100644 index 0000000000000000000000000000000000000000..ccec61c078e57ba7b6a310ec57189fcf236c972d --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_cythonized_array_utils.pxd @@ -0,0 +1,40 @@ +cimport numpy as cnp + +ctypedef fused lapack_t: + float + double + (float complex) + (double complex) + +ctypedef fused lapack_cz_t: + (float complex) + (double complex) + +ctypedef fused lapack_sd_t: + float + double + +ctypedef fused np_numeric_t: + cnp.int8_t + cnp.int16_t + cnp.int32_t + cnp.int64_t + cnp.uint8_t + cnp.uint16_t + cnp.uint32_t + cnp.uint64_t + cnp.float32_t + cnp.float64_t + cnp.longdouble_t + cnp.complex64_t + cnp.complex128_t + +ctypedef fused np_complex_numeric_t: + cnp.complex64_t + cnp.complex128_t + + +cdef void swap_c_and_f_layout(lapack_t *a, lapack_t *b, int r, int c) noexcept nogil +cdef (int, int) band_check_internal_c(np_numeric_t[:, ::1]A) noexcept nogil +cdef bint is_sym_her_real_c_internal(np_numeric_t[:, ::1]A) noexcept nogil +cdef bint is_sym_her_complex_c_internal(np_complex_numeric_t[:, ::1]A) noexcept nogil diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_cythonized_array_utils.pyi b/venv/lib/python3.10/site-packages/scipy/linalg/_cythonized_array_utils.pyi new file mode 100644 index 0000000000000000000000000000000000000000..5633cb61ecf3a90eba901120f64fa6cc6634fa5a --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_cythonized_array_utils.pyi @@ -0,0 +1,16 @@ +from numpy.typing import NDArray +from typing import Any + +def bandwidth(a: NDArray[Any]) -> tuple[int, int]: ... + +def issymmetric( + a: NDArray[Any], + atol: None | float = ..., + rtol: None | float = ..., +) -> bool: ... + +def ishermitian( + a: NDArray[Any], + atol: None | float = ..., + rtol: None | float = ..., +) -> bool: ... diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_decomp.py b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp.py new file mode 100644 index 0000000000000000000000000000000000000000..2918295ec5b21d2a560a5e7af20d8b32c719e73f --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp.py @@ -0,0 +1,1621 @@ +# +# Author: Pearu Peterson, March 2002 +# +# additions by Travis Oliphant, March 2002 +# additions by Eric Jones, June 2002 +# additions by Johannes Loehnert, June 2006 +# additions by Bart Vandereycken, June 2006 +# additions by Andrew D Straw, May 2007 +# additions by Tiziano Zito, November 2008 +# +# April 2010: Functions for LU, QR, SVD, Schur, and Cholesky decompositions +# were moved to their own files. Still in this file are functions for +# eigenstuff and for the Hessenberg form. + +__all__ = ['eig', 'eigvals', 'eigh', 'eigvalsh', + 'eig_banded', 'eigvals_banded', + 'eigh_tridiagonal', 'eigvalsh_tridiagonal', 'hessenberg', 'cdf2rdf'] + +import warnings + +import numpy +from numpy import (array, isfinite, inexact, nonzero, iscomplexobj, + flatnonzero, conj, asarray, argsort, empty, + iscomplex, zeros, einsum, eye, inf) +# Local imports +from scipy._lib._util import _asarray_validated +from ._misc import LinAlgError, _datacopied, norm +from .lapack import get_lapack_funcs, _compute_lwork +from scipy._lib.deprecation import _NoValue, _deprecate_positional_args + + +_I = numpy.array(1j, dtype='F') + + +def _make_complex_eigvecs(w, vin, dtype): + """ + Produce complex-valued eigenvectors from LAPACK DGGEV real-valued output + """ + # - see LAPACK man page DGGEV at ALPHAI + v = numpy.array(vin, dtype=dtype) + m = (w.imag > 0) + m[:-1] |= (w.imag[1:] < 0) # workaround for LAPACK bug, cf. ticket #709 + for i in flatnonzero(m): + v.imag[:, i] = vin[:, i+1] + conj(v[:, i], v[:, i+1]) + return v + + +def _make_eigvals(alpha, beta, homogeneous_eigvals): + if homogeneous_eigvals: + if beta is None: + return numpy.vstack((alpha, numpy.ones_like(alpha))) + else: + return numpy.vstack((alpha, beta)) + else: + if beta is None: + return alpha + else: + w = numpy.empty_like(alpha) + alpha_zero = (alpha == 0) + beta_zero = (beta == 0) + beta_nonzero = ~beta_zero + w[beta_nonzero] = alpha[beta_nonzero]/beta[beta_nonzero] + # Use numpy.inf for complex values too since + # 1/numpy.inf = 0, i.e., it correctly behaves as projective + # infinity. + w[~alpha_zero & beta_zero] = numpy.inf + if numpy.all(alpha.imag == 0): + w[alpha_zero & beta_zero] = numpy.nan + else: + w[alpha_zero & beta_zero] = complex(numpy.nan, numpy.nan) + return w + + +def _geneig(a1, b1, left, right, overwrite_a, overwrite_b, + homogeneous_eigvals): + ggev, = get_lapack_funcs(('ggev',), (a1, b1)) + cvl, cvr = left, right + res = ggev(a1, b1, lwork=-1) + lwork = res[-2][0].real.astype(numpy.int_) + if ggev.typecode in 'cz': + alpha, beta, vl, vr, work, info = ggev(a1, b1, cvl, cvr, lwork, + overwrite_a, overwrite_b) + w = _make_eigvals(alpha, beta, homogeneous_eigvals) + else: + alphar, alphai, beta, vl, vr, work, info = ggev(a1, b1, cvl, cvr, + lwork, overwrite_a, + overwrite_b) + alpha = alphar + _I * alphai + w = _make_eigvals(alpha, beta, homogeneous_eigvals) + _check_info(info, 'generalized eig algorithm (ggev)') + + only_real = numpy.all(w.imag == 0.0) + if not (ggev.typecode in 'cz' or only_real): + t = w.dtype.char + if left: + vl = _make_complex_eigvecs(w, vl, t) + if right: + vr = _make_complex_eigvecs(w, vr, t) + + # the eigenvectors returned by the lapack function are NOT normalized + for i in range(vr.shape[0]): + if right: + vr[:, i] /= norm(vr[:, i]) + if left: + vl[:, i] /= norm(vl[:, i]) + + if not (left or right): + return w + if left: + if right: + return w, vl, vr + return w, vl + return w, vr + + +def eig(a, b=None, left=False, right=True, overwrite_a=False, + overwrite_b=False, check_finite=True, homogeneous_eigvals=False): + """ + Solve an ordinary or generalized eigenvalue problem of a square matrix. + + Find eigenvalues w and right or left eigenvectors of a general matrix:: + + a vr[:,i] = w[i] b vr[:,i] + a.H vl[:,i] = w[i].conj() b.H vl[:,i] + + where ``.H`` is the Hermitian conjugation. + + Parameters + ---------- + a : (M, M) array_like + A complex or real matrix whose eigenvalues and eigenvectors + will be computed. + b : (M, M) array_like, optional + Right-hand side matrix in a generalized eigenvalue problem. + Default is None, identity matrix is assumed. + left : bool, optional + Whether to calculate and return left eigenvectors. Default is False. + right : bool, optional + Whether to calculate and return right eigenvectors. Default is True. + overwrite_a : bool, optional + Whether to overwrite `a`; may improve performance. Default is False. + overwrite_b : bool, optional + Whether to overwrite `b`; may improve performance. Default is False. + check_finite : bool, optional + Whether to check that the input matrices contain only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + homogeneous_eigvals : bool, optional + If True, return the eigenvalues in homogeneous coordinates. + In this case ``w`` is a (2, M) array so that:: + + w[1,i] a vr[:,i] = w[0,i] b vr[:,i] + + Default is False. + + Returns + ------- + w : (M,) or (2, M) double or complex ndarray + The eigenvalues, each repeated according to its + multiplicity. The shape is (M,) unless + ``homogeneous_eigvals=True``. + vl : (M, M) double or complex ndarray + The left eigenvector corresponding to the eigenvalue + ``w[i]`` is the column ``vl[:,i]``. Only returned if ``left=True``. + The left eigenvector is not normalized. + vr : (M, M) double or complex ndarray + The normalized right eigenvector corresponding to the eigenvalue + ``w[i]`` is the column ``vr[:,i]``. Only returned if ``right=True``. + + Raises + ------ + LinAlgError + If eigenvalue computation does not converge. + + See Also + -------- + eigvals : eigenvalues of general arrays + eigh : Eigenvalues and right eigenvectors for symmetric/Hermitian arrays. + eig_banded : eigenvalues and right eigenvectors for symmetric/Hermitian + band matrices + eigh_tridiagonal : eigenvalues and right eiegenvectors for + symmetric/Hermitian tridiagonal matrices + + Examples + -------- + >>> import numpy as np + >>> from scipy import linalg + >>> a = np.array([[0., -1.], [1., 0.]]) + >>> linalg.eigvals(a) + array([0.+1.j, 0.-1.j]) + + >>> b = np.array([[0., 1.], [1., 1.]]) + >>> linalg.eigvals(a, b) + array([ 1.+0.j, -1.+0.j]) + + >>> a = np.array([[3., 0., 0.], [0., 8., 0.], [0., 0., 7.]]) + >>> linalg.eigvals(a, homogeneous_eigvals=True) + array([[3.+0.j, 8.+0.j, 7.+0.j], + [1.+0.j, 1.+0.j, 1.+0.j]]) + + >>> a = np.array([[0., -1.], [1., 0.]]) + >>> linalg.eigvals(a) == linalg.eig(a)[0] + array([ True, True]) + >>> linalg.eig(a, left=True, right=False)[1] # normalized left eigenvector + array([[-0.70710678+0.j , -0.70710678-0.j ], + [-0. +0.70710678j, -0. -0.70710678j]]) + >>> linalg.eig(a, left=False, right=True)[1] # normalized right eigenvector + array([[0.70710678+0.j , 0.70710678-0.j ], + [0. -0.70710678j, 0. +0.70710678j]]) + + + + """ + a1 = _asarray_validated(a, check_finite=check_finite) + if len(a1.shape) != 2 or a1.shape[0] != a1.shape[1]: + raise ValueError('expected square matrix') + overwrite_a = overwrite_a or (_datacopied(a1, a)) + if b is not None: + b1 = _asarray_validated(b, check_finite=check_finite) + overwrite_b = overwrite_b or _datacopied(b1, b) + if len(b1.shape) != 2 or b1.shape[0] != b1.shape[1]: + raise ValueError('expected square matrix') + if b1.shape != a1.shape: + raise ValueError('a and b must have the same shape') + return _geneig(a1, b1, left, right, overwrite_a, overwrite_b, + homogeneous_eigvals) + + geev, geev_lwork = get_lapack_funcs(('geev', 'geev_lwork'), (a1,)) + compute_vl, compute_vr = left, right + + lwork = _compute_lwork(geev_lwork, a1.shape[0], + compute_vl=compute_vl, + compute_vr=compute_vr) + + if geev.typecode in 'cz': + w, vl, vr, info = geev(a1, lwork=lwork, + compute_vl=compute_vl, + compute_vr=compute_vr, + overwrite_a=overwrite_a) + w = _make_eigvals(w, None, homogeneous_eigvals) + else: + wr, wi, vl, vr, info = geev(a1, lwork=lwork, + compute_vl=compute_vl, + compute_vr=compute_vr, + overwrite_a=overwrite_a) + t = {'f': 'F', 'd': 'D'}[wr.dtype.char] + w = wr + _I * wi + w = _make_eigvals(w, None, homogeneous_eigvals) + + _check_info(info, 'eig algorithm (geev)', + positive='did not converge (only eigenvalues ' + 'with order >= %d have converged)') + + only_real = numpy.all(w.imag == 0.0) + if not (geev.typecode in 'cz' or only_real): + t = w.dtype.char + if left: + vl = _make_complex_eigvecs(w, vl, t) + if right: + vr = _make_complex_eigvecs(w, vr, t) + if not (left or right): + return w + if left: + if right: + return w, vl, vr + return w, vl + return w, vr + + +@_deprecate_positional_args(version="1.14.0") +def eigh(a, b=None, *, lower=True, eigvals_only=False, overwrite_a=False, + overwrite_b=False, turbo=_NoValue, eigvals=_NoValue, type=1, + check_finite=True, subset_by_index=None, subset_by_value=None, + driver=None): + """ + Solve a standard or generalized eigenvalue problem for a complex + Hermitian or real symmetric matrix. + + Find eigenvalues array ``w`` and optionally eigenvectors array ``v`` of + array ``a``, where ``b`` is positive definite such that for every + eigenvalue λ (i-th entry of w) and its eigenvector ``vi`` (i-th column of + ``v``) satisfies:: + + a @ vi = λ * b @ vi + vi.conj().T @ a @ vi = λ + vi.conj().T @ b @ vi = 1 + + In the standard problem, ``b`` is assumed to be the identity matrix. + + Parameters + ---------- + a : (M, M) array_like + A complex Hermitian or real symmetric matrix whose eigenvalues and + eigenvectors will be computed. + b : (M, M) array_like, optional + A complex Hermitian or real symmetric definite positive matrix in. + If omitted, identity matrix is assumed. + lower : bool, optional + Whether the pertinent array data is taken from the lower or upper + triangle of ``a`` and, if applicable, ``b``. (Default: lower) + eigvals_only : bool, optional + Whether to calculate only eigenvalues and no eigenvectors. + (Default: both are calculated) + subset_by_index : iterable, optional + If provided, this two-element iterable defines the start and the end + indices of the desired eigenvalues (ascending order and 0-indexed). + To return only the second smallest to fifth smallest eigenvalues, + ``[1, 4]`` is used. ``[n-3, n-1]`` returns the largest three. Only + available with "evr", "evx", and "gvx" drivers. The entries are + directly converted to integers via ``int()``. + subset_by_value : iterable, optional + If provided, this two-element iterable defines the half-open interval + ``(a, b]`` that, if any, only the eigenvalues between these values + are returned. Only available with "evr", "evx", and "gvx" drivers. Use + ``np.inf`` for the unconstrained ends. + driver : str, optional + Defines which LAPACK driver should be used. Valid options are "ev", + "evd", "evr", "evx" for standard problems and "gv", "gvd", "gvx" for + generalized (where b is not None) problems. See the Notes section. + The default for standard problems is "evr". For generalized problems, + "gvd" is used for full set, and "gvx" for subset requested cases. + type : int, optional + For the generalized problems, this keyword specifies the problem type + to be solved for ``w`` and ``v`` (only takes 1, 2, 3 as possible + inputs):: + + 1 => a @ v = w @ b @ v + 2 => a @ b @ v = w @ v + 3 => b @ a @ v = w @ v + + This keyword is ignored for standard problems. + overwrite_a : bool, optional + Whether to overwrite data in ``a`` (may improve performance). Default + is False. + overwrite_b : bool, optional + Whether to overwrite data in ``b`` (may improve performance). Default + is False. + check_finite : bool, optional + Whether to check that the input matrices contain only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + turbo : bool, optional, deprecated + .. deprecated:: 1.5.0 + `eigh` keyword argument `turbo` is deprecated in favour of + ``driver=gvd`` keyword instead and will be removed in SciPy + 1.14.0. + eigvals : tuple (lo, hi), optional, deprecated + .. deprecated:: 1.5.0 + `eigh` keyword argument `eigvals` is deprecated in favour of + `subset_by_index` keyword instead and will be removed in SciPy + 1.14.0. + + Returns + ------- + w : (N,) ndarray + The N (N<=M) selected eigenvalues, in ascending order, each + repeated according to its multiplicity. + v : (M, N) ndarray + The normalized eigenvector corresponding to the eigenvalue ``w[i]`` is + the column ``v[:,i]``. Only returned if ``eigvals_only=False``. + + Raises + ------ + LinAlgError + If eigenvalue computation does not converge, an error occurred, or + b matrix is not definite positive. Note that if input matrices are + not symmetric or Hermitian, no error will be reported but results will + be wrong. + + See Also + -------- + eigvalsh : eigenvalues of symmetric or Hermitian arrays + eig : eigenvalues and right eigenvectors for non-symmetric arrays + eigh_tridiagonal : eigenvalues and right eiegenvectors for + symmetric/Hermitian tridiagonal matrices + + Notes + ----- + This function does not check the input array for being Hermitian/symmetric + in order to allow for representing arrays with only their upper/lower + triangular parts. Also, note that even though not taken into account, + finiteness check applies to the whole array and unaffected by "lower" + keyword. + + This function uses LAPACK drivers for computations in all possible keyword + combinations, prefixed with ``sy`` if arrays are real and ``he`` if + complex, e.g., a float array with "evr" driver is solved via + "syevr", complex arrays with "gvx" driver problem is solved via "hegvx" + etc. + + As a brief summary, the slowest and the most robust driver is the + classical ``ev`` which uses symmetric QR. ``evr`` is seen as + the optimal choice for the most general cases. However, there are certain + occasions that ``evd`` computes faster at the expense of more + memory usage. ``evx``, while still being faster than ``ev``, + often performs worse than the rest except when very few eigenvalues are + requested for large arrays though there is still no performance guarantee. + + + For the generalized problem, normalization with respect to the given + type argument:: + + type 1 and 3 : v.conj().T @ a @ v = w + type 2 : inv(v).conj().T @ a @ inv(v) = w + + type 1 or 2 : v.conj().T @ b @ v = I + type 3 : v.conj().T @ inv(b) @ v = I + + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import eigh + >>> A = np.array([[6, 3, 1, 5], [3, 0, 5, 1], [1, 5, 6, 2], [5, 1, 2, 2]]) + >>> w, v = eigh(A) + >>> np.allclose(A @ v - v @ np.diag(w), np.zeros((4, 4))) + True + + Request only the eigenvalues + + >>> w = eigh(A, eigvals_only=True) + + Request eigenvalues that are less than 10. + + >>> A = np.array([[34, -4, -10, -7, 2], + ... [-4, 7, 2, 12, 0], + ... [-10, 2, 44, 2, -19], + ... [-7, 12, 2, 79, -34], + ... [2, 0, -19, -34, 29]]) + >>> eigh(A, eigvals_only=True, subset_by_value=[-np.inf, 10]) + array([6.69199443e-07, 9.11938152e+00]) + + Request the second smallest eigenvalue and its eigenvector + + >>> w, v = eigh(A, subset_by_index=[1, 1]) + >>> w + array([9.11938152]) + >>> v.shape # only a single column is returned + (5, 1) + + """ + if turbo is not _NoValue: + warnings.warn("Keyword argument 'turbo' is deprecated in favour of '" + "driver=gvd' keyword instead and will be removed in " + "SciPy 1.14.0.", + DeprecationWarning, stacklevel=2) + if eigvals is not _NoValue: + warnings.warn("Keyword argument 'eigvals' is deprecated in favour of " + "'subset_by_index' keyword instead and will be removed " + "in SciPy 1.14.0.", + DeprecationWarning, stacklevel=2) + + # set lower + uplo = 'L' if lower else 'U' + # Set job for Fortran routines + _job = 'N' if eigvals_only else 'V' + + drv_str = [None, "ev", "evd", "evr", "evx", "gv", "gvd", "gvx"] + if driver not in drv_str: + raise ValueError('"{}" is unknown. Possible values are "None", "{}".' + ''.format(driver, '", "'.join(drv_str[1:]))) + + a1 = _asarray_validated(a, check_finite=check_finite) + if len(a1.shape) != 2 or a1.shape[0] != a1.shape[1]: + raise ValueError('expected square "a" matrix') + overwrite_a = overwrite_a or (_datacopied(a1, a)) + cplx = True if iscomplexobj(a1) else False + n = a1.shape[0] + drv_args = {'overwrite_a': overwrite_a} + + if b is not None: + b1 = _asarray_validated(b, check_finite=check_finite) + overwrite_b = overwrite_b or _datacopied(b1, b) + if len(b1.shape) != 2 or b1.shape[0] != b1.shape[1]: + raise ValueError('expected square "b" matrix') + + if b1.shape != a1.shape: + raise ValueError(f"wrong b dimensions {b1.shape}, should be {a1.shape}") + + if type not in [1, 2, 3]: + raise ValueError('"type" keyword only accepts 1, 2, and 3.') + + cplx = True if iscomplexobj(b1) else (cplx or False) + drv_args.update({'overwrite_b': overwrite_b, 'itype': type}) + + # backwards-compatibility handling + subset_by_index = subset_by_index if (eigvals in (None, _NoValue)) else eigvals + + subset = (subset_by_index is not None) or (subset_by_value is not None) + + # Both subsets can't be given + if subset_by_index and subset_by_value: + raise ValueError('Either index or value subset can be requested.') + + # Take turbo into account if all conditions are met otherwise ignore + if turbo not in (None, _NoValue) and b is not None: + driver = 'gvx' if subset else 'gvd' + + # Check indices if given + if subset_by_index: + lo, hi = (int(x) for x in subset_by_index) + if not (0 <= lo <= hi < n): + raise ValueError('Requested eigenvalue indices are not valid. ' + f'Valid range is [0, {n-1}] and start <= end, but ' + f'start={lo}, end={hi} is given') + # fortran is 1-indexed + drv_args.update({'range': 'I', 'il': lo + 1, 'iu': hi + 1}) + + if subset_by_value: + lo, hi = subset_by_value + if not (-inf <= lo < hi <= inf): + raise ValueError('Requested eigenvalue bounds are not valid. ' + 'Valid range is (-inf, inf) and low < high, but ' + f'low={lo}, high={hi} is given') + + drv_args.update({'range': 'V', 'vl': lo, 'vu': hi}) + + # fix prefix for lapack routines + pfx = 'he' if cplx else 'sy' + + # decide on the driver if not given + # first early exit on incompatible choice + if driver: + if b is None and (driver in ["gv", "gvd", "gvx"]): + raise ValueError(f'{driver} requires input b array to be supplied ' + 'for generalized eigenvalue problems.') + if (b is not None) and (driver in ['ev', 'evd', 'evr', 'evx']): + raise ValueError(f'"{driver}" does not accept input b array ' + 'for standard eigenvalue problems.') + if subset and (driver in ["ev", "evd", "gv", "gvd"]): + raise ValueError(f'"{driver}" cannot compute subsets of eigenvalues') + + # Default driver is evr and gvd + else: + driver = "evr" if b is None else ("gvx" if subset else "gvd") + + lwork_spec = { + 'syevd': ['lwork', 'liwork'], + 'syevr': ['lwork', 'liwork'], + 'heevd': ['lwork', 'liwork', 'lrwork'], + 'heevr': ['lwork', 'lrwork', 'liwork'], + } + + if b is None: # Standard problem + drv, drvlw = get_lapack_funcs((pfx + driver, pfx+driver+'_lwork'), + [a1]) + clw_args = {'n': n, 'lower': lower} + if driver == 'evd': + clw_args.update({'compute_v': 0 if _job == "N" else 1}) + + lw = _compute_lwork(drvlw, **clw_args) + # Multiple lwork vars + if isinstance(lw, tuple): + lwork_args = dict(zip(lwork_spec[pfx+driver], lw)) + else: + lwork_args = {'lwork': lw} + + drv_args.update({'lower': lower, 'compute_v': 0 if _job == "N" else 1}) + w, v, *other_args, info = drv(a=a1, **drv_args, **lwork_args) + + else: # Generalized problem + # 'gvd' doesn't have lwork query + if driver == "gvd": + drv = get_lapack_funcs(pfx + "gvd", [a1, b1]) + lwork_args = {} + else: + drv, drvlw = get_lapack_funcs((pfx + driver, pfx+driver+'_lwork'), + [a1, b1]) + # generalized drivers use uplo instead of lower + lw = _compute_lwork(drvlw, n, uplo=uplo) + lwork_args = {'lwork': lw} + + drv_args.update({'uplo': uplo, 'jobz': _job}) + + w, v, *other_args, info = drv(a=a1, b=b1, **drv_args, **lwork_args) + + # m is always the first extra argument + w = w[:other_args[0]] if subset else w + v = v[:, :other_args[0]] if (subset and not eigvals_only) else v + + # Check if we had a successful exit + if info == 0: + if eigvals_only: + return w + else: + return w, v + else: + if info < -1: + raise LinAlgError('Illegal value in argument {} of internal {}' + ''.format(-info, drv.typecode + pfx + driver)) + elif info > n: + raise LinAlgError(f'The leading minor of order {info-n} of B is not ' + 'positive definite. The factorization of B ' + 'could not be completed and no eigenvalues ' + 'or eigenvectors were computed.') + else: + drv_err = {'ev': 'The algorithm failed to converge; {} ' + 'off-diagonal elements of an intermediate ' + 'tridiagonal form did not converge to zero.', + 'evx': '{} eigenvectors failed to converge.', + 'evd': 'The algorithm failed to compute an eigenvalue ' + 'while working on the submatrix lying in rows ' + 'and columns {0}/{1} through mod({0},{1}).', + 'evr': 'Internal Error.' + } + if driver in ['ev', 'gv']: + msg = drv_err['ev'].format(info) + elif driver in ['evx', 'gvx']: + msg = drv_err['evx'].format(info) + elif driver in ['evd', 'gvd']: + if eigvals_only: + msg = drv_err['ev'].format(info) + else: + msg = drv_err['evd'].format(info, n+1) + else: + msg = drv_err['evr'] + + raise LinAlgError(msg) + + +_conv_dict = {0: 0, 1: 1, 2: 2, + 'all': 0, 'value': 1, 'index': 2, + 'a': 0, 'v': 1, 'i': 2} + + +def _check_select(select, select_range, max_ev, max_len): + """Check that select is valid, convert to Fortran style.""" + if isinstance(select, str): + select = select.lower() + try: + select = _conv_dict[select] + except KeyError as e: + raise ValueError('invalid argument for select') from e + vl, vu = 0., 1. + il = iu = 1 + if select != 0: # (non-all) + sr = asarray(select_range) + if sr.ndim != 1 or sr.size != 2 or sr[1] < sr[0]: + raise ValueError('select_range must be a 2-element array-like ' + 'in nondecreasing order') + if select == 1: # (value) + vl, vu = sr + if max_ev == 0: + max_ev = max_len + else: # 2 (index) + if sr.dtype.char.lower() not in 'hilqp': + raise ValueError( + f'when using select="i", select_range must ' + f'contain integers, got dtype {sr.dtype} ({sr.dtype.char})' + ) + # translate Python (0 ... N-1) into Fortran (1 ... N) with + 1 + il, iu = sr + 1 + if min(il, iu) < 1 or max(il, iu) > max_len: + raise ValueError('select_range out of bounds') + max_ev = iu - il + 1 + return select, vl, vu, il, iu, max_ev + + +def eig_banded(a_band, lower=False, eigvals_only=False, overwrite_a_band=False, + select='a', select_range=None, max_ev=0, check_finite=True): + """ + Solve real symmetric or complex Hermitian band matrix eigenvalue problem. + + Find eigenvalues w and optionally right eigenvectors v of a:: + + a v[:,i] = w[i] v[:,i] + v.H v = identity + + The matrix a is stored in a_band either in lower diagonal or upper + diagonal ordered form: + + a_band[u + i - j, j] == a[i,j] (if upper form; i <= j) + a_band[ i - j, j] == a[i,j] (if lower form; i >= j) + + where u is the number of bands above the diagonal. + + Example of a_band (shape of a is (6,6), u=2):: + + upper form: + * * a02 a13 a24 a35 + * a01 a12 a23 a34 a45 + a00 a11 a22 a33 a44 a55 + + lower form: + a00 a11 a22 a33 a44 a55 + a10 a21 a32 a43 a54 * + a20 a31 a42 a53 * * + + Cells marked with * are not used. + + Parameters + ---------- + a_band : (u+1, M) array_like + The bands of the M by M matrix a. + lower : bool, optional + Is the matrix in the lower form. (Default is upper form) + eigvals_only : bool, optional + Compute only the eigenvalues and no eigenvectors. + (Default: calculate also eigenvectors) + overwrite_a_band : bool, optional + Discard data in a_band (may enhance performance) + select : {'a', 'v', 'i'}, optional + Which eigenvalues to calculate + + ====== ======================================== + select calculated + ====== ======================================== + 'a' All eigenvalues + 'v' Eigenvalues in the interval (min, max] + 'i' Eigenvalues with indices min <= i <= max + ====== ======================================== + select_range : (min, max), optional + Range of selected eigenvalues + max_ev : int, optional + For select=='v', maximum number of eigenvalues expected. + For other values of select, has no meaning. + + In doubt, leave this parameter untouched. + + check_finite : bool, optional + Whether to check that the input matrix contains only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + w : (M,) ndarray + The eigenvalues, in ascending order, each repeated according to its + multiplicity. + v : (M, M) float or complex ndarray + The normalized eigenvector corresponding to the eigenvalue w[i] is + the column v[:,i]. Only returned if ``eigvals_only=False``. + + Raises + ------ + LinAlgError + If eigenvalue computation does not converge. + + See Also + -------- + eigvals_banded : eigenvalues for symmetric/Hermitian band matrices + eig : eigenvalues and right eigenvectors of general arrays. + eigh : eigenvalues and right eigenvectors for symmetric/Hermitian arrays + eigh_tridiagonal : eigenvalues and right eigenvectors for + symmetric/Hermitian tridiagonal matrices + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import eig_banded + >>> A = np.array([[1, 5, 2, 0], [5, 2, 5, 2], [2, 5, 3, 5], [0, 2, 5, 4]]) + >>> Ab = np.array([[1, 2, 3, 4], [5, 5, 5, 0], [2, 2, 0, 0]]) + >>> w, v = eig_banded(Ab, lower=True) + >>> np.allclose(A @ v - v @ np.diag(w), np.zeros((4, 4))) + True + >>> w = eig_banded(Ab, lower=True, eigvals_only=True) + >>> w + array([-4.26200532, -2.22987175, 3.95222349, 12.53965359]) + + Request only the eigenvalues between ``[-3, 4]`` + + >>> w, v = eig_banded(Ab, lower=True, select='v', select_range=[-3, 4]) + >>> w + array([-2.22987175, 3.95222349]) + + """ + if eigvals_only or overwrite_a_band: + a1 = _asarray_validated(a_band, check_finite=check_finite) + overwrite_a_band = overwrite_a_band or (_datacopied(a1, a_band)) + else: + a1 = array(a_band) + if issubclass(a1.dtype.type, inexact) and not isfinite(a1).all(): + raise ValueError("array must not contain infs or NaNs") + overwrite_a_band = 1 + + if len(a1.shape) != 2: + raise ValueError('expected a 2-D array') + select, vl, vu, il, iu, max_ev = _check_select( + select, select_range, max_ev, a1.shape[1]) + del select_range + if select == 0: + if a1.dtype.char in 'GFD': + # FIXME: implement this somewhen, for now go with builtin values + # FIXME: calc optimal lwork by calling ?hbevd(lwork=-1) + # or by using calc_lwork.f ??? + # lwork = calc_lwork.hbevd(bevd.typecode, a1.shape[0], lower) + internal_name = 'hbevd' + else: # a1.dtype.char in 'fd': + # FIXME: implement this somewhen, for now go with builtin values + # see above + # lwork = calc_lwork.sbevd(bevd.typecode, a1.shape[0], lower) + internal_name = 'sbevd' + bevd, = get_lapack_funcs((internal_name,), (a1,)) + w, v, info = bevd(a1, compute_v=not eigvals_only, + lower=lower, overwrite_ab=overwrite_a_band) + else: # select in [1, 2] + if eigvals_only: + max_ev = 1 + # calculate optimal abstol for dsbevx (see manpage) + if a1.dtype.char in 'fF': # single precision + lamch, = get_lapack_funcs(('lamch',), (array(0, dtype='f'),)) + else: + lamch, = get_lapack_funcs(('lamch',), (array(0, dtype='d'),)) + abstol = 2 * lamch('s') + if a1.dtype.char in 'GFD': + internal_name = 'hbevx' + else: # a1.dtype.char in 'gfd' + internal_name = 'sbevx' + bevx, = get_lapack_funcs((internal_name,), (a1,)) + w, v, m, ifail, info = bevx( + a1, vl, vu, il, iu, compute_v=not eigvals_only, mmax=max_ev, + range=select, lower=lower, overwrite_ab=overwrite_a_band, + abstol=abstol) + # crop off w and v + w = w[:m] + if not eigvals_only: + v = v[:, :m] + _check_info(info, internal_name) + + if eigvals_only: + return w + return w, v + + +def eigvals(a, b=None, overwrite_a=False, check_finite=True, + homogeneous_eigvals=False): + """ + Compute eigenvalues from an ordinary or generalized eigenvalue problem. + + Find eigenvalues of a general matrix:: + + a vr[:,i] = w[i] b vr[:,i] + + Parameters + ---------- + a : (M, M) array_like + A complex or real matrix whose eigenvalues and eigenvectors + will be computed. + b : (M, M) array_like, optional + Right-hand side matrix in a generalized eigenvalue problem. + If omitted, identity matrix is assumed. + overwrite_a : bool, optional + Whether to overwrite data in a (may improve performance) + check_finite : bool, optional + Whether to check that the input matrices contain only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities + or NaNs. + homogeneous_eigvals : bool, optional + If True, return the eigenvalues in homogeneous coordinates. + In this case ``w`` is a (2, M) array so that:: + + w[1,i] a vr[:,i] = w[0,i] b vr[:,i] + + Default is False. + + Returns + ------- + w : (M,) or (2, M) double or complex ndarray + The eigenvalues, each repeated according to its multiplicity + but not in any specific order. The shape is (M,) unless + ``homogeneous_eigvals=True``. + + Raises + ------ + LinAlgError + If eigenvalue computation does not converge + + See Also + -------- + eig : eigenvalues and right eigenvectors of general arrays. + eigvalsh : eigenvalues of symmetric or Hermitian arrays + eigvals_banded : eigenvalues for symmetric/Hermitian band matrices + eigvalsh_tridiagonal : eigenvalues of symmetric/Hermitian tridiagonal + matrices + + Examples + -------- + >>> import numpy as np + >>> from scipy import linalg + >>> a = np.array([[0., -1.], [1., 0.]]) + >>> linalg.eigvals(a) + array([0.+1.j, 0.-1.j]) + + >>> b = np.array([[0., 1.], [1., 1.]]) + >>> linalg.eigvals(a, b) + array([ 1.+0.j, -1.+0.j]) + + >>> a = np.array([[3., 0., 0.], [0., 8., 0.], [0., 0., 7.]]) + >>> linalg.eigvals(a, homogeneous_eigvals=True) + array([[3.+0.j, 8.+0.j, 7.+0.j], + [1.+0.j, 1.+0.j, 1.+0.j]]) + + """ + return eig(a, b=b, left=0, right=0, overwrite_a=overwrite_a, + check_finite=check_finite, + homogeneous_eigvals=homogeneous_eigvals) + + +@_deprecate_positional_args(version="1.14.0") +def eigvalsh(a, b=None, *, lower=True, overwrite_a=False, + overwrite_b=False, turbo=_NoValue, eigvals=_NoValue, type=1, + check_finite=True, subset_by_index=None, subset_by_value=None, + driver=None): + """ + Solves a standard or generalized eigenvalue problem for a complex + Hermitian or real symmetric matrix. + + Find eigenvalues array ``w`` of array ``a``, where ``b`` is positive + definite such that for every eigenvalue λ (i-th entry of w) and its + eigenvector vi (i-th column of v) satisfies:: + + a @ vi = λ * b @ vi + vi.conj().T @ a @ vi = λ + vi.conj().T @ b @ vi = 1 + + In the standard problem, b is assumed to be the identity matrix. + + Parameters + ---------- + a : (M, M) array_like + A complex Hermitian or real symmetric matrix whose eigenvalues will + be computed. + b : (M, M) array_like, optional + A complex Hermitian or real symmetric definite positive matrix in. + If omitted, identity matrix is assumed. + lower : bool, optional + Whether the pertinent array data is taken from the lower or upper + triangle of ``a`` and, if applicable, ``b``. (Default: lower) + overwrite_a : bool, optional + Whether to overwrite data in ``a`` (may improve performance). Default + is False. + overwrite_b : bool, optional + Whether to overwrite data in ``b`` (may improve performance). Default + is False. + type : int, optional + For the generalized problems, this keyword specifies the problem type + to be solved for ``w`` and ``v`` (only takes 1, 2, 3 as possible + inputs):: + + 1 => a @ v = w @ b @ v + 2 => a @ b @ v = w @ v + 3 => b @ a @ v = w @ v + + This keyword is ignored for standard problems. + check_finite : bool, optional + Whether to check that the input matrices contain only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + subset_by_index : iterable, optional + If provided, this two-element iterable defines the start and the end + indices of the desired eigenvalues (ascending order and 0-indexed). + To return only the second smallest to fifth smallest eigenvalues, + ``[1, 4]`` is used. ``[n-3, n-1]`` returns the largest three. Only + available with "evr", "evx", and "gvx" drivers. The entries are + directly converted to integers via ``int()``. + subset_by_value : iterable, optional + If provided, this two-element iterable defines the half-open interval + ``(a, b]`` that, if any, only the eigenvalues between these values + are returned. Only available with "evr", "evx", and "gvx" drivers. Use + ``np.inf`` for the unconstrained ends. + driver : str, optional + Defines which LAPACK driver should be used. Valid options are "ev", + "evd", "evr", "evx" for standard problems and "gv", "gvd", "gvx" for + generalized (where b is not None) problems. See the Notes section of + `scipy.linalg.eigh`. + turbo : bool, optional, deprecated + .. deprecated:: 1.5.0 + 'eigvalsh' keyword argument `turbo` is deprecated in favor of + ``driver=gvd`` option and will be removed in SciPy 1.14.0. + + eigvals : tuple (lo, hi), optional + .. deprecated:: 1.5.0 + 'eigvalsh' keyword argument `eigvals` is deprecated in favor of + `subset_by_index` option and will be removed in SciPy 1.14.0. + + Returns + ------- + w : (N,) ndarray + The N (N<=M) selected eigenvalues, in ascending order, each + repeated according to its multiplicity. + + Raises + ------ + LinAlgError + If eigenvalue computation does not converge, an error occurred, or + b matrix is not definite positive. Note that if input matrices are + not symmetric or Hermitian, no error will be reported but results will + be wrong. + + See Also + -------- + eigh : eigenvalues and right eigenvectors for symmetric/Hermitian arrays + eigvals : eigenvalues of general arrays + eigvals_banded : eigenvalues for symmetric/Hermitian band matrices + eigvalsh_tridiagonal : eigenvalues of symmetric/Hermitian tridiagonal + matrices + + Notes + ----- + This function does not check the input array for being Hermitian/symmetric + in order to allow for representing arrays with only their upper/lower + triangular parts. + + This function serves as a one-liner shorthand for `scipy.linalg.eigh` with + the option ``eigvals_only=True`` to get the eigenvalues and not the + eigenvectors. Here it is kept as a legacy convenience. It might be + beneficial to use the main function to have full control and to be a bit + more pythonic. + + Examples + -------- + For more examples see `scipy.linalg.eigh`. + + >>> import numpy as np + >>> from scipy.linalg import eigvalsh + >>> A = np.array([[6, 3, 1, 5], [3, 0, 5, 1], [1, 5, 6, 2], [5, 1, 2, 2]]) + >>> w = eigvalsh(A) + >>> w + array([-3.74637491, -0.76263923, 6.08502336, 12.42399079]) + + """ + return eigh(a, b=b, lower=lower, eigvals_only=True, + overwrite_a=overwrite_a, overwrite_b=overwrite_b, + turbo=turbo, eigvals=eigvals, type=type, + check_finite=check_finite, subset_by_index=subset_by_index, + subset_by_value=subset_by_value, driver=driver) + + +def eigvals_banded(a_band, lower=False, overwrite_a_band=False, + select='a', select_range=None, check_finite=True): + """ + Solve real symmetric or complex Hermitian band matrix eigenvalue problem. + + Find eigenvalues w of a:: + + a v[:,i] = w[i] v[:,i] + v.H v = identity + + The matrix a is stored in a_band either in lower diagonal or upper + diagonal ordered form: + + a_band[u + i - j, j] == a[i,j] (if upper form; i <= j) + a_band[ i - j, j] == a[i,j] (if lower form; i >= j) + + where u is the number of bands above the diagonal. + + Example of a_band (shape of a is (6,6), u=2):: + + upper form: + * * a02 a13 a24 a35 + * a01 a12 a23 a34 a45 + a00 a11 a22 a33 a44 a55 + + lower form: + a00 a11 a22 a33 a44 a55 + a10 a21 a32 a43 a54 * + a20 a31 a42 a53 * * + + Cells marked with * are not used. + + Parameters + ---------- + a_band : (u+1, M) array_like + The bands of the M by M matrix a. + lower : bool, optional + Is the matrix in the lower form. (Default is upper form) + overwrite_a_band : bool, optional + Discard data in a_band (may enhance performance) + select : {'a', 'v', 'i'}, optional + Which eigenvalues to calculate + + ====== ======================================== + select calculated + ====== ======================================== + 'a' All eigenvalues + 'v' Eigenvalues in the interval (min, max] + 'i' Eigenvalues with indices min <= i <= max + ====== ======================================== + select_range : (min, max), optional + Range of selected eigenvalues + check_finite : bool, optional + Whether to check that the input matrix contains only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + w : (M,) ndarray + The eigenvalues, in ascending order, each repeated according to its + multiplicity. + + Raises + ------ + LinAlgError + If eigenvalue computation does not converge. + + See Also + -------- + eig_banded : eigenvalues and right eigenvectors for symmetric/Hermitian + band matrices + eigvalsh_tridiagonal : eigenvalues of symmetric/Hermitian tridiagonal + matrices + eigvals : eigenvalues of general arrays + eigh : eigenvalues and right eigenvectors for symmetric/Hermitian arrays + eig : eigenvalues and right eigenvectors for non-symmetric arrays + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import eigvals_banded + >>> A = np.array([[1, 5, 2, 0], [5, 2, 5, 2], [2, 5, 3, 5], [0, 2, 5, 4]]) + >>> Ab = np.array([[1, 2, 3, 4], [5, 5, 5, 0], [2, 2, 0, 0]]) + >>> w = eigvals_banded(Ab, lower=True) + >>> w + array([-4.26200532, -2.22987175, 3.95222349, 12.53965359]) + """ + return eig_banded(a_band, lower=lower, eigvals_only=1, + overwrite_a_band=overwrite_a_band, select=select, + select_range=select_range, check_finite=check_finite) + + +def eigvalsh_tridiagonal(d, e, select='a', select_range=None, + check_finite=True, tol=0., lapack_driver='auto'): + """ + Solve eigenvalue problem for a real symmetric tridiagonal matrix. + + Find eigenvalues `w` of ``a``:: + + a v[:,i] = w[i] v[:,i] + v.H v = identity + + For a real symmetric matrix ``a`` with diagonal elements `d` and + off-diagonal elements `e`. + + Parameters + ---------- + d : ndarray, shape (ndim,) + The diagonal elements of the array. + e : ndarray, shape (ndim-1,) + The off-diagonal elements of the array. + select : {'a', 'v', 'i'}, optional + Which eigenvalues to calculate + + ====== ======================================== + select calculated + ====== ======================================== + 'a' All eigenvalues + 'v' Eigenvalues in the interval (min, max] + 'i' Eigenvalues with indices min <= i <= max + ====== ======================================== + select_range : (min, max), optional + Range of selected eigenvalues + check_finite : bool, optional + Whether to check that the input matrix contains only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + tol : float + The absolute tolerance to which each eigenvalue is required + (only used when ``lapack_driver='stebz'``). + An eigenvalue (or cluster) is considered to have converged if it + lies in an interval of this width. If <= 0. (default), + the value ``eps*|a|`` is used where eps is the machine precision, + and ``|a|`` is the 1-norm of the matrix ``a``. + lapack_driver : str + LAPACK function to use, can be 'auto', 'stemr', 'stebz', 'sterf', + or 'stev'. When 'auto' (default), it will use 'stemr' if ``select='a'`` + and 'stebz' otherwise. 'sterf' and 'stev' can only be used when + ``select='a'``. + + Returns + ------- + w : (M,) ndarray + The eigenvalues, in ascending order, each repeated according to its + multiplicity. + + Raises + ------ + LinAlgError + If eigenvalue computation does not converge. + + See Also + -------- + eigh_tridiagonal : eigenvalues and right eiegenvectors for + symmetric/Hermitian tridiagonal matrices + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import eigvalsh_tridiagonal, eigvalsh + >>> d = 3*np.ones(4) + >>> e = -1*np.ones(3) + >>> w = eigvalsh_tridiagonal(d, e) + >>> A = np.diag(d) + np.diag(e, k=1) + np.diag(e, k=-1) + >>> w2 = eigvalsh(A) # Verify with other eigenvalue routines + >>> np.allclose(w - w2, np.zeros(4)) + True + """ + return eigh_tridiagonal( + d, e, eigvals_only=True, select=select, select_range=select_range, + check_finite=check_finite, tol=tol, lapack_driver=lapack_driver) + + +def eigh_tridiagonal(d, e, eigvals_only=False, select='a', select_range=None, + check_finite=True, tol=0., lapack_driver='auto'): + """ + Solve eigenvalue problem for a real symmetric tridiagonal matrix. + + Find eigenvalues `w` and optionally right eigenvectors `v` of ``a``:: + + a v[:,i] = w[i] v[:,i] + v.H v = identity + + For a real symmetric matrix ``a`` with diagonal elements `d` and + off-diagonal elements `e`. + + Parameters + ---------- + d : ndarray, shape (ndim,) + The diagonal elements of the array. + e : ndarray, shape (ndim-1,) + The off-diagonal elements of the array. + eigvals_only : bool, optional + Compute only the eigenvalues and no eigenvectors. + (Default: calculate also eigenvectors) + select : {'a', 'v', 'i'}, optional + Which eigenvalues to calculate + + ====== ======================================== + select calculated + ====== ======================================== + 'a' All eigenvalues + 'v' Eigenvalues in the interval (min, max] + 'i' Eigenvalues with indices min <= i <= max + ====== ======================================== + select_range : (min, max), optional + Range of selected eigenvalues + check_finite : bool, optional + Whether to check that the input matrix contains only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + tol : float + The absolute tolerance to which each eigenvalue is required + (only used when 'stebz' is the `lapack_driver`). + An eigenvalue (or cluster) is considered to have converged if it + lies in an interval of this width. If <= 0. (default), + the value ``eps*|a|`` is used where eps is the machine precision, + and ``|a|`` is the 1-norm of the matrix ``a``. + lapack_driver : str + LAPACK function to use, can be 'auto', 'stemr', 'stebz', 'sterf', + or 'stev'. When 'auto' (default), it will use 'stemr' if ``select='a'`` + and 'stebz' otherwise. When 'stebz' is used to find the eigenvalues and + ``eigvals_only=False``, then a second LAPACK call (to ``?STEIN``) is + used to find the corresponding eigenvectors. 'sterf' can only be + used when ``eigvals_only=True`` and ``select='a'``. 'stev' can only + be used when ``select='a'``. + + Returns + ------- + w : (M,) ndarray + The eigenvalues, in ascending order, each repeated according to its + multiplicity. + v : (M, M) ndarray + The normalized eigenvector corresponding to the eigenvalue ``w[i]`` is + the column ``v[:,i]``. Only returned if ``eigvals_only=False``. + + Raises + ------ + LinAlgError + If eigenvalue computation does not converge. + + See Also + -------- + eigvalsh_tridiagonal : eigenvalues of symmetric/Hermitian tridiagonal + matrices + eig : eigenvalues and right eigenvectors for non-symmetric arrays + eigh : eigenvalues and right eigenvectors for symmetric/Hermitian arrays + eig_banded : eigenvalues and right eigenvectors for symmetric/Hermitian + band matrices + + Notes + ----- + This function makes use of LAPACK ``S/DSTEMR`` routines. + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import eigh_tridiagonal + >>> d = 3*np.ones(4) + >>> e = -1*np.ones(3) + >>> w, v = eigh_tridiagonal(d, e) + >>> A = np.diag(d) + np.diag(e, k=1) + np.diag(e, k=-1) + >>> np.allclose(A @ v - v @ np.diag(w), np.zeros((4, 4))) + True + """ + d = _asarray_validated(d, check_finite=check_finite) + e = _asarray_validated(e, check_finite=check_finite) + for check in (d, e): + if check.ndim != 1: + raise ValueError('expected a 1-D array') + if check.dtype.char in 'GFD': # complex + raise TypeError('Only real arrays currently supported') + if d.size != e.size + 1: + raise ValueError(f'd ({d.size}) must have one more element than e ({e.size})') + select, vl, vu, il, iu, _ = _check_select( + select, select_range, 0, d.size) + if not isinstance(lapack_driver, str): + raise TypeError('lapack_driver must be str') + drivers = ('auto', 'stemr', 'sterf', 'stebz', 'stev') + if lapack_driver not in drivers: + raise ValueError(f'lapack_driver must be one of {drivers}, ' + f'got {lapack_driver}') + if lapack_driver == 'auto': + lapack_driver = 'stemr' if select == 0 else 'stebz' + + # Quick exit for 1x1 case + if len(d) == 1: + if select == 1 and (not (vl < d[0] <= vu)): # request by value + w = array([]) + v = empty([1, 0], dtype=d.dtype) + else: # all and request by index + w = array([d[0]], dtype=d.dtype) + v = array([[1.]], dtype=d.dtype) + + if eigvals_only: + return w + else: + return w, v + + func, = get_lapack_funcs((lapack_driver,), (d, e)) + compute_v = not eigvals_only + if lapack_driver == 'sterf': + if select != 0: + raise ValueError('sterf can only be used when select == "a"') + if not eigvals_only: + raise ValueError('sterf can only be used when eigvals_only is ' + 'True') + w, info = func(d, e) + m = len(w) + elif lapack_driver == 'stev': + if select != 0: + raise ValueError('stev can only be used when select == "a"') + w, v, info = func(d, e, compute_v=compute_v) + m = len(w) + elif lapack_driver == 'stebz': + tol = float(tol) + internal_name = 'stebz' + stebz, = get_lapack_funcs((internal_name,), (d, e)) + # If getting eigenvectors, needs to be block-ordered (B) instead of + # matrix-ordered (E), and we will reorder later + order = 'E' if eigvals_only else 'B' + m, w, iblock, isplit, info = stebz(d, e, select, vl, vu, il, iu, tol, + order) + else: # 'stemr' + # ?STEMR annoyingly requires size N instead of N-1 + e_ = empty(e.size+1, e.dtype) + e_[:-1] = e + stemr_lwork, = get_lapack_funcs(('stemr_lwork',), (d, e)) + lwork, liwork, info = stemr_lwork(d, e_, select, vl, vu, il, iu, + compute_v=compute_v) + _check_info(info, 'stemr_lwork') + m, w, v, info = func(d, e_, select, vl, vu, il, iu, + compute_v=compute_v, lwork=lwork, liwork=liwork) + _check_info(info, lapack_driver + ' (eigh_tridiagonal)') + w = w[:m] + if eigvals_only: + return w + else: + # Do we still need to compute the eigenvalues? + if lapack_driver == 'stebz': + func, = get_lapack_funcs(('stein',), (d, e)) + v, info = func(d, e, w, iblock, isplit) + _check_info(info, 'stein (eigh_tridiagonal)', + positive='%d eigenvectors failed to converge') + # Convert block-order to matrix-order + order = argsort(w) + w, v = w[order], v[:, order] + else: + v = v[:, :m] + return w, v + + +def _check_info(info, driver, positive='did not converge (LAPACK info=%d)'): + """Check info return value.""" + if info < 0: + raise ValueError('illegal value in argument %d of internal %s' + % (-info, driver)) + if info > 0 and positive: + raise LinAlgError(("%s " + positive) % (driver, info,)) + + +def hessenberg(a, calc_q=False, overwrite_a=False, check_finite=True): + """ + Compute Hessenberg form of a matrix. + + The Hessenberg decomposition is:: + + A = Q H Q^H + + where `Q` is unitary/orthogonal and `H` has only zero elements below + the first sub-diagonal. + + Parameters + ---------- + a : (M, M) array_like + Matrix to bring into Hessenberg form. + calc_q : bool, optional + Whether to compute the transformation matrix. Default is False. + overwrite_a : bool, optional + Whether to overwrite `a`; may improve performance. + Default is False. + check_finite : bool, optional + Whether to check that the input matrix contains only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + H : (M, M) ndarray + Hessenberg form of `a`. + Q : (M, M) ndarray + Unitary/orthogonal similarity transformation matrix ``A = Q H Q^H``. + Only returned if ``calc_q=True``. + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import hessenberg + >>> A = np.array([[2, 5, 8, 7], [5, 2, 2, 8], [7, 5, 6, 6], [5, 4, 4, 8]]) + >>> H, Q = hessenberg(A, calc_q=True) + >>> H + array([[ 2. , -11.65843866, 1.42005301, 0.25349066], + [ -9.94987437, 14.53535354, -5.31022304, 2.43081618], + [ 0. , -1.83299243, 0.38969961, -0.51527034], + [ 0. , 0. , -3.83189513, 1.07494686]]) + >>> np.allclose(Q @ H @ Q.conj().T - A, np.zeros((4, 4))) + True + """ + a1 = _asarray_validated(a, check_finite=check_finite) + if len(a1.shape) != 2 or (a1.shape[0] != a1.shape[1]): + raise ValueError('expected square matrix') + overwrite_a = overwrite_a or (_datacopied(a1, a)) + + # if 2x2 or smaller: already in Hessenberg + if a1.shape[0] <= 2: + if calc_q: + return a1, eye(a1.shape[0]) + return a1 + + gehrd, gebal, gehrd_lwork = get_lapack_funcs(('gehrd', 'gebal', + 'gehrd_lwork'), (a1,)) + ba, lo, hi, pivscale, info = gebal(a1, permute=0, overwrite_a=overwrite_a) + _check_info(info, 'gebal (hessenberg)', positive=False) + n = len(a1) + + lwork = _compute_lwork(gehrd_lwork, ba.shape[0], lo=lo, hi=hi) + + hq, tau, info = gehrd(ba, lo=lo, hi=hi, lwork=lwork, overwrite_a=1) + _check_info(info, 'gehrd (hessenberg)', positive=False) + h = numpy.triu(hq, -1) + if not calc_q: + return h + + # use orghr/unghr to compute q + orghr, orghr_lwork = get_lapack_funcs(('orghr', 'orghr_lwork'), (a1,)) + lwork = _compute_lwork(orghr_lwork, n, lo=lo, hi=hi) + + q, info = orghr(a=hq, tau=tau, lo=lo, hi=hi, lwork=lwork, overwrite_a=1) + _check_info(info, 'orghr (hessenberg)', positive=False) + return h, q + + +def cdf2rdf(w, v): + """ + Converts complex eigenvalues ``w`` and eigenvectors ``v`` to real + eigenvalues in a block diagonal form ``wr`` and the associated real + eigenvectors ``vr``, such that:: + + vr @ wr = X @ vr + + continues to hold, where ``X`` is the original array for which ``w`` and + ``v`` are the eigenvalues and eigenvectors. + + .. versionadded:: 1.1.0 + + Parameters + ---------- + w : (..., M) array_like + Complex or real eigenvalues, an array or stack of arrays + + Conjugate pairs must not be interleaved, else the wrong result + will be produced. So ``[1+1j, 1, 1-1j]`` will give a correct result, + but ``[1+1j, 2+1j, 1-1j, 2-1j]`` will not. + + v : (..., M, M) array_like + Complex or real eigenvectors, a square array or stack of square arrays. + + Returns + ------- + wr : (..., M, M) ndarray + Real diagonal block form of eigenvalues + vr : (..., M, M) ndarray + Real eigenvectors associated with ``wr`` + + See Also + -------- + eig : Eigenvalues and right eigenvectors for non-symmetric arrays + rsf2csf : Convert real Schur form to complex Schur form + + Notes + ----- + ``w``, ``v`` must be the eigenstructure for some *real* matrix ``X``. + For example, obtained by ``w, v = scipy.linalg.eig(X)`` or + ``w, v = numpy.linalg.eig(X)`` in which case ``X`` can also represent + stacked arrays. + + .. versionadded:: 1.1.0 + + Examples + -------- + >>> import numpy as np + >>> X = np.array([[1, 2, 3], [0, 4, 5], [0, -5, 4]]) + >>> X + array([[ 1, 2, 3], + [ 0, 4, 5], + [ 0, -5, 4]]) + + >>> from scipy import linalg + >>> w, v = linalg.eig(X) + >>> w + array([ 1.+0.j, 4.+5.j, 4.-5.j]) + >>> v + array([[ 1.00000+0.j , -0.01906-0.40016j, -0.01906+0.40016j], + [ 0.00000+0.j , 0.00000-0.64788j, 0.00000+0.64788j], + [ 0.00000+0.j , 0.64788+0.j , 0.64788-0.j ]]) + + >>> wr, vr = linalg.cdf2rdf(w, v) + >>> wr + array([[ 1., 0., 0.], + [ 0., 4., 5.], + [ 0., -5., 4.]]) + >>> vr + array([[ 1. , 0.40016, -0.01906], + [ 0. , 0.64788, 0. ], + [ 0. , 0. , 0.64788]]) + + >>> vr @ wr + array([[ 1. , 1.69593, 1.9246 ], + [ 0. , 2.59153, 3.23942], + [ 0. , -3.23942, 2.59153]]) + >>> X @ vr + array([[ 1. , 1.69593, 1.9246 ], + [ 0. , 2.59153, 3.23942], + [ 0. , -3.23942, 2.59153]]) + """ + w, v = _asarray_validated(w), _asarray_validated(v) + + # check dimensions + if w.ndim < 1: + raise ValueError('expected w to be at least 1D') + if v.ndim < 2: + raise ValueError('expected v to be at least 2D') + if v.ndim != w.ndim + 1: + raise ValueError('expected eigenvectors array to have exactly one ' + 'dimension more than eigenvalues array') + + # check shapes + n = w.shape[-1] + M = w.shape[:-1] + if v.shape[-2] != v.shape[-1]: + raise ValueError('expected v to be a square matrix or stacked square ' + 'matrices: v.shape[-2] = v.shape[-1]') + if v.shape[-1] != n: + raise ValueError('expected the same number of eigenvalues as ' + 'eigenvectors') + + # get indices for each first pair of complex eigenvalues + complex_mask = iscomplex(w) + n_complex = complex_mask.sum(axis=-1) + + # check if all complex eigenvalues have conjugate pairs + if not (n_complex % 2 == 0).all(): + raise ValueError('expected complex-conjugate pairs of eigenvalues') + + # find complex indices + idx = nonzero(complex_mask) + idx_stack = idx[:-1] + idx_elem = idx[-1] + + # filter them to conjugate indices, assuming pairs are not interleaved + j = idx_elem[0::2] + k = idx_elem[1::2] + stack_ind = () + for i in idx_stack: + # should never happen, assuming nonzero orders by the last axis + assert (i[0::2] == i[1::2]).all(), \ + "Conjugate pair spanned different arrays!" + stack_ind += (i[0::2],) + + # all eigenvalues to diagonal form + wr = zeros(M + (n, n), dtype=w.real.dtype) + di = range(n) + wr[..., di, di] = w.real + + # complex eigenvalues to real block diagonal form + wr[stack_ind + (j, k)] = w[stack_ind + (j,)].imag + wr[stack_ind + (k, j)] = w[stack_ind + (k,)].imag + + # compute real eigenvectors associated with real block diagonal eigenvalues + u = zeros(M + (n, n), dtype=numpy.cdouble) + u[..., di, di] = 1.0 + u[stack_ind + (j, j)] = 0.5j + u[stack_ind + (j, k)] = 0.5 + u[stack_ind + (k, j)] = -0.5j + u[stack_ind + (k, k)] = 0.5 + + # multiply matrices v and u (equivalent to v @ u) + vr = einsum('...ij,...jk->...ik', v, u).real + + return wr, vr diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_cholesky.py b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_cholesky.py new file mode 100644 index 0000000000000000000000000000000000000000..76de9de3fab7358d1e9d66efa22fafa043b961ca --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_cholesky.py @@ -0,0 +1,356 @@ +"""Cholesky decomposition functions.""" + +from numpy import asarray_chkfinite, asarray, atleast_2d + +# Local imports +from ._misc import LinAlgError, _datacopied +from .lapack import get_lapack_funcs + +__all__ = ['cholesky', 'cho_factor', 'cho_solve', 'cholesky_banded', + 'cho_solve_banded'] + + +def _cholesky(a, lower=False, overwrite_a=False, clean=True, + check_finite=True): + """Common code for cholesky() and cho_factor().""" + + a1 = asarray_chkfinite(a) if check_finite else asarray(a) + a1 = atleast_2d(a1) + + # Dimension check + if a1.ndim != 2: + raise ValueError(f'Input array needs to be 2D but received a {a1.ndim}d-array.') + # Squareness check + if a1.shape[0] != a1.shape[1]: + raise ValueError('Input array is expected to be square but has ' + f'the shape: {a1.shape}.') + + # Quick return for square empty array + if a1.size == 0: + return a1.copy(), lower + + overwrite_a = overwrite_a or _datacopied(a1, a) + potrf, = get_lapack_funcs(('potrf',), (a1,)) + c, info = potrf(a1, lower=lower, overwrite_a=overwrite_a, clean=clean) + if info > 0: + raise LinAlgError("%d-th leading minor of the array is not positive " + "definite" % info) + if info < 0: + raise ValueError(f'LAPACK reported an illegal value in {-info}-th argument' + 'on entry to "POTRF".') + return c, lower + + +def cholesky(a, lower=False, overwrite_a=False, check_finite=True): + """ + Compute the Cholesky decomposition of a matrix. + + Returns the Cholesky decomposition, :math:`A = L L^*` or + :math:`A = U^* U` of a Hermitian positive-definite matrix A. + + Parameters + ---------- + a : (M, M) array_like + Matrix to be decomposed + lower : bool, optional + Whether to compute the upper- or lower-triangular Cholesky + factorization. Default is upper-triangular. + overwrite_a : bool, optional + Whether to overwrite data in `a` (may improve performance). + check_finite : bool, optional + Whether to check that the input matrix contains only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + c : (M, M) ndarray + Upper- or lower-triangular Cholesky factor of `a`. + + Raises + ------ + LinAlgError : if decomposition fails. + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import cholesky + >>> a = np.array([[1,-2j],[2j,5]]) + >>> L = cholesky(a, lower=True) + >>> L + array([[ 1.+0.j, 0.+0.j], + [ 0.+2.j, 1.+0.j]]) + >>> L @ L.T.conj() + array([[ 1.+0.j, 0.-2.j], + [ 0.+2.j, 5.+0.j]]) + + """ + c, lower = _cholesky(a, lower=lower, overwrite_a=overwrite_a, clean=True, + check_finite=check_finite) + return c + + +def cho_factor(a, lower=False, overwrite_a=False, check_finite=True): + """ + Compute the Cholesky decomposition of a matrix, to use in cho_solve + + Returns a matrix containing the Cholesky decomposition, + ``A = L L*`` or ``A = U* U`` of a Hermitian positive-definite matrix `a`. + The return value can be directly used as the first parameter to cho_solve. + + .. warning:: + The returned matrix also contains random data in the entries not + used by the Cholesky decomposition. If you need to zero these + entries, use the function `cholesky` instead. + + Parameters + ---------- + a : (M, M) array_like + Matrix to be decomposed + lower : bool, optional + Whether to compute the upper or lower triangular Cholesky factorization + (Default: upper-triangular) + overwrite_a : bool, optional + Whether to overwrite data in a (may improve performance) + check_finite : bool, optional + Whether to check that the input matrix contains only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + c : (M, M) ndarray + Matrix whose upper or lower triangle contains the Cholesky factor + of `a`. Other parts of the matrix contain random data. + lower : bool + Flag indicating whether the factor is in the lower or upper triangle + + Raises + ------ + LinAlgError + Raised if decomposition fails. + + See Also + -------- + cho_solve : Solve a linear set equations using the Cholesky factorization + of a matrix. + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import cho_factor + >>> A = np.array([[9, 3, 1, 5], [3, 7, 5, 1], [1, 5, 9, 2], [5, 1, 2, 6]]) + >>> c, low = cho_factor(A) + >>> c + array([[3. , 1. , 0.33333333, 1.66666667], + [3. , 2.44948974, 1.90515869, -0.27216553], + [1. , 5. , 2.29330749, 0.8559528 ], + [5. , 1. , 2. , 1.55418563]]) + >>> np.allclose(np.triu(c).T @ np. triu(c) - A, np.zeros((4, 4))) + True + + """ + c, lower = _cholesky(a, lower=lower, overwrite_a=overwrite_a, clean=False, + check_finite=check_finite) + return c, lower + + +def cho_solve(c_and_lower, b, overwrite_b=False, check_finite=True): + """Solve the linear equations A x = b, given the Cholesky factorization of A. + + Parameters + ---------- + (c, lower) : tuple, (array, bool) + Cholesky factorization of a, as given by cho_factor + b : array + Right-hand side + overwrite_b : bool, optional + Whether to overwrite data in b (may improve performance) + check_finite : bool, optional + Whether to check that the input matrices contain only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + x : array + The solution to the system A x = b + + See Also + -------- + cho_factor : Cholesky factorization of a matrix + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import cho_factor, cho_solve + >>> A = np.array([[9, 3, 1, 5], [3, 7, 5, 1], [1, 5, 9, 2], [5, 1, 2, 6]]) + >>> c, low = cho_factor(A) + >>> x = cho_solve((c, low), [1, 1, 1, 1]) + >>> np.allclose(A @ x - [1, 1, 1, 1], np.zeros(4)) + True + + """ + (c, lower) = c_and_lower + if check_finite: + b1 = asarray_chkfinite(b) + c = asarray_chkfinite(c) + else: + b1 = asarray(b) + c = asarray(c) + if c.ndim != 2 or c.shape[0] != c.shape[1]: + raise ValueError("The factored matrix c is not square.") + if c.shape[1] != b1.shape[0]: + raise ValueError(f"incompatible dimensions ({c.shape} and {b1.shape})") + + overwrite_b = overwrite_b or _datacopied(b1, b) + + potrs, = get_lapack_funcs(('potrs',), (c, b1)) + x, info = potrs(c, b1, lower=lower, overwrite_b=overwrite_b) + if info != 0: + raise ValueError('illegal value in %dth argument of internal potrs' + % -info) + return x + + +def cholesky_banded(ab, overwrite_ab=False, lower=False, check_finite=True): + """ + Cholesky decompose a banded Hermitian positive-definite matrix + + The matrix a is stored in ab either in lower-diagonal or upper- + diagonal ordered form:: + + ab[u + i - j, j] == a[i,j] (if upper form; i <= j) + ab[ i - j, j] == a[i,j] (if lower form; i >= j) + + Example of ab (shape of a is (6,6), u=2):: + + upper form: + * * a02 a13 a24 a35 + * a01 a12 a23 a34 a45 + a00 a11 a22 a33 a44 a55 + + lower form: + a00 a11 a22 a33 a44 a55 + a10 a21 a32 a43 a54 * + a20 a31 a42 a53 * * + + Parameters + ---------- + ab : (u + 1, M) array_like + Banded matrix + overwrite_ab : bool, optional + Discard data in ab (may enhance performance) + lower : bool, optional + Is the matrix in the lower form. (Default is upper form) + check_finite : bool, optional + Whether to check that the input matrix contains only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + c : (u + 1, M) ndarray + Cholesky factorization of a, in the same banded format as ab + + See Also + -------- + cho_solve_banded : + Solve a linear set equations, given the Cholesky factorization + of a banded Hermitian. + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import cholesky_banded + >>> from numpy import allclose, zeros, diag + >>> Ab = np.array([[0, 0, 1j, 2, 3j], [0, -1, -2, 3, 4], [9, 8, 7, 6, 9]]) + >>> A = np.diag(Ab[0,2:], k=2) + np.diag(Ab[1,1:], k=1) + >>> A = A + A.conj().T + np.diag(Ab[2, :]) + >>> c = cholesky_banded(Ab) + >>> C = np.diag(c[0, 2:], k=2) + np.diag(c[1, 1:], k=1) + np.diag(c[2, :]) + >>> np.allclose(C.conj().T @ C - A, np.zeros((5, 5))) + True + + """ + if check_finite: + ab = asarray_chkfinite(ab) + else: + ab = asarray(ab) + + pbtrf, = get_lapack_funcs(('pbtrf',), (ab,)) + c, info = pbtrf(ab, lower=lower, overwrite_ab=overwrite_ab) + if info > 0: + raise LinAlgError("%d-th leading minor not positive definite" % info) + if info < 0: + raise ValueError('illegal value in %d-th argument of internal pbtrf' + % -info) + return c + + +def cho_solve_banded(cb_and_lower, b, overwrite_b=False, check_finite=True): + """ + Solve the linear equations ``A x = b``, given the Cholesky factorization of + the banded Hermitian ``A``. + + Parameters + ---------- + (cb, lower) : tuple, (ndarray, bool) + `cb` is the Cholesky factorization of A, as given by cholesky_banded. + `lower` must be the same value that was given to cholesky_banded. + b : array_like + Right-hand side + overwrite_b : bool, optional + If True, the function will overwrite the values in `b`. + check_finite : bool, optional + Whether to check that the input matrices contain only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + x : array + The solution to the system A x = b + + See Also + -------- + cholesky_banded : Cholesky factorization of a banded matrix + + Notes + ----- + + .. versionadded:: 0.8.0 + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import cholesky_banded, cho_solve_banded + >>> Ab = np.array([[0, 0, 1j, 2, 3j], [0, -1, -2, 3, 4], [9, 8, 7, 6, 9]]) + >>> A = np.diag(Ab[0,2:], k=2) + np.diag(Ab[1,1:], k=1) + >>> A = A + A.conj().T + np.diag(Ab[2, :]) + >>> c = cholesky_banded(Ab) + >>> x = cho_solve_banded((c, False), np.ones(5)) + >>> np.allclose(A @ x - np.ones(5), np.zeros(5)) + True + + """ + (cb, lower) = cb_and_lower + if check_finite: + cb = asarray_chkfinite(cb) + b = asarray_chkfinite(b) + else: + cb = asarray(cb) + b = asarray(b) + + # Validate shapes. + if cb.shape[-1] != b.shape[0]: + raise ValueError("shapes of cb and b are not compatible.") + + pbtrs, = get_lapack_funcs(('pbtrs',), (cb, b)) + x, info = pbtrs(cb, b, lower=lower, overwrite_b=overwrite_b) + if info > 0: + raise LinAlgError("%dth leading minor not positive definite" % info) + if info < 0: + raise ValueError('illegal value in %dth argument of internal pbtrs' + % -info) + return x diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_cossin.py b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_cossin.py new file mode 100644 index 0000000000000000000000000000000000000000..bb8603d03c7942fa472d7bf04073976f2b77c0cc --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_cossin.py @@ -0,0 +1,221 @@ +from collections.abc import Iterable +import numpy as np + +from scipy._lib._util import _asarray_validated +from scipy.linalg import block_diag, LinAlgError +from .lapack import _compute_lwork, get_lapack_funcs + +__all__ = ['cossin'] + + +def cossin(X, p=None, q=None, separate=False, + swap_sign=False, compute_u=True, compute_vh=True): + """ + Compute the cosine-sine (CS) decomposition of an orthogonal/unitary matrix. + + X is an ``(m, m)`` orthogonal/unitary matrix, partitioned as the following + where upper left block has the shape of ``(p, q)``:: + + ┌ ┐ + │ I 0 0 │ 0 0 0 │ + ┌ ┐ ┌ ┐│ 0 C 0 │ 0 -S 0 │┌ ┐* + │ X11 │ X12 │ │ U1 │ ││ 0 0 0 │ 0 0 -I ││ V1 │ │ + │ ────┼──── │ = │────┼────││─────────┼─────────││────┼────│ + │ X21 │ X22 │ │ │ U2 ││ 0 0 0 │ I 0 0 ││ │ V2 │ + └ ┘ └ ┘│ 0 S 0 │ 0 C 0 │└ ┘ + │ 0 0 I │ 0 0 0 │ + └ ┘ + + ``U1``, ``U2``, ``V1``, ``V2`` are square orthogonal/unitary matrices of + dimensions ``(p,p)``, ``(m-p,m-p)``, ``(q,q)``, and ``(m-q,m-q)`` + respectively, and ``C`` and ``S`` are ``(r, r)`` nonnegative diagonal + matrices satisfying ``C^2 + S^2 = I`` where ``r = min(p, m-p, q, m-q)``. + + Moreover, the rank of the identity matrices are ``min(p, q) - r``, + ``min(p, m - q) - r``, ``min(m - p, q) - r``, and ``min(m - p, m - q) - r`` + respectively. + + X can be supplied either by itself and block specifications p, q or its + subblocks in an iterable from which the shapes would be derived. See the + examples below. + + Parameters + ---------- + X : array_like, iterable + complex unitary or real orthogonal matrix to be decomposed, or iterable + of subblocks ``X11``, ``X12``, ``X21``, ``X22``, when ``p``, ``q`` are + omitted. + p : int, optional + Number of rows of the upper left block ``X11``, used only when X is + given as an array. + q : int, optional + Number of columns of the upper left block ``X11``, used only when X is + given as an array. + separate : bool, optional + if ``True``, the low level components are returned instead of the + matrix factors, i.e. ``(u1,u2)``, ``theta``, ``(v1h,v2h)`` instead of + ``u``, ``cs``, ``vh``. + swap_sign : bool, optional + if ``True``, the ``-S``, ``-I`` block will be the bottom left, + otherwise (by default) they will be in the upper right block. + compute_u : bool, optional + if ``False``, ``u`` won't be computed and an empty array is returned. + compute_vh : bool, optional + if ``False``, ``vh`` won't be computed and an empty array is returned. + + Returns + ------- + u : ndarray + When ``compute_u=True``, contains the block diagonal orthogonal/unitary + matrix consisting of the blocks ``U1`` (``p`` x ``p``) and ``U2`` + (``m-p`` x ``m-p``) orthogonal/unitary matrices. If ``separate=True``, + this contains the tuple of ``(U1, U2)``. + cs : ndarray + The cosine-sine factor with the structure described above. + If ``separate=True``, this contains the ``theta`` array containing the + angles in radians. + vh : ndarray + When ``compute_vh=True`, contains the block diagonal orthogonal/unitary + matrix consisting of the blocks ``V1H`` (``q`` x ``q``) and ``V2H`` + (``m-q`` x ``m-q``) orthogonal/unitary matrices. If ``separate=True``, + this contains the tuple of ``(V1H, V2H)``. + + References + ---------- + .. [1] Brian D. Sutton. Computing the complete CS decomposition. Numer. + Algorithms, 50(1):33-65, 2009. + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import cossin + >>> from scipy.stats import unitary_group + >>> x = unitary_group.rvs(4) + >>> u, cs, vdh = cossin(x, p=2, q=2) + >>> np.allclose(x, u @ cs @ vdh) + True + + Same can be entered via subblocks without the need of ``p`` and ``q``. Also + let's skip the computation of ``u`` + + >>> ue, cs, vdh = cossin((x[:2, :2], x[:2, 2:], x[2:, :2], x[2:, 2:]), + ... compute_u=False) + >>> print(ue) + [] + >>> np.allclose(x, u @ cs @ vdh) + True + + """ + + if p or q: + p = 1 if p is None else int(p) + q = 1 if q is None else int(q) + X = _asarray_validated(X, check_finite=True) + if not np.equal(*X.shape): + raise ValueError("Cosine Sine decomposition only supports square" + f" matrices, got {X.shape}") + m = X.shape[0] + if p >= m or p <= 0: + raise ValueError(f"invalid p={p}, 0= m or q <= 0: + raise ValueError(f"invalid q={q}, 0 0: + raise LinAlgError(f"{method_name} did not converge: {info}") + + if separate: + return (u1, u2), theta, (v1h, v2h) + + U = block_diag(u1, u2) + VDH = block_diag(v1h, v2h) + + # Construct the middle factor CS + c = np.diag(np.cos(theta)) + s = np.diag(np.sin(theta)) + r = min(p, q, m - p, m - q) + n11 = min(p, q) - r + n12 = min(p, m - q) - r + n21 = min(m - p, q) - r + n22 = min(m - p, m - q) - r + Id = np.eye(np.max([n11, n12, n21, n22, r]), dtype=theta.dtype) + CS = np.zeros((m, m), dtype=theta.dtype) + + CS[:n11, :n11] = Id[:n11, :n11] + + xs = n11 + r + xe = n11 + r + n12 + ys = n11 + n21 + n22 + 2 * r + ye = n11 + n21 + n22 + 2 * r + n12 + CS[xs: xe, ys:ye] = Id[:n12, :n12] if swap_sign else -Id[:n12, :n12] + + xs = p + n22 + r + xe = p + n22 + r + + n21 + ys = n11 + r + ye = n11 + r + n21 + CS[xs:xe, ys:ye] = -Id[:n21, :n21] if swap_sign else Id[:n21, :n21] + + CS[p:p + n22, q:q + n22] = Id[:n22, :n22] + CS[n11:n11 + r, n11:n11 + r] = c + CS[p + n22:p + n22 + r, r + n21 + n22:2 * r + n21 + n22] = c + + xs = n11 + xe = n11 + r + ys = n11 + n21 + n22 + r + ye = n11 + n21 + n22 + 2 * r + CS[xs:xe, ys:ye] = s if swap_sign else -s + + CS[p + n22:p + n22 + r, n11:n11 + r] = -s if swap_sign else s + + return U, CS, VDH diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_ldl.py b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_ldl.py new file mode 100644 index 0000000000000000000000000000000000000000..336df1d5fb416f635c91afe3cc2cfb3c340239fc --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_ldl.py @@ -0,0 +1,353 @@ +from warnings import warn + +import numpy as np +from numpy import (atleast_2d, arange, zeros_like, imag, diag, + iscomplexobj, tril, triu, argsort, empty_like) +from scipy._lib._util import ComplexWarning +from ._decomp import _asarray_validated +from .lapack import get_lapack_funcs, _compute_lwork + +__all__ = ['ldl'] + + +def ldl(A, lower=True, hermitian=True, overwrite_a=False, check_finite=True): + """ Computes the LDLt or Bunch-Kaufman factorization of a symmetric/ + hermitian matrix. + + This function returns a block diagonal matrix D consisting blocks of size + at most 2x2 and also a possibly permuted unit lower triangular matrix + ``L`` such that the factorization ``A = L D L^H`` or ``A = L D L^T`` + holds. If `lower` is False then (again possibly permuted) upper + triangular matrices are returned as outer factors. + + The permutation array can be used to triangularize the outer factors + simply by a row shuffle, i.e., ``lu[perm, :]`` is an upper/lower + triangular matrix. This is also equivalent to multiplication with a + permutation matrix ``P.dot(lu)``, where ``P`` is a column-permuted + identity matrix ``I[:, perm]``. + + Depending on the value of the boolean `lower`, only upper or lower + triangular part of the input array is referenced. Hence, a triangular + matrix on entry would give the same result as if the full matrix is + supplied. + + Parameters + ---------- + A : array_like + Square input array + lower : bool, optional + This switches between the lower and upper triangular outer factors of + the factorization. Lower triangular (``lower=True``) is the default. + hermitian : bool, optional + For complex-valued arrays, this defines whether ``A = A.conj().T`` or + ``A = A.T`` is assumed. For real-valued arrays, this switch has no + effect. + overwrite_a : bool, optional + Allow overwriting data in `A` (may enhance performance). The default + is False. + check_finite : bool, optional + Whether to check that the input matrices contain only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + lu : ndarray + The (possibly) permuted upper/lower triangular outer factor of the + factorization. + d : ndarray + The block diagonal multiplier of the factorization. + perm : ndarray + The row-permutation index array that brings lu into triangular form. + + Raises + ------ + ValueError + If input array is not square. + ComplexWarning + If a complex-valued array with nonzero imaginary parts on the + diagonal is given and hermitian is set to True. + + See Also + -------- + cholesky, lu + + Notes + ----- + This function uses ``?SYTRF`` routines for symmetric matrices and + ``?HETRF`` routines for Hermitian matrices from LAPACK. See [1]_ for + the algorithm details. + + Depending on the `lower` keyword value, only lower or upper triangular + part of the input array is referenced. Moreover, this keyword also defines + the structure of the outer factors of the factorization. + + .. versionadded:: 1.1.0 + + References + ---------- + .. [1] J.R. Bunch, L. Kaufman, Some stable methods for calculating + inertia and solving symmetric linear systems, Math. Comput. Vol.31, + 1977. :doi:`10.2307/2005787` + + Examples + -------- + Given an upper triangular array ``a`` that represents the full symmetric + array with its entries, obtain ``l``, 'd' and the permutation vector `perm`: + + >>> import numpy as np + >>> from scipy.linalg import ldl + >>> a = np.array([[2, -1, 3], [0, 2, 0], [0, 0, 1]]) + >>> lu, d, perm = ldl(a, lower=0) # Use the upper part + >>> lu + array([[ 0. , 0. , 1. ], + [ 0. , 1. , -0.5], + [ 1. , 1. , 1.5]]) + >>> d + array([[-5. , 0. , 0. ], + [ 0. , 1.5, 0. ], + [ 0. , 0. , 2. ]]) + >>> perm + array([2, 1, 0]) + >>> lu[perm, :] + array([[ 1. , 1. , 1.5], + [ 0. , 1. , -0.5], + [ 0. , 0. , 1. ]]) + >>> lu.dot(d).dot(lu.T) + array([[ 2., -1., 3.], + [-1., 2., 0.], + [ 3., 0., 1.]]) + + """ + a = atleast_2d(_asarray_validated(A, check_finite=check_finite)) + if a.shape[0] != a.shape[1]: + raise ValueError('The input array "a" should be square.') + # Return empty arrays for empty square input + if a.size == 0: + return empty_like(a), empty_like(a), np.array([], dtype=int) + + n = a.shape[0] + r_or_c = complex if iscomplexobj(a) else float + + # Get the LAPACK routine + if r_or_c is complex and hermitian: + s, sl = 'hetrf', 'hetrf_lwork' + if np.any(imag(diag(a))): + warn('scipy.linalg.ldl():\nThe imaginary parts of the diagonal' + 'are ignored. Use "hermitian=False" for factorization of' + 'complex symmetric arrays.', ComplexWarning, stacklevel=2) + else: + s, sl = 'sytrf', 'sytrf_lwork' + + solver, solver_lwork = get_lapack_funcs((s, sl), (a,)) + lwork = _compute_lwork(solver_lwork, n, lower=lower) + ldu, piv, info = solver(a, lwork=lwork, lower=lower, + overwrite_a=overwrite_a) + if info < 0: + raise ValueError(f'{s.upper()} exited with the internal error "illegal value ' + f'in argument number {-info}". See LAPACK documentation ' + 'for the error codes.') + + swap_arr, pivot_arr = _ldl_sanitize_ipiv(piv, lower=lower) + d, lu = _ldl_get_d_and_l(ldu, pivot_arr, lower=lower, hermitian=hermitian) + lu, perm = _ldl_construct_tri_factor(lu, swap_arr, pivot_arr, lower=lower) + + return lu, d, perm + + +def _ldl_sanitize_ipiv(a, lower=True): + """ + This helper function takes the rather strangely encoded permutation array + returned by the LAPACK routines ?(HE/SY)TRF and converts it into + regularized permutation and diagonal pivot size format. + + Since FORTRAN uses 1-indexing and LAPACK uses different start points for + upper and lower formats there are certain offsets in the indices used + below. + + Let's assume a result where the matrix is 6x6 and there are two 2x2 + and two 1x1 blocks reported by the routine. To ease the coding efforts, + we still populate a 6-sized array and fill zeros as the following :: + + pivots = [2, 0, 2, 0, 1, 1] + + This denotes a diagonal matrix of the form :: + + [x x ] + [x x ] + [ x x ] + [ x x ] + [ x ] + [ x] + + In other words, we write 2 when the 2x2 block is first encountered and + automatically write 0 to the next entry and skip the next spin of the + loop. Thus, a separate counter or array appends to keep track of block + sizes are avoided. If needed, zeros can be filtered out later without + losing the block structure. + + Parameters + ---------- + a : ndarray + The permutation array ipiv returned by LAPACK + lower : bool, optional + The switch to select whether upper or lower triangle is chosen in + the LAPACK call. + + Returns + ------- + swap_ : ndarray + The array that defines the row/column swap operations. For example, + if row two is swapped with row four, the result is [0, 3, 2, 3]. + pivots : ndarray + The array that defines the block diagonal structure as given above. + + """ + n = a.size + swap_ = arange(n) + pivots = zeros_like(swap_, dtype=int) + skip_2x2 = False + + # Some upper/lower dependent offset values + # range (s)tart, r(e)nd, r(i)ncrement + x, y, rs, re, ri = (1, 0, 0, n, 1) if lower else (-1, -1, n-1, -1, -1) + + for ind in range(rs, re, ri): + # If previous spin belonged already to a 2x2 block + if skip_2x2: + skip_2x2 = False + continue + + cur_val = a[ind] + # do we have a 1x1 block or not? + if cur_val > 0: + if cur_val != ind+1: + # Index value != array value --> permutation required + swap_[ind] = swap_[cur_val-1] + pivots[ind] = 1 + # Not. + elif cur_val < 0 and cur_val == a[ind+x]: + # first neg entry of 2x2 block identifier + if -cur_val != ind+2: + # Index value != array value --> permutation required + swap_[ind+x] = swap_[-cur_val-1] + pivots[ind+y] = 2 + skip_2x2 = True + else: # Doesn't make sense, give up + raise ValueError('While parsing the permutation array ' + 'in "scipy.linalg.ldl", invalid entries ' + 'found. The array syntax is invalid.') + return swap_, pivots + + +def _ldl_get_d_and_l(ldu, pivs, lower=True, hermitian=True): + """ + Helper function to extract the diagonal and triangular matrices for + LDL.T factorization. + + Parameters + ---------- + ldu : ndarray + The compact output returned by the LAPACK routing + pivs : ndarray + The sanitized array of {0, 1, 2} denoting the sizes of the pivots. For + every 2 there is a succeeding 0. + lower : bool, optional + If set to False, upper triangular part is considered. + hermitian : bool, optional + If set to False a symmetric complex array is assumed. + + Returns + ------- + d : ndarray + The block diagonal matrix. + lu : ndarray + The upper/lower triangular matrix + """ + is_c = iscomplexobj(ldu) + d = diag(diag(ldu)) + n = d.shape[0] + blk_i = 0 # block index + + # row/column offsets for selecting sub-, super-diagonal + x, y = (1, 0) if lower else (0, 1) + + lu = tril(ldu, -1) if lower else triu(ldu, 1) + diag_inds = arange(n) + lu[diag_inds, diag_inds] = 1 + + for blk in pivs[pivs != 0]: + # increment the block index and check for 2s + # if 2 then copy the off diagonals depending on uplo + inc = blk_i + blk + + if blk == 2: + d[blk_i+x, blk_i+y] = ldu[blk_i+x, blk_i+y] + # If Hermitian matrix is factorized, the cross-offdiagonal element + # should be conjugated. + if is_c and hermitian: + d[blk_i+y, blk_i+x] = ldu[blk_i+x, blk_i+y].conj() + else: + d[blk_i+y, blk_i+x] = ldu[blk_i+x, blk_i+y] + + lu[blk_i+x, blk_i+y] = 0. + blk_i = inc + + return d, lu + + +def _ldl_construct_tri_factor(lu, swap_vec, pivs, lower=True): + """ + Helper function to construct explicit outer factors of LDL factorization. + + If lower is True the permuted factors are multiplied as L(1)*L(2)*...*L(k). + Otherwise, the permuted factors are multiplied as L(k)*...*L(2)*L(1). See + LAPACK documentation for more details. + + Parameters + ---------- + lu : ndarray + The triangular array that is extracted from LAPACK routine call with + ones on the diagonals. + swap_vec : ndarray + The array that defines the row swapping indices. If the kth entry is m + then rows k,m are swapped. Notice that the mth entry is not necessarily + k to avoid undoing the swapping. + pivs : ndarray + The array that defines the block diagonal structure returned by + _ldl_sanitize_ipiv(). + lower : bool, optional + The boolean to switch between lower and upper triangular structure. + + Returns + ------- + lu : ndarray + The square outer factor which satisfies the L * D * L.T = A + perm : ndarray + The permutation vector that brings the lu to the triangular form + + Notes + ----- + Note that the original argument "lu" is overwritten. + + """ + n = lu.shape[0] + perm = arange(n) + # Setup the reading order of the permutation matrix for upper/lower + rs, re, ri = (n-1, -1, -1) if lower else (0, n, 1) + + for ind in range(rs, re, ri): + s_ind = swap_vec[ind] + if s_ind != ind: + # Column start and end positions + col_s = ind if lower else 0 + col_e = n if lower else ind+1 + + # If we stumble upon a 2x2 block include both cols in the perm. + if pivs[ind] == (0 if lower else 2): + col_s += -1 if lower else 0 + col_e += 0 if lower else 1 + lu[[s_ind, ind], col_s:col_e] = lu[[ind, s_ind], col_s:col_e] + perm[[s_ind, ind]] = perm[[ind, s_ind]] + + return lu, argsort(perm) diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_lu.py b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_lu.py new file mode 100644 index 0000000000000000000000000000000000000000..2bb088b453178335648a7dd0d345b52dbf6ef802 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_lu.py @@ -0,0 +1,374 @@ +"""LU decomposition functions.""" + +from warnings import warn + +from numpy import asarray, asarray_chkfinite +import numpy as np +from itertools import product + +# Local imports +from ._misc import _datacopied, LinAlgWarning +from .lapack import get_lapack_funcs +from ._decomp_lu_cython import lu_dispatcher + +lapack_cast_dict = {x: ''.join([y for y in 'fdFD' if np.can_cast(x, y)]) + for x in np.typecodes['All']} + +__all__ = ['lu', 'lu_solve', 'lu_factor'] + + +def lu_factor(a, overwrite_a=False, check_finite=True): + """ + Compute pivoted LU decomposition of a matrix. + + The decomposition is:: + + A = P L U + + where P is a permutation matrix, L lower triangular with unit + diagonal elements, and U upper triangular. + + Parameters + ---------- + a : (M, N) array_like + Matrix to decompose + overwrite_a : bool, optional + Whether to overwrite data in A (may increase performance) + check_finite : bool, optional + Whether to check that the input matrix contains only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + lu : (M, N) ndarray + Matrix containing U in its upper triangle, and L in its lower triangle. + The unit diagonal elements of L are not stored. + piv : (K,) ndarray + Pivot indices representing the permutation matrix P: + row i of matrix was interchanged with row piv[i]. + Of shape ``(K,)``, with ``K = min(M, N)``. + + See Also + -------- + lu : gives lu factorization in more user-friendly format + lu_solve : solve an equation system using the LU factorization of a matrix + + Notes + ----- + This is a wrapper to the ``*GETRF`` routines from LAPACK. Unlike + :func:`lu`, it outputs the L and U factors into a single array + and returns pivot indices instead of a permutation matrix. + + While the underlying ``*GETRF`` routines return 1-based pivot indices, the + ``piv`` array returned by ``lu_factor`` contains 0-based indices. + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import lu_factor + >>> A = np.array([[2, 5, 8, 7], [5, 2, 2, 8], [7, 5, 6, 6], [5, 4, 4, 8]]) + >>> lu, piv = lu_factor(A) + >>> piv + array([2, 2, 3, 3], dtype=int32) + + Convert LAPACK's ``piv`` array to NumPy index and test the permutation + + >>> def pivot_to_permutation(piv): + ... perm = np.arange(len(piv)) + ... for i in range(len(piv)): + ... perm[i], perm[piv[i]] = perm[piv[i]], perm[i] + ... return perm + ... + >>> p_inv = pivot_to_permutation(piv) + >>> p_inv + array([2, 0, 3, 1]) + >>> L, U = np.tril(lu, k=-1) + np.eye(4), np.triu(lu) + >>> np.allclose(A[p_inv] - L @ U, np.zeros((4, 4))) + True + + The P matrix in P L U is defined by the inverse permutation and + can be recovered using argsort: + + >>> p = np.argsort(p_inv) + >>> p + array([1, 3, 0, 2]) + >>> np.allclose(A - L[p] @ U, np.zeros((4, 4))) + True + + or alternatively: + + >>> P = np.eye(4)[p] + >>> np.allclose(A - P @ L @ U, np.zeros((4, 4))) + True + """ + if check_finite: + a1 = asarray_chkfinite(a) + else: + a1 = asarray(a) + overwrite_a = overwrite_a or (_datacopied(a1, a)) + getrf, = get_lapack_funcs(('getrf',), (a1,)) + lu, piv, info = getrf(a1, overwrite_a=overwrite_a) + if info < 0: + raise ValueError('illegal value in %dth argument of ' + 'internal getrf (lu_factor)' % -info) + if info > 0: + warn("Diagonal number %d is exactly zero. Singular matrix." % info, + LinAlgWarning, stacklevel=2) + return lu, piv + + +def lu_solve(lu_and_piv, b, trans=0, overwrite_b=False, check_finite=True): + """Solve an equation system, a x = b, given the LU factorization of a + + Parameters + ---------- + (lu, piv) + Factorization of the coefficient matrix a, as given by lu_factor. + In particular piv are 0-indexed pivot indices. + b : array + Right-hand side + trans : {0, 1, 2}, optional + Type of system to solve: + + ===== ========= + trans system + ===== ========= + 0 a x = b + 1 a^T x = b + 2 a^H x = b + ===== ========= + overwrite_b : bool, optional + Whether to overwrite data in b (may increase performance) + check_finite : bool, optional + Whether to check that the input matrices contain only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + x : array + Solution to the system + + See Also + -------- + lu_factor : LU factorize a matrix + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import lu_factor, lu_solve + >>> A = np.array([[2, 5, 8, 7], [5, 2, 2, 8], [7, 5, 6, 6], [5, 4, 4, 8]]) + >>> b = np.array([1, 1, 1, 1]) + >>> lu, piv = lu_factor(A) + >>> x = lu_solve((lu, piv), b) + >>> np.allclose(A @ x - b, np.zeros((4,))) + True + + """ + (lu, piv) = lu_and_piv + if check_finite: + b1 = asarray_chkfinite(b) + else: + b1 = asarray(b) + overwrite_b = overwrite_b or _datacopied(b1, b) + if lu.shape[0] != b1.shape[0]: + raise ValueError(f"Shapes of lu {lu.shape} and b {b1.shape} are incompatible") + + getrs, = get_lapack_funcs(('getrs',), (lu, b1)) + x, info = getrs(lu, piv, b1, trans=trans, overwrite_b=overwrite_b) + if info == 0: + return x + raise ValueError('illegal value in %dth argument of internal gesv|posv' + % -info) + + +def lu(a, permute_l=False, overwrite_a=False, check_finite=True, + p_indices=False): + """ + Compute LU decomposition of a matrix with partial pivoting. + + The decomposition satisfies:: + + A = P @ L @ U + + where ``P`` is a permutation matrix, ``L`` lower triangular with unit + diagonal elements, and ``U`` upper triangular. If `permute_l` is set to + ``True`` then ``L`` is returned already permuted and hence satisfying + ``A = L @ U``. + + Parameters + ---------- + a : (M, N) array_like + Array to decompose + permute_l : bool, optional + Perform the multiplication P*L (Default: do not permute) + overwrite_a : bool, optional + Whether to overwrite data in a (may improve performance) + check_finite : bool, optional + Whether to check that the input matrix contains only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + p_indices : bool, optional + If ``True`` the permutation information is returned as row indices. + The default is ``False`` for backwards-compatibility reasons. + + Returns + ------- + **(If `permute_l` is ``False``)** + + p : (..., M, M) ndarray + Permutation arrays or vectors depending on `p_indices` + l : (..., M, K) ndarray + Lower triangular or trapezoidal array with unit diagonal. + ``K = min(M, N)`` + u : (..., K, N) ndarray + Upper triangular or trapezoidal array + + **(If `permute_l` is ``True``)** + + pl : (..., M, K) ndarray + Permuted L matrix. + ``K = min(M, N)`` + u : (..., K, N) ndarray + Upper triangular or trapezoidal array + + Notes + ----- + Permutation matrices are costly since they are nothing but row reorder of + ``L`` and hence indices are strongly recommended to be used instead if the + permutation is required. The relation in the 2D case then becomes simply + ``A = L[P, :] @ U``. In higher dimensions, it is better to use `permute_l` + to avoid complicated indexing tricks. + + In 2D case, if one has the indices however, for some reason, the + permutation matrix is still needed then it can be constructed by + ``np.eye(M)[P, :]``. + + Examples + -------- + + >>> import numpy as np + >>> from scipy.linalg import lu + >>> A = np.array([[2, 5, 8, 7], [5, 2, 2, 8], [7, 5, 6, 6], [5, 4, 4, 8]]) + >>> p, l, u = lu(A) + >>> np.allclose(A, p @ l @ u) + True + >>> p # Permutation matrix + array([[0., 1., 0., 0.], # Row index 1 + [0., 0., 0., 1.], # Row index 3 + [1., 0., 0., 0.], # Row index 0 + [0., 0., 1., 0.]]) # Row index 2 + >>> p, _, _ = lu(A, p_indices=True) + >>> p + array([1, 3, 0, 2]) # as given by row indices above + >>> np.allclose(A, l[p, :] @ u) + True + + We can also use nd-arrays, for example, a demonstration with 4D array: + + >>> rng = np.random.default_rng() + >>> A = rng.uniform(low=-4, high=4, size=[3, 2, 4, 8]) + >>> p, l, u = lu(A) + >>> p.shape, l.shape, u.shape + ((3, 2, 4, 4), (3, 2, 4, 4), (3, 2, 4, 8)) + >>> np.allclose(A, p @ l @ u) + True + >>> PL, U = lu(A, permute_l=True) + >>> np.allclose(A, PL @ U) + True + + """ + a1 = np.asarray_chkfinite(a) if check_finite else np.asarray(a) + if a1.ndim < 2: + raise ValueError('The input array must be at least two-dimensional.') + + # Also check if dtype is LAPACK compatible + if a1.dtype.char not in 'fdFD': + dtype_char = lapack_cast_dict[a1.dtype.char] + if not dtype_char: # No casting possible + raise TypeError(f'The dtype {a1.dtype} cannot be cast ' + 'to float(32, 64) or complex(64, 128).') + + a1 = a1.astype(dtype_char[0]) # makes a copy, free to scratch + overwrite_a = True + + *nd, m, n = a1.shape + k = min(m, n) + real_dchar = 'f' if a1.dtype.char in 'fF' else 'd' + + # Empty input + if min(*a1.shape) == 0: + if permute_l: + PL = np.empty(shape=[*nd, m, k], dtype=a1.dtype) + U = np.empty(shape=[*nd, k, n], dtype=a1.dtype) + return PL, U + else: + P = (np.empty([*nd, 0], dtype=np.int32) if p_indices else + np.empty([*nd, 0, 0], dtype=real_dchar)) + L = np.empty(shape=[*nd, m, k], dtype=a1.dtype) + U = np.empty(shape=[*nd, k, n], dtype=a1.dtype) + return P, L, U + + # Scalar case + if a1.shape[-2:] == (1, 1): + if permute_l: + return np.ones_like(a1), (a1 if overwrite_a else a1.copy()) + else: + P = (np.zeros(shape=[*nd, m], dtype=int) if p_indices + else np.ones_like(a1)) + return P, np.ones_like(a1), (a1 if overwrite_a else a1.copy()) + + # Then check overwrite permission + if not _datacopied(a1, a): # "a" still alive through "a1" + if not overwrite_a: + # Data belongs to "a" so make a copy + a1 = a1.copy(order='C') + # else: Do nothing we'll use "a" if possible + # else: a1 has its own data thus free to scratch + + # Then layout checks, might happen that overwrite is allowed but original + # array was read-only or non-contiguous. + + if not (a1.flags['C_CONTIGUOUS'] and a1.flags['WRITEABLE']): + a1 = a1.copy(order='C') + + if not nd: # 2D array + + p = np.empty(m, dtype=np.int32) + u = np.zeros([k, k], dtype=a1.dtype) + lu_dispatcher(a1, u, p, permute_l) + P, L, U = (p, a1, u) if m > n else (p, u, a1) + + else: # Stacked array + + # Prepare the contiguous data holders + P = np.empty([*nd, m], dtype=np.int32) # perm vecs + + if m > n: # Tall arrays, U will be created + U = np.zeros([*nd, k, k], dtype=a1.dtype) + for ind in product(*[range(x) for x in a1.shape[:-2]]): + lu_dispatcher(a1[ind], U[ind], P[ind], permute_l) + L = a1 + + else: # Fat arrays, L will be created + L = np.zeros([*nd, k, k], dtype=a1.dtype) + for ind in product(*[range(x) for x in a1.shape[:-2]]): + lu_dispatcher(a1[ind], L[ind], P[ind], permute_l) + U = a1 + + # Convert permutation vecs to permutation arrays + # permute_l=False needed to enter here to avoid wasted efforts + if (not p_indices) and (not permute_l): + if nd: + Pa = np.zeros([*nd, m, m], dtype=real_dchar) + # An unreadable index hack - One-hot encoding for perm matrices + nd_ix = np.ix_(*([np.arange(x) for x in nd]+[np.arange(m)])) + Pa[(*nd_ix, P)] = 1 + P = Pa + else: # 2D case + Pa = np.zeros([m, m], dtype=real_dchar) + Pa[np.arange(m), P] = 1 + P = Pa + + return (L, U) if permute_l else (P, L, U) diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_lu_cython.cpython-310-x86_64-linux-gnu.so b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_lu_cython.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..7dd9117e8db647fbab8565c968bb2118b0b1a501 Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_lu_cython.cpython-310-x86_64-linux-gnu.so differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_lu_cython.pyi b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_lu_cython.pyi new file mode 100644 index 0000000000000000000000000000000000000000..0a175b1de32806102318cf69f7c5b4c3deddb03c --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_lu_cython.pyi @@ -0,0 +1,6 @@ +from numpy.typing import NDArray +from typing import Any + +def lu_decompose(a: NDArray[Any], lu: NDArray[Any], perm: NDArray[Any], permute_l: bool) -> None: ... # noqa: E501 + +def lu_dispatcher(a: NDArray[Any], lu: NDArray[Any], perm: NDArray[Any], permute_l: bool) -> None: ... # noqa: E501 diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_polar.py b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_polar.py new file mode 100644 index 0000000000000000000000000000000000000000..2fc3652899bed607ab1dd5e3f1663345010e93c1 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_polar.py @@ -0,0 +1,111 @@ +import numpy as np +from scipy.linalg import svd + + +__all__ = ['polar'] + + +def polar(a, side="right"): + """ + Compute the polar decomposition. + + Returns the factors of the polar decomposition [1]_ `u` and `p` such + that ``a = up`` (if `side` is "right") or ``a = pu`` (if `side` is + "left"), where `p` is positive semidefinite. Depending on the shape + of `a`, either the rows or columns of `u` are orthonormal. When `a` + is a square array, `u` is a square unitary array. When `a` is not + square, the "canonical polar decomposition" [2]_ is computed. + + Parameters + ---------- + a : (m, n) array_like + The array to be factored. + side : {'left', 'right'}, optional + Determines whether a right or left polar decomposition is computed. + If `side` is "right", then ``a = up``. If `side` is "left", then + ``a = pu``. The default is "right". + + Returns + ------- + u : (m, n) ndarray + If `a` is square, then `u` is unitary. If m > n, then the columns + of `a` are orthonormal, and if m < n, then the rows of `u` are + orthonormal. + p : ndarray + `p` is Hermitian positive semidefinite. If `a` is nonsingular, `p` + is positive definite. The shape of `p` is (n, n) or (m, m), depending + on whether `side` is "right" or "left", respectively. + + References + ---------- + .. [1] R. A. Horn and C. R. Johnson, "Matrix Analysis", Cambridge + University Press, 1985. + .. [2] N. J. Higham, "Functions of Matrices: Theory and Computation", + SIAM, 2008. + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import polar + >>> a = np.array([[1, -1], [2, 4]]) + >>> u, p = polar(a) + >>> u + array([[ 0.85749293, -0.51449576], + [ 0.51449576, 0.85749293]]) + >>> p + array([[ 1.88648444, 1.2004901 ], + [ 1.2004901 , 3.94446746]]) + + A non-square example, with m < n: + + >>> b = np.array([[0.5, 1, 2], [1.5, 3, 4]]) + >>> u, p = polar(b) + >>> u + array([[-0.21196618, -0.42393237, 0.88054056], + [ 0.39378971, 0.78757942, 0.4739708 ]]) + >>> p + array([[ 0.48470147, 0.96940295, 1.15122648], + [ 0.96940295, 1.9388059 , 2.30245295], + [ 1.15122648, 2.30245295, 3.65696431]]) + >>> u.dot(p) # Verify the decomposition. + array([[ 0.5, 1. , 2. ], + [ 1.5, 3. , 4. ]]) + >>> u.dot(u.T) # The rows of u are orthonormal. + array([[ 1.00000000e+00, -2.07353665e-17], + [ -2.07353665e-17, 1.00000000e+00]]) + + Another non-square example, with m > n: + + >>> c = b.T + >>> u, p = polar(c) + >>> u + array([[-0.21196618, 0.39378971], + [-0.42393237, 0.78757942], + [ 0.88054056, 0.4739708 ]]) + >>> p + array([[ 1.23116567, 1.93241587], + [ 1.93241587, 4.84930602]]) + >>> u.dot(p) # Verify the decomposition. + array([[ 0.5, 1.5], + [ 1. , 3. ], + [ 2. , 4. ]]) + >>> u.T.dot(u) # The columns of u are orthonormal. + array([[ 1.00000000e+00, -1.26363763e-16], + [ -1.26363763e-16, 1.00000000e+00]]) + + """ + if side not in ['right', 'left']: + raise ValueError("`side` must be either 'right' or 'left'") + a = np.asarray(a) + if a.ndim != 2: + raise ValueError("`a` must be a 2-D array.") + + w, s, vh = svd(a, full_matrices=False) + u = w.dot(vh) + if side == 'right': + # a = up + p = (vh.T.conj() * s).dot(vh) + else: + # a = pu + p = (w * s).dot(w.T.conj()) + return u, p diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_qr.py b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_qr.py new file mode 100644 index 0000000000000000000000000000000000000000..2b158015e7bff9d7e11cc2e85eeabcd2b531aec5 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_qr.py @@ -0,0 +1,430 @@ +"""QR decomposition functions.""" +import numpy + +# Local imports +from .lapack import get_lapack_funcs +from ._misc import _datacopied + +__all__ = ['qr', 'qr_multiply', 'rq'] + + +def safecall(f, name, *args, **kwargs): + """Call a LAPACK routine, determining lwork automatically and handling + error return values""" + lwork = kwargs.get("lwork", None) + if lwork in (None, -1): + kwargs['lwork'] = -1 + ret = f(*args, **kwargs) + kwargs['lwork'] = ret[-2][0].real.astype(numpy.int_) + ret = f(*args, **kwargs) + if ret[-1] < 0: + raise ValueError("illegal value in %dth argument of internal %s" + % (-ret[-1], name)) + return ret[:-2] + + +def qr(a, overwrite_a=False, lwork=None, mode='full', pivoting=False, + check_finite=True): + """ + Compute QR decomposition of a matrix. + + Calculate the decomposition ``A = Q R`` where Q is unitary/orthogonal + and R upper triangular. + + Parameters + ---------- + a : (M, N) array_like + Matrix to be decomposed + overwrite_a : bool, optional + Whether data in `a` is overwritten (may improve performance if + `overwrite_a` is set to True by reusing the existing input data + structure rather than creating a new one.) + lwork : int, optional + Work array size, lwork >= a.shape[1]. If None or -1, an optimal size + is computed. + mode : {'full', 'r', 'economic', 'raw'}, optional + Determines what information is to be returned: either both Q and R + ('full', default), only R ('r') or both Q and R but computed in + economy-size ('economic', see Notes). The final option 'raw' + (added in SciPy 0.11) makes the function return two matrices + (Q, TAU) in the internal format used by LAPACK. + pivoting : bool, optional + Whether or not factorization should include pivoting for rank-revealing + qr decomposition. If pivoting, compute the decomposition + ``A[:, P] = Q @ R`` as above, but where P is chosen such that the + diagonal of R is non-increasing. + check_finite : bool, optional + Whether to check that the input matrix contains only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + Q : float or complex ndarray + Of shape (M, M), or (M, K) for ``mode='economic'``. Not returned + if ``mode='r'``. Replaced by tuple ``(Q, TAU)`` if ``mode='raw'``. + R : float or complex ndarray + Of shape (M, N), or (K, N) for ``mode in ['economic', 'raw']``. + ``K = min(M, N)``. + P : int ndarray + Of shape (N,) for ``pivoting=True``. Not returned if + ``pivoting=False``. + + Raises + ------ + LinAlgError + Raised if decomposition fails + + Notes + ----- + This is an interface to the LAPACK routines dgeqrf, zgeqrf, + dorgqr, zungqr, dgeqp3, and zgeqp3. + + If ``mode=economic``, the shapes of Q and R are (M, K) and (K, N) instead + of (M,M) and (M,N), with ``K=min(M,N)``. + + Examples + -------- + >>> import numpy as np + >>> from scipy import linalg + >>> rng = np.random.default_rng() + >>> a = rng.standard_normal((9, 6)) + + >>> q, r = linalg.qr(a) + >>> np.allclose(a, np.dot(q, r)) + True + >>> q.shape, r.shape + ((9, 9), (9, 6)) + + >>> r2 = linalg.qr(a, mode='r') + >>> np.allclose(r, r2) + True + + >>> q3, r3 = linalg.qr(a, mode='economic') + >>> q3.shape, r3.shape + ((9, 6), (6, 6)) + + >>> q4, r4, p4 = linalg.qr(a, pivoting=True) + >>> d = np.abs(np.diag(r4)) + >>> np.all(d[1:] <= d[:-1]) + True + >>> np.allclose(a[:, p4], np.dot(q4, r4)) + True + >>> q4.shape, r4.shape, p4.shape + ((9, 9), (9, 6), (6,)) + + >>> q5, r5, p5 = linalg.qr(a, mode='economic', pivoting=True) + >>> q5.shape, r5.shape, p5.shape + ((9, 6), (6, 6), (6,)) + + """ + # 'qr' was the old default, equivalent to 'full'. Neither 'full' nor + # 'qr' are used below. + # 'raw' is used internally by qr_multiply + if mode not in ['full', 'qr', 'r', 'economic', 'raw']: + raise ValueError("Mode argument should be one of ['full', 'r'," + "'economic', 'raw']") + + if check_finite: + a1 = numpy.asarray_chkfinite(a) + else: + a1 = numpy.asarray(a) + if len(a1.shape) != 2: + raise ValueError("expected a 2-D array") + M, N = a1.shape + overwrite_a = overwrite_a or (_datacopied(a1, a)) + + if pivoting: + geqp3, = get_lapack_funcs(('geqp3',), (a1,)) + qr, jpvt, tau = safecall(geqp3, "geqp3", a1, overwrite_a=overwrite_a) + jpvt -= 1 # geqp3 returns a 1-based index array, so subtract 1 + else: + geqrf, = get_lapack_funcs(('geqrf',), (a1,)) + qr, tau = safecall(geqrf, "geqrf", a1, lwork=lwork, + overwrite_a=overwrite_a) + + if mode not in ['economic', 'raw'] or M < N: + R = numpy.triu(qr) + else: + R = numpy.triu(qr[:N, :]) + + if pivoting: + Rj = R, jpvt + else: + Rj = R, + + if mode == 'r': + return Rj + elif mode == 'raw': + return ((qr, tau),) + Rj + + gor_un_gqr, = get_lapack_funcs(('orgqr',), (qr,)) + + if M < N: + Q, = safecall(gor_un_gqr, "gorgqr/gungqr", qr[:, :M], tau, + lwork=lwork, overwrite_a=1) + elif mode == 'economic': + Q, = safecall(gor_un_gqr, "gorgqr/gungqr", qr, tau, lwork=lwork, + overwrite_a=1) + else: + t = qr.dtype.char + qqr = numpy.empty((M, M), dtype=t) + qqr[:, :N] = qr + Q, = safecall(gor_un_gqr, "gorgqr/gungqr", qqr, tau, lwork=lwork, + overwrite_a=1) + + return (Q,) + Rj + + +def qr_multiply(a, c, mode='right', pivoting=False, conjugate=False, + overwrite_a=False, overwrite_c=False): + """ + Calculate the QR decomposition and multiply Q with a matrix. + + Calculate the decomposition ``A = Q R`` where Q is unitary/orthogonal + and R upper triangular. Multiply Q with a vector or a matrix c. + + Parameters + ---------- + a : (M, N), array_like + Input array + c : array_like + Input array to be multiplied by ``q``. + mode : {'left', 'right'}, optional + ``Q @ c`` is returned if mode is 'left', ``c @ Q`` is returned if + mode is 'right'. + The shape of c must be appropriate for the matrix multiplications, + if mode is 'left', ``min(a.shape) == c.shape[0]``, + if mode is 'right', ``a.shape[0] == c.shape[1]``. + pivoting : bool, optional + Whether or not factorization should include pivoting for rank-revealing + qr decomposition, see the documentation of qr. + conjugate : bool, optional + Whether Q should be complex-conjugated. This might be faster + than explicit conjugation. + overwrite_a : bool, optional + Whether data in a is overwritten (may improve performance) + overwrite_c : bool, optional + Whether data in c is overwritten (may improve performance). + If this is used, c must be big enough to keep the result, + i.e. ``c.shape[0]`` = ``a.shape[0]`` if mode is 'left'. + + Returns + ------- + CQ : ndarray + The product of ``Q`` and ``c``. + R : (K, N), ndarray + R array of the resulting QR factorization where ``K = min(M, N)``. + P : (N,) ndarray + Integer pivot array. Only returned when ``pivoting=True``. + + Raises + ------ + LinAlgError + Raised if QR decomposition fails. + + Notes + ----- + This is an interface to the LAPACK routines ``?GEQRF``, ``?ORMQR``, + ``?UNMQR``, and ``?GEQP3``. + + .. versionadded:: 0.11.0 + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import qr_multiply, qr + >>> A = np.array([[1, 3, 3], [2, 3, 2], [2, 3, 3], [1, 3, 2]]) + >>> qc, r1, piv1 = qr_multiply(A, 2*np.eye(4), pivoting=1) + >>> qc + array([[-1., 1., -1.], + [-1., -1., 1.], + [-1., -1., -1.], + [-1., 1., 1.]]) + >>> r1 + array([[-6., -3., -5. ], + [ 0., -1., -1.11022302e-16], + [ 0., 0., -1. ]]) + >>> piv1 + array([1, 0, 2], dtype=int32) + >>> q2, r2, piv2 = qr(A, mode='economic', pivoting=1) + >>> np.allclose(2*q2 - qc, np.zeros((4, 3))) + True + + """ + if mode not in ['left', 'right']: + raise ValueError("Mode argument can only be 'left' or 'right' but " + f"not '{mode}'") + c = numpy.asarray_chkfinite(c) + if c.ndim < 2: + onedim = True + c = numpy.atleast_2d(c) + if mode == "left": + c = c.T + else: + onedim = False + + a = numpy.atleast_2d(numpy.asarray(a)) # chkfinite done in qr + M, N = a.shape + + if mode == 'left': + if c.shape[0] != min(M, N + overwrite_c*(M-N)): + raise ValueError('Array shapes are not compatible for Q @ c' + f' operation: {a.shape} vs {c.shape}') + else: + if M != c.shape[1]: + raise ValueError('Array shapes are not compatible for c @ Q' + f' operation: {c.shape} vs {a.shape}') + + raw = qr(a, overwrite_a, None, "raw", pivoting) + Q, tau = raw[0] + + gor_un_mqr, = get_lapack_funcs(('ormqr',), (Q,)) + if gor_un_mqr.typecode in ('s', 'd'): + trans = "T" + else: + trans = "C" + + Q = Q[:, :min(M, N)] + if M > N and mode == "left" and not overwrite_c: + if conjugate: + cc = numpy.zeros((c.shape[1], M), dtype=c.dtype, order="F") + cc[:, :N] = c.T + else: + cc = numpy.zeros((M, c.shape[1]), dtype=c.dtype, order="F") + cc[:N, :] = c + trans = "N" + if conjugate: + lr = "R" + else: + lr = "L" + overwrite_c = True + elif c.flags["C_CONTIGUOUS"] and trans == "T" or conjugate: + cc = c.T + if mode == "left": + lr = "R" + else: + lr = "L" + else: + trans = "N" + cc = c + if mode == "left": + lr = "L" + else: + lr = "R" + cQ, = safecall(gor_un_mqr, "gormqr/gunmqr", lr, trans, Q, tau, cc, + overwrite_c=overwrite_c) + if trans != "N": + cQ = cQ.T + if mode == "right": + cQ = cQ[:, :min(M, N)] + if onedim: + cQ = cQ.ravel() + + return (cQ,) + raw[1:] + + +def rq(a, overwrite_a=False, lwork=None, mode='full', check_finite=True): + """ + Compute RQ decomposition of a matrix. + + Calculate the decomposition ``A = R Q`` where Q is unitary/orthogonal + and R upper triangular. + + Parameters + ---------- + a : (M, N) array_like + Matrix to be decomposed + overwrite_a : bool, optional + Whether data in a is overwritten (may improve performance) + lwork : int, optional + Work array size, lwork >= a.shape[1]. If None or -1, an optimal size + is computed. + mode : {'full', 'r', 'economic'}, optional + Determines what information is to be returned: either both Q and R + ('full', default), only R ('r') or both Q and R but computed in + economy-size ('economic', see Notes). + check_finite : bool, optional + Whether to check that the input matrix contains only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + R : float or complex ndarray + Of shape (M, N) or (M, K) for ``mode='economic'``. ``K = min(M, N)``. + Q : float or complex ndarray + Of shape (N, N) or (K, N) for ``mode='economic'``. Not returned + if ``mode='r'``. + + Raises + ------ + LinAlgError + If decomposition fails. + + Notes + ----- + This is an interface to the LAPACK routines sgerqf, dgerqf, cgerqf, zgerqf, + sorgrq, dorgrq, cungrq and zungrq. + + If ``mode=economic``, the shapes of Q and R are (K, N) and (M, K) instead + of (N,N) and (M,N), with ``K=min(M,N)``. + + Examples + -------- + >>> import numpy as np + >>> from scipy import linalg + >>> rng = np.random.default_rng() + >>> a = rng.standard_normal((6, 9)) + >>> r, q = linalg.rq(a) + >>> np.allclose(a, r @ q) + True + >>> r.shape, q.shape + ((6, 9), (9, 9)) + >>> r2 = linalg.rq(a, mode='r') + >>> np.allclose(r, r2) + True + >>> r3, q3 = linalg.rq(a, mode='economic') + >>> r3.shape, q3.shape + ((6, 6), (6, 9)) + + """ + if mode not in ['full', 'r', 'economic']: + raise ValueError( + "Mode argument should be one of ['full', 'r', 'economic']") + + if check_finite: + a1 = numpy.asarray_chkfinite(a) + else: + a1 = numpy.asarray(a) + if len(a1.shape) != 2: + raise ValueError('expected matrix') + M, N = a1.shape + overwrite_a = overwrite_a or (_datacopied(a1, a)) + + gerqf, = get_lapack_funcs(('gerqf',), (a1,)) + rq, tau = safecall(gerqf, 'gerqf', a1, lwork=lwork, + overwrite_a=overwrite_a) + if not mode == 'economic' or N < M: + R = numpy.triu(rq, N-M) + else: + R = numpy.triu(rq[-M:, -M:]) + + if mode == 'r': + return R + + gor_un_grq, = get_lapack_funcs(('orgrq',), (rq,)) + + if N < M: + Q, = safecall(gor_un_grq, "gorgrq/gungrq", rq[-N:], tau, lwork=lwork, + overwrite_a=1) + elif mode == 'economic': + Q, = safecall(gor_un_grq, "gorgrq/gungrq", rq, tau, lwork=lwork, + overwrite_a=1) + else: + rq1 = numpy.empty((N, N), dtype=rq.dtype) + rq1[-M:] = rq + Q, = safecall(gor_un_grq, "gorgrq/gungrq", rq1, tau, lwork=lwork, + overwrite_a=1) + + return R, Q diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_qz.py b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_qz.py new file mode 100644 index 0000000000000000000000000000000000000000..39361f172df7f1985c7ed0fbc4d919b5c4545725 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_qz.py @@ -0,0 +1,449 @@ +import warnings + +import numpy as np +from numpy import asarray_chkfinite +from ._misc import LinAlgError, _datacopied, LinAlgWarning +from .lapack import get_lapack_funcs + + +__all__ = ['qz', 'ordqz'] + +_double_precision = ['i', 'l', 'd'] + + +def _select_function(sort): + if callable(sort): + # assume the user knows what they're doing + sfunction = sort + elif sort == 'lhp': + sfunction = _lhp + elif sort == 'rhp': + sfunction = _rhp + elif sort == 'iuc': + sfunction = _iuc + elif sort == 'ouc': + sfunction = _ouc + else: + raise ValueError("sort parameter must be None, a callable, or " + "one of ('lhp','rhp','iuc','ouc')") + + return sfunction + + +def _lhp(x, y): + out = np.empty_like(x, dtype=bool) + nonzero = (y != 0) + # handles (x, y) = (0, 0) too + out[~nonzero] = False + out[nonzero] = (np.real(x[nonzero]/y[nonzero]) < 0.0) + return out + + +def _rhp(x, y): + out = np.empty_like(x, dtype=bool) + nonzero = (y != 0) + # handles (x, y) = (0, 0) too + out[~nonzero] = False + out[nonzero] = (np.real(x[nonzero]/y[nonzero]) > 0.0) + return out + + +def _iuc(x, y): + out = np.empty_like(x, dtype=bool) + nonzero = (y != 0) + # handles (x, y) = (0, 0) too + out[~nonzero] = False + out[nonzero] = (abs(x[nonzero]/y[nonzero]) < 1.0) + return out + + +def _ouc(x, y): + out = np.empty_like(x, dtype=bool) + xzero = (x == 0) + yzero = (y == 0) + out[xzero & yzero] = False + out[~xzero & yzero] = True + out[~yzero] = (abs(x[~yzero]/y[~yzero]) > 1.0) + return out + + +def _qz(A, B, output='real', lwork=None, sort=None, overwrite_a=False, + overwrite_b=False, check_finite=True): + if sort is not None: + # Disabled due to segfaults on win32, see ticket 1717. + raise ValueError("The 'sort' input of qz() has to be None and will be " + "removed in a future release. Use ordqz instead.") + + if output not in ['real', 'complex', 'r', 'c']: + raise ValueError("argument must be 'real', or 'complex'") + + if check_finite: + a1 = asarray_chkfinite(A) + b1 = asarray_chkfinite(B) + else: + a1 = np.asarray(A) + b1 = np.asarray(B) + + a_m, a_n = a1.shape + b_m, b_n = b1.shape + if not (a_m == a_n == b_m == b_n): + raise ValueError("Array dimensions must be square and agree") + + typa = a1.dtype.char + if output in ['complex', 'c'] and typa not in ['F', 'D']: + if typa in _double_precision: + a1 = a1.astype('D') + typa = 'D' + else: + a1 = a1.astype('F') + typa = 'F' + typb = b1.dtype.char + if output in ['complex', 'c'] and typb not in ['F', 'D']: + if typb in _double_precision: + b1 = b1.astype('D') + typb = 'D' + else: + b1 = b1.astype('F') + typb = 'F' + + overwrite_a = overwrite_a or (_datacopied(a1, A)) + overwrite_b = overwrite_b or (_datacopied(b1, B)) + + gges, = get_lapack_funcs(('gges',), (a1, b1)) + + if lwork is None or lwork == -1: + # get optimal work array size + result = gges(lambda x: None, a1, b1, lwork=-1) + lwork = result[-2][0].real.astype(int) + + def sfunction(x): + return None + result = gges(sfunction, a1, b1, lwork=lwork, overwrite_a=overwrite_a, + overwrite_b=overwrite_b, sort_t=0) + + info = result[-1] + if info < 0: + raise ValueError(f"Illegal value in argument {-info} of gges") + elif info > 0 and info <= a_n: + warnings.warn("The QZ iteration failed. (a,b) are not in Schur " + "form, but ALPHAR(j), ALPHAI(j), and BETA(j) should be " + f"correct for J={info-1},...,N", LinAlgWarning, + stacklevel=3) + elif info == a_n+1: + raise LinAlgError("Something other than QZ iteration failed") + elif info == a_n+2: + raise LinAlgError("After reordering, roundoff changed values of some " + "complex eigenvalues so that leading eigenvalues " + "in the Generalized Schur form no longer satisfy " + "sort=True. This could also be due to scaling.") + elif info == a_n+3: + raise LinAlgError("Reordering failed in tgsen") + + return result, gges.typecode + + +def qz(A, B, output='real', lwork=None, sort=None, overwrite_a=False, + overwrite_b=False, check_finite=True): + """ + QZ decomposition for generalized eigenvalues of a pair of matrices. + + The QZ, or generalized Schur, decomposition for a pair of n-by-n + matrices (A,B) is:: + + (A,B) = (Q @ AA @ Z*, Q @ BB @ Z*) + + where AA, BB is in generalized Schur form if BB is upper-triangular + with non-negative diagonal and AA is upper-triangular, or for real QZ + decomposition (``output='real'``) block upper triangular with 1x1 + and 2x2 blocks. In this case, the 1x1 blocks correspond to real + generalized eigenvalues and 2x2 blocks are 'standardized' by making + the corresponding elements of BB have the form:: + + [ a 0 ] + [ 0 b ] + + and the pair of corresponding 2x2 blocks in AA and BB will have a complex + conjugate pair of generalized eigenvalues. If (``output='complex'``) or + A and B are complex matrices, Z' denotes the conjugate-transpose of Z. + Q and Z are unitary matrices. + + Parameters + ---------- + A : (N, N) array_like + 2-D array to decompose + B : (N, N) array_like + 2-D array to decompose + output : {'real', 'complex'}, optional + Construct the real or complex QZ decomposition for real matrices. + Default is 'real'. + lwork : int, optional + Work array size. If None or -1, it is automatically computed. + sort : {None, callable, 'lhp', 'rhp', 'iuc', 'ouc'}, optional + NOTE: THIS INPUT IS DISABLED FOR NOW. Use ordqz instead. + + Specifies whether the upper eigenvalues should be sorted. A callable + may be passed that, given a eigenvalue, returns a boolean denoting + whether the eigenvalue should be sorted to the top-left (True). For + real matrix pairs, the sort function takes three real arguments + (alphar, alphai, beta). The eigenvalue + ``x = (alphar + alphai*1j)/beta``. For complex matrix pairs or + output='complex', the sort function takes two complex arguments + (alpha, beta). The eigenvalue ``x = (alpha/beta)``. Alternatively, + string parameters may be used: + + - 'lhp' Left-hand plane (x.real < 0.0) + - 'rhp' Right-hand plane (x.real > 0.0) + - 'iuc' Inside the unit circle (x*x.conjugate() < 1.0) + - 'ouc' Outside the unit circle (x*x.conjugate() > 1.0) + + Defaults to None (no sorting). + overwrite_a : bool, optional + Whether to overwrite data in a (may improve performance) + overwrite_b : bool, optional + Whether to overwrite data in b (may improve performance) + check_finite : bool, optional + If true checks the elements of `A` and `B` are finite numbers. If + false does no checking and passes matrix through to + underlying algorithm. + + Returns + ------- + AA : (N, N) ndarray + Generalized Schur form of A. + BB : (N, N) ndarray + Generalized Schur form of B. + Q : (N, N) ndarray + The left Schur vectors. + Z : (N, N) ndarray + The right Schur vectors. + + See Also + -------- + ordqz + + Notes + ----- + Q is transposed versus the equivalent function in Matlab. + + .. versionadded:: 0.11.0 + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import qz + + >>> A = np.array([[1, 2, -1], [5, 5, 5], [2, 4, -8]]) + >>> B = np.array([[1, 1, -3], [3, 1, -1], [5, 6, -2]]) + + Compute the decomposition. The QZ decomposition is not unique, so + depending on the underlying library that is used, there may be + differences in the signs of coefficients in the following output. + + >>> AA, BB, Q, Z = qz(A, B) + >>> AA + array([[-1.36949157, -4.05459025, 7.44389431], + [ 0. , 7.65653432, 5.13476017], + [ 0. , -0.65978437, 2.4186015 ]]) # may vary + >>> BB + array([[ 1.71890633, -1.64723705, -0.72696385], + [ 0. , 8.6965692 , -0. ], + [ 0. , 0. , 2.27446233]]) # may vary + >>> Q + array([[-0.37048362, 0.1903278 , 0.90912992], + [-0.90073232, 0.16534124, -0.40167593], + [ 0.22676676, 0.96769706, -0.11017818]]) # may vary + >>> Z + array([[-0.67660785, 0.63528924, -0.37230283], + [ 0.70243299, 0.70853819, -0.06753907], + [ 0.22088393, -0.30721526, -0.92565062]]) # may vary + + Verify the QZ decomposition. With real output, we only need the + transpose of ``Z`` in the following expressions. + + >>> Q @ AA @ Z.T # Should be A + array([[ 1., 2., -1.], + [ 5., 5., 5.], + [ 2., 4., -8.]]) + >>> Q @ BB @ Z.T # Should be B + array([[ 1., 1., -3.], + [ 3., 1., -1.], + [ 5., 6., -2.]]) + + Repeat the decomposition, but with ``output='complex'``. + + >>> AA, BB, Q, Z = qz(A, B, output='complex') + + For conciseness in the output, we use ``np.set_printoptions()`` to set + the output precision of NumPy arrays to 3 and display tiny values as 0. + + >>> np.set_printoptions(precision=3, suppress=True) + >>> AA + array([[-1.369+0.j , 2.248+4.237j, 4.861-5.022j], + [ 0. +0.j , 7.037+2.922j, 0.794+4.932j], + [ 0. +0.j , 0. +0.j , 2.655-1.103j]]) # may vary + >>> BB + array([[ 1.719+0.j , -1.115+1.j , -0.763-0.646j], + [ 0. +0.j , 7.24 +0.j , -3.144+3.322j], + [ 0. +0.j , 0. +0.j , 2.732+0.j ]]) # may vary + >>> Q + array([[ 0.326+0.175j, -0.273-0.029j, -0.886-0.052j], + [ 0.794+0.426j, -0.093+0.134j, 0.402-0.02j ], + [-0.2 -0.107j, -0.816+0.482j, 0.151-0.167j]]) # may vary + >>> Z + array([[ 0.596+0.32j , -0.31 +0.414j, 0.393-0.347j], + [-0.619-0.332j, -0.479+0.314j, 0.154-0.393j], + [-0.195-0.104j, 0.576+0.27j , 0.715+0.187j]]) # may vary + + With complex arrays, we must use ``Z.conj().T`` in the following + expressions to verify the decomposition. + + >>> Q @ AA @ Z.conj().T # Should be A + array([[ 1.-0.j, 2.-0.j, -1.-0.j], + [ 5.+0.j, 5.+0.j, 5.-0.j], + [ 2.+0.j, 4.+0.j, -8.+0.j]]) + >>> Q @ BB @ Z.conj().T # Should be B + array([[ 1.+0.j, 1.+0.j, -3.+0.j], + [ 3.-0.j, 1.-0.j, -1.+0.j], + [ 5.+0.j, 6.+0.j, -2.+0.j]]) + + """ + # output for real + # AA, BB, sdim, alphar, alphai, beta, vsl, vsr, work, info + # output for complex + # AA, BB, sdim, alpha, beta, vsl, vsr, work, info + result, _ = _qz(A, B, output=output, lwork=lwork, sort=sort, + overwrite_a=overwrite_a, overwrite_b=overwrite_b, + check_finite=check_finite) + return result[0], result[1], result[-4], result[-3] + + +def ordqz(A, B, sort='lhp', output='real', overwrite_a=False, + overwrite_b=False, check_finite=True): + """QZ decomposition for a pair of matrices with reordering. + + Parameters + ---------- + A : (N, N) array_like + 2-D array to decompose + B : (N, N) array_like + 2-D array to decompose + sort : {callable, 'lhp', 'rhp', 'iuc', 'ouc'}, optional + Specifies whether the upper eigenvalues should be sorted. A + callable may be passed that, given an ordered pair ``(alpha, + beta)`` representing the eigenvalue ``x = (alpha/beta)``, + returns a boolean denoting whether the eigenvalue should be + sorted to the top-left (True). For the real matrix pairs + ``beta`` is real while ``alpha`` can be complex, and for + complex matrix pairs both ``alpha`` and ``beta`` can be + complex. The callable must be able to accept a NumPy + array. Alternatively, string parameters may be used: + + - 'lhp' Left-hand plane (x.real < 0.0) + - 'rhp' Right-hand plane (x.real > 0.0) + - 'iuc' Inside the unit circle (x*x.conjugate() < 1.0) + - 'ouc' Outside the unit circle (x*x.conjugate() > 1.0) + + With the predefined sorting functions, an infinite eigenvalue + (i.e., ``alpha != 0`` and ``beta = 0``) is considered to lie in + neither the left-hand nor the right-hand plane, but it is + considered to lie outside the unit circle. For the eigenvalue + ``(alpha, beta) = (0, 0)``, the predefined sorting functions + all return `False`. + output : str {'real','complex'}, optional + Construct the real or complex QZ decomposition for real matrices. + Default is 'real'. + overwrite_a : bool, optional + If True, the contents of A are overwritten. + overwrite_b : bool, optional + If True, the contents of B are overwritten. + check_finite : bool, optional + If true checks the elements of `A` and `B` are finite numbers. If + false does no checking and passes matrix through to + underlying algorithm. + + Returns + ------- + AA : (N, N) ndarray + Generalized Schur form of A. + BB : (N, N) ndarray + Generalized Schur form of B. + alpha : (N,) ndarray + alpha = alphar + alphai * 1j. See notes. + beta : (N,) ndarray + See notes. + Q : (N, N) ndarray + The left Schur vectors. + Z : (N, N) ndarray + The right Schur vectors. + + See Also + -------- + qz + + Notes + ----- + On exit, ``(ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N``, will be the + generalized eigenvalues. ``ALPHAR(j) + ALPHAI(j)*i`` and + ``BETA(j),j=1,...,N`` are the diagonals of the complex Schur form (S,T) + that would result if the 2-by-2 diagonal blocks of the real generalized + Schur form of (A,B) were further reduced to triangular form using complex + unitary transformations. If ALPHAI(j) is zero, then the jth eigenvalue is + real; if positive, then the ``j``\\ th and ``(j+1)``\\ st eigenvalues are a + complex conjugate pair, with ``ALPHAI(j+1)`` negative. + + .. versionadded:: 0.17.0 + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import ordqz + >>> A = np.array([[2, 5, 8, 7], [5, 2, 2, 8], [7, 5, 6, 6], [5, 4, 4, 8]]) + >>> B = np.array([[0, 6, 0, 0], [5, 0, 2, 1], [5, 2, 6, 6], [4, 7, 7, 7]]) + >>> AA, BB, alpha, beta, Q, Z = ordqz(A, B, sort='lhp') + + Since we have sorted for left half plane eigenvalues, negatives come first + + >>> (alpha/beta).real < 0 + array([ True, True, False, False], dtype=bool) + + """ + (AA, BB, _, *ab, Q, Z, _, _), typ = _qz(A, B, output=output, sort=None, + overwrite_a=overwrite_a, + overwrite_b=overwrite_b, + check_finite=check_finite) + + if typ == 's': + alpha, beta = ab[0] + ab[1]*np.complex64(1j), ab[2] + elif typ == 'd': + alpha, beta = ab[0] + ab[1]*1.j, ab[2] + else: + alpha, beta = ab + + sfunction = _select_function(sort) + select = sfunction(alpha, beta) + + tgsen = get_lapack_funcs('tgsen', (AA, BB)) + # the real case needs 4n + 16 lwork + lwork = 4*AA.shape[0] + 16 if typ in 'sd' else 1 + AAA, BBB, *ab, QQ, ZZ, _, _, _, _, info = tgsen(select, AA, BB, Q, Z, + ijob=0, + lwork=lwork, liwork=1) + + # Once more for tgsen output + if typ == 's': + alpha, beta = ab[0] + ab[1]*np.complex64(1j), ab[2] + elif typ == 'd': + alpha, beta = ab[0] + ab[1]*1.j, ab[2] + else: + alpha, beta = ab + + if info < 0: + raise ValueError(f"Illegal value in argument {-info} of tgsen") + elif info == 1: + raise ValueError("Reordering of (A, B) failed because the transformed" + " matrix pair (A, B) would be too far from " + "generalized Schur form; the problem is very " + "ill-conditioned. (A, B) may have been partially " + "reordered.") + + return AAA, BBB, alpha, beta, QQ, ZZ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_schur.py b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_schur.py new file mode 100644 index 0000000000000000000000000000000000000000..ed41e4f9ea7e42bc241a7dfcb810fe8ed024e27c --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_schur.py @@ -0,0 +1,300 @@ +"""Schur decomposition functions.""" +import numpy +from numpy import asarray_chkfinite, single, asarray, array +from numpy.linalg import norm + + +# Local imports. +from ._misc import LinAlgError, _datacopied +from .lapack import get_lapack_funcs +from ._decomp import eigvals + +__all__ = ['schur', 'rsf2csf'] + +_double_precision = ['i', 'l', 'd'] + + +def schur(a, output='real', lwork=None, overwrite_a=False, sort=None, + check_finite=True): + """ + Compute Schur decomposition of a matrix. + + The Schur decomposition is:: + + A = Z T Z^H + + where Z is unitary and T is either upper-triangular, or for real + Schur decomposition (output='real'), quasi-upper triangular. In + the quasi-triangular form, 2x2 blocks describing complex-valued + eigenvalue pairs may extrude from the diagonal. + + Parameters + ---------- + a : (M, M) array_like + Matrix to decompose + output : {'real', 'complex'}, optional + Construct the real or complex Schur decomposition (for real matrices). + lwork : int, optional + Work array size. If None or -1, it is automatically computed. + overwrite_a : bool, optional + Whether to overwrite data in a (may improve performance). + sort : {None, callable, 'lhp', 'rhp', 'iuc', 'ouc'}, optional + Specifies whether the upper eigenvalues should be sorted. A callable + may be passed that, given a eigenvalue, returns a boolean denoting + whether the eigenvalue should be sorted to the top-left (True). + Alternatively, string parameters may be used:: + + 'lhp' Left-hand plane (x.real < 0.0) + 'rhp' Right-hand plane (x.real > 0.0) + 'iuc' Inside the unit circle (x*x.conjugate() <= 1.0) + 'ouc' Outside the unit circle (x*x.conjugate() > 1.0) + + Defaults to None (no sorting). + check_finite : bool, optional + Whether to check that the input matrix contains only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + T : (M, M) ndarray + Schur form of A. It is real-valued for the real Schur decomposition. + Z : (M, M) ndarray + An unitary Schur transformation matrix for A. + It is real-valued for the real Schur decomposition. + sdim : int + If and only if sorting was requested, a third return value will + contain the number of eigenvalues satisfying the sort condition. + + Raises + ------ + LinAlgError + Error raised under three conditions: + + 1. The algorithm failed due to a failure of the QR algorithm to + compute all eigenvalues. + 2. If eigenvalue sorting was requested, the eigenvalues could not be + reordered due to a failure to separate eigenvalues, usually because + of poor conditioning. + 3. If eigenvalue sorting was requested, roundoff errors caused the + leading eigenvalues to no longer satisfy the sorting condition. + + See Also + -------- + rsf2csf : Convert real Schur form to complex Schur form + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import schur, eigvals + >>> A = np.array([[0, 2, 2], [0, 1, 2], [1, 0, 1]]) + >>> T, Z = schur(A) + >>> T + array([[ 2.65896708, 1.42440458, -1.92933439], + [ 0. , -0.32948354, -0.49063704], + [ 0. , 1.31178921, -0.32948354]]) + >>> Z + array([[0.72711591, -0.60156188, 0.33079564], + [0.52839428, 0.79801892, 0.28976765], + [0.43829436, 0.03590414, -0.89811411]]) + + >>> T2, Z2 = schur(A, output='complex') + >>> T2 + array([[ 2.65896708, -1.22839825+1.32378589j, 0.42590089+1.51937378j], # may vary + [ 0. , -0.32948354+0.80225456j, -0.59877807+0.56192146j], + [ 0. , 0. , -0.32948354-0.80225456j]]) + >>> eigvals(T2) + array([2.65896708, -0.32948354+0.80225456j, -0.32948354-0.80225456j]) + + An arbitrary custom eig-sorting condition, having positive imaginary part, + which is satisfied by only one eigenvalue + + >>> T3, Z3, sdim = schur(A, output='complex', sort=lambda x: x.imag > 0) + >>> sdim + 1 + + """ + if output not in ['real', 'complex', 'r', 'c']: + raise ValueError("argument must be 'real', or 'complex'") + if check_finite: + a1 = asarray_chkfinite(a) + else: + a1 = asarray(a) + if numpy.issubdtype(a1.dtype, numpy.integer): + a1 = asarray(a, dtype=numpy.dtype("long")) + if len(a1.shape) != 2 or (a1.shape[0] != a1.shape[1]): + raise ValueError('expected square matrix') + typ = a1.dtype.char + if output in ['complex', 'c'] and typ not in ['F', 'D']: + if typ in _double_precision: + a1 = a1.astype('D') + typ = 'D' + else: + a1 = a1.astype('F') + typ = 'F' + overwrite_a = overwrite_a or (_datacopied(a1, a)) + gees, = get_lapack_funcs(('gees',), (a1,)) + if lwork is None or lwork == -1: + # get optimal work array + result = gees(lambda x: None, a1, lwork=-1) + lwork = result[-2][0].real.astype(numpy.int_) + + if sort is None: + sort_t = 0 + def sfunction(x): + return None + else: + sort_t = 1 + if callable(sort): + sfunction = sort + elif sort == 'lhp': + def sfunction(x): + return x.real < 0.0 + elif sort == 'rhp': + def sfunction(x): + return x.real >= 0.0 + elif sort == 'iuc': + def sfunction(x): + return abs(x) <= 1.0 + elif sort == 'ouc': + def sfunction(x): + return abs(x) > 1.0 + else: + raise ValueError("'sort' parameter must either be 'None', or a " + "callable, or one of ('lhp','rhp','iuc','ouc')") + + result = gees(sfunction, a1, lwork=lwork, overwrite_a=overwrite_a, + sort_t=sort_t) + + info = result[-1] + if info < 0: + raise ValueError(f'illegal value in {-info}-th argument of internal gees') + elif info == a1.shape[0] + 1: + raise LinAlgError('Eigenvalues could not be separated for reordering.') + elif info == a1.shape[0] + 2: + raise LinAlgError('Leading eigenvalues do not satisfy sort condition.') + elif info > 0: + raise LinAlgError("Schur form not found. Possibly ill-conditioned.") + + if sort_t == 0: + return result[0], result[-3] + else: + return result[0], result[-3], result[1] + + +eps = numpy.finfo(float).eps +feps = numpy.finfo(single).eps + +_array_kind = {'b': 0, 'h': 0, 'B': 0, 'i': 0, 'l': 0, + 'f': 0, 'd': 0, 'F': 1, 'D': 1} +_array_precision = {'i': 1, 'l': 1, 'f': 0, 'd': 1, 'F': 0, 'D': 1} +_array_type = [['f', 'd'], ['F', 'D']] + + +def _commonType(*arrays): + kind = 0 + precision = 0 + for a in arrays: + t = a.dtype.char + kind = max(kind, _array_kind[t]) + precision = max(precision, _array_precision[t]) + return _array_type[kind][precision] + + +def _castCopy(type, *arrays): + cast_arrays = () + for a in arrays: + if a.dtype.char == type: + cast_arrays = cast_arrays + (a.copy(),) + else: + cast_arrays = cast_arrays + (a.astype(type),) + if len(cast_arrays) == 1: + return cast_arrays[0] + else: + return cast_arrays + + +def rsf2csf(T, Z, check_finite=True): + """ + Convert real Schur form to complex Schur form. + + Convert a quasi-diagonal real-valued Schur form to the upper-triangular + complex-valued Schur form. + + Parameters + ---------- + T : (M, M) array_like + Real Schur form of the original array + Z : (M, M) array_like + Schur transformation matrix + check_finite : bool, optional + Whether to check that the input arrays contain only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + T : (M, M) ndarray + Complex Schur form of the original array + Z : (M, M) ndarray + Schur transformation matrix corresponding to the complex form + + See Also + -------- + schur : Schur decomposition of an array + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import schur, rsf2csf + >>> A = np.array([[0, 2, 2], [0, 1, 2], [1, 0, 1]]) + >>> T, Z = schur(A) + >>> T + array([[ 2.65896708, 1.42440458, -1.92933439], + [ 0. , -0.32948354, -0.49063704], + [ 0. , 1.31178921, -0.32948354]]) + >>> Z + array([[0.72711591, -0.60156188, 0.33079564], + [0.52839428, 0.79801892, 0.28976765], + [0.43829436, 0.03590414, -0.89811411]]) + >>> T2 , Z2 = rsf2csf(T, Z) + >>> T2 + array([[2.65896708+0.j, -1.64592781+0.743164187j, -1.21516887+1.00660462j], + [0.+0.j , -0.32948354+8.02254558e-01j, -0.82115218-2.77555756e-17j], + [0.+0.j , 0.+0.j, -0.32948354-0.802254558j]]) + >>> Z2 + array([[0.72711591+0.j, 0.28220393-0.31385693j, 0.51319638-0.17258824j], + [0.52839428+0.j, 0.24720268+0.41635578j, -0.68079517-0.15118243j], + [0.43829436+0.j, -0.76618703+0.01873251j, -0.03063006+0.46857912j]]) + + """ + if check_finite: + Z, T = map(asarray_chkfinite, (Z, T)) + else: + Z, T = map(asarray, (Z, T)) + + for ind, X in enumerate([Z, T]): + if X.ndim != 2 or X.shape[0] != X.shape[1]: + raise ValueError("Input '{}' must be square.".format('ZT'[ind])) + + if T.shape[0] != Z.shape[0]: + message = f"Input array shapes must match: Z: {Z.shape} vs. T: {T.shape}" + raise ValueError(message) + N = T.shape[0] + t = _commonType(Z, T, array([3.0], 'F')) + Z, T = _castCopy(t, Z, T) + + for m in range(N-1, 0, -1): + if abs(T[m, m-1]) > eps*(abs(T[m-1, m-1]) + abs(T[m, m])): + mu = eigvals(T[m-1:m+1, m-1:m+1]) - T[m, m] + r = norm([mu[0], T[m, m-1]]) + c = mu[0] / r + s = T[m, m-1] / r + G = array([[c.conj(), s], [-s, c]], dtype=t) + + T[m-1:m+1, m-1:] = G.dot(T[m-1:m+1, m-1:]) + T[:m+1, m-1:m+1] = T[:m+1, m-1:m+1].dot(G.conj().T) + Z[:, m-1:m+1] = Z[:, m-1:m+1].dot(G.conj().T) + + T[m, m-1] = 0.0 + return T, Z diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_svd.py b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_svd.py new file mode 100644 index 0000000000000000000000000000000000000000..a2452e3dc21b76600a6a3a58b56f53804f91561b --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_svd.py @@ -0,0 +1,517 @@ +"""SVD decomposition functions.""" +import numpy +from numpy import zeros, r_, diag, dot, arccos, arcsin, where, clip + +# Local imports. +from ._misc import LinAlgError, _datacopied +from .lapack import get_lapack_funcs, _compute_lwork +from ._decomp import _asarray_validated + +__all__ = ['svd', 'svdvals', 'diagsvd', 'orth', 'subspace_angles', 'null_space'] + + +def svd(a, full_matrices=True, compute_uv=True, overwrite_a=False, + check_finite=True, lapack_driver='gesdd'): + """ + Singular Value Decomposition. + + Factorizes the matrix `a` into two unitary matrices ``U`` and ``Vh``, and + a 1-D array ``s`` of singular values (real, non-negative) such that + ``a == U @ S @ Vh``, where ``S`` is a suitably shaped matrix of zeros with + main diagonal ``s``. + + Parameters + ---------- + a : (M, N) array_like + Matrix to decompose. + full_matrices : bool, optional + If True (default), `U` and `Vh` are of shape ``(M, M)``, ``(N, N)``. + If False, the shapes are ``(M, K)`` and ``(K, N)``, where + ``K = min(M, N)``. + compute_uv : bool, optional + Whether to compute also ``U`` and ``Vh`` in addition to ``s``. + Default is True. + overwrite_a : bool, optional + Whether to overwrite `a`; may improve performance. + Default is False. + check_finite : bool, optional + Whether to check that the input matrix contains only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + lapack_driver : {'gesdd', 'gesvd'}, optional + Whether to use the more efficient divide-and-conquer approach + (``'gesdd'``) or general rectangular approach (``'gesvd'``) + to compute the SVD. MATLAB and Octave use the ``'gesvd'`` approach. + Default is ``'gesdd'``. + + .. versionadded:: 0.18 + + Returns + ------- + U : ndarray + Unitary matrix having left singular vectors as columns. + Of shape ``(M, M)`` or ``(M, K)``, depending on `full_matrices`. + s : ndarray + The singular values, sorted in non-increasing order. + Of shape (K,), with ``K = min(M, N)``. + Vh : ndarray + Unitary matrix having right singular vectors as rows. + Of shape ``(N, N)`` or ``(K, N)`` depending on `full_matrices`. + + For ``compute_uv=False``, only ``s`` is returned. + + Raises + ------ + LinAlgError + If SVD computation does not converge. + + See Also + -------- + svdvals : Compute singular values of a matrix. + diagsvd : Construct the Sigma matrix, given the vector s. + + Examples + -------- + >>> import numpy as np + >>> from scipy import linalg + >>> rng = np.random.default_rng() + >>> m, n = 9, 6 + >>> a = rng.standard_normal((m, n)) + 1.j*rng.standard_normal((m, n)) + >>> U, s, Vh = linalg.svd(a) + >>> U.shape, s.shape, Vh.shape + ((9, 9), (6,), (6, 6)) + + Reconstruct the original matrix from the decomposition: + + >>> sigma = np.zeros((m, n)) + >>> for i in range(min(m, n)): + ... sigma[i, i] = s[i] + >>> a1 = np.dot(U, np.dot(sigma, Vh)) + >>> np.allclose(a, a1) + True + + Alternatively, use ``full_matrices=False`` (notice that the shape of + ``U`` is then ``(m, n)`` instead of ``(m, m)``): + + >>> U, s, Vh = linalg.svd(a, full_matrices=False) + >>> U.shape, s.shape, Vh.shape + ((9, 6), (6,), (6, 6)) + >>> S = np.diag(s) + >>> np.allclose(a, np.dot(U, np.dot(S, Vh))) + True + + >>> s2 = linalg.svd(a, compute_uv=False) + >>> np.allclose(s, s2) + True + + """ + a1 = _asarray_validated(a, check_finite=check_finite) + if len(a1.shape) != 2: + raise ValueError('expected matrix') + m, n = a1.shape + overwrite_a = overwrite_a or (_datacopied(a1, a)) + + if not isinstance(lapack_driver, str): + raise TypeError('lapack_driver must be a string') + if lapack_driver not in ('gesdd', 'gesvd'): + message = f'lapack_driver must be "gesdd" or "gesvd", not "{lapack_driver}"' + raise ValueError(message) + + if lapack_driver == 'gesdd' and compute_uv: + # XXX: revisit int32 when ILP64 lapack becomes a thing + max_mn, min_mn = (m, n) if m > n else (n, m) + if full_matrices: + if max_mn*max_mn > numpy.iinfo(numpy.int32).max: + raise ValueError(f"Indexing a matrix size {max_mn} x {max_mn} " + " would incur integer overflow in LAPACK.") + else: + sz = max(m * min_mn, n * min_mn) + if max(m * min_mn, n * min_mn) > numpy.iinfo(numpy.int32).max: + raise ValueError(f"Indexing a matrix of {sz} elements would " + "incur an in integer overflow in LAPACK.") + + funcs = (lapack_driver, lapack_driver + '_lwork') + gesXd, gesXd_lwork = get_lapack_funcs(funcs, (a1,), ilp64='preferred') + + # compute optimal lwork + lwork = _compute_lwork(gesXd_lwork, a1.shape[0], a1.shape[1], + compute_uv=compute_uv, full_matrices=full_matrices) + + # perform decomposition + u, s, v, info = gesXd(a1, compute_uv=compute_uv, lwork=lwork, + full_matrices=full_matrices, overwrite_a=overwrite_a) + + if info > 0: + raise LinAlgError("SVD did not converge") + if info < 0: + raise ValueError('illegal value in %dth argument of internal gesdd' + % -info) + if compute_uv: + return u, s, v + else: + return s + + +def svdvals(a, overwrite_a=False, check_finite=True): + """ + Compute singular values of a matrix. + + Parameters + ---------- + a : (M, N) array_like + Matrix to decompose. + overwrite_a : bool, optional + Whether to overwrite `a`; may improve performance. + Default is False. + check_finite : bool, optional + Whether to check that the input matrix contains only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + s : (min(M, N),) ndarray + The singular values, sorted in decreasing order. + + Raises + ------ + LinAlgError + If SVD computation does not converge. + + See Also + -------- + svd : Compute the full singular value decomposition of a matrix. + diagsvd : Construct the Sigma matrix, given the vector s. + + Notes + ----- + ``svdvals(a)`` only differs from ``svd(a, compute_uv=False)`` by its + handling of the edge case of empty ``a``, where it returns an + empty sequence: + + >>> import numpy as np + >>> a = np.empty((0, 2)) + >>> from scipy.linalg import svdvals + >>> svdvals(a) + array([], dtype=float64) + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import svdvals + >>> m = np.array([[1.0, 0.0], + ... [2.0, 3.0], + ... [1.0, 1.0], + ... [0.0, 2.0], + ... [1.0, 0.0]]) + >>> svdvals(m) + array([ 4.28091555, 1.63516424]) + + We can verify the maximum singular value of `m` by computing the maximum + length of `m.dot(u)` over all the unit vectors `u` in the (x,y) plane. + We approximate "all" the unit vectors with a large sample. Because + of linearity, we only need the unit vectors with angles in [0, pi]. + + >>> t = np.linspace(0, np.pi, 2000) + >>> u = np.array([np.cos(t), np.sin(t)]) + >>> np.linalg.norm(m.dot(u), axis=0).max() + 4.2809152422538475 + + `p` is a projection matrix with rank 1. With exact arithmetic, + its singular values would be [1, 0, 0, 0]. + + >>> v = np.array([0.1, 0.3, 0.9, 0.3]) + >>> p = np.outer(v, v) + >>> svdvals(p) + array([ 1.00000000e+00, 2.02021698e-17, 1.56692500e-17, + 8.15115104e-34]) + + The singular values of an orthogonal matrix are all 1. Here, we + create a random orthogonal matrix by using the `rvs()` method of + `scipy.stats.ortho_group`. + + >>> from scipy.stats import ortho_group + >>> orth = ortho_group.rvs(4) + >>> svdvals(orth) + array([ 1., 1., 1., 1.]) + + """ + a = _asarray_validated(a, check_finite=check_finite) + if a.size: + return svd(a, compute_uv=0, overwrite_a=overwrite_a, + check_finite=False) + elif len(a.shape) != 2: + raise ValueError('expected matrix') + else: + return numpy.empty(0) + + +def diagsvd(s, M, N): + """ + Construct the sigma matrix in SVD from singular values and size M, N. + + Parameters + ---------- + s : (M,) or (N,) array_like + Singular values + M : int + Size of the matrix whose singular values are `s`. + N : int + Size of the matrix whose singular values are `s`. + + Returns + ------- + S : (M, N) ndarray + The S-matrix in the singular value decomposition + + See Also + -------- + svd : Singular value decomposition of a matrix + svdvals : Compute singular values of a matrix. + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import diagsvd + >>> vals = np.array([1, 2, 3]) # The array representing the computed svd + >>> diagsvd(vals, 3, 4) + array([[1, 0, 0, 0], + [0, 2, 0, 0], + [0, 0, 3, 0]]) + >>> diagsvd(vals, 4, 3) + array([[1, 0, 0], + [0, 2, 0], + [0, 0, 3], + [0, 0, 0]]) + + """ + part = diag(s) + typ = part.dtype.char + MorN = len(s) + if MorN == M: + return numpy.hstack((part, zeros((M, N - M), dtype=typ))) + elif MorN == N: + return r_[part, zeros((M - N, N), dtype=typ)] + else: + raise ValueError("Length of s must be M or N.") + + +# Orthonormal decomposition + +def orth(A, rcond=None): + """ + Construct an orthonormal basis for the range of A using SVD + + Parameters + ---------- + A : (M, N) array_like + Input array + rcond : float, optional + Relative condition number. Singular values ``s`` smaller than + ``rcond * max(s)`` are considered zero. + Default: floating point eps * max(M,N). + + Returns + ------- + Q : (M, K) ndarray + Orthonormal basis for the range of A. + K = effective rank of A, as determined by rcond + + See Also + -------- + svd : Singular value decomposition of a matrix + null_space : Matrix null space + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import orth + >>> A = np.array([[2, 0, 0], [0, 5, 0]]) # rank 2 array + >>> orth(A) + array([[0., 1.], + [1., 0.]]) + >>> orth(A.T) + array([[0., 1.], + [1., 0.], + [0., 0.]]) + + """ + u, s, vh = svd(A, full_matrices=False) + M, N = u.shape[0], vh.shape[1] + if rcond is None: + rcond = numpy.finfo(s.dtype).eps * max(M, N) + tol = numpy.amax(s) * rcond + num = numpy.sum(s > tol, dtype=int) + Q = u[:, :num] + return Q + + +def null_space(A, rcond=None): + """ + Construct an orthonormal basis for the null space of A using SVD + + Parameters + ---------- + A : (M, N) array_like + Input array + rcond : float, optional + Relative condition number. Singular values ``s`` smaller than + ``rcond * max(s)`` are considered zero. + Default: floating point eps * max(M,N). + + Returns + ------- + Z : (N, K) ndarray + Orthonormal basis for the null space of A. + K = dimension of effective null space, as determined by rcond + + See Also + -------- + svd : Singular value decomposition of a matrix + orth : Matrix range + + Examples + -------- + 1-D null space: + + >>> import numpy as np + >>> from scipy.linalg import null_space + >>> A = np.array([[1, 1], [1, 1]]) + >>> ns = null_space(A) + >>> ns * np.copysign(1, ns[0,0]) # Remove the sign ambiguity of the vector + array([[ 0.70710678], + [-0.70710678]]) + + 2-D null space: + + >>> from numpy.random import default_rng + >>> rng = default_rng() + >>> B = rng.random((3, 5)) + >>> Z = null_space(B) + >>> Z.shape + (5, 2) + >>> np.allclose(B.dot(Z), 0) + True + + The basis vectors are orthonormal (up to rounding error): + + >>> Z.T.dot(Z) + array([[ 1.00000000e+00, 6.92087741e-17], + [ 6.92087741e-17, 1.00000000e+00]]) + + """ + u, s, vh = svd(A, full_matrices=True) + M, N = u.shape[0], vh.shape[1] + if rcond is None: + rcond = numpy.finfo(s.dtype).eps * max(M, N) + tol = numpy.amax(s) * rcond + num = numpy.sum(s > tol, dtype=int) + Q = vh[num:,:].T.conj() + return Q + + +def subspace_angles(A, B): + r""" + Compute the subspace angles between two matrices. + + Parameters + ---------- + A : (M, N) array_like + The first input array. + B : (M, K) array_like + The second input array. + + Returns + ------- + angles : ndarray, shape (min(N, K),) + The subspace angles between the column spaces of `A` and `B` in + descending order. + + See Also + -------- + orth + svd + + Notes + ----- + This computes the subspace angles according to the formula + provided in [1]_. For equivalence with MATLAB and Octave behavior, + use ``angles[0]``. + + .. versionadded:: 1.0 + + References + ---------- + .. [1] Knyazev A, Argentati M (2002) Principal Angles between Subspaces + in an A-Based Scalar Product: Algorithms and Perturbation + Estimates. SIAM J. Sci. Comput. 23:2008-2040. + + Examples + -------- + An Hadamard matrix, which has orthogonal columns, so we expect that + the suspace angle to be :math:`\frac{\pi}{2}`: + + >>> import numpy as np + >>> from scipy.linalg import hadamard, subspace_angles + >>> rng = np.random.default_rng() + >>> H = hadamard(4) + >>> print(H) + [[ 1 1 1 1] + [ 1 -1 1 -1] + [ 1 1 -1 -1] + [ 1 -1 -1 1]] + >>> np.rad2deg(subspace_angles(H[:, :2], H[:, 2:])) + array([ 90., 90.]) + + And the subspace angle of a matrix to itself should be zero: + + >>> subspace_angles(H[:, :2], H[:, :2]) <= 2 * np.finfo(float).eps + array([ True, True], dtype=bool) + + The angles between non-orthogonal subspaces are in between these extremes: + + >>> x = rng.standard_normal((4, 3)) + >>> np.rad2deg(subspace_angles(x[:, :2], x[:, [2]])) + array([ 55.832]) # random + """ + # Steps here omit the U and V calculation steps from the paper + + # 1. Compute orthonormal bases of column-spaces + A = _asarray_validated(A, check_finite=True) + if len(A.shape) != 2: + raise ValueError(f'expected 2D array, got shape {A.shape}') + QA = orth(A) + del A + + B = _asarray_validated(B, check_finite=True) + if len(B.shape) != 2: + raise ValueError(f'expected 2D array, got shape {B.shape}') + if len(B) != len(QA): + raise ValueError('A and B must have the same number of rows, got ' + f'{QA.shape[0]} and {B.shape[0]}') + QB = orth(B) + del B + + # 2. Compute SVD for cosine + QA_H_QB = dot(QA.T.conj(), QB) + sigma = svdvals(QA_H_QB) + + # 3. Compute matrix B + if QA.shape[1] >= QB.shape[1]: + B = QB - dot(QA, QA_H_QB) + else: + B = QA - dot(QB, QA_H_QB.T.conj()) + del QA, QB, QA_H_QB + + # 4. Compute SVD for sine + mask = sigma ** 2 >= 0.5 + if mask.any(): + mu_arcsin = arcsin(clip(svdvals(B, overwrite_a=True), -1., 1.)) + else: + mu_arcsin = 0. + + # 5. Compute the principal angles + # with reverse ordering of sigma because smallest sigma belongs to largest + # angle theta + theta = where(mask, mu_arcsin, arccos(clip(sigma[::-1], -1., 1.))) + return theta diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_update.cpython-310-x86_64-linux-gnu.so b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_update.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..ea47d937fd2808a054c12b40093d9197d12519f8 Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/_decomp_update.cpython-310-x86_64-linux-gnu.so differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_expm_frechet.py b/venv/lib/python3.10/site-packages/scipy/linalg/_expm_frechet.py new file mode 100644 index 0000000000000000000000000000000000000000..83d3086872986b2d6606ddbe6bdc5be8de0b95c3 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_expm_frechet.py @@ -0,0 +1,413 @@ +"""Frechet derivative of the matrix exponential.""" +import numpy as np +import scipy.linalg + +__all__ = ['expm_frechet', 'expm_cond'] + + +def expm_frechet(A, E, method=None, compute_expm=True, check_finite=True): + """ + Frechet derivative of the matrix exponential of A in the direction E. + + Parameters + ---------- + A : (N, N) array_like + Matrix of which to take the matrix exponential. + E : (N, N) array_like + Matrix direction in which to take the Frechet derivative. + method : str, optional + Choice of algorithm. Should be one of + + - `SPS` (default) + - `blockEnlarge` + + compute_expm : bool, optional + Whether to compute also `expm_A` in addition to `expm_frechet_AE`. + Default is True. + check_finite : bool, optional + Whether to check that the input matrix contains only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + expm_A : ndarray + Matrix exponential of A. + expm_frechet_AE : ndarray + Frechet derivative of the matrix exponential of A in the direction E. + For ``compute_expm = False``, only `expm_frechet_AE` is returned. + + See Also + -------- + expm : Compute the exponential of a matrix. + + Notes + ----- + This section describes the available implementations that can be selected + by the `method` parameter. The default method is *SPS*. + + Method *blockEnlarge* is a naive algorithm. + + Method *SPS* is Scaling-Pade-Squaring [1]_. + It is a sophisticated implementation which should take + only about 3/8 as much time as the naive implementation. + The asymptotics are the same. + + .. versionadded:: 0.13.0 + + References + ---------- + .. [1] Awad H. Al-Mohy and Nicholas J. Higham (2009) + Computing the Frechet Derivative of the Matrix Exponential, + with an application to Condition Number Estimation. + SIAM Journal On Matrix Analysis and Applications., + 30 (4). pp. 1639-1657. ISSN 1095-7162 + + Examples + -------- + >>> import numpy as np + >>> from scipy import linalg + >>> rng = np.random.default_rng() + + >>> A = rng.standard_normal((3, 3)) + >>> E = rng.standard_normal((3, 3)) + >>> expm_A, expm_frechet_AE = linalg.expm_frechet(A, E) + >>> expm_A.shape, expm_frechet_AE.shape + ((3, 3), (3, 3)) + + Create a 6x6 matrix containing [[A, E], [0, A]]: + + >>> M = np.zeros((6, 6)) + >>> M[:3, :3] = A + >>> M[:3, 3:] = E + >>> M[3:, 3:] = A + + >>> expm_M = linalg.expm(M) + >>> np.allclose(expm_A, expm_M[:3, :3]) + True + >>> np.allclose(expm_frechet_AE, expm_M[:3, 3:]) + True + + """ + if check_finite: + A = np.asarray_chkfinite(A) + E = np.asarray_chkfinite(E) + else: + A = np.asarray(A) + E = np.asarray(E) + if A.ndim != 2 or A.shape[0] != A.shape[1]: + raise ValueError('expected A to be a square matrix') + if E.ndim != 2 or E.shape[0] != E.shape[1]: + raise ValueError('expected E to be a square matrix') + if A.shape != E.shape: + raise ValueError('expected A and E to be the same shape') + if method is None: + method = 'SPS' + if method == 'SPS': + expm_A, expm_frechet_AE = expm_frechet_algo_64(A, E) + elif method == 'blockEnlarge': + expm_A, expm_frechet_AE = expm_frechet_block_enlarge(A, E) + else: + raise ValueError('Unknown implementation %s' % method) + if compute_expm: + return expm_A, expm_frechet_AE + else: + return expm_frechet_AE + + +def expm_frechet_block_enlarge(A, E): + """ + This is a helper function, mostly for testing and profiling. + Return expm(A), frechet(A, E) + """ + n = A.shape[0] + M = np.vstack([ + np.hstack([A, E]), + np.hstack([np.zeros_like(A), A])]) + expm_M = scipy.linalg.expm(M) + return expm_M[:n, :n], expm_M[:n, n:] + + +""" +Maximal values ell_m of ||2**-s A|| such that the backward error bound +does not exceed 2**-53. +""" +ell_table_61 = ( + None, + # 1 + 2.11e-8, + 3.56e-4, + 1.08e-2, + 6.49e-2, + 2.00e-1, + 4.37e-1, + 7.83e-1, + 1.23e0, + 1.78e0, + 2.42e0, + # 11 + 3.13e0, + 3.90e0, + 4.74e0, + 5.63e0, + 6.56e0, + 7.52e0, + 8.53e0, + 9.56e0, + 1.06e1, + 1.17e1, + ) + + +# The b vectors and U and V are copypasted +# from scipy.sparse.linalg.matfuncs.py. +# M, Lu, Lv follow (6.11), (6.12), (6.13), (3.3) + +def _diff_pade3(A, E, ident): + b = (120., 60., 12., 1.) + A2 = A.dot(A) + M2 = np.dot(A, E) + np.dot(E, A) + U = A.dot(b[3]*A2 + b[1]*ident) + V = b[2]*A2 + b[0]*ident + Lu = A.dot(b[3]*M2) + E.dot(b[3]*A2 + b[1]*ident) + Lv = b[2]*M2 + return U, V, Lu, Lv + + +def _diff_pade5(A, E, ident): + b = (30240., 15120., 3360., 420., 30., 1.) + A2 = A.dot(A) + M2 = np.dot(A, E) + np.dot(E, A) + A4 = np.dot(A2, A2) + M4 = np.dot(A2, M2) + np.dot(M2, A2) + U = A.dot(b[5]*A4 + b[3]*A2 + b[1]*ident) + V = b[4]*A4 + b[2]*A2 + b[0]*ident + Lu = (A.dot(b[5]*M4 + b[3]*M2) + + E.dot(b[5]*A4 + b[3]*A2 + b[1]*ident)) + Lv = b[4]*M4 + b[2]*M2 + return U, V, Lu, Lv + + +def _diff_pade7(A, E, ident): + b = (17297280., 8648640., 1995840., 277200., 25200., 1512., 56., 1.) + A2 = A.dot(A) + M2 = np.dot(A, E) + np.dot(E, A) + A4 = np.dot(A2, A2) + M4 = np.dot(A2, M2) + np.dot(M2, A2) + A6 = np.dot(A2, A4) + M6 = np.dot(A4, M2) + np.dot(M4, A2) + U = A.dot(b[7]*A6 + b[5]*A4 + b[3]*A2 + b[1]*ident) + V = b[6]*A6 + b[4]*A4 + b[2]*A2 + b[0]*ident + Lu = (A.dot(b[7]*M6 + b[5]*M4 + b[3]*M2) + + E.dot(b[7]*A6 + b[5]*A4 + b[3]*A2 + b[1]*ident)) + Lv = b[6]*M6 + b[4]*M4 + b[2]*M2 + return U, V, Lu, Lv + + +def _diff_pade9(A, E, ident): + b = (17643225600., 8821612800., 2075673600., 302702400., 30270240., + 2162160., 110880., 3960., 90., 1.) + A2 = A.dot(A) + M2 = np.dot(A, E) + np.dot(E, A) + A4 = np.dot(A2, A2) + M4 = np.dot(A2, M2) + np.dot(M2, A2) + A6 = np.dot(A2, A4) + M6 = np.dot(A4, M2) + np.dot(M4, A2) + A8 = np.dot(A4, A4) + M8 = np.dot(A4, M4) + np.dot(M4, A4) + U = A.dot(b[9]*A8 + b[7]*A6 + b[5]*A4 + b[3]*A2 + b[1]*ident) + V = b[8]*A8 + b[6]*A6 + b[4]*A4 + b[2]*A2 + b[0]*ident + Lu = (A.dot(b[9]*M8 + b[7]*M6 + b[5]*M4 + b[3]*M2) + + E.dot(b[9]*A8 + b[7]*A6 + b[5]*A4 + b[3]*A2 + b[1]*ident)) + Lv = b[8]*M8 + b[6]*M6 + b[4]*M4 + b[2]*M2 + return U, V, Lu, Lv + + +def expm_frechet_algo_64(A, E): + n = A.shape[0] + s = None + ident = np.identity(n) + A_norm_1 = scipy.linalg.norm(A, 1) + m_pade_pairs = ( + (3, _diff_pade3), + (5, _diff_pade5), + (7, _diff_pade7), + (9, _diff_pade9)) + for m, pade in m_pade_pairs: + if A_norm_1 <= ell_table_61[m]: + U, V, Lu, Lv = pade(A, E, ident) + s = 0 + break + if s is None: + # scaling + s = max(0, int(np.ceil(np.log2(A_norm_1 / ell_table_61[13])))) + A = A * 2.0**-s + E = E * 2.0**-s + # pade order 13 + A2 = np.dot(A, A) + M2 = np.dot(A, E) + np.dot(E, A) + A4 = np.dot(A2, A2) + M4 = np.dot(A2, M2) + np.dot(M2, A2) + A6 = np.dot(A2, A4) + M6 = np.dot(A4, M2) + np.dot(M4, A2) + b = (64764752532480000., 32382376266240000., 7771770303897600., + 1187353796428800., 129060195264000., 10559470521600., + 670442572800., 33522128640., 1323241920., 40840800., 960960., + 16380., 182., 1.) + W1 = b[13]*A6 + b[11]*A4 + b[9]*A2 + W2 = b[7]*A6 + b[5]*A4 + b[3]*A2 + b[1]*ident + Z1 = b[12]*A6 + b[10]*A4 + b[8]*A2 + Z2 = b[6]*A6 + b[4]*A4 + b[2]*A2 + b[0]*ident + W = np.dot(A6, W1) + W2 + U = np.dot(A, W) + V = np.dot(A6, Z1) + Z2 + Lw1 = b[13]*M6 + b[11]*M4 + b[9]*M2 + Lw2 = b[7]*M6 + b[5]*M4 + b[3]*M2 + Lz1 = b[12]*M6 + b[10]*M4 + b[8]*M2 + Lz2 = b[6]*M6 + b[4]*M4 + b[2]*M2 + Lw = np.dot(A6, Lw1) + np.dot(M6, W1) + Lw2 + Lu = np.dot(A, Lw) + np.dot(E, W) + Lv = np.dot(A6, Lz1) + np.dot(M6, Z1) + Lz2 + # factor once and solve twice + lu_piv = scipy.linalg.lu_factor(-U + V) + R = scipy.linalg.lu_solve(lu_piv, U + V) + L = scipy.linalg.lu_solve(lu_piv, Lu + Lv + np.dot((Lu - Lv), R)) + # squaring + for k in range(s): + L = np.dot(R, L) + np.dot(L, R) + R = np.dot(R, R) + return R, L + + +def vec(M): + """ + Stack columns of M to construct a single vector. + + This is somewhat standard notation in linear algebra. + + Parameters + ---------- + M : 2-D array_like + Input matrix + + Returns + ------- + v : 1-D ndarray + Output vector + + """ + return M.T.ravel() + + +def expm_frechet_kronform(A, method=None, check_finite=True): + """ + Construct the Kronecker form of the Frechet derivative of expm. + + Parameters + ---------- + A : array_like with shape (N, N) + Matrix to be expm'd. + method : str, optional + Extra keyword to be passed to expm_frechet. + check_finite : bool, optional + Whether to check that the input matrix contains only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + K : 2-D ndarray with shape (N*N, N*N) + Kronecker form of the Frechet derivative of the matrix exponential. + + Notes + ----- + This function is used to help compute the condition number + of the matrix exponential. + + See Also + -------- + expm : Compute a matrix exponential. + expm_frechet : Compute the Frechet derivative of the matrix exponential. + expm_cond : Compute the relative condition number of the matrix exponential + in the Frobenius norm. + + """ + if check_finite: + A = np.asarray_chkfinite(A) + else: + A = np.asarray(A) + if len(A.shape) != 2 or A.shape[0] != A.shape[1]: + raise ValueError('expected a square matrix') + + n = A.shape[0] + ident = np.identity(n) + cols = [] + for i in range(n): + for j in range(n): + E = np.outer(ident[i], ident[j]) + F = expm_frechet(A, E, + method=method, compute_expm=False, check_finite=False) + cols.append(vec(F)) + return np.vstack(cols).T + + +def expm_cond(A, check_finite=True): + """ + Relative condition number of the matrix exponential in the Frobenius norm. + + Parameters + ---------- + A : 2-D array_like + Square input matrix with shape (N, N). + check_finite : bool, optional + Whether to check that the input matrix contains only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + kappa : float + The relative condition number of the matrix exponential + in the Frobenius norm + + See Also + -------- + expm : Compute the exponential of a matrix. + expm_frechet : Compute the Frechet derivative of the matrix exponential. + + Notes + ----- + A faster estimate for the condition number in the 1-norm + has been published but is not yet implemented in SciPy. + + .. versionadded:: 0.14.0 + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import expm_cond + >>> A = np.array([[-0.3, 0.2, 0.6], [0.6, 0.3, -0.1], [-0.7, 1.2, 0.9]]) + >>> k = expm_cond(A) + >>> k + 1.7787805864469866 + + """ + if check_finite: + A = np.asarray_chkfinite(A) + else: + A = np.asarray(A) + if len(A.shape) != 2 or A.shape[0] != A.shape[1]: + raise ValueError('expected a square matrix') + + X = scipy.linalg.expm(A) + K = expm_frechet_kronform(A, check_finite=False) + + # The following norm choices are deliberate. + # The norms of A and X are Frobenius norms, + # and the norm of K is the induced 2-norm. + A_norm = scipy.linalg.norm(A, 'fro') + X_norm = scipy.linalg.norm(X, 'fro') + K_norm = scipy.linalg.norm(K, 2) + + kappa = (K_norm * A_norm) / X_norm + return kappa diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_fblas.cpython-310-x86_64-linux-gnu.so b/venv/lib/python3.10/site-packages/scipy/linalg/_fblas.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..b9163e3028fd64471a97c8d1af59366245cbd8b1 Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/_fblas.cpython-310-x86_64-linux-gnu.so differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_interpolative.cpython-310-x86_64-linux-gnu.so b/venv/lib/python3.10/site-packages/scipy/linalg/_interpolative.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..342561d85bbdceb7f5d7ea9bcf4f81450c099329 Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/_interpolative.cpython-310-x86_64-linux-gnu.so differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_interpolative_backend.py b/venv/lib/python3.10/site-packages/scipy/linalg/_interpolative_backend.py new file mode 100644 index 0000000000000000000000000000000000000000..7835314f79c132c4fdc927186b3282347d681792 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_interpolative_backend.py @@ -0,0 +1,1681 @@ +#****************************************************************************** +# Copyright (C) 2013 Kenneth L. Ho +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. Redistributions in binary +# form must reproduce the above copyright notice, this list of conditions and +# the following disclaimer in the documentation and/or other materials +# provided with the distribution. +# +# None of the names of the copyright holders may be used to endorse or +# promote products derived from this software without specific prior written +# permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +#****************************************************************************** + +""" +Direct wrappers for Fortran `id_dist` backend. +""" + +import scipy.linalg._interpolative as _id +import numpy as np + +_RETCODE_ERROR = RuntimeError("nonzero return code") + + +def _asfortranarray_copy(A): + """ + Same as np.asfortranarray, but ensure a copy + """ + A = np.asarray(A) + if A.flags.f_contiguous: + A = A.copy(order="F") + else: + A = np.asfortranarray(A) + return A + + +#------------------------------------------------------------------------------ +# id_rand.f +#------------------------------------------------------------------------------ + +def id_srand(n): + """ + Generate standard uniform pseudorandom numbers via a very efficient lagged + Fibonacci method. + + :param n: + Number of pseudorandom numbers to generate. + :type n: int + + :return: + Pseudorandom numbers. + :rtype: :class:`numpy.ndarray` + """ + return _id.id_srand(n) + + +def id_srandi(t): + """ + Initialize seed values for :func:`id_srand` (any appropriately random + numbers will do). + + :param t: + Array of 55 seed values. + :type t: :class:`numpy.ndarray` + """ + t = np.asfortranarray(t) + _id.id_srandi(t) + + +def id_srando(): + """ + Reset seed values to their original values. + """ + _id.id_srando() + + +#------------------------------------------------------------------------------ +# idd_frm.f +#------------------------------------------------------------------------------ + +def idd_frm(n, w, x): + """ + Transform real vector via a composition of Rokhlin's random transform, + random subselection, and an FFT. + + In contrast to :func:`idd_sfrm`, this routine works best when the length of + the transformed vector is the power-of-two integer output by + :func:`idd_frmi`, or when the length is not specified but instead + determined a posteriori from the output. The returned transformed vector is + randomly permuted. + + :param n: + Greatest power-of-two integer satisfying `n <= x.size` as obtained from + :func:`idd_frmi`; `n` is also the length of the output vector. + :type n: int + :param w: + Initialization array constructed by :func:`idd_frmi`. + :type w: :class:`numpy.ndarray` + :param x: + Vector to be transformed. + :type x: :class:`numpy.ndarray` + + :return: + Transformed vector. + :rtype: :class:`numpy.ndarray` + """ + return _id.idd_frm(n, w, x) + + +def idd_sfrm(l, n, w, x): + """ + Transform real vector via a composition of Rokhlin's random transform, + random subselection, and an FFT. + + In contrast to :func:`idd_frm`, this routine works best when the length of + the transformed vector is known a priori. + + :param l: + Length of transformed vector, satisfying `l <= n`. + :type l: int + :param n: + Greatest power-of-two integer satisfying `n <= x.size` as obtained from + :func:`idd_sfrmi`. + :type n: int + :param w: + Initialization array constructed by :func:`idd_sfrmi`. + :type w: :class:`numpy.ndarray` + :param x: + Vector to be transformed. + :type x: :class:`numpy.ndarray` + + :return: + Transformed vector. + :rtype: :class:`numpy.ndarray` + """ + return _id.idd_sfrm(l, n, w, x) + + +def idd_frmi(m): + """ + Initialize data for :func:`idd_frm`. + + :param m: + Length of vector to be transformed. + :type m: int + + :return: + Greatest power-of-two integer `n` satisfying `n <= m`. + :rtype: int + :return: + Initialization array to be used by :func:`idd_frm`. + :rtype: :class:`numpy.ndarray` + """ + return _id.idd_frmi(m) + + +def idd_sfrmi(l, m): + """ + Initialize data for :func:`idd_sfrm`. + + :param l: + Length of output transformed vector. + :type l: int + :param m: + Length of the vector to be transformed. + :type m: int + + :return: + Greatest power-of-two integer `n` satisfying `n <= m`. + :rtype: int + :return: + Initialization array to be used by :func:`idd_sfrm`. + :rtype: :class:`numpy.ndarray` + """ + return _id.idd_sfrmi(l, m) + + +#------------------------------------------------------------------------------ +# idd_id.f +#------------------------------------------------------------------------------ + +def iddp_id(eps, A): + """ + Compute ID of a real matrix to a specified relative precision. + + :param eps: + Relative precision. + :type eps: float + :param A: + Matrix. + :type A: :class:`numpy.ndarray` + + :return: + Rank of ID. + :rtype: int + :return: + Column index array. + :rtype: :class:`numpy.ndarray` + :return: + Interpolation coefficients. + :rtype: :class:`numpy.ndarray` + """ + A = _asfortranarray_copy(A) + k, idx, rnorms = _id.iddp_id(eps, A) + n = A.shape[1] + proj = A.T.ravel()[:k*(n-k)].reshape((k, n-k), order='F') + return k, idx, proj + + +def iddr_id(A, k): + """ + Compute ID of a real matrix to a specified rank. + + :param A: + Matrix. + :type A: :class:`numpy.ndarray` + :param k: + Rank of ID. + :type k: int + + :return: + Column index array. + :rtype: :class:`numpy.ndarray` + :return: + Interpolation coefficients. + :rtype: :class:`numpy.ndarray` + """ + A = _asfortranarray_copy(A) + idx, rnorms = _id.iddr_id(A, k) + n = A.shape[1] + proj = A.T.ravel()[:k*(n-k)].reshape((k, n-k), order='F') + return idx, proj + + +def idd_reconid(B, idx, proj): + """ + Reconstruct matrix from real ID. + + :param B: + Skeleton matrix. + :type B: :class:`numpy.ndarray` + :param idx: + Column index array. + :type idx: :class:`numpy.ndarray` + :param proj: + Interpolation coefficients. + :type proj: :class:`numpy.ndarray` + + :return: + Reconstructed matrix. + :rtype: :class:`numpy.ndarray` + """ + B = np.asfortranarray(B) + if proj.size > 0: + return _id.idd_reconid(B, idx, proj) + else: + return B[:, np.argsort(idx)] + + +def idd_reconint(idx, proj): + """ + Reconstruct interpolation matrix from real ID. + + :param idx: + Column index array. + :type idx: :class:`numpy.ndarray` + :param proj: + Interpolation coefficients. + :type proj: :class:`numpy.ndarray` + + :return: + Interpolation matrix. + :rtype: :class:`numpy.ndarray` + """ + return _id.idd_reconint(idx, proj) + + +def idd_copycols(A, k, idx): + """ + Reconstruct skeleton matrix from real ID. + + :param A: + Original matrix. + :type A: :class:`numpy.ndarray` + :param k: + Rank of ID. + :type k: int + :param idx: + Column index array. + :type idx: :class:`numpy.ndarray` + + :return: + Skeleton matrix. + :rtype: :class:`numpy.ndarray` + """ + A = np.asfortranarray(A) + return _id.idd_copycols(A, k, idx) + + +#------------------------------------------------------------------------------ +# idd_id2svd.f +#------------------------------------------------------------------------------ + +def idd_id2svd(B, idx, proj): + """ + Convert real ID to SVD. + + :param B: + Skeleton matrix. + :type B: :class:`numpy.ndarray` + :param idx: + Column index array. + :type idx: :class:`numpy.ndarray` + :param proj: + Interpolation coefficients. + :type proj: :class:`numpy.ndarray` + + :return: + Left singular vectors. + :rtype: :class:`numpy.ndarray` + :return: + Right singular vectors. + :rtype: :class:`numpy.ndarray` + :return: + Singular values. + :rtype: :class:`numpy.ndarray` + """ + B = np.asfortranarray(B) + U, V, S, ier = _id.idd_id2svd(B, idx, proj) + if ier: + raise _RETCODE_ERROR + return U, V, S + + +#------------------------------------------------------------------------------ +# idd_snorm.f +#------------------------------------------------------------------------------ + +def idd_snorm(m, n, matvect, matvec, its=20): + """ + Estimate spectral norm of a real matrix by the randomized power method. + + :param m: + Matrix row dimension. + :type m: int + :param n: + Matrix column dimension. + :type n: int + :param matvect: + Function to apply the matrix transpose to a vector, with call signature + `y = matvect(x)`, where `x` and `y` are the input and output vectors, + respectively. + :type matvect: function + :param matvec: + Function to apply the matrix to a vector, with call signature + `y = matvec(x)`, where `x` and `y` are the input and output vectors, + respectively. + :type matvec: function + :param its: + Number of power method iterations. + :type its: int + + :return: + Spectral norm estimate. + :rtype: float + """ + snorm, v = _id.idd_snorm(m, n, matvect, matvec, its) + return snorm + + +def idd_diffsnorm(m, n, matvect, matvect2, matvec, matvec2, its=20): + """ + Estimate spectral norm of the difference of two real matrices by the + randomized power method. + + :param m: + Matrix row dimension. + :type m: int + :param n: + Matrix column dimension. + :type n: int + :param matvect: + Function to apply the transpose of the first matrix to a vector, with + call signature `y = matvect(x)`, where `x` and `y` are the input and + output vectors, respectively. + :type matvect: function + :param matvect2: + Function to apply the transpose of the second matrix to a vector, with + call signature `y = matvect2(x)`, where `x` and `y` are the input and + output vectors, respectively. + :type matvect2: function + :param matvec: + Function to apply the first matrix to a vector, with call signature + `y = matvec(x)`, where `x` and `y` are the input and output vectors, + respectively. + :type matvec: function + :param matvec2: + Function to apply the second matrix to a vector, with call signature + `y = matvec2(x)`, where `x` and `y` are the input and output vectors, + respectively. + :type matvec2: function + :param its: + Number of power method iterations. + :type its: int + + :return: + Spectral norm estimate of matrix difference. + :rtype: float + """ + return _id.idd_diffsnorm(m, n, matvect, matvect2, matvec, matvec2, its) + + +#------------------------------------------------------------------------------ +# idd_svd.f +#------------------------------------------------------------------------------ + +def iddr_svd(A, k): + """ + Compute SVD of a real matrix to a specified rank. + + :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` + """ + A = np.asfortranarray(A) + U, V, S, ier = _id.iddr_svd(A, k) + if ier: + raise _RETCODE_ERROR + return U, V, S + + +def iddp_svd(eps, A): + """ + Compute SVD of a real matrix to a specified relative precision. + + :param eps: + Relative precision. + :type eps: float + :param A: + Matrix. + :type A: :class:`numpy.ndarray` + + :return: + Left singular vectors. + :rtype: :class:`numpy.ndarray` + :return: + Right singular vectors. + :rtype: :class:`numpy.ndarray` + :return: + Singular values. + :rtype: :class:`numpy.ndarray` + """ + A = np.asfortranarray(A) + m, n = A.shape + k, iU, iV, iS, w, ier = _id.iddp_svd(eps, A) + if ier: + raise _RETCODE_ERROR + U = w[iU-1:iU+m*k-1].reshape((m, k), order='F') + V = w[iV-1:iV+n*k-1].reshape((n, k), order='F') + S = w[iS-1:iS+k-1] + return U, V, S + + +#------------------------------------------------------------------------------ +# iddp_aid.f +#------------------------------------------------------------------------------ + +def iddp_aid(eps, A): + """ + Compute ID of a real matrix to a specified relative precision using random + sampling. + + :param eps: + Relative precision. + :type eps: float + :param A: + Matrix. + :type A: :class:`numpy.ndarray` + + :return: + Rank of ID. + :rtype: int + :return: + Column index array. + :rtype: :class:`numpy.ndarray` + :return: + Interpolation coefficients. + :rtype: :class:`numpy.ndarray` + """ + A = np.asfortranarray(A) + m, n = A.shape + n2, w = idd_frmi(m) + proj = np.empty(n*(2*n2 + 1) + n2 + 1, order='F') + k, idx, proj = _id.iddp_aid(eps, A, w, proj) + proj = proj[:k*(n-k)].reshape((k, n-k), order='F') + return k, idx, proj + + +def idd_estrank(eps, A): + """ + Estimate rank of a real matrix to a specified relative precision using + random sampling. + + The output rank is typically about 8 higher than the actual rank. + + :param eps: + Relative precision. + :type eps: float + :param A: + Matrix. + :type A: :class:`numpy.ndarray` + + :return: + Rank estimate. + :rtype: int + """ + A = np.asfortranarray(A) + m, n = A.shape + n2, w = idd_frmi(m) + ra = np.empty(n*n2 + (n + 1)*(n2 + 1), order='F') + k, ra = _id.idd_estrank(eps, A, w, ra) + return k + + +#------------------------------------------------------------------------------ +# iddp_asvd.f +#------------------------------------------------------------------------------ + +def iddp_asvd(eps, A): + """ + Compute SVD of a real matrix to a specified relative precision using random + sampling. + + :param eps: + Relative precision. + :type eps: float + :param A: + Matrix. + :type A: :class:`numpy.ndarray` + + :return: + Left singular vectors. + :rtype: :class:`numpy.ndarray` + :return: + Right singular vectors. + :rtype: :class:`numpy.ndarray` + :return: + Singular values. + :rtype: :class:`numpy.ndarray` + """ + A = np.asfortranarray(A) + m, n = A.shape + n2, winit = _id.idd_frmi(m) + w = np.empty( + max((min(m, n) + 1)*(3*m + 5*n + 1) + 25*min(m, n)**2, + (2*n + 1)*(n2 + 1)), + order='F') + k, iU, iV, iS, w, ier = _id.iddp_asvd(eps, A, winit, w) + if ier: + raise _RETCODE_ERROR + U = w[iU-1:iU+m*k-1].reshape((m, k), order='F') + V = w[iV-1:iV+n*k-1].reshape((n, k), order='F') + S = w[iS-1:iS+k-1] + return U, V, S + + +#------------------------------------------------------------------------------ +# iddp_rid.f +#------------------------------------------------------------------------------ + +def iddp_rid(eps, m, n, matvect): + """ + Compute ID of a real matrix to a specified relative precision using random + matrix-vector multiplication. + + :param eps: + Relative precision. + :type eps: float + :param m: + Matrix row dimension. + :type m: int + :param n: + Matrix column dimension. + :type n: int + :param matvect: + Function to apply the matrix transpose to a vector, with call signature + `y = matvect(x)`, where `x` and `y` are the input and output vectors, + respectively. + :type matvect: function + + :return: + Rank of ID. + :rtype: int + :return: + Column index array. + :rtype: :class:`numpy.ndarray` + :return: + Interpolation coefficients. + :rtype: :class:`numpy.ndarray` + """ + proj = np.empty(m + 1 + 2*n*(min(m, n) + 1), order='F') + k, idx, proj, ier = _id.iddp_rid(eps, m, n, matvect, proj) + if ier != 0: + raise _RETCODE_ERROR + proj = proj[:k*(n-k)].reshape((k, n-k), order='F') + return k, idx, proj + + +def idd_findrank(eps, m, n, matvect): + """ + Estimate rank of a real matrix to a specified relative precision using + random matrix-vector multiplication. + + :param eps: + Relative precision. + :type eps: float + :param m: + Matrix row dimension. + :type m: int + :param n: + Matrix column dimension. + :type n: int + :param matvect: + Function to apply the matrix transpose to a vector, with call signature + `y = matvect(x)`, where `x` and `y` are the input and output vectors, + respectively. + :type matvect: function + + :return: + Rank estimate. + :rtype: int + """ + k, ra, ier = _id.idd_findrank(eps, m, n, matvect) + if ier: + raise _RETCODE_ERROR + return k + + +#------------------------------------------------------------------------------ +# iddp_rsvd.f +#------------------------------------------------------------------------------ + +def iddp_rsvd(eps, m, n, matvect, matvec): + """ + Compute SVD of a real matrix to a specified relative precision using random + matrix-vector multiplication. + + :param eps: + Relative precision. + :type eps: float + :param m: + Matrix row dimension. + :type m: int + :param n: + Matrix column dimension. + :type n: int + :param matvect: + Function to apply the matrix transpose to a vector, with call signature + `y = matvect(x)`, where `x` and `y` are the input and output vectors, + respectively. + :type matvect: function + :param matvec: + Function to apply the matrix to a vector, with call signature + `y = matvec(x)`, where `x` and `y` are the input and output vectors, + respectively. + :type matvec: function + + :return: + Left singular vectors. + :rtype: :class:`numpy.ndarray` + :return: + Right singular vectors. + :rtype: :class:`numpy.ndarray` + :return: + Singular values. + :rtype: :class:`numpy.ndarray` + """ + k, iU, iV, iS, w, ier = _id.iddp_rsvd(eps, m, n, matvect, matvec) + if ier: + raise _RETCODE_ERROR + U = w[iU-1:iU+m*k-1].reshape((m, k), order='F') + V = w[iV-1:iV+n*k-1].reshape((n, k), order='F') + S = w[iS-1:iS+k-1] + return U, V, S + + +#------------------------------------------------------------------------------ +# iddr_aid.f +#------------------------------------------------------------------------------ + +def iddr_aid(A, k): + """ + Compute ID of a real matrix to a specified rank using random sampling. + + :param A: + Matrix. + :type A: :class:`numpy.ndarray` + :param k: + Rank of ID. + :type k: int + + :return: + Column index array. + :rtype: :class:`numpy.ndarray` + :return: + Interpolation coefficients. + :rtype: :class:`numpy.ndarray` + """ + A = np.asfortranarray(A) + m, n = A.shape + w = iddr_aidi(m, n, k) + idx, proj = _id.iddr_aid(A, k, w) + if k == n: + proj = np.empty((k, n-k), dtype='float64', order='F') + else: + proj = proj.reshape((k, n-k), order='F') + return idx, proj + + +def iddr_aidi(m, n, k): + """ + Initialize array for :func:`iddr_aid`. + + :param m: + Matrix row dimension. + :type m: int + :param n: + Matrix column dimension. + :type n: int + :param k: + Rank of ID. + :type k: int + + :return: + Initialization array to be used by :func:`iddr_aid`. + :rtype: :class:`numpy.ndarray` + """ + return _id.iddr_aidi(m, n, k) + + +#------------------------------------------------------------------------------ +# iddr_asvd.f +#------------------------------------------------------------------------------ + +def iddr_asvd(A, k): + """ + 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` + """ + A = np.asfortranarray(A) + m, n = A.shape + w = np.empty((2*k + 28)*m + (6*k + 21)*n + 25*k**2 + 100, order='F') + w_ = iddr_aidi(m, n, k) + w[:w_.size] = w_ + U, V, S, ier = _id.iddr_asvd(A, k, w) + if ier != 0: + raise _RETCODE_ERROR + return U, V, S + + +#------------------------------------------------------------------------------ +# iddr_rid.f +#------------------------------------------------------------------------------ + +def iddr_rid(m, n, matvect, k): + """ + Compute ID of a real matrix to a specified rank using random matrix-vector + multiplication. + + :param m: + Matrix row dimension. + :type m: int + :param n: + Matrix column dimension. + :type n: int + :param matvect: + Function to apply the matrix transpose to a vector, with call signature + `y = matvect(x)`, where `x` and `y` are the input and output vectors, + respectively. + :type matvect: function + :param k: + Rank of ID. + :type k: int + + :return: + Column index array. + :rtype: :class:`numpy.ndarray` + :return: + Interpolation coefficients. + :rtype: :class:`numpy.ndarray` + """ + idx, proj = _id.iddr_rid(m, n, matvect, k) + proj = proj[:k*(n-k)].reshape((k, n-k), order='F') + return idx, proj + + +#------------------------------------------------------------------------------ +# iddr_rsvd.f +#------------------------------------------------------------------------------ + +def iddr_rsvd(m, n, matvect, matvec, k): + """ + Compute SVD of a real matrix to a specified rank using random matrix-vector + multiplication. + + :param m: + Matrix row dimension. + :type m: int + :param n: + Matrix column dimension. + :type n: int + :param matvect: + Function to apply the matrix transpose to a vector, with call signature + `y = matvect(x)`, where `x` and `y` are the input and output vectors, + respectively. + :type matvect: function + :param matvec: + Function to apply the matrix to a vector, with call signature + `y = matvec(x)`, where `x` and `y` are the input and output vectors, + respectively. + :type matvec: function + :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` + """ + U, V, S, ier = _id.iddr_rsvd(m, n, matvect, matvec, k) + if ier != 0: + raise _RETCODE_ERROR + return U, V, S + + +#------------------------------------------------------------------------------ +# idz_frm.f +#------------------------------------------------------------------------------ + +def idz_frm(n, w, x): + """ + Transform complex vector via a composition of Rokhlin's random transform, + random subselection, and an FFT. + + In contrast to :func:`idz_sfrm`, this routine works best when the length of + the transformed vector is the power-of-two integer output by + :func:`idz_frmi`, or when the length is not specified but instead + determined a posteriori from the output. The returned transformed vector is + randomly permuted. + + :param n: + Greatest power-of-two integer satisfying `n <= x.size` as obtained from + :func:`idz_frmi`; `n` is also the length of the output vector. + :type n: int + :param w: + Initialization array constructed by :func:`idz_frmi`. + :type w: :class:`numpy.ndarray` + :param x: + Vector to be transformed. + :type x: :class:`numpy.ndarray` + + :return: + Transformed vector. + :rtype: :class:`numpy.ndarray` + """ + return _id.idz_frm(n, w, x) + + +def idz_sfrm(l, n, w, x): + """ + Transform complex vector via a composition of Rokhlin's random transform, + random subselection, and an FFT. + + In contrast to :func:`idz_frm`, this routine works best when the length of + the transformed vector is known a priori. + + :param l: + Length of transformed vector, satisfying `l <= n`. + :type l: int + :param n: + Greatest power-of-two integer satisfying `n <= x.size` as obtained from + :func:`idz_sfrmi`. + :type n: int + :param w: + Initialization array constructed by :func:`idd_sfrmi`. + :type w: :class:`numpy.ndarray` + :param x: + Vector to be transformed. + :type x: :class:`numpy.ndarray` + + :return: + Transformed vector. + :rtype: :class:`numpy.ndarray` + """ + return _id.idz_sfrm(l, n, w, x) + + +def idz_frmi(m): + """ + Initialize data for :func:`idz_frm`. + + :param m: + Length of vector to be transformed. + :type m: int + + :return: + Greatest power-of-two integer `n` satisfying `n <= m`. + :rtype: int + :return: + Initialization array to be used by :func:`idz_frm`. + :rtype: :class:`numpy.ndarray` + """ + return _id.idz_frmi(m) + + +def idz_sfrmi(l, m): + """ + Initialize data for :func:`idz_sfrm`. + + :param l: + Length of output transformed vector. + :type l: int + :param m: + Length of the vector to be transformed. + :type m: int + + :return: + Greatest power-of-two integer `n` satisfying `n <= m`. + :rtype: int + :return: + Initialization array to be used by :func:`idz_sfrm`. + :rtype: :class:`numpy.ndarray` + """ + return _id.idz_sfrmi(l, m) + + +#------------------------------------------------------------------------------ +# idz_id.f +#------------------------------------------------------------------------------ + +def idzp_id(eps, A): + """ + Compute ID of a complex matrix to a specified relative precision. + + :param eps: + Relative precision. + :type eps: float + :param A: + Matrix. + :type A: :class:`numpy.ndarray` + + :return: + Rank of ID. + :rtype: int + :return: + Column index array. + :rtype: :class:`numpy.ndarray` + :return: + Interpolation coefficients. + :rtype: :class:`numpy.ndarray` + """ + A = _asfortranarray_copy(A) + k, idx, rnorms = _id.idzp_id(eps, A) + n = A.shape[1] + proj = A.T.ravel()[:k*(n-k)].reshape((k, n-k), order='F') + return k, idx, proj + + +def idzr_id(A, k): + """ + Compute ID of a complex matrix to a specified rank. + + :param A: + Matrix. + :type A: :class:`numpy.ndarray` + :param k: + Rank of ID. + :type k: int + + :return: + Column index array. + :rtype: :class:`numpy.ndarray` + :return: + Interpolation coefficients. + :rtype: :class:`numpy.ndarray` + """ + A = _asfortranarray_copy(A) + idx, rnorms = _id.idzr_id(A, k) + n = A.shape[1] + proj = A.T.ravel()[:k*(n-k)].reshape((k, n-k), order='F') + return idx, proj + + +def idz_reconid(B, idx, proj): + """ + Reconstruct matrix from complex ID. + + :param B: + Skeleton matrix. + :type B: :class:`numpy.ndarray` + :param idx: + Column index array. + :type idx: :class:`numpy.ndarray` + :param proj: + Interpolation coefficients. + :type proj: :class:`numpy.ndarray` + + :return: + Reconstructed matrix. + :rtype: :class:`numpy.ndarray` + """ + B = np.asfortranarray(B) + if proj.size > 0: + return _id.idz_reconid(B, idx, proj) + else: + return B[:, np.argsort(idx)] + + +def idz_reconint(idx, proj): + """ + Reconstruct interpolation matrix from complex ID. + + :param idx: + Column index array. + :type idx: :class:`numpy.ndarray` + :param proj: + Interpolation coefficients. + :type proj: :class:`numpy.ndarray` + + :return: + Interpolation matrix. + :rtype: :class:`numpy.ndarray` + """ + return _id.idz_reconint(idx, proj) + + +def idz_copycols(A, k, idx): + """ + Reconstruct skeleton matrix from complex ID. + + :param A: + Original matrix. + :type A: :class:`numpy.ndarray` + :param k: + Rank of ID. + :type k: int + :param idx: + Column index array. + :type idx: :class:`numpy.ndarray` + + :return: + Skeleton matrix. + :rtype: :class:`numpy.ndarray` + """ + A = np.asfortranarray(A) + return _id.idz_copycols(A, k, idx) + + +#------------------------------------------------------------------------------ +# idz_id2svd.f +#------------------------------------------------------------------------------ + +def idz_id2svd(B, idx, proj): + """ + Convert complex ID to SVD. + + :param B: + Skeleton matrix. + :type B: :class:`numpy.ndarray` + :param idx: + Column index array. + :type idx: :class:`numpy.ndarray` + :param proj: + Interpolation coefficients. + :type proj: :class:`numpy.ndarray` + + :return: + Left singular vectors. + :rtype: :class:`numpy.ndarray` + :return: + Right singular vectors. + :rtype: :class:`numpy.ndarray` + :return: + Singular values. + :rtype: :class:`numpy.ndarray` + """ + B = np.asfortranarray(B) + U, V, S, ier = _id.idz_id2svd(B, idx, proj) + if ier: + raise _RETCODE_ERROR + return U, V, S + + +#------------------------------------------------------------------------------ +# idz_snorm.f +#------------------------------------------------------------------------------ + +def idz_snorm(m, n, matveca, matvec, its=20): + """ + Estimate spectral norm of a complex matrix by the randomized power method. + + :param m: + Matrix row dimension. + :type m: int + :param n: + Matrix column dimension. + :type n: int + :param matveca: + Function to apply the matrix adjoint to a vector, with call signature + `y = matveca(x)`, where `x` and `y` are the input and output vectors, + respectively. + :type matveca: function + :param matvec: + Function to apply the matrix to a vector, with call signature + `y = matvec(x)`, where `x` and `y` are the input and output vectors, + respectively. + :type matvec: function + :param its: + Number of power method iterations. + :type its: int + + :return: + Spectral norm estimate. + :rtype: float + """ + snorm, v = _id.idz_snorm(m, n, matveca, matvec, its) + return snorm + + +def idz_diffsnorm(m, n, matveca, matveca2, matvec, matvec2, its=20): + """ + Estimate spectral norm of the difference of two complex matrices by the + randomized power method. + + :param m: + Matrix row dimension. + :type m: int + :param n: + Matrix column dimension. + :type n: int + :param matveca: + Function to apply the adjoint of the first matrix to a vector, with + call signature `y = matveca(x)`, where `x` and `y` are the input and + output vectors, respectively. + :type matveca: function + :param matveca2: + Function to apply the adjoint of the second matrix to a vector, with + call signature `y = matveca2(x)`, where `x` and `y` are the input and + output vectors, respectively. + :type matveca2: function + :param matvec: + Function to apply the first matrix to a vector, with call signature + `y = matvec(x)`, where `x` and `y` are the input and output vectors, + respectively. + :type matvec: function + :param matvec2: + Function to apply the second matrix to a vector, with call signature + `y = matvec2(x)`, where `x` and `y` are the input and output vectors, + respectively. + :type matvec2: function + :param its: + Number of power method iterations. + :type its: int + + :return: + Spectral norm estimate of matrix difference. + :rtype: float + """ + return _id.idz_diffsnorm(m, n, matveca, matveca2, matvec, matvec2, its) + + +#------------------------------------------------------------------------------ +# idz_svd.f +#------------------------------------------------------------------------------ + +def idzr_svd(A, k): + """ + Compute SVD of a complex matrix to a specified rank. + + :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` + """ + A = np.asfortranarray(A) + U, V, S, ier = _id.idzr_svd(A, k) + if ier: + raise _RETCODE_ERROR + return U, V, S + + +def idzp_svd(eps, A): + """ + Compute SVD of a complex matrix to a specified relative precision. + + :param eps: + Relative precision. + :type eps: float + :param A: + Matrix. + :type A: :class:`numpy.ndarray` + + :return: + Left singular vectors. + :rtype: :class:`numpy.ndarray` + :return: + Right singular vectors. + :rtype: :class:`numpy.ndarray` + :return: + Singular values. + :rtype: :class:`numpy.ndarray` + """ + A = np.asfortranarray(A) + m, n = A.shape + k, iU, iV, iS, w, ier = _id.idzp_svd(eps, A) + if ier: + raise _RETCODE_ERROR + U = w[iU-1:iU+m*k-1].reshape((m, k), order='F') + V = w[iV-1:iV+n*k-1].reshape((n, k), order='F') + S = w[iS-1:iS+k-1] + return U, V, S + + +#------------------------------------------------------------------------------ +# idzp_aid.f +#------------------------------------------------------------------------------ + +def idzp_aid(eps, A): + """ + Compute ID of a complex matrix to a specified relative precision using + random sampling. + + :param eps: + Relative precision. + :type eps: float + :param A: + Matrix. + :type A: :class:`numpy.ndarray` + + :return: + Rank of ID. + :rtype: int + :return: + Column index array. + :rtype: :class:`numpy.ndarray` + :return: + Interpolation coefficients. + :rtype: :class:`numpy.ndarray` + """ + A = np.asfortranarray(A) + m, n = A.shape + n2, w = idz_frmi(m) + proj = np.empty(n*(2*n2 + 1) + n2 + 1, dtype='complex128', order='F') + k, idx, proj = _id.idzp_aid(eps, A, w, proj) + proj = proj[:k*(n-k)].reshape((k, n-k), order='F') + return k, idx, proj + + +def idz_estrank(eps, A): + """ + Estimate rank of a complex matrix to a specified relative precision using + random sampling. + + The output rank is typically about 8 higher than the actual rank. + + :param eps: + Relative precision. + :type eps: float + :param A: + Matrix. + :type A: :class:`numpy.ndarray` + + :return: + Rank estimate. + :rtype: int + """ + A = np.asfortranarray(A) + m, n = A.shape + n2, w = idz_frmi(m) + ra = np.empty(n*n2 + (n + 1)*(n2 + 1), dtype='complex128', order='F') + k, ra = _id.idz_estrank(eps, A, w, ra) + return k + + +#------------------------------------------------------------------------------ +# idzp_asvd.f +#------------------------------------------------------------------------------ + +def idzp_asvd(eps, A): + """ + Compute SVD of a complex matrix to a specified relative precision using + random sampling. + + :param eps: + Relative precision. + :type eps: float + :param A: + Matrix. + :type A: :class:`numpy.ndarray` + + :return: + Left singular vectors. + :rtype: :class:`numpy.ndarray` + :return: + Right singular vectors. + :rtype: :class:`numpy.ndarray` + :return: + Singular values. + :rtype: :class:`numpy.ndarray` + """ + A = np.asfortranarray(A) + m, n = A.shape + n2, winit = _id.idz_frmi(m) + w = np.empty( + max((min(m, n) + 1)*(3*m + 5*n + 11) + 8*min(m, n)**2, + (2*n + 1)*(n2 + 1)), + dtype=np.complex128, order='F') + k, iU, iV, iS, w, ier = _id.idzp_asvd(eps, A, winit, w) + if ier: + raise _RETCODE_ERROR + U = w[iU-1:iU+m*k-1].reshape((m, k), order='F') + V = w[iV-1:iV+n*k-1].reshape((n, k), order='F') + S = w[iS-1:iS+k-1] + return U, V, S + + +#------------------------------------------------------------------------------ +# idzp_rid.f +#------------------------------------------------------------------------------ + +def idzp_rid(eps, m, n, matveca): + """ + Compute ID of a complex matrix to a specified relative precision using + random matrix-vector multiplication. + + :param eps: + Relative precision. + :type eps: float + :param m: + Matrix row dimension. + :type m: int + :param n: + Matrix column dimension. + :type n: int + :param matveca: + Function to apply the matrix adjoint to a vector, with call signature + `y = matveca(x)`, where `x` and `y` are the input and output vectors, + respectively. + :type matveca: function + + :return: + Rank of ID. + :rtype: int + :return: + Column index array. + :rtype: :class:`numpy.ndarray` + :return: + Interpolation coefficients. + :rtype: :class:`numpy.ndarray` + """ + proj = np.empty( + m + 1 + 2*n*(min(m, n) + 1), + dtype=np.complex128, order='F') + k, idx, proj, ier = _id.idzp_rid(eps, m, n, matveca, proj) + if ier: + raise _RETCODE_ERROR + proj = proj[:k*(n-k)].reshape((k, n-k), order='F') + return k, idx, proj + + +def idz_findrank(eps, m, n, matveca): + """ + Estimate rank of a complex matrix to a specified relative precision using + random matrix-vector multiplication. + + :param eps: + Relative precision. + :type eps: float + :param m: + Matrix row dimension. + :type m: int + :param n: + Matrix column dimension. + :type n: int + :param matveca: + Function to apply the matrix adjoint to a vector, with call signature + `y = matveca(x)`, where `x` and `y` are the input and output vectors, + respectively. + :type matveca: function + + :return: + Rank estimate. + :rtype: int + """ + k, ra, ier = _id.idz_findrank(eps, m, n, matveca) + if ier: + raise _RETCODE_ERROR + return k + + +#------------------------------------------------------------------------------ +# idzp_rsvd.f +#------------------------------------------------------------------------------ + +def idzp_rsvd(eps, m, n, matveca, matvec): + """ + Compute SVD of a complex matrix to a specified relative precision using + random matrix-vector multiplication. + + :param eps: + Relative precision. + :type eps: float + :param m: + Matrix row dimension. + :type m: int + :param n: + Matrix column dimension. + :type n: int + :param matveca: + Function to apply the matrix adjoint to a vector, with call signature + `y = matveca(x)`, where `x` and `y` are the input and output vectors, + respectively. + :type matveca: function + :param matvec: + Function to apply the matrix to a vector, with call signature + `y = matvec(x)`, where `x` and `y` are the input and output vectors, + respectively. + :type matvec: function + + :return: + Left singular vectors. + :rtype: :class:`numpy.ndarray` + :return: + Right singular vectors. + :rtype: :class:`numpy.ndarray` + :return: + Singular values. + :rtype: :class:`numpy.ndarray` + """ + k, iU, iV, iS, w, ier = _id.idzp_rsvd(eps, m, n, matveca, matvec) + if ier: + raise _RETCODE_ERROR + U = w[iU-1:iU+m*k-1].reshape((m, k), order='F') + V = w[iV-1:iV+n*k-1].reshape((n, k), order='F') + S = w[iS-1:iS+k-1] + return U, V, S + + +#------------------------------------------------------------------------------ +# idzr_aid.f +#------------------------------------------------------------------------------ + +def idzr_aid(A, k): + """ + Compute ID of a complex matrix to a specified rank using random sampling. + + :param A: + Matrix. + :type A: :class:`numpy.ndarray` + :param k: + Rank of ID. + :type k: int + + :return: + Column index array. + :rtype: :class:`numpy.ndarray` + :return: + Interpolation coefficients. + :rtype: :class:`numpy.ndarray` + """ + A = np.asfortranarray(A) + m, n = A.shape + w = idzr_aidi(m, n, k) + idx, proj = _id.idzr_aid(A, k, w) + if k == n: + proj = np.empty((k, n-k), dtype='complex128', order='F') + else: + proj = proj.reshape((k, n-k), order='F') + return idx, proj + + +def idzr_aidi(m, n, k): + """ + Initialize array for :func:`idzr_aid`. + + :param m: + Matrix row dimension. + :type m: int + :param n: + Matrix column dimension. + :type n: int + :param k: + Rank of ID. + :type k: int + + :return: + Initialization array to be used by :func:`idzr_aid`. + :rtype: :class:`numpy.ndarray` + """ + return _id.idzr_aidi(m, n, k) + + +#------------------------------------------------------------------------------ +# idzr_asvd.f +#------------------------------------------------------------------------------ + +def idzr_asvd(A, k): + """ + Compute SVD of a complex 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` + """ + A = np.asfortranarray(A) + m, n = A.shape + w = np.empty( + (2*k + 22)*m + (6*k + 21)*n + 8*k**2 + 10*k + 90, + dtype='complex128', order='F') + w_ = idzr_aidi(m, n, k) + w[:w_.size] = w_ + U, V, S, ier = _id.idzr_asvd(A, k, w) + if ier: + raise _RETCODE_ERROR + return U, V, S + + +#------------------------------------------------------------------------------ +# idzr_rid.f +#------------------------------------------------------------------------------ + +def idzr_rid(m, n, matveca, k): + """ + Compute ID of a complex matrix to a specified rank using random + matrix-vector multiplication. + + :param m: + Matrix row dimension. + :type m: int + :param n: + Matrix column dimension. + :type n: int + :param matveca: + Function to apply the matrix adjoint to a vector, with call signature + `y = matveca(x)`, where `x` and `y` are the input and output vectors, + respectively. + :type matveca: function + :param k: + Rank of ID. + :type k: int + + :return: + Column index array. + :rtype: :class:`numpy.ndarray` + :return: + Interpolation coefficients. + :rtype: :class:`numpy.ndarray` + """ + idx, proj = _id.idzr_rid(m, n, matveca, k) + proj = proj[:k*(n-k)].reshape((k, n-k), order='F') + return idx, proj + + +#------------------------------------------------------------------------------ +# idzr_rsvd.f +#------------------------------------------------------------------------------ + +def idzr_rsvd(m, n, matveca, matvec, k): + """ + Compute SVD of a complex matrix to a specified rank using random + matrix-vector multiplication. + + :param m: + Matrix row dimension. + :type m: int + :param n: + Matrix column dimension. + :type n: int + :param matveca: + Function to apply the matrix adjoint to a vector, with call signature + `y = matveca(x)`, where `x` and `y` are the input and output vectors, + respectively. + :type matveca: function + :param matvec: + Function to apply the matrix to a vector, with call signature + `y = matvec(x)`, where `x` and `y` are the input and output vectors, + respectively. + :type matvec: function + :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` + """ + U, V, S, ier = _id.idzr_rsvd(m, n, matveca, matvec, k) + if ier: + raise _RETCODE_ERROR + return U, V, S diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_lapack_subroutines.h b/venv/lib/python3.10/site-packages/scipy/linalg/_lapack_subroutines.h new file mode 100644 index 0000000000000000000000000000000000000000..d4a33afb9b9af82e82eec69fb02b63820053928d --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_lapack_subroutines.h @@ -0,0 +1,1521 @@ +/* +This file was generated by _generate_pyx.py. +Do not edit this file directly. +*/ + +#include "fortran_defs.h" +#include "npy_cblas.h" + +typedef int (*_cselect1)(npy_complex64*); +typedef int (*_cselect2)(npy_complex64*, npy_complex64*); +typedef int (*_dselect2)(double*, double*); +typedef int (*_dselect3)(double*, double*, double*); +typedef int (*_sselect2)(float*, float*); +typedef int (*_sselect3)(float*, float*, float*); +typedef int (*_zselect1)(npy_complex128*); +typedef int (*_zselect2)(npy_complex128*, npy_complex128*); + +#ifdef __cplusplus +extern "C" { +#endif + +void BLAS_FUNC(cbbcsd)(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, float *theta, float *phi, npy_complex64 *u1, int *ldu1, npy_complex64 *u2, int *ldu2, npy_complex64 *v1t, int *ldv1t, npy_complex64 *v2t, int *ldv2t, float *b11d, float *b11e, float *b12d, float *b12e, float *b21d, float *b21e, float *b22d, float *b22e, float *rwork, int *lrwork, int *info); +void BLAS_FUNC(cbdsqr)(char *uplo, int *n, int *ncvt, int *nru, int *ncc, float *d, float *e, npy_complex64 *vt, int *ldvt, npy_complex64 *u, int *ldu, npy_complex64 *c, int *ldc, float *rwork, int *info); +void BLAS_FUNC(cgbbrd)(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, npy_complex64 *ab, int *ldab, float *d, float *e, npy_complex64 *q, int *ldq, npy_complex64 *pt, int *ldpt, npy_complex64 *c, int *ldc, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(cgbcon)(char *norm, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, int *ipiv, float *anorm, float *rcond, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(cgbequ)(int *m, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, float *r, float *c, float *rowcnd, float *colcnd, float *amax, int *info); +void BLAS_FUNC(cgbequb)(int *m, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, float *r, float *c, float *rowcnd, float *colcnd, float *amax, int *info); +void BLAS_FUNC(cgbrfs)(char *trans, int *n, int *kl, int *ku, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *afb, int *ldafb, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(cgbsv)(int *n, int *kl, int *ku, int *nrhs, npy_complex64 *ab, int *ldab, int *ipiv, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(cgbsvx)(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *afb, int *ldafb, int *ipiv, char *equed, float *r, float *c, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *rcond, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(cgbtf2)(int *m, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, int *ipiv, int *info); +void BLAS_FUNC(cgbtrf)(int *m, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, int *ipiv, int *info); +void BLAS_FUNC(cgbtrs)(char *trans, int *n, int *kl, int *ku, int *nrhs, npy_complex64 *ab, int *ldab, int *ipiv, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(cgebak)(char *job, char *side, int *n, int *ilo, int *ihi, float *scale, int *m, npy_complex64 *v, int *ldv, int *info); +void BLAS_FUNC(cgebal)(char *job, int *n, npy_complex64 *a, int *lda, int *ilo, int *ihi, float *scale, int *info); +void BLAS_FUNC(cgebd2)(int *m, int *n, npy_complex64 *a, int *lda, float *d, float *e, npy_complex64 *tauq, npy_complex64 *taup, npy_complex64 *work, int *info); +void BLAS_FUNC(cgebrd)(int *m, int *n, npy_complex64 *a, int *lda, float *d, float *e, npy_complex64 *tauq, npy_complex64 *taup, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cgecon)(char *norm, int *n, npy_complex64 *a, int *lda, float *anorm, float *rcond, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(cgeequ)(int *m, int *n, npy_complex64 *a, int *lda, float *r, float *c, float *rowcnd, float *colcnd, float *amax, int *info); +void BLAS_FUNC(cgeequb)(int *m, int *n, npy_complex64 *a, int *lda, float *r, float *c, float *rowcnd, float *colcnd, float *amax, int *info); +void BLAS_FUNC(cgees)(char *jobvs, char *sort, _cselect1 *select, int *n, npy_complex64 *a, int *lda, int *sdim, npy_complex64 *w, npy_complex64 *vs, int *ldvs, npy_complex64 *work, int *lwork, float *rwork, int *bwork, int *info); +void BLAS_FUNC(cgeesx)(char *jobvs, char *sort, _cselect1 *select, char *sense, int *n, npy_complex64 *a, int *lda, int *sdim, npy_complex64 *w, npy_complex64 *vs, int *ldvs, float *rconde, float *rcondv, npy_complex64 *work, int *lwork, float *rwork, int *bwork, int *info); +void BLAS_FUNC(cgeev)(char *jobvl, char *jobvr, int *n, npy_complex64 *a, int *lda, npy_complex64 *w, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, npy_complex64 *work, int *lwork, float *rwork, int *info); +void BLAS_FUNC(cgeevx)(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, npy_complex64 *a, int *lda, npy_complex64 *w, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, int *ilo, int *ihi, float *scale, float *abnrm, float *rconde, float *rcondv, npy_complex64 *work, int *lwork, float *rwork, int *info); +void BLAS_FUNC(cgehd2)(int *n, int *ilo, int *ihi, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info); +void BLAS_FUNC(cgehrd)(int *n, int *ilo, int *ihi, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cgelq2)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info); +void BLAS_FUNC(cgelqf)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cgels)(char *trans, int *m, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cgelsd)(int *m, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, float *s, float *rcond, int *rank, npy_complex64 *work, int *lwork, float *rwork, int *iwork, int *info); +void BLAS_FUNC(cgelss)(int *m, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, float *s, float *rcond, int *rank, npy_complex64 *work, int *lwork, float *rwork, int *info); +void BLAS_FUNC(cgelsy)(int *m, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *jpvt, float *rcond, int *rank, npy_complex64 *work, int *lwork, float *rwork, int *info); +void BLAS_FUNC(cgemqrt)(char *side, char *trans, int *m, int *n, int *k, int *nb, npy_complex64 *v, int *ldv, npy_complex64 *t, int *ldt, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info); +void BLAS_FUNC(cgeql2)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info); +void BLAS_FUNC(cgeqlf)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cgeqp3)(int *m, int *n, npy_complex64 *a, int *lda, int *jpvt, npy_complex64 *tau, npy_complex64 *work, int *lwork, float *rwork, int *info); +void BLAS_FUNC(cgeqr2)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info); +void BLAS_FUNC(cgeqr2p)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info); +void BLAS_FUNC(cgeqrf)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cgeqrfp)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cgeqrt)(int *m, int *n, int *nb, npy_complex64 *a, int *lda, npy_complex64 *t, int *ldt, npy_complex64 *work, int *info); +void BLAS_FUNC(cgeqrt2)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *t, int *ldt, int *info); +void BLAS_FUNC(cgeqrt3)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *t, int *ldt, int *info); +void BLAS_FUNC(cgerfs)(char *trans, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(cgerq2)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info); +void BLAS_FUNC(cgerqf)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cgesc2)(int *n, npy_complex64 *a, int *lda, npy_complex64 *rhs, int *ipiv, int *jpiv, float *scale); +void BLAS_FUNC(cgesdd)(char *jobz, int *m, int *n, npy_complex64 *a, int *lda, float *s, npy_complex64 *u, int *ldu, npy_complex64 *vt, int *ldvt, npy_complex64 *work, int *lwork, float *rwork, int *iwork, int *info); +void BLAS_FUNC(cgesv)(int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(cgesvd)(char *jobu, char *jobvt, int *m, int *n, npy_complex64 *a, int *lda, float *s, npy_complex64 *u, int *ldu, npy_complex64 *vt, int *ldvt, npy_complex64 *work, int *lwork, float *rwork, int *info); +void BLAS_FUNC(cgesvx)(char *fact, char *trans, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, int *ipiv, char *equed, float *r, float *c, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *rcond, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(cgetc2)(int *n, npy_complex64 *a, int *lda, int *ipiv, int *jpiv, int *info); +void BLAS_FUNC(cgetf2)(int *m, int *n, npy_complex64 *a, int *lda, int *ipiv, int *info); +void BLAS_FUNC(cgetrf)(int *m, int *n, npy_complex64 *a, int *lda, int *ipiv, int *info); +void BLAS_FUNC(cgetri)(int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cgetrs)(char *trans, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(cggbak)(char *job, char *side, int *n, int *ilo, int *ihi, float *lscale, float *rscale, int *m, npy_complex64 *v, int *ldv, int *info); +void BLAS_FUNC(cggbal)(char *job, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *ilo, int *ihi, float *lscale, float *rscale, float *work, int *info); +void BLAS_FUNC(cgges)(char *jobvsl, char *jobvsr, char *sort, _cselect2 *selctg, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *sdim, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *vsl, int *ldvsl, npy_complex64 *vsr, int *ldvsr, npy_complex64 *work, int *lwork, float *rwork, int *bwork, int *info); +void BLAS_FUNC(cggesx)(char *jobvsl, char *jobvsr, char *sort, _cselect2 *selctg, char *sense, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *sdim, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *vsl, int *ldvsl, npy_complex64 *vsr, int *ldvsr, float *rconde, float *rcondv, npy_complex64 *work, int *lwork, float *rwork, int *iwork, int *liwork, int *bwork, int *info); +void BLAS_FUNC(cggev)(char *jobvl, char *jobvr, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, npy_complex64 *work, int *lwork, float *rwork, int *info); +void BLAS_FUNC(cggevx)(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, int *ilo, int *ihi, float *lscale, float *rscale, float *abnrm, float *bbnrm, float *rconde, float *rcondv, npy_complex64 *work, int *lwork, float *rwork, int *iwork, int *bwork, int *info); +void BLAS_FUNC(cggglm)(int *n, int *m, int *p, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *d, npy_complex64 *x, npy_complex64 *y, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cgghrd)(char *compq, char *compz, int *n, int *ilo, int *ihi, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *q, int *ldq, npy_complex64 *z, int *ldz, int *info); +void BLAS_FUNC(cgglse)(int *m, int *n, int *p, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *c, npy_complex64 *d, npy_complex64 *x, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cggqrf)(int *n, int *m, int *p, npy_complex64 *a, int *lda, npy_complex64 *taua, npy_complex64 *b, int *ldb, npy_complex64 *taub, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cggrqf)(int *m, int *p, int *n, npy_complex64 *a, int *lda, npy_complex64 *taua, npy_complex64 *b, int *ldb, npy_complex64 *taub, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cgtcon)(char *norm, int *n, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *du2, int *ipiv, float *anorm, float *rcond, npy_complex64 *work, int *info); +void BLAS_FUNC(cgtrfs)(char *trans, int *n, int *nrhs, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *dlf, npy_complex64 *df, npy_complex64 *duf, npy_complex64 *du2, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(cgtsv)(int *n, int *nrhs, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(cgtsvx)(char *fact, char *trans, int *n, int *nrhs, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *dlf, npy_complex64 *df, npy_complex64 *duf, npy_complex64 *du2, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *rcond, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(cgttrf)(int *n, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *du2, int *ipiv, int *info); +void BLAS_FUNC(cgttrs)(char *trans, int *n, int *nrhs, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *du2, int *ipiv, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(cgtts2)(int *itrans, int *n, int *nrhs, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *du2, int *ipiv, npy_complex64 *b, int *ldb); +void BLAS_FUNC(chbev)(char *jobz, char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(chbevd)(char *jobz, char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(chbevx)(char *jobz, char *range, char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, npy_complex64 *q, int *ldq, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, float *rwork, int *iwork, int *ifail, int *info); +void BLAS_FUNC(chbgst)(char *vect, char *uplo, int *n, int *ka, int *kb, npy_complex64 *ab, int *ldab, npy_complex64 *bb, int *ldbb, npy_complex64 *x, int *ldx, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(chbgv)(char *jobz, char *uplo, int *n, int *ka, int *kb, npy_complex64 *ab, int *ldab, npy_complex64 *bb, int *ldbb, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(chbgvd)(char *jobz, char *uplo, int *n, int *ka, int *kb, npy_complex64 *ab, int *ldab, npy_complex64 *bb, int *ldbb, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(chbgvx)(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, npy_complex64 *ab, int *ldab, npy_complex64 *bb, int *ldbb, npy_complex64 *q, int *ldq, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, float *rwork, int *iwork, int *ifail, int *info); +void BLAS_FUNC(chbtrd)(char *vect, char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, float *d, float *e, npy_complex64 *q, int *ldq, npy_complex64 *work, int *info); +void BLAS_FUNC(checon)(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, float *anorm, float *rcond, npy_complex64 *work, int *info); +void BLAS_FUNC(cheequb)(char *uplo, int *n, npy_complex64 *a, int *lda, float *s, float *scond, float *amax, npy_complex64 *work, int *info); +void BLAS_FUNC(cheev)(char *jobz, char *uplo, int *n, npy_complex64 *a, int *lda, float *w, npy_complex64 *work, int *lwork, float *rwork, int *info); +void BLAS_FUNC(cheevd)(char *jobz, char *uplo, int *n, npy_complex64 *a, int *lda, float *w, npy_complex64 *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(cheevr)(char *jobz, char *range, char *uplo, int *n, npy_complex64 *a, int *lda, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, npy_complex64 *z, int *ldz, int *isuppz, npy_complex64 *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(cheevx)(char *jobz, char *range, char *uplo, int *n, npy_complex64 *a, int *lda, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, float *rwork, int *iwork, int *ifail, int *info); +void BLAS_FUNC(chegs2)(int *itype, char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(chegst)(int *itype, char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(chegv)(int *itype, char *jobz, char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, float *w, npy_complex64 *work, int *lwork, float *rwork, int *info); +void BLAS_FUNC(chegvd)(int *itype, char *jobz, char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, float *w, npy_complex64 *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(chegvx)(int *itype, char *jobz, char *range, char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, float *rwork, int *iwork, int *ifail, int *info); +void BLAS_FUNC(cherfs)(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(chesv)(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(chesvx)(char *fact, char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *rcond, float *ferr, float *berr, npy_complex64 *work, int *lwork, float *rwork, int *info); +void BLAS_FUNC(cheswapr)(char *uplo, int *n, npy_complex64 *a, int *lda, int *i1, int *i2); +void BLAS_FUNC(chetd2)(char *uplo, int *n, npy_complex64 *a, int *lda, float *d, float *e, npy_complex64 *tau, int *info); +void BLAS_FUNC(chetf2)(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, int *info); +void BLAS_FUNC(chetrd)(char *uplo, int *n, npy_complex64 *a, int *lda, float *d, float *e, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(chetrf)(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(chetri)(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *info); +void BLAS_FUNC(chetri2)(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(chetri2x)(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *nb, int *info); +void BLAS_FUNC(chetrs)(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(chetrs2)(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *work, int *info); +void BLAS_FUNC(chfrk)(char *transr, char *uplo, char *trans, int *n, int *k, float *alpha, npy_complex64 *a, int *lda, float *beta, npy_complex64 *c); +void BLAS_FUNC(chgeqz)(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, npy_complex64 *h, int *ldh, npy_complex64 *t, int *ldt, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *q, int *ldq, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, float *rwork, int *info); +char BLAS_FUNC(chla_transtype)(int *trans); +void BLAS_FUNC(chpcon)(char *uplo, int *n, npy_complex64 *ap, int *ipiv, float *anorm, float *rcond, npy_complex64 *work, int *info); +void BLAS_FUNC(chpev)(char *jobz, char *uplo, int *n, npy_complex64 *ap, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(chpevd)(char *jobz, char *uplo, int *n, npy_complex64 *ap, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(chpevx)(char *jobz, char *range, char *uplo, int *n, npy_complex64 *ap, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, float *rwork, int *iwork, int *ifail, int *info); +void BLAS_FUNC(chpgst)(int *itype, char *uplo, int *n, npy_complex64 *ap, npy_complex64 *bp, int *info); +void BLAS_FUNC(chpgv)(int *itype, char *jobz, char *uplo, int *n, npy_complex64 *ap, npy_complex64 *bp, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(chpgvd)(int *itype, char *jobz, char *uplo, int *n, npy_complex64 *ap, npy_complex64 *bp, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(chpgvx)(int *itype, char *jobz, char *range, char *uplo, int *n, npy_complex64 *ap, npy_complex64 *bp, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, float *rwork, int *iwork, int *ifail, int *info); +void BLAS_FUNC(chprfs)(char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *afp, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(chpsv)(char *uplo, int *n, int *nrhs, npy_complex64 *ap, int *ipiv, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(chpsvx)(char *fact, char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *afp, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *rcond, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(chptrd)(char *uplo, int *n, npy_complex64 *ap, float *d, float *e, npy_complex64 *tau, int *info); +void BLAS_FUNC(chptrf)(char *uplo, int *n, npy_complex64 *ap, int *ipiv, int *info); +void BLAS_FUNC(chptri)(char *uplo, int *n, npy_complex64 *ap, int *ipiv, npy_complex64 *work, int *info); +void BLAS_FUNC(chptrs)(char *uplo, int *n, int *nrhs, npy_complex64 *ap, int *ipiv, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(chsein)(char *side, char *eigsrc, char *initv, int *select, int *n, npy_complex64 *h, int *ldh, npy_complex64 *w, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, int *mm, int *m, npy_complex64 *work, float *rwork, int *ifaill, int *ifailr, int *info); +void BLAS_FUNC(chseqr)(char *job, char *compz, int *n, int *ilo, int *ihi, npy_complex64 *h, int *ldh, npy_complex64 *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(clabrd)(int *m, int *n, int *nb, npy_complex64 *a, int *lda, float *d, float *e, npy_complex64 *tauq, npy_complex64 *taup, npy_complex64 *x, int *ldx, npy_complex64 *y, int *ldy); +void BLAS_FUNC(clacgv)(int *n, npy_complex64 *x, int *incx); +void BLAS_FUNC(clacn2)(int *n, npy_complex64 *v, npy_complex64 *x, float *est, int *kase, int *isave); +void BLAS_FUNC(clacon)(int *n, npy_complex64 *v, npy_complex64 *x, float *est, int *kase); +void BLAS_FUNC(clacp2)(char *uplo, int *m, int *n, float *a, int *lda, npy_complex64 *b, int *ldb); +void BLAS_FUNC(clacpy)(char *uplo, int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb); +void BLAS_FUNC(clacrm)(int *m, int *n, npy_complex64 *a, int *lda, float *b, int *ldb, npy_complex64 *c, int *ldc, float *rwork); +void BLAS_FUNC(clacrt)(int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy, npy_complex64 *c, npy_complex64 *s); +void (cladivwrp_)(npy_complex64 *out, npy_complex64 *x, npy_complex64 *y); +void BLAS_FUNC(claed0)(int *qsiz, int *n, float *d, float *e, npy_complex64 *q, int *ldq, npy_complex64 *qstore, int *ldqs, float *rwork, int *iwork, int *info); +void BLAS_FUNC(claed7)(int *n, int *cutpnt, int *qsiz, int *tlvls, int *curlvl, int *curpbm, float *d, npy_complex64 *q, int *ldq, float *rho, int *indxq, float *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, float *givnum, npy_complex64 *work, float *rwork, int *iwork, int *info); +void BLAS_FUNC(claed8)(int *k, int *n, int *qsiz, npy_complex64 *q, int *ldq, float *d, float *rho, int *cutpnt, float *z, float *dlamda, npy_complex64 *q2, int *ldq2, float *w, int *indxp, int *indx, int *indxq, int *perm, int *givptr, int *givcol, float *givnum, int *info); +void BLAS_FUNC(claein)(int *rightv, int *noinit, int *n, npy_complex64 *h, int *ldh, npy_complex64 *w, npy_complex64 *v, npy_complex64 *b, int *ldb, float *rwork, float *eps3, float *smlnum, int *info); +void BLAS_FUNC(claesy)(npy_complex64 *a, npy_complex64 *b, npy_complex64 *c, npy_complex64 *rt1, npy_complex64 *rt2, npy_complex64 *evscal, npy_complex64 *cs1, npy_complex64 *sn1); +void BLAS_FUNC(claev2)(npy_complex64 *a, npy_complex64 *b, npy_complex64 *c, float *rt1, float *rt2, float *cs1, npy_complex64 *sn1); +void BLAS_FUNC(clag2z)(int *m, int *n, npy_complex64 *sa, int *ldsa, npy_complex128 *a, int *lda, int *info); +void BLAS_FUNC(clags2)(int *upper, float *a1, npy_complex64 *a2, float *a3, float *b1, npy_complex64 *b2, float *b3, float *csu, npy_complex64 *snu, float *csv, npy_complex64 *snv, float *csq, npy_complex64 *snq); +void BLAS_FUNC(clagtm)(char *trans, int *n, int *nrhs, float *alpha, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *x, int *ldx, float *beta, npy_complex64 *b, int *ldb); +void BLAS_FUNC(clahef)(char *uplo, int *n, int *nb, int *kb, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *w, int *ldw, int *info); +void BLAS_FUNC(clahqr)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, npy_complex64 *h, int *ldh, npy_complex64 *w, int *iloz, int *ihiz, npy_complex64 *z, int *ldz, int *info); +void BLAS_FUNC(clahr2)(int *n, int *k, int *nb, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *t, int *ldt, npy_complex64 *y, int *ldy); +void BLAS_FUNC(claic1)(int *job, int *j, npy_complex64 *x, float *sest, npy_complex64 *w, npy_complex64 *gamma, float *sestpr, npy_complex64 *s, npy_complex64 *c); +void BLAS_FUNC(clals0)(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, npy_complex64 *b, int *ldb, npy_complex64 *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, float *givnum, int *ldgnum, float *poles, float *difl, float *difr, float *z, int *k, float *c, float *s, float *rwork, int *info); +void BLAS_FUNC(clalsa)(int *icompq, int *smlsiz, int *n, int *nrhs, npy_complex64 *b, int *ldb, npy_complex64 *bx, int *ldbx, float *u, int *ldu, float *vt, int *k, float *difl, float *difr, float *z, float *poles, int *givptr, int *givcol, int *ldgcol, int *perm, float *givnum, float *c, float *s, float *rwork, int *iwork, int *info); +void BLAS_FUNC(clalsd)(char *uplo, int *smlsiz, int *n, int *nrhs, float *d, float *e, npy_complex64 *b, int *ldb, float *rcond, int *rank, npy_complex64 *work, float *rwork, int *iwork, int *info); +float BLAS_FUNC(clangb)(char *norm, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, float *work); +float BLAS_FUNC(clange)(char *norm, int *m, int *n, npy_complex64 *a, int *lda, float *work); +float BLAS_FUNC(clangt)(char *norm, int *n, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du); +float BLAS_FUNC(clanhb)(char *norm, char *uplo, int *n, int *k, npy_complex64 *ab, int *ldab, float *work); +float BLAS_FUNC(clanhe)(char *norm, char *uplo, int *n, npy_complex64 *a, int *lda, float *work); +float BLAS_FUNC(clanhf)(char *norm, char *transr, char *uplo, int *n, npy_complex64 *a, float *work); +float BLAS_FUNC(clanhp)(char *norm, char *uplo, int *n, npy_complex64 *ap, float *work); +float BLAS_FUNC(clanhs)(char *norm, int *n, npy_complex64 *a, int *lda, float *work); +float BLAS_FUNC(clanht)(char *norm, int *n, float *d, npy_complex64 *e); +float BLAS_FUNC(clansb)(char *norm, char *uplo, int *n, int *k, npy_complex64 *ab, int *ldab, float *work); +float BLAS_FUNC(clansp)(char *norm, char *uplo, int *n, npy_complex64 *ap, float *work); +float BLAS_FUNC(clansy)(char *norm, char *uplo, int *n, npy_complex64 *a, int *lda, float *work); +float BLAS_FUNC(clantb)(char *norm, char *uplo, char *diag, int *n, int *k, npy_complex64 *ab, int *ldab, float *work); +float BLAS_FUNC(clantp)(char *norm, char *uplo, char *diag, int *n, npy_complex64 *ap, float *work); +float BLAS_FUNC(clantr)(char *norm, char *uplo, char *diag, int *m, int *n, npy_complex64 *a, int *lda, float *work); +void BLAS_FUNC(clapll)(int *n, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, float *ssmin); +void BLAS_FUNC(clapmr)(int *forwrd, int *m, int *n, npy_complex64 *x, int *ldx, int *k); +void BLAS_FUNC(clapmt)(int *forwrd, int *m, int *n, npy_complex64 *x, int *ldx, int *k); +void BLAS_FUNC(claqgb)(int *m, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, float *r, float *c, float *rowcnd, float *colcnd, float *amax, char *equed); +void BLAS_FUNC(claqge)(int *m, int *n, npy_complex64 *a, int *lda, float *r, float *c, float *rowcnd, float *colcnd, float *amax, char *equed); +void BLAS_FUNC(claqhb)(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, float *s, float *scond, float *amax, char *equed); +void BLAS_FUNC(claqhe)(char *uplo, int *n, npy_complex64 *a, int *lda, float *s, float *scond, float *amax, char *equed); +void BLAS_FUNC(claqhp)(char *uplo, int *n, npy_complex64 *ap, float *s, float *scond, float *amax, char *equed); +void BLAS_FUNC(claqp2)(int *m, int *n, int *offset, npy_complex64 *a, int *lda, int *jpvt, npy_complex64 *tau, float *vn1, float *vn2, npy_complex64 *work); +void BLAS_FUNC(claqps)(int *m, int *n, int *offset, int *nb, int *kb, npy_complex64 *a, int *lda, int *jpvt, npy_complex64 *tau, float *vn1, float *vn2, npy_complex64 *auxv, npy_complex64 *f, int *ldf); +void BLAS_FUNC(claqr0)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, npy_complex64 *h, int *ldh, npy_complex64 *w, int *iloz, int *ihiz, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(claqr1)(int *n, npy_complex64 *h, int *ldh, npy_complex64 *s1, npy_complex64 *s2, npy_complex64 *v); +void BLAS_FUNC(claqr2)(int *wantt, int *wantz, int *n, int *ktop, int *kbot, int *nw, npy_complex64 *h, int *ldh, int *iloz, int *ihiz, npy_complex64 *z, int *ldz, int *ns, int *nd, npy_complex64 *sh, npy_complex64 *v, int *ldv, int *nh, npy_complex64 *t, int *ldt, int *nv, npy_complex64 *wv, int *ldwv, npy_complex64 *work, int *lwork); +void BLAS_FUNC(claqr3)(int *wantt, int *wantz, int *n, int *ktop, int *kbot, int *nw, npy_complex64 *h, int *ldh, int *iloz, int *ihiz, npy_complex64 *z, int *ldz, int *ns, int *nd, npy_complex64 *sh, npy_complex64 *v, int *ldv, int *nh, npy_complex64 *t, int *ldt, int *nv, npy_complex64 *wv, int *ldwv, npy_complex64 *work, int *lwork); +void BLAS_FUNC(claqr4)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, npy_complex64 *h, int *ldh, npy_complex64 *w, int *iloz, int *ihiz, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(claqr5)(int *wantt, int *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, npy_complex64 *s, npy_complex64 *h, int *ldh, int *iloz, int *ihiz, npy_complex64 *z, int *ldz, npy_complex64 *v, int *ldv, npy_complex64 *u, int *ldu, int *nv, npy_complex64 *wv, int *ldwv, int *nh, npy_complex64 *wh, int *ldwh); +void BLAS_FUNC(claqsb)(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, float *s, float *scond, float *amax, char *equed); +void BLAS_FUNC(claqsp)(char *uplo, int *n, npy_complex64 *ap, float *s, float *scond, float *amax, char *equed); +void BLAS_FUNC(claqsy)(char *uplo, int *n, npy_complex64 *a, int *lda, float *s, float *scond, float *amax, char *equed); +void BLAS_FUNC(clar1v)(int *n, int *b1, int *bn, float *lambda_, float *d, float *l, float *ld, float *lld, float *pivmin, float *gaptol, npy_complex64 *z, int *wantnc, int *negcnt, float *ztz, float *mingma, int *r, int *isuppz, float *nrminv, float *resid, float *rqcorr, float *work); +void BLAS_FUNC(clar2v)(int *n, npy_complex64 *x, npy_complex64 *y, npy_complex64 *z, int *incx, float *c, npy_complex64 *s, int *incc); +void BLAS_FUNC(clarcm)(int *m, int *n, float *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *c, int *ldc, float *rwork); +void BLAS_FUNC(clarf)(char *side, int *m, int *n, npy_complex64 *v, int *incv, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work); +void BLAS_FUNC(clarfb)(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, npy_complex64 *v, int *ldv, npy_complex64 *t, int *ldt, npy_complex64 *c, int *ldc, npy_complex64 *work, int *ldwork); +void BLAS_FUNC(clarfg)(int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *tau); +void BLAS_FUNC(clarfgp)(int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *tau); +void BLAS_FUNC(clarft)(char *direct, char *storev, int *n, int *k, npy_complex64 *v, int *ldv, npy_complex64 *tau, npy_complex64 *t, int *ldt); +void BLAS_FUNC(clarfx)(char *side, int *m, int *n, npy_complex64 *v, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work); +void BLAS_FUNC(clargv)(int *n, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, float *c, int *incc); +void BLAS_FUNC(clarnv)(int *idist, int *iseed, int *n, npy_complex64 *x); +void BLAS_FUNC(clarrv)(int *n, float *vl, float *vu, float *d, float *l, float *pivmin, int *isplit, int *m, int *dol, int *dou, float *minrgp, float *rtol1, float *rtol2, float *w, float *werr, float *wgap, int *iblock, int *indexw, float *gers, npy_complex64 *z, int *ldz, int *isuppz, float *work, int *iwork, int *info); +void BLAS_FUNC(clartg)(npy_complex64 *f, npy_complex64 *g, float *cs, npy_complex64 *sn, npy_complex64 *r); +void BLAS_FUNC(clartv)(int *n, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, float *c, npy_complex64 *s, int *incc); +void BLAS_FUNC(clarz)(char *side, int *m, int *n, int *l, npy_complex64 *v, int *incv, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work); +void BLAS_FUNC(clarzb)(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, npy_complex64 *v, int *ldv, npy_complex64 *t, int *ldt, npy_complex64 *c, int *ldc, npy_complex64 *work, int *ldwork); +void BLAS_FUNC(clarzt)(char *direct, char *storev, int *n, int *k, npy_complex64 *v, int *ldv, npy_complex64 *tau, npy_complex64 *t, int *ldt); +void BLAS_FUNC(clascl)(char *type_bn, int *kl, int *ku, float *cfrom, float *cto, int *m, int *n, npy_complex64 *a, int *lda, int *info); +void BLAS_FUNC(claset)(char *uplo, int *m, int *n, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *a, int *lda); +void BLAS_FUNC(clasr)(char *side, char *pivot, char *direct, int *m, int *n, float *c, float *s, npy_complex64 *a, int *lda); +void BLAS_FUNC(classq)(int *n, npy_complex64 *x, int *incx, float *scale, float *sumsq); +void BLAS_FUNC(claswp)(int *n, npy_complex64 *a, int *lda, int *k1, int *k2, int *ipiv, int *incx); +void BLAS_FUNC(clasyf)(char *uplo, int *n, int *nb, int *kb, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *w, int *ldw, int *info); +void BLAS_FUNC(clatbs)(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, npy_complex64 *ab, int *ldab, npy_complex64 *x, float *scale, float *cnorm, int *info); +void BLAS_FUNC(clatdf)(int *ijob, int *n, npy_complex64 *z, int *ldz, npy_complex64 *rhs, float *rdsum, float *rdscal, int *ipiv, int *jpiv); +void BLAS_FUNC(clatps)(char *uplo, char *trans, char *diag, char *normin, int *n, npy_complex64 *ap, npy_complex64 *x, float *scale, float *cnorm, int *info); +void BLAS_FUNC(clatrd)(char *uplo, int *n, int *nb, npy_complex64 *a, int *lda, float *e, npy_complex64 *tau, npy_complex64 *w, int *ldw); +void BLAS_FUNC(clatrs)(char *uplo, char *trans, char *diag, char *normin, int *n, npy_complex64 *a, int *lda, npy_complex64 *x, float *scale, float *cnorm, int *info); +void BLAS_FUNC(clatrz)(int *m, int *n, int *l, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work); +void BLAS_FUNC(clauu2)(char *uplo, int *n, npy_complex64 *a, int *lda, int *info); +void BLAS_FUNC(clauum)(char *uplo, int *n, npy_complex64 *a, int *lda, int *info); +void BLAS_FUNC(cpbcon)(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, float *anorm, float *rcond, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(cpbequ)(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, float *s, float *scond, float *amax, int *info); +void BLAS_FUNC(cpbrfs)(char *uplo, int *n, int *kd, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *afb, int *ldafb, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(cpbstf)(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, int *info); +void BLAS_FUNC(cpbsv)(char *uplo, int *n, int *kd, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(cpbsvx)(char *fact, char *uplo, int *n, int *kd, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *afb, int *ldafb, char *equed, float *s, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *rcond, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(cpbtf2)(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, int *info); +void BLAS_FUNC(cpbtrf)(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, int *info); +void BLAS_FUNC(cpbtrs)(char *uplo, int *n, int *kd, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(cpftrf)(char *transr, char *uplo, int *n, npy_complex64 *a, int *info); +void BLAS_FUNC(cpftri)(char *transr, char *uplo, int *n, npy_complex64 *a, int *info); +void BLAS_FUNC(cpftrs)(char *transr, char *uplo, int *n, int *nrhs, npy_complex64 *a, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(cpocon)(char *uplo, int *n, npy_complex64 *a, int *lda, float *anorm, float *rcond, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(cpoequ)(int *n, npy_complex64 *a, int *lda, float *s, float *scond, float *amax, int *info); +void BLAS_FUNC(cpoequb)(int *n, npy_complex64 *a, int *lda, float *s, float *scond, float *amax, int *info); +void BLAS_FUNC(cporfs)(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(cposv)(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(cposvx)(char *fact, char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, char *equed, float *s, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *rcond, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(cpotf2)(char *uplo, int *n, npy_complex64 *a, int *lda, int *info); +void BLAS_FUNC(cpotrf)(char *uplo, int *n, npy_complex64 *a, int *lda, int *info); +void BLAS_FUNC(cpotri)(char *uplo, int *n, npy_complex64 *a, int *lda, int *info); +void BLAS_FUNC(cpotrs)(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(cppcon)(char *uplo, int *n, npy_complex64 *ap, float *anorm, float *rcond, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(cppequ)(char *uplo, int *n, npy_complex64 *ap, float *s, float *scond, float *amax, int *info); +void BLAS_FUNC(cpprfs)(char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *afp, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(cppsv)(char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(cppsvx)(char *fact, char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *afp, char *equed, float *s, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *rcond, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(cpptrf)(char *uplo, int *n, npy_complex64 *ap, int *info); +void BLAS_FUNC(cpptri)(char *uplo, int *n, npy_complex64 *ap, int *info); +void BLAS_FUNC(cpptrs)(char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(cpstf2)(char *uplo, int *n, npy_complex64 *a, int *lda, int *piv, int *rank, float *tol, float *work, int *info); +void BLAS_FUNC(cpstrf)(char *uplo, int *n, npy_complex64 *a, int *lda, int *piv, int *rank, float *tol, float *work, int *info); +void BLAS_FUNC(cptcon)(int *n, float *d, npy_complex64 *e, float *anorm, float *rcond, float *rwork, int *info); +void BLAS_FUNC(cpteqr)(char *compz, int *n, float *d, float *e, npy_complex64 *z, int *ldz, float *work, int *info); +void BLAS_FUNC(cptrfs)(char *uplo, int *n, int *nrhs, float *d, npy_complex64 *e, float *df, npy_complex64 *ef, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(cptsv)(int *n, int *nrhs, float *d, npy_complex64 *e, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(cptsvx)(char *fact, int *n, int *nrhs, float *d, npy_complex64 *e, float *df, npy_complex64 *ef, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *rcond, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(cpttrf)(int *n, float *d, npy_complex64 *e, int *info); +void BLAS_FUNC(cpttrs)(char *uplo, int *n, int *nrhs, float *d, npy_complex64 *e, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(cptts2)(int *iuplo, int *n, int *nrhs, float *d, npy_complex64 *e, npy_complex64 *b, int *ldb); +void BLAS_FUNC(crot)(int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy, float *c, npy_complex64 *s); +void BLAS_FUNC(cspcon)(char *uplo, int *n, npy_complex64 *ap, int *ipiv, float *anorm, float *rcond, npy_complex64 *work, int *info); +void BLAS_FUNC(cspmv)(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *ap, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy); +void BLAS_FUNC(cspr)(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *ap); +void BLAS_FUNC(csprfs)(char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *afp, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(cspsv)(char *uplo, int *n, int *nrhs, npy_complex64 *ap, int *ipiv, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(cspsvx)(char *fact, char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *afp, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *rcond, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(csptrf)(char *uplo, int *n, npy_complex64 *ap, int *ipiv, int *info); +void BLAS_FUNC(csptri)(char *uplo, int *n, npy_complex64 *ap, int *ipiv, npy_complex64 *work, int *info); +void BLAS_FUNC(csptrs)(char *uplo, int *n, int *nrhs, npy_complex64 *ap, int *ipiv, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(csrscl)(int *n, float *sa, npy_complex64 *sx, int *incx); +void BLAS_FUNC(cstedc)(char *compz, int *n, float *d, float *e, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(cstegr)(char *jobz, char *range, int *n, float *d, float *e, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, npy_complex64 *z, int *ldz, int *isuppz, float *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(cstein)(int *n, float *d, float *e, int *m, float *w, int *iblock, int *isplit, npy_complex64 *z, int *ldz, float *work, int *iwork, int *ifail, int *info); +void BLAS_FUNC(cstemr)(char *jobz, char *range, int *n, float *d, float *e, float *vl, float *vu, int *il, int *iu, int *m, float *w, npy_complex64 *z, int *ldz, int *nzc, int *isuppz, int *tryrac, float *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(csteqr)(char *compz, int *n, float *d, float *e, npy_complex64 *z, int *ldz, float *work, int *info); +void BLAS_FUNC(csycon)(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, float *anorm, float *rcond, npy_complex64 *work, int *info); +void BLAS_FUNC(csyconv)(char *uplo, char *way, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *info); +void BLAS_FUNC(csyequb)(char *uplo, int *n, npy_complex64 *a, int *lda, float *s, float *scond, float *amax, npy_complex64 *work, int *info); +void BLAS_FUNC(csymv)(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy); +void BLAS_FUNC(csyr)(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *a, int *lda); +void BLAS_FUNC(csyrfs)(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(csysv)(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(csysvx)(char *fact, char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *rcond, float *ferr, float *berr, npy_complex64 *work, int *lwork, float *rwork, int *info); +void BLAS_FUNC(csyswapr)(char *uplo, int *n, npy_complex64 *a, int *lda, int *i1, int *i2); +void BLAS_FUNC(csytf2)(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, int *info); +void BLAS_FUNC(csytrf)(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(csytri)(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *info); +void BLAS_FUNC(csytri2)(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(csytri2x)(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *nb, int *info); +void BLAS_FUNC(csytrs)(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(csytrs2)(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *work, int *info); +void BLAS_FUNC(ctbcon)(char *norm, char *uplo, char *diag, int *n, int *kd, npy_complex64 *ab, int *ldab, float *rcond, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(ctbrfs)(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(ctbtrs)(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(ctfsm)(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, npy_complex64 *b, int *ldb); +void BLAS_FUNC(ctftri)(char *transr, char *uplo, char *diag, int *n, npy_complex64 *a, int *info); +void BLAS_FUNC(ctfttp)(char *transr, char *uplo, int *n, npy_complex64 *arf, npy_complex64 *ap, int *info); +void BLAS_FUNC(ctfttr)(char *transr, char *uplo, int *n, npy_complex64 *arf, npy_complex64 *a, int *lda, int *info); +void BLAS_FUNC(ctgevc)(char *side, char *howmny, int *select, int *n, npy_complex64 *s, int *lds, npy_complex64 *p, int *ldp, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, int *mm, int *m, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(ctgex2)(int *wantq, int *wantz, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *q, int *ldq, npy_complex64 *z, int *ldz, int *j1, int *info); +void BLAS_FUNC(ctgexc)(int *wantq, int *wantz, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *q, int *ldq, npy_complex64 *z, int *ldz, int *ifst, int *ilst, int *info); +void BLAS_FUNC(ctgsen)(int *ijob, int *wantq, int *wantz, int *select, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *q, int *ldq, npy_complex64 *z, int *ldz, int *m, float *pl, float *pr, float *dif, npy_complex64 *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(ctgsja)(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, float *tola, float *tolb, float *alpha, float *beta, npy_complex64 *u, int *ldu, npy_complex64 *v, int *ldv, npy_complex64 *q, int *ldq, npy_complex64 *work, int *ncycle, int *info); +void BLAS_FUNC(ctgsna)(char *job, char *howmny, int *select, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, float *s, float *dif, int *mm, int *m, npy_complex64 *work, int *lwork, int *iwork, int *info); +void BLAS_FUNC(ctgsy2)(char *trans, int *ijob, int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *c, int *ldc, npy_complex64 *d, int *ldd, npy_complex64 *e, int *lde, npy_complex64 *f, int *ldf, float *scale, float *rdsum, float *rdscal, int *info); +void BLAS_FUNC(ctgsyl)(char *trans, int *ijob, int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *c, int *ldc, npy_complex64 *d, int *ldd, npy_complex64 *e, int *lde, npy_complex64 *f, int *ldf, float *scale, float *dif, npy_complex64 *work, int *lwork, int *iwork, int *info); +void BLAS_FUNC(ctpcon)(char *norm, char *uplo, char *diag, int *n, npy_complex64 *ap, float *rcond, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(ctpmqrt)(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, npy_complex64 *v, int *ldv, npy_complex64 *t, int *ldt, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *work, int *info); +void BLAS_FUNC(ctpqrt)(int *m, int *n, int *l, int *nb, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *t, int *ldt, npy_complex64 *work, int *info); +void BLAS_FUNC(ctpqrt2)(int *m, int *n, int *l, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *t, int *ldt, int *info); +void BLAS_FUNC(ctprfb)(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, npy_complex64 *v, int *ldv, npy_complex64 *t, int *ldt, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *work, int *ldwork); +void BLAS_FUNC(ctprfs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(ctptri)(char *uplo, char *diag, int *n, npy_complex64 *ap, int *info); +void BLAS_FUNC(ctptrs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(ctpttf)(char *transr, char *uplo, int *n, npy_complex64 *ap, npy_complex64 *arf, int *info); +void BLAS_FUNC(ctpttr)(char *uplo, int *n, npy_complex64 *ap, npy_complex64 *a, int *lda, int *info); +void BLAS_FUNC(ctrcon)(char *norm, char *uplo, char *diag, int *n, npy_complex64 *a, int *lda, float *rcond, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(ctrevc)(char *side, char *howmny, int *select, int *n, npy_complex64 *t, int *ldt, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, int *mm, int *m, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(ctrexc)(char *compq, int *n, npy_complex64 *t, int *ldt, npy_complex64 *q, int *ldq, int *ifst, int *ilst, int *info); +void BLAS_FUNC(ctrrfs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info); +void BLAS_FUNC(ctrsen)(char *job, char *compq, int *select, int *n, npy_complex64 *t, int *ldt, npy_complex64 *q, int *ldq, npy_complex64 *w, int *m, float *s, float *sep, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(ctrsna)(char *job, char *howmny, int *select, int *n, npy_complex64 *t, int *ldt, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, float *s, float *sep, int *mm, int *m, npy_complex64 *work, int *ldwork, float *rwork, int *info); +void BLAS_FUNC(ctrsyl)(char *trana, char *tranb, int *isgn, int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *c, int *ldc, float *scale, int *info); +void BLAS_FUNC(ctrti2)(char *uplo, char *diag, int *n, npy_complex64 *a, int *lda, int *info); +void BLAS_FUNC(ctrtri)(char *uplo, char *diag, int *n, npy_complex64 *a, int *lda, int *info); +void BLAS_FUNC(ctrtrs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *info); +void BLAS_FUNC(ctrttf)(char *transr, char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *arf, int *info); +void BLAS_FUNC(ctrttp)(char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *ap, int *info); +void BLAS_FUNC(ctzrzf)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cunbdb)(char *trans, char *signs, int *m, int *p, int *q, npy_complex64 *x11, int *ldx11, npy_complex64 *x12, int *ldx12, npy_complex64 *x21, int *ldx21, npy_complex64 *x22, int *ldx22, float *theta, float *phi, npy_complex64 *taup1, npy_complex64 *taup2, npy_complex64 *tauq1, npy_complex64 *tauq2, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cuncsd)(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, npy_complex64 *x11, int *ldx11, npy_complex64 *x12, int *ldx12, npy_complex64 *x21, int *ldx21, npy_complex64 *x22, int *ldx22, float *theta, npy_complex64 *u1, int *ldu1, npy_complex64 *u2, int *ldu2, npy_complex64 *v1t, int *ldv1t, npy_complex64 *v2t, int *ldv2t, npy_complex64 *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *info); +void BLAS_FUNC(cung2l)(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info); +void BLAS_FUNC(cung2r)(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info); +void BLAS_FUNC(cungbr)(char *vect, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cunghr)(int *n, int *ilo, int *ihi, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cungl2)(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info); +void BLAS_FUNC(cunglq)(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cungql)(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cungqr)(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cungr2)(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info); +void BLAS_FUNC(cungrq)(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cungtr)(char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cunm2l)(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info); +void BLAS_FUNC(cunm2r)(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info); +void BLAS_FUNC(cunmbr)(char *vect, char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cunmhr)(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cunml2)(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info); +void BLAS_FUNC(cunmlq)(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cunmql)(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cunmqr)(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cunmr2)(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info); +void BLAS_FUNC(cunmr3)(char *side, char *trans, int *m, int *n, int *k, int *l, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info); +void BLAS_FUNC(cunmrq)(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cunmrz)(char *side, char *trans, int *m, int *n, int *k, int *l, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cunmtr)(char *side, char *uplo, char *trans, int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info); +void BLAS_FUNC(cupgtr)(char *uplo, int *n, npy_complex64 *ap, npy_complex64 *tau, npy_complex64 *q, int *ldq, npy_complex64 *work, int *info); +void BLAS_FUNC(cupmtr)(char *side, char *uplo, char *trans, int *m, int *n, npy_complex64 *ap, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info); +void BLAS_FUNC(dbbcsd)(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, double *theta, double *phi, double *u1, int *ldu1, double *u2, int *ldu2, double *v1t, int *ldv1t, double *v2t, int *ldv2t, double *b11d, double *b11e, double *b12d, double *b12e, double *b21d, double *b21e, double *b22d, double *b22e, double *work, int *lwork, int *info); +void BLAS_FUNC(dbdsdc)(char *uplo, char *compq, int *n, double *d, double *e, double *u, int *ldu, double *vt, int *ldvt, double *q, int *iq, double *work, int *iwork, int *info); +void BLAS_FUNC(dbdsqr)(char *uplo, int *n, int *ncvt, int *nru, int *ncc, double *d, double *e, double *vt, int *ldvt, double *u, int *ldu, double *c, int *ldc, double *work, int *info); +void BLAS_FUNC(ddisna)(char *job, int *m, int *n, double *d, double *sep, int *info); +void BLAS_FUNC(dgbbrd)(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, double *ab, int *ldab, double *d, double *e, double *q, int *ldq, double *pt, int *ldpt, double *c, int *ldc, double *work, int *info); +void BLAS_FUNC(dgbcon)(char *norm, int *n, int *kl, int *ku, double *ab, int *ldab, int *ipiv, double *anorm, double *rcond, double *work, int *iwork, int *info); +void BLAS_FUNC(dgbequ)(int *m, int *n, int *kl, int *ku, double *ab, int *ldab, double *r, double *c, double *rowcnd, double *colcnd, double *amax, int *info); +void BLAS_FUNC(dgbequb)(int *m, int *n, int *kl, int *ku, double *ab, int *ldab, double *r, double *c, double *rowcnd, double *colcnd, double *amax, int *info); +void BLAS_FUNC(dgbrfs)(char *trans, int *n, int *kl, int *ku, int *nrhs, double *ab, int *ldab, double *afb, int *ldafb, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info); +void BLAS_FUNC(dgbsv)(int *n, int *kl, int *ku, int *nrhs, double *ab, int *ldab, int *ipiv, double *b, int *ldb, int *info); +void BLAS_FUNC(dgbsvx)(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, double *ab, int *ldab, double *afb, int *ldafb, int *ipiv, char *equed, double *r, double *c, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *iwork, int *info); +void BLAS_FUNC(dgbtf2)(int *m, int *n, int *kl, int *ku, double *ab, int *ldab, int *ipiv, int *info); +void BLAS_FUNC(dgbtrf)(int *m, int *n, int *kl, int *ku, double *ab, int *ldab, int *ipiv, int *info); +void BLAS_FUNC(dgbtrs)(char *trans, int *n, int *kl, int *ku, int *nrhs, double *ab, int *ldab, int *ipiv, double *b, int *ldb, int *info); +void BLAS_FUNC(dgebak)(char *job, char *side, int *n, int *ilo, int *ihi, double *scale, int *m, double *v, int *ldv, int *info); +void BLAS_FUNC(dgebal)(char *job, int *n, double *a, int *lda, int *ilo, int *ihi, double *scale, int *info); +void BLAS_FUNC(dgebd2)(int *m, int *n, double *a, int *lda, double *d, double *e, double *tauq, double *taup, double *work, int *info); +void BLAS_FUNC(dgebrd)(int *m, int *n, double *a, int *lda, double *d, double *e, double *tauq, double *taup, double *work, int *lwork, int *info); +void BLAS_FUNC(dgecon)(char *norm, int *n, double *a, int *lda, double *anorm, double *rcond, double *work, int *iwork, int *info); +void BLAS_FUNC(dgeequ)(int *m, int *n, double *a, int *lda, double *r, double *c, double *rowcnd, double *colcnd, double *amax, int *info); +void BLAS_FUNC(dgeequb)(int *m, int *n, double *a, int *lda, double *r, double *c, double *rowcnd, double *colcnd, double *amax, int *info); +void BLAS_FUNC(dgees)(char *jobvs, char *sort, _dselect2 *select, int *n, double *a, int *lda, int *sdim, double *wr, double *wi, double *vs, int *ldvs, double *work, int *lwork, int *bwork, int *info); +void BLAS_FUNC(dgeesx)(char *jobvs, char *sort, _dselect2 *select, char *sense, int *n, double *a, int *lda, int *sdim, double *wr, double *wi, double *vs, int *ldvs, double *rconde, double *rcondv, double *work, int *lwork, int *iwork, int *liwork, int *bwork, int *info); +void BLAS_FUNC(dgeev)(char *jobvl, char *jobvr, int *n, double *a, int *lda, double *wr, double *wi, double *vl, int *ldvl, double *vr, int *ldvr, double *work, int *lwork, int *info); +void BLAS_FUNC(dgeevx)(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, double *a, int *lda, double *wr, double *wi, double *vl, int *ldvl, double *vr, int *ldvr, int *ilo, int *ihi, double *scale, double *abnrm, double *rconde, double *rcondv, double *work, int *lwork, int *iwork, int *info); +void BLAS_FUNC(dgehd2)(int *n, int *ilo, int *ihi, double *a, int *lda, double *tau, double *work, int *info); +void BLAS_FUNC(dgehrd)(int *n, int *ilo, int *ihi, double *a, int *lda, double *tau, double *work, int *lwork, int *info); +void BLAS_FUNC(dgejsv)(char *joba, char *jobu, char *jobv, char *jobr, char *jobt, char *jobp, int *m, int *n, double *a, int *lda, double *sva, double *u, int *ldu, double *v, int *ldv, double *work, int *lwork, int *iwork, int *info); +void BLAS_FUNC(dgelq2)(int *m, int *n, double *a, int *lda, double *tau, double *work, int *info); +void BLAS_FUNC(dgelqf)(int *m, int *n, double *a, int *lda, double *tau, double *work, int *lwork, int *info); +void BLAS_FUNC(dgels)(char *trans, int *m, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, double *work, int *lwork, int *info); +void BLAS_FUNC(dgelsd)(int *m, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, double *s, double *rcond, int *rank, double *work, int *lwork, int *iwork, int *info); +void BLAS_FUNC(dgelss)(int *m, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, double *s, double *rcond, int *rank, double *work, int *lwork, int *info); +void BLAS_FUNC(dgelsy)(int *m, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, int *jpvt, double *rcond, int *rank, double *work, int *lwork, int *info); +void BLAS_FUNC(dgemqrt)(char *side, char *trans, int *m, int *n, int *k, int *nb, double *v, int *ldv, double *t, int *ldt, double *c, int *ldc, double *work, int *info); +void BLAS_FUNC(dgeql2)(int *m, int *n, double *a, int *lda, double *tau, double *work, int *info); +void BLAS_FUNC(dgeqlf)(int *m, int *n, double *a, int *lda, double *tau, double *work, int *lwork, int *info); +void BLAS_FUNC(dgeqp3)(int *m, int *n, double *a, int *lda, int *jpvt, double *tau, double *work, int *lwork, int *info); +void BLAS_FUNC(dgeqr2)(int *m, int *n, double *a, int *lda, double *tau, double *work, int *info); +void BLAS_FUNC(dgeqr2p)(int *m, int *n, double *a, int *lda, double *tau, double *work, int *info); +void BLAS_FUNC(dgeqrf)(int *m, int *n, double *a, int *lda, double *tau, double *work, int *lwork, int *info); +void BLAS_FUNC(dgeqrfp)(int *m, int *n, double *a, int *lda, double *tau, double *work, int *lwork, int *info); +void BLAS_FUNC(dgeqrt)(int *m, int *n, int *nb, double *a, int *lda, double *t, int *ldt, double *work, int *info); +void BLAS_FUNC(dgeqrt2)(int *m, int *n, double *a, int *lda, double *t, int *ldt, int *info); +void BLAS_FUNC(dgeqrt3)(int *m, int *n, double *a, int *lda, double *t, int *ldt, int *info); +void BLAS_FUNC(dgerfs)(char *trans, int *n, int *nrhs, double *a, int *lda, double *af, int *ldaf, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info); +void BLAS_FUNC(dgerq2)(int *m, int *n, double *a, int *lda, double *tau, double *work, int *info); +void BLAS_FUNC(dgerqf)(int *m, int *n, double *a, int *lda, double *tau, double *work, int *lwork, int *info); +void BLAS_FUNC(dgesc2)(int *n, double *a, int *lda, double *rhs, int *ipiv, int *jpiv, double *scale); +void BLAS_FUNC(dgesdd)(char *jobz, int *m, int *n, double *a, int *lda, double *s, double *u, int *ldu, double *vt, int *ldvt, double *work, int *lwork, int *iwork, int *info); +void BLAS_FUNC(dgesv)(int *n, int *nrhs, double *a, int *lda, int *ipiv, double *b, int *ldb, int *info); +void BLAS_FUNC(dgesvd)(char *jobu, char *jobvt, int *m, int *n, double *a, int *lda, double *s, double *u, int *ldu, double *vt, int *ldvt, double *work, int *lwork, int *info); +void BLAS_FUNC(dgesvj)(char *joba, char *jobu, char *jobv, int *m, int *n, double *a, int *lda, double *sva, int *mv, double *v, int *ldv, double *work, int *lwork, int *info); +void BLAS_FUNC(dgesvx)(char *fact, char *trans, int *n, int *nrhs, double *a, int *lda, double *af, int *ldaf, int *ipiv, char *equed, double *r, double *c, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *iwork, int *info); +void BLAS_FUNC(dgetc2)(int *n, double *a, int *lda, int *ipiv, int *jpiv, int *info); +void BLAS_FUNC(dgetf2)(int *m, int *n, double *a, int *lda, int *ipiv, int *info); +void BLAS_FUNC(dgetrf)(int *m, int *n, double *a, int *lda, int *ipiv, int *info); +void BLAS_FUNC(dgetri)(int *n, double *a, int *lda, int *ipiv, double *work, int *lwork, int *info); +void BLAS_FUNC(dgetrs)(char *trans, int *n, int *nrhs, double *a, int *lda, int *ipiv, double *b, int *ldb, int *info); +void BLAS_FUNC(dggbak)(char *job, char *side, int *n, int *ilo, int *ihi, double *lscale, double *rscale, int *m, double *v, int *ldv, int *info); +void BLAS_FUNC(dggbal)(char *job, int *n, double *a, int *lda, double *b, int *ldb, int *ilo, int *ihi, double *lscale, double *rscale, double *work, int *info); +void BLAS_FUNC(dgges)(char *jobvsl, char *jobvsr, char *sort, _dselect3 *selctg, int *n, double *a, int *lda, double *b, int *ldb, int *sdim, double *alphar, double *alphai, double *beta, double *vsl, int *ldvsl, double *vsr, int *ldvsr, double *work, int *lwork, int *bwork, int *info); +void BLAS_FUNC(dggesx)(char *jobvsl, char *jobvsr, char *sort, _dselect3 *selctg, char *sense, int *n, double *a, int *lda, double *b, int *ldb, int *sdim, double *alphar, double *alphai, double *beta, double *vsl, int *ldvsl, double *vsr, int *ldvsr, double *rconde, double *rcondv, double *work, int *lwork, int *iwork, int *liwork, int *bwork, int *info); +void BLAS_FUNC(dggev)(char *jobvl, char *jobvr, int *n, double *a, int *lda, double *b, int *ldb, double *alphar, double *alphai, double *beta, double *vl, int *ldvl, double *vr, int *ldvr, double *work, int *lwork, int *info); +void BLAS_FUNC(dggevx)(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, double *a, int *lda, double *b, int *ldb, double *alphar, double *alphai, double *beta, double *vl, int *ldvl, double *vr, int *ldvr, int *ilo, int *ihi, double *lscale, double *rscale, double *abnrm, double *bbnrm, double *rconde, double *rcondv, double *work, int *lwork, int *iwork, int *bwork, int *info); +void BLAS_FUNC(dggglm)(int *n, int *m, int *p, double *a, int *lda, double *b, int *ldb, double *d, double *x, double *y, double *work, int *lwork, int *info); +void BLAS_FUNC(dgghrd)(char *compq, char *compz, int *n, int *ilo, int *ihi, double *a, int *lda, double *b, int *ldb, double *q, int *ldq, double *z, int *ldz, int *info); +void BLAS_FUNC(dgglse)(int *m, int *n, int *p, double *a, int *lda, double *b, int *ldb, double *c, double *d, double *x, double *work, int *lwork, int *info); +void BLAS_FUNC(dggqrf)(int *n, int *m, int *p, double *a, int *lda, double *taua, double *b, int *ldb, double *taub, double *work, int *lwork, int *info); +void BLAS_FUNC(dggrqf)(int *m, int *p, int *n, double *a, int *lda, double *taua, double *b, int *ldb, double *taub, double *work, int *lwork, int *info); +void BLAS_FUNC(dgsvj0)(char *jobv, int *m, int *n, double *a, int *lda, double *d, double *sva, int *mv, double *v, int *ldv, double *eps, double *sfmin, double *tol, int *nsweep, double *work, int *lwork, int *info); +void BLAS_FUNC(dgsvj1)(char *jobv, int *m, int *n, int *n1, double *a, int *lda, double *d, double *sva, int *mv, double *v, int *ldv, double *eps, double *sfmin, double *tol, int *nsweep, double *work, int *lwork, int *info); +void BLAS_FUNC(dgtcon)(char *norm, int *n, double *dl, double *d, double *du, double *du2, int *ipiv, double *anorm, double *rcond, double *work, int *iwork, int *info); +void BLAS_FUNC(dgtrfs)(char *trans, int *n, int *nrhs, double *dl, double *d, double *du, double *dlf, double *df, double *duf, double *du2, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info); +void BLAS_FUNC(dgtsv)(int *n, int *nrhs, double *dl, double *d, double *du, double *b, int *ldb, int *info); +void BLAS_FUNC(dgtsvx)(char *fact, char *trans, int *n, int *nrhs, double *dl, double *d, double *du, double *dlf, double *df, double *duf, double *du2, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *iwork, int *info); +void BLAS_FUNC(dgttrf)(int *n, double *dl, double *d, double *du, double *du2, int *ipiv, int *info); +void BLAS_FUNC(dgttrs)(char *trans, int *n, int *nrhs, double *dl, double *d, double *du, double *du2, int *ipiv, double *b, int *ldb, int *info); +void BLAS_FUNC(dgtts2)(int *itrans, int *n, int *nrhs, double *dl, double *d, double *du, double *du2, int *ipiv, double *b, int *ldb); +void BLAS_FUNC(dhgeqz)(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, double *h, int *ldh, double *t, int *ldt, double *alphar, double *alphai, double *beta, double *q, int *ldq, double *z, int *ldz, double *work, int *lwork, int *info); +void BLAS_FUNC(dhsein)(char *side, char *eigsrc, char *initv, int *select, int *n, double *h, int *ldh, double *wr, double *wi, double *vl, int *ldvl, double *vr, int *ldvr, int *mm, int *m, double *work, int *ifaill, int *ifailr, int *info); +void BLAS_FUNC(dhseqr)(char *job, char *compz, int *n, int *ilo, int *ihi, double *h, int *ldh, double *wr, double *wi, double *z, int *ldz, double *work, int *lwork, int *info); +int BLAS_FUNC(disnan)(double *din); +void BLAS_FUNC(dlabad)(double *small, double *large); +void BLAS_FUNC(dlabrd)(int *m, int *n, int *nb, double *a, int *lda, double *d, double *e, double *tauq, double *taup, double *x, int *ldx, double *y, int *ldy); +void BLAS_FUNC(dlacn2)(int *n, double *v, double *x, int *isgn, double *est, int *kase, int *isave); +void BLAS_FUNC(dlacon)(int *n, double *v, double *x, int *isgn, double *est, int *kase); +void BLAS_FUNC(dlacpy)(char *uplo, int *m, int *n, double *a, int *lda, double *b, int *ldb); +void BLAS_FUNC(dladiv)(double *a, double *b, double *c, double *d, double *p, double *q); +void BLAS_FUNC(dlae2)(double *a, double *b, double *c, double *rt1, double *rt2); +void BLAS_FUNC(dlaebz)(int *ijob, int *nitmax, int *n, int *mmax, int *minp, int *nbmin, double *abstol, double *reltol, double *pivmin, double *d, double *e, double *e2, int *nval, double *ab, double *c, int *mout, int *nab, double *work, int *iwork, int *info); +void BLAS_FUNC(dlaed0)(int *icompq, int *qsiz, int *n, double *d, double *e, double *q, int *ldq, double *qstore, int *ldqs, double *work, int *iwork, int *info); +void BLAS_FUNC(dlaed1)(int *n, double *d, double *q, int *ldq, int *indxq, double *rho, int *cutpnt, double *work, int *iwork, int *info); +void BLAS_FUNC(dlaed2)(int *k, int *n, int *n1, double *d, double *q, int *ldq, int *indxq, double *rho, double *z, double *dlamda, double *w, double *q2, int *indx, int *indxc, int *indxp, int *coltyp, int *info); +void BLAS_FUNC(dlaed3)(int *k, int *n, int *n1, double *d, double *q, int *ldq, double *rho, double *dlamda, double *q2, int *indx, int *ctot, double *w, double *s, int *info); +void BLAS_FUNC(dlaed4)(int *n, int *i, double *d, double *z, double *delta, double *rho, double *dlam, int *info); +void BLAS_FUNC(dlaed5)(int *i, double *d, double *z, double *delta, double *rho, double *dlam); +void BLAS_FUNC(dlaed6)(int *kniter, int *orgati, double *rho, double *d, double *z, double *finit, double *tau, int *info); +void BLAS_FUNC(dlaed7)(int *icompq, int *n, int *qsiz, int *tlvls, int *curlvl, int *curpbm, double *d, double *q, int *ldq, int *indxq, double *rho, int *cutpnt, double *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, double *givnum, double *work, int *iwork, int *info); +void BLAS_FUNC(dlaed8)(int *icompq, int *k, int *n, int *qsiz, double *d, double *q, int *ldq, int *indxq, double *rho, int *cutpnt, double *z, double *dlamda, double *q2, int *ldq2, double *w, int *perm, int *givptr, int *givcol, double *givnum, int *indxp, int *indx, int *info); +void BLAS_FUNC(dlaed9)(int *k, int *kstart, int *kstop, int *n, double *d, double *q, int *ldq, double *rho, double *dlamda, double *w, double *s, int *lds, int *info); +void BLAS_FUNC(dlaeda)(int *n, int *tlvls, int *curlvl, int *curpbm, int *prmptr, int *perm, int *givptr, int *givcol, double *givnum, double *q, int *qptr, double *z, double *ztemp, int *info); +void BLAS_FUNC(dlaein)(int *rightv, int *noinit, int *n, double *h, int *ldh, double *wr, double *wi, double *vr, double *vi, double *b, int *ldb, double *work, double *eps3, double *smlnum, double *bignum, int *info); +void BLAS_FUNC(dlaev2)(double *a, double *b, double *c, double *rt1, double *rt2, double *cs1, double *sn1); +void BLAS_FUNC(dlaexc)(int *wantq, int *n, double *t, int *ldt, double *q, int *ldq, int *j1, int *n1, int *n2, double *work, int *info); +void BLAS_FUNC(dlag2)(double *a, int *lda, double *b, int *ldb, double *safmin, double *scale1, double *scale2, double *wr1, double *wr2, double *wi); +void BLAS_FUNC(dlag2s)(int *m, int *n, double *a, int *lda, float *sa, int *ldsa, int *info); +void BLAS_FUNC(dlags2)(int *upper, double *a1, double *a2, double *a3, double *b1, double *b2, double *b3, double *csu, double *snu, double *csv, double *snv, double *csq, double *snq); +void BLAS_FUNC(dlagtf)(int *n, double *a, double *lambda_, double *b, double *c, double *tol, double *d, int *in_, int *info); +void BLAS_FUNC(dlagtm)(char *trans, int *n, int *nrhs, double *alpha, double *dl, double *d, double *du, double *x, int *ldx, double *beta, double *b, int *ldb); +void BLAS_FUNC(dlagts)(int *job, int *n, double *a, double *b, double *c, double *d, int *in_, double *y, double *tol, int *info); +void BLAS_FUNC(dlagv2)(double *a, int *lda, double *b, int *ldb, double *alphar, double *alphai, double *beta, double *csl, double *snl, double *csr, double *snr); +void BLAS_FUNC(dlahqr)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, double *h, int *ldh, double *wr, double *wi, int *iloz, int *ihiz, double *z, int *ldz, int *info); +void BLAS_FUNC(dlahr2)(int *n, int *k, int *nb, double *a, int *lda, double *tau, double *t, int *ldt, double *y, int *ldy); +void BLAS_FUNC(dlaic1)(int *job, int *j, double *x, double *sest, double *w, double *gamma, double *sestpr, double *s, double *c); +void BLAS_FUNC(dlaln2)(int *ltrans, int *na, int *nw, double *smin, double *ca, double *a, int *lda, double *d1, double *d2, double *b, int *ldb, double *wr, double *wi, double *x, int *ldx, double *scale, double *xnorm, int *info); +void BLAS_FUNC(dlals0)(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, double *b, int *ldb, double *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, double *givnum, int *ldgnum, double *poles, double *difl, double *difr, double *z, int *k, double *c, double *s, double *work, int *info); +void BLAS_FUNC(dlalsa)(int *icompq, int *smlsiz, int *n, int *nrhs, double *b, int *ldb, double *bx, int *ldbx, double *u, int *ldu, double *vt, int *k, double *difl, double *difr, double *z, double *poles, int *givptr, int *givcol, int *ldgcol, int *perm, double *givnum, double *c, double *s, double *work, int *iwork, int *info); +void BLAS_FUNC(dlalsd)(char *uplo, int *smlsiz, int *n, int *nrhs, double *d, double *e, double *b, int *ldb, double *rcond, int *rank, double *work, int *iwork, int *info); +double BLAS_FUNC(dlamch)(char *cmach); +void BLAS_FUNC(dlamrg)(int *n1, int *n2, double *a, int *dtrd1, int *dtrd2, int *index_bn); +int BLAS_FUNC(dlaneg)(int *n, double *d, double *lld, double *sigma, double *pivmin, int *r); +double BLAS_FUNC(dlangb)(char *norm, int *n, int *kl, int *ku, double *ab, int *ldab, double *work); +double BLAS_FUNC(dlange)(char *norm, int *m, int *n, double *a, int *lda, double *work); +double BLAS_FUNC(dlangt)(char *norm, int *n, double *dl, double *d_, double *du); +double BLAS_FUNC(dlanhs)(char *norm, int *n, double *a, int *lda, double *work); +double BLAS_FUNC(dlansb)(char *norm, char *uplo, int *n, int *k, double *ab, int *ldab, double *work); +double BLAS_FUNC(dlansf)(char *norm, char *transr, char *uplo, int *n, double *a, double *work); +double BLAS_FUNC(dlansp)(char *norm, char *uplo, int *n, double *ap, double *work); +double BLAS_FUNC(dlanst)(char *norm, int *n, double *d_, double *e); +double BLAS_FUNC(dlansy)(char *norm, char *uplo, int *n, double *a, int *lda, double *work); +double BLAS_FUNC(dlantb)(char *norm, char *uplo, char *diag, int *n, int *k, double *ab, int *ldab, double *work); +double BLAS_FUNC(dlantp)(char *norm, char *uplo, char *diag, int *n, double *ap, double *work); +double BLAS_FUNC(dlantr)(char *norm, char *uplo, char *diag, int *m, int *n, double *a, int *lda, double *work); +void BLAS_FUNC(dlanv2)(double *a, double *b, double *c, double *d, double *rt1r, double *rt1i, double *rt2r, double *rt2i, double *cs, double *sn); +void BLAS_FUNC(dlapll)(int *n, double *x, int *incx, double *y, int *incy, double *ssmin); +void BLAS_FUNC(dlapmr)(int *forwrd, int *m, int *n, double *x, int *ldx, int *k); +void BLAS_FUNC(dlapmt)(int *forwrd, int *m, int *n, double *x, int *ldx, int *k); +double BLAS_FUNC(dlapy2)(double *x, double *y); +double BLAS_FUNC(dlapy3)(double *x, double *y, double *z); +void BLAS_FUNC(dlaqgb)(int *m, int *n, int *kl, int *ku, double *ab, int *ldab, double *r, double *c, double *rowcnd, double *colcnd, double *amax, char *equed); +void BLAS_FUNC(dlaqge)(int *m, int *n, double *a, int *lda, double *r, double *c, double *rowcnd, double *colcnd, double *amax, char *equed); +void BLAS_FUNC(dlaqp2)(int *m, int *n, int *offset, double *a, int *lda, int *jpvt, double *tau, double *vn1, double *vn2, double *work); +void BLAS_FUNC(dlaqps)(int *m, int *n, int *offset, int *nb, int *kb, double *a, int *lda, int *jpvt, double *tau, double *vn1, double *vn2, double *auxv, double *f, int *ldf); +void BLAS_FUNC(dlaqr0)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, double *h, int *ldh, double *wr, double *wi, int *iloz, int *ihiz, double *z, int *ldz, double *work, int *lwork, int *info); +void BLAS_FUNC(dlaqr1)(int *n, double *h, int *ldh, double *sr1, double *si1, double *sr2, double *si2, double *v); +void BLAS_FUNC(dlaqr2)(int *wantt, int *wantz, int *n, int *ktop, int *kbot, int *nw, double *h, int *ldh, int *iloz, int *ihiz, double *z, int *ldz, int *ns, int *nd, double *sr, double *si, double *v, int *ldv, int *nh, double *t, int *ldt, int *nv, double *wv, int *ldwv, double *work, int *lwork); +void BLAS_FUNC(dlaqr3)(int *wantt, int *wantz, int *n, int *ktop, int *kbot, int *nw, double *h, int *ldh, int *iloz, int *ihiz, double *z, int *ldz, int *ns, int *nd, double *sr, double *si, double *v, int *ldv, int *nh, double *t, int *ldt, int *nv, double *wv, int *ldwv, double *work, int *lwork); +void BLAS_FUNC(dlaqr4)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, double *h, int *ldh, double *wr, double *wi, int *iloz, int *ihiz, double *z, int *ldz, double *work, int *lwork, int *info); +void BLAS_FUNC(dlaqr5)(int *wantt, int *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, double *sr, double *si, double *h, int *ldh, int *iloz, int *ihiz, double *z, int *ldz, double *v, int *ldv, double *u, int *ldu, int *nv, double *wv, int *ldwv, int *nh, double *wh, int *ldwh); +void BLAS_FUNC(dlaqsb)(char *uplo, int *n, int *kd, double *ab, int *ldab, double *s, double *scond, double *amax, char *equed); +void BLAS_FUNC(dlaqsp)(char *uplo, int *n, double *ap, double *s, double *scond, double *amax, char *equed); +void BLAS_FUNC(dlaqsy)(char *uplo, int *n, double *a, int *lda, double *s, double *scond, double *amax, char *equed); +void BLAS_FUNC(dlaqtr)(int *ltran, int *lreal, int *n, double *t, int *ldt, double *b, double *w, double *scale, double *x, double *work, int *info); +void BLAS_FUNC(dlar1v)(int *n, int *b1, int *bn, double *lambda_, double *d, double *l, double *ld, double *lld, double *pivmin, double *gaptol, double *z, int *wantnc, int *negcnt, double *ztz, double *mingma, int *r, int *isuppz, double *nrminv, double *resid, double *rqcorr, double *work); +void BLAS_FUNC(dlar2v)(int *n, double *x, double *y, double *z, int *incx, double *c, double *s, int *incc); +void BLAS_FUNC(dlarf)(char *side, int *m, int *n, double *v, int *incv, double *tau, double *c, int *ldc, double *work); +void BLAS_FUNC(dlarfb)(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, double *v, int *ldv, double *t, int *ldt, double *c, int *ldc, double *work, int *ldwork); +void BLAS_FUNC(dlarfg)(int *n, double *alpha, double *x, int *incx, double *tau); +void BLAS_FUNC(dlarfgp)(int *n, double *alpha, double *x, int *incx, double *tau); +void BLAS_FUNC(dlarft)(char *direct, char *storev, int *n, int *k, double *v, int *ldv, double *tau, double *t, int *ldt); +void BLAS_FUNC(dlarfx)(char *side, int *m, int *n, double *v, double *tau, double *c, int *ldc, double *work); +void BLAS_FUNC(dlargv)(int *n, double *x, int *incx, double *y, int *incy, double *c, int *incc); +void BLAS_FUNC(dlarnv)(int *idist, int *iseed, int *n, double *x); +void BLAS_FUNC(dlarra)(int *n, double *d, double *e, double *e2, double *spltol, double *tnrm, int *nsplit, int *isplit, int *info); +void BLAS_FUNC(dlarrb)(int *n, double *d, double *lld, int *ifirst, int *ilast, double *rtol1, double *rtol2, int *offset, double *w, double *wgap, double *werr, double *work, int *iwork, double *pivmin, double *spdiam, int *twist, int *info); +void BLAS_FUNC(dlarrc)(char *jobt, int *n, double *vl, double *vu, double *d, double *e, double *pivmin, int *eigcnt, int *lcnt, int *rcnt, int *info); +void BLAS_FUNC(dlarrd)(char *range, char *order, int *n, double *vl, double *vu, int *il, int *iu, double *gers, double *reltol, double *d, double *e, double *e2, double *pivmin, int *nsplit, int *isplit, int *m, double *w, double *werr, double *wl, double *wu, int *iblock, int *indexw, double *work, int *iwork, int *info); +void BLAS_FUNC(dlarre)(char *range, int *n, double *vl, double *vu, int *il, int *iu, double *d, double *e, double *e2, double *rtol1, double *rtol2, double *spltol, int *nsplit, int *isplit, int *m, double *w, double *werr, double *wgap, int *iblock, int *indexw, double *gers, double *pivmin, double *work, int *iwork, int *info); +void BLAS_FUNC(dlarrf)(int *n, double *d, double *l, double *ld, int *clstrt, int *clend, double *w, double *wgap, double *werr, double *spdiam, double *clgapl, double *clgapr, double *pivmin, double *sigma, double *dplus, double *lplus, double *work, int *info); +void BLAS_FUNC(dlarrj)(int *n, double *d, double *e2, int *ifirst, int *ilast, double *rtol, int *offset, double *w, double *werr, double *work, int *iwork, double *pivmin, double *spdiam, int *info); +void BLAS_FUNC(dlarrk)(int *n, int *iw, double *gl, double *gu, double *d, double *e2, double *pivmin, double *reltol, double *w, double *werr, int *info); +void BLAS_FUNC(dlarrr)(int *n, double *d, double *e, int *info); +void BLAS_FUNC(dlarrv)(int *n, double *vl, double *vu, double *d, double *l, double *pivmin, int *isplit, int *m, int *dol, int *dou, double *minrgp, double *rtol1, double *rtol2, double *w, double *werr, double *wgap, int *iblock, int *indexw, double *gers, double *z, int *ldz, int *isuppz, double *work, int *iwork, int *info); +void BLAS_FUNC(dlartg)(double *f, double *g, double *cs, double *sn, double *r); +void BLAS_FUNC(dlartgp)(double *f, double *g, double *cs, double *sn, double *r); +void BLAS_FUNC(dlartgs)(double *x, double *y, double *sigma, double *cs, double *sn); +void BLAS_FUNC(dlartv)(int *n, double *x, int *incx, double *y, int *incy, double *c, double *s, int *incc); +void BLAS_FUNC(dlaruv)(int *iseed, int *n, double *x); +void BLAS_FUNC(dlarz)(char *side, int *m, int *n, int *l, double *v, int *incv, double *tau, double *c, int *ldc, double *work); +void BLAS_FUNC(dlarzb)(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, double *v, int *ldv, double *t, int *ldt, double *c, int *ldc, double *work, int *ldwork); +void BLAS_FUNC(dlarzt)(char *direct, char *storev, int *n, int *k, double *v, int *ldv, double *tau, double *t, int *ldt); +void BLAS_FUNC(dlas2)(double *f, double *g, double *h, double *ssmin, double *ssmax); +void BLAS_FUNC(dlascl)(char *type_bn, int *kl, int *ku, double *cfrom, double *cto, int *m, int *n, double *a, int *lda, int *info); +void BLAS_FUNC(dlasd0)(int *n, int *sqre, double *d, double *e, double *u, int *ldu, double *vt, int *ldvt, int *smlsiz, int *iwork, double *work, int *info); +void BLAS_FUNC(dlasd1)(int *nl, int *nr, int *sqre, double *d, double *alpha, double *beta, double *u, int *ldu, double *vt, int *ldvt, int *idxq, int *iwork, double *work, int *info); +void BLAS_FUNC(dlasd2)(int *nl, int *nr, int *sqre, int *k, double *d, double *z, double *alpha, double *beta, double *u, int *ldu, double *vt, int *ldvt, double *dsigma, double *u2, int *ldu2, double *vt2, int *ldvt2, int *idxp, int *idx, int *idxc, int *idxq, int *coltyp, int *info); +void BLAS_FUNC(dlasd3)(int *nl, int *nr, int *sqre, int *k, double *d, double *q, int *ldq, double *dsigma, double *u, int *ldu, double *u2, int *ldu2, double *vt, int *ldvt, double *vt2, int *ldvt2, int *idxc, int *ctot, double *z, int *info); +void BLAS_FUNC(dlasd4)(int *n, int *i, double *d, double *z, double *delta, double *rho, double *sigma, double *work, int *info); +void BLAS_FUNC(dlasd5)(int *i, double *d, double *z, double *delta, double *rho, double *dsigma, double *work); +void BLAS_FUNC(dlasd6)(int *icompq, int *nl, int *nr, int *sqre, double *d, double *vf, double *vl, double *alpha, double *beta, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, double *givnum, int *ldgnum, double *poles, double *difl, double *difr, double *z, int *k, double *c, double *s, double *work, int *iwork, int *info); +void BLAS_FUNC(dlasd7)(int *icompq, int *nl, int *nr, int *sqre, int *k, double *d, double *z, double *zw, double *vf, double *vfw, double *vl, double *vlw, double *alpha, double *beta, double *dsigma, int *idx, int *idxp, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, double *givnum, int *ldgnum, double *c, double *s, int *info); +void BLAS_FUNC(dlasd8)(int *icompq, int *k, double *d, double *z, double *vf, double *vl, double *difl, double *difr, int *lddifr, double *dsigma, double *work, int *info); +void BLAS_FUNC(dlasda)(int *icompq, int *smlsiz, int *n, int *sqre, double *d, double *e, double *u, int *ldu, double *vt, int *k, double *difl, double *difr, double *z, double *poles, int *givptr, int *givcol, int *ldgcol, int *perm, double *givnum, double *c, double *s, double *work, int *iwork, int *info); +void BLAS_FUNC(dlasdq)(char *uplo, int *sqre, int *n, int *ncvt, int *nru, int *ncc, double *d, double *e, double *vt, int *ldvt, double *u, int *ldu, double *c, int *ldc, double *work, int *info); +void BLAS_FUNC(dlasdt)(int *n, int *lvl, int *nd, int *inode, int *ndiml, int *ndimr, int *msub); +void BLAS_FUNC(dlaset)(char *uplo, int *m, int *n, double *alpha, double *beta, double *a, int *lda); +void BLAS_FUNC(dlasq1)(int *n, double *d, double *e, double *work, int *info); +void BLAS_FUNC(dlasq2)(int *n, double *z, int *info); +void BLAS_FUNC(dlasq3)(int *i0, int *n0, double *z, int *pp, double *dmin, double *sigma, double *desig, double *qmax, int *nfail, int *iter, int *ndiv, int *ieee, int *ttype, double *dmin1, double *dmin2, double *dn, double *dn1, double *dn2, double *g, double *tau); +void BLAS_FUNC(dlasq4)(int *i0, int *n0, double *z, int *pp, int *n0in, double *dmin, double *dmin1, double *dmin2, double *dn, double *dn1, double *dn2, double *tau, int *ttype, double *g); +void BLAS_FUNC(dlasq6)(int *i0, int *n0, double *z, int *pp, double *dmin, double *dmin1, double *dmin2, double *dn, double *dnm1, double *dnm2); +void BLAS_FUNC(dlasr)(char *side, char *pivot, char *direct, int *m, int *n, double *c, double *s, double *a, int *lda); +void BLAS_FUNC(dlasrt)(char *id, int *n, double *d, int *info); +void BLAS_FUNC(dlassq)(int *n, double *x, int *incx, double *scale, double *sumsq); +void BLAS_FUNC(dlasv2)(double *f, double *g, double *h, double *ssmin, double *ssmax, double *snr, double *csr, double *snl, double *csl); +void BLAS_FUNC(dlaswp)(int *n, double *a, int *lda, int *k1, int *k2, int *ipiv, int *incx); +void BLAS_FUNC(dlasy2)(int *ltranl, int *ltranr, int *isgn, int *n1, int *n2, double *tl, int *ldtl, double *tr, int *ldtr, double *b, int *ldb, double *scale, double *x, int *ldx, double *xnorm, int *info); +void BLAS_FUNC(dlasyf)(char *uplo, int *n, int *nb, int *kb, double *a, int *lda, int *ipiv, double *w, int *ldw, int *info); +void BLAS_FUNC(dlat2s)(char *uplo, int *n, double *a, int *lda, float *sa, int *ldsa, int *info); +void BLAS_FUNC(dlatbs)(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, double *ab, int *ldab, double *x, double *scale, double *cnorm, int *info); +void BLAS_FUNC(dlatdf)(int *ijob, int *n, double *z, int *ldz, double *rhs, double *rdsum, double *rdscal, int *ipiv, int *jpiv); +void BLAS_FUNC(dlatps)(char *uplo, char *trans, char *diag, char *normin, int *n, double *ap, double *x, double *scale, double *cnorm, int *info); +void BLAS_FUNC(dlatrd)(char *uplo, int *n, int *nb, double *a, int *lda, double *e, double *tau, double *w, int *ldw); +void BLAS_FUNC(dlatrs)(char *uplo, char *trans, char *diag, char *normin, int *n, double *a, int *lda, double *x, double *scale, double *cnorm, int *info); +void BLAS_FUNC(dlatrz)(int *m, int *n, int *l, double *a, int *lda, double *tau, double *work); +void BLAS_FUNC(dlauu2)(char *uplo, int *n, double *a, int *lda, int *info); +void BLAS_FUNC(dlauum)(char *uplo, int *n, double *a, int *lda, int *info); +void BLAS_FUNC(dopgtr)(char *uplo, int *n, double *ap, double *tau, double *q, int *ldq, double *work, int *info); +void BLAS_FUNC(dopmtr)(char *side, char *uplo, char *trans, int *m, int *n, double *ap, double *tau, double *c, int *ldc, double *work, int *info); +void BLAS_FUNC(dorbdb)(char *trans, char *signs, int *m, int *p, int *q, double *x11, int *ldx11, double *x12, int *ldx12, double *x21, int *ldx21, double *x22, int *ldx22, double *theta, double *phi, double *taup1, double *taup2, double *tauq1, double *tauq2, double *work, int *lwork, int *info); +void BLAS_FUNC(dorcsd)(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, double *x11, int *ldx11, double *x12, int *ldx12, double *x21, int *ldx21, double *x22, int *ldx22, double *theta, double *u1, int *ldu1, double *u2, int *ldu2, double *v1t, int *ldv1t, double *v2t, int *ldv2t, double *work, int *lwork, int *iwork, int *info); +void BLAS_FUNC(dorg2l)(int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *info); +void BLAS_FUNC(dorg2r)(int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *info); +void BLAS_FUNC(dorgbr)(char *vect, int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *lwork, int *info); +void BLAS_FUNC(dorghr)(int *n, int *ilo, int *ihi, double *a, int *lda, double *tau, double *work, int *lwork, int *info); +void BLAS_FUNC(dorgl2)(int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *info); +void BLAS_FUNC(dorglq)(int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *lwork, int *info); +void BLAS_FUNC(dorgql)(int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *lwork, int *info); +void BLAS_FUNC(dorgqr)(int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *lwork, int *info); +void BLAS_FUNC(dorgr2)(int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *info); +void BLAS_FUNC(dorgrq)(int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *lwork, int *info); +void BLAS_FUNC(dorgtr)(char *uplo, int *n, double *a, int *lda, double *tau, double *work, int *lwork, int *info); +void BLAS_FUNC(dorm2l)(char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *info); +void BLAS_FUNC(dorm2r)(char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *info); +void BLAS_FUNC(dormbr)(char *vect, char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info); +void BLAS_FUNC(dormhr)(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info); +void BLAS_FUNC(dorml2)(char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *info); +void BLAS_FUNC(dormlq)(char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info); +void BLAS_FUNC(dormql)(char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info); +void BLAS_FUNC(dormqr)(char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info); +void BLAS_FUNC(dormr2)(char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *info); +void BLAS_FUNC(dormr3)(char *side, char *trans, int *m, int *n, int *k, int *l, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *info); +void BLAS_FUNC(dormrq)(char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info); +void BLAS_FUNC(dormrz)(char *side, char *trans, int *m, int *n, int *k, int *l, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info); +void BLAS_FUNC(dormtr)(char *side, char *uplo, char *trans, int *m, int *n, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info); +void BLAS_FUNC(dpbcon)(char *uplo, int *n, int *kd, double *ab, int *ldab, double *anorm, double *rcond, double *work, int *iwork, int *info); +void BLAS_FUNC(dpbequ)(char *uplo, int *n, int *kd, double *ab, int *ldab, double *s, double *scond, double *amax, int *info); +void BLAS_FUNC(dpbrfs)(char *uplo, int *n, int *kd, int *nrhs, double *ab, int *ldab, double *afb, int *ldafb, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info); +void BLAS_FUNC(dpbstf)(char *uplo, int *n, int *kd, double *ab, int *ldab, int *info); +void BLAS_FUNC(dpbsv)(char *uplo, int *n, int *kd, int *nrhs, double *ab, int *ldab, double *b, int *ldb, int *info); +void BLAS_FUNC(dpbsvx)(char *fact, char *uplo, int *n, int *kd, int *nrhs, double *ab, int *ldab, double *afb, int *ldafb, char *equed, double *s, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *iwork, int *info); +void BLAS_FUNC(dpbtf2)(char *uplo, int *n, int *kd, double *ab, int *ldab, int *info); +void BLAS_FUNC(dpbtrf)(char *uplo, int *n, int *kd, double *ab, int *ldab, int *info); +void BLAS_FUNC(dpbtrs)(char *uplo, int *n, int *kd, int *nrhs, double *ab, int *ldab, double *b, int *ldb, int *info); +void BLAS_FUNC(dpftrf)(char *transr, char *uplo, int *n, double *a, int *info); +void BLAS_FUNC(dpftri)(char *transr, char *uplo, int *n, double *a, int *info); +void BLAS_FUNC(dpftrs)(char *transr, char *uplo, int *n, int *nrhs, double *a, double *b, int *ldb, int *info); +void BLAS_FUNC(dpocon)(char *uplo, int *n, double *a, int *lda, double *anorm, double *rcond, double *work, int *iwork, int *info); +void BLAS_FUNC(dpoequ)(int *n, double *a, int *lda, double *s, double *scond, double *amax, int *info); +void BLAS_FUNC(dpoequb)(int *n, double *a, int *lda, double *s, double *scond, double *amax, int *info); +void BLAS_FUNC(dporfs)(char *uplo, int *n, int *nrhs, double *a, int *lda, double *af, int *ldaf, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info); +void BLAS_FUNC(dposv)(char *uplo, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, int *info); +void BLAS_FUNC(dposvx)(char *fact, char *uplo, int *n, int *nrhs, double *a, int *lda, double *af, int *ldaf, char *equed, double *s, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *iwork, int *info); +void BLAS_FUNC(dpotf2)(char *uplo, int *n, double *a, int *lda, int *info); +void BLAS_FUNC(dpotrf)(char *uplo, int *n, double *a, int *lda, int *info); +void BLAS_FUNC(dpotri)(char *uplo, int *n, double *a, int *lda, int *info); +void BLAS_FUNC(dpotrs)(char *uplo, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, int *info); +void BLAS_FUNC(dppcon)(char *uplo, int *n, double *ap, double *anorm, double *rcond, double *work, int *iwork, int *info); +void BLAS_FUNC(dppequ)(char *uplo, int *n, double *ap, double *s, double *scond, double *amax, int *info); +void BLAS_FUNC(dpprfs)(char *uplo, int *n, int *nrhs, double *ap, double *afp, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info); +void BLAS_FUNC(dppsv)(char *uplo, int *n, int *nrhs, double *ap, double *b, int *ldb, int *info); +void BLAS_FUNC(dppsvx)(char *fact, char *uplo, int *n, int *nrhs, double *ap, double *afp, char *equed, double *s, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *iwork, int *info); +void BLAS_FUNC(dpptrf)(char *uplo, int *n, double *ap, int *info); +void BLAS_FUNC(dpptri)(char *uplo, int *n, double *ap, int *info); +void BLAS_FUNC(dpptrs)(char *uplo, int *n, int *nrhs, double *ap, double *b, int *ldb, int *info); +void BLAS_FUNC(dpstf2)(char *uplo, int *n, double *a, int *lda, int *piv, int *rank, double *tol, double *work, int *info); +void BLAS_FUNC(dpstrf)(char *uplo, int *n, double *a, int *lda, int *piv, int *rank, double *tol, double *work, int *info); +void BLAS_FUNC(dptcon)(int *n, double *d, double *e, double *anorm, double *rcond, double *work, int *info); +void BLAS_FUNC(dpteqr)(char *compz, int *n, double *d, double *e, double *z, int *ldz, double *work, int *info); +void BLAS_FUNC(dptrfs)(int *n, int *nrhs, double *d, double *e, double *df, double *ef, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *info); +void BLAS_FUNC(dptsv)(int *n, int *nrhs, double *d, double *e, double *b, int *ldb, int *info); +void BLAS_FUNC(dptsvx)(char *fact, int *n, int *nrhs, double *d, double *e, double *df, double *ef, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *info); +void BLAS_FUNC(dpttrf)(int *n, double *d, double *e, int *info); +void BLAS_FUNC(dpttrs)(int *n, int *nrhs, double *d, double *e, double *b, int *ldb, int *info); +void BLAS_FUNC(dptts2)(int *n, int *nrhs, double *d, double *e, double *b, int *ldb); +void BLAS_FUNC(drscl)(int *n, double *sa, double *sx, int *incx); +void BLAS_FUNC(dsbev)(char *jobz, char *uplo, int *n, int *kd, double *ab, int *ldab, double *w, double *z, int *ldz, double *work, int *info); +void BLAS_FUNC(dsbevd)(char *jobz, char *uplo, int *n, int *kd, double *ab, int *ldab, double *w, double *z, int *ldz, double *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(dsbevx)(char *jobz, char *range, char *uplo, int *n, int *kd, double *ab, int *ldab, double *q, int *ldq, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, double *work, int *iwork, int *ifail, int *info); +void BLAS_FUNC(dsbgst)(char *vect, char *uplo, int *n, int *ka, int *kb, double *ab, int *ldab, double *bb, int *ldbb, double *x, int *ldx, double *work, int *info); +void BLAS_FUNC(dsbgv)(char *jobz, char *uplo, int *n, int *ka, int *kb, double *ab, int *ldab, double *bb, int *ldbb, double *w, double *z, int *ldz, double *work, int *info); +void BLAS_FUNC(dsbgvd)(char *jobz, char *uplo, int *n, int *ka, int *kb, double *ab, int *ldab, double *bb, int *ldbb, double *w, double *z, int *ldz, double *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(dsbgvx)(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, double *ab, int *ldab, double *bb, int *ldbb, double *q, int *ldq, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, double *work, int *iwork, int *ifail, int *info); +void BLAS_FUNC(dsbtrd)(char *vect, char *uplo, int *n, int *kd, double *ab, int *ldab, double *d, double *e, double *q, int *ldq, double *work, int *info); +void BLAS_FUNC(dsfrk)(char *transr, char *uplo, char *trans, int *n, int *k, double *alpha, double *a, int *lda, double *beta, double *c); +void BLAS_FUNC(dsgesv)(int *n, int *nrhs, double *a, int *lda, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *work, float *swork, int *iter, int *info); +void BLAS_FUNC(dspcon)(char *uplo, int *n, double *ap, int *ipiv, double *anorm, double *rcond, double *work, int *iwork, int *info); +void BLAS_FUNC(dspev)(char *jobz, char *uplo, int *n, double *ap, double *w, double *z, int *ldz, double *work, int *info); +void BLAS_FUNC(dspevd)(char *jobz, char *uplo, int *n, double *ap, double *w, double *z, int *ldz, double *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(dspevx)(char *jobz, char *range, char *uplo, int *n, double *ap, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, double *work, int *iwork, int *ifail, int *info); +void BLAS_FUNC(dspgst)(int *itype, char *uplo, int *n, double *ap, double *bp, int *info); +void BLAS_FUNC(dspgv)(int *itype, char *jobz, char *uplo, int *n, double *ap, double *bp, double *w, double *z, int *ldz, double *work, int *info); +void BLAS_FUNC(dspgvd)(int *itype, char *jobz, char *uplo, int *n, double *ap, double *bp, double *w, double *z, int *ldz, double *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(dspgvx)(int *itype, char *jobz, char *range, char *uplo, int *n, double *ap, double *bp, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, double *work, int *iwork, int *ifail, int *info); +void BLAS_FUNC(dsposv)(char *uplo, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, double *x, int *ldx, double *work, float *swork, int *iter, int *info); +void BLAS_FUNC(dsprfs)(char *uplo, int *n, int *nrhs, double *ap, double *afp, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info); +void BLAS_FUNC(dspsv)(char *uplo, int *n, int *nrhs, double *ap, int *ipiv, double *b, int *ldb, int *info); +void BLAS_FUNC(dspsvx)(char *fact, char *uplo, int *n, int *nrhs, double *ap, double *afp, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *iwork, int *info); +void BLAS_FUNC(dsptrd)(char *uplo, int *n, double *ap, double *d, double *e, double *tau, int *info); +void BLAS_FUNC(dsptrf)(char *uplo, int *n, double *ap, int *ipiv, int *info); +void BLAS_FUNC(dsptri)(char *uplo, int *n, double *ap, int *ipiv, double *work, int *info); +void BLAS_FUNC(dsptrs)(char *uplo, int *n, int *nrhs, double *ap, int *ipiv, double *b, int *ldb, int *info); +void BLAS_FUNC(dstebz)(char *range, char *order, int *n, double *vl, double *vu, int *il, int *iu, double *abstol, double *d, double *e, int *m, int *nsplit, double *w, int *iblock, int *isplit, double *work, int *iwork, int *info); +void BLAS_FUNC(dstedc)(char *compz, int *n, double *d, double *e, double *z, int *ldz, double *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(dstegr)(char *jobz, char *range, int *n, double *d, double *e, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, int *isuppz, double *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(dstein)(int *n, double *d, double *e, int *m, double *w, int *iblock, int *isplit, double *z, int *ldz, double *work, int *iwork, int *ifail, int *info); +void BLAS_FUNC(dstemr)(char *jobz, char *range, int *n, double *d, double *e, double *vl, double *vu, int *il, int *iu, int *m, double *w, double *z, int *ldz, int *nzc, int *isuppz, int *tryrac, double *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(dsteqr)(char *compz, int *n, double *d, double *e, double *z, int *ldz, double *work, int *info); +void BLAS_FUNC(dsterf)(int *n, double *d, double *e, int *info); +void BLAS_FUNC(dstev)(char *jobz, int *n, double *d, double *e, double *z, int *ldz, double *work, int *info); +void BLAS_FUNC(dstevd)(char *jobz, int *n, double *d, double *e, double *z, int *ldz, double *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(dstevr)(char *jobz, char *range, int *n, double *d, double *e, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, int *isuppz, double *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(dstevx)(char *jobz, char *range, int *n, double *d, double *e, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, double *work, int *iwork, int *ifail, int *info); +void BLAS_FUNC(dsycon)(char *uplo, int *n, double *a, int *lda, int *ipiv, double *anorm, double *rcond, double *work, int *iwork, int *info); +void BLAS_FUNC(dsyconv)(char *uplo, char *way, int *n, double *a, int *lda, int *ipiv, double *work, int *info); +void BLAS_FUNC(dsyequb)(char *uplo, int *n, double *a, int *lda, double *s, double *scond, double *amax, double *work, int *info); +void BLAS_FUNC(dsyev)(char *jobz, char *uplo, int *n, double *a, int *lda, double *w, double *work, int *lwork, int *info); +void BLAS_FUNC(dsyevd)(char *jobz, char *uplo, int *n, double *a, int *lda, double *w, double *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(dsyevr)(char *jobz, char *range, char *uplo, int *n, double *a, int *lda, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, int *isuppz, double *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(dsyevx)(char *jobz, char *range, char *uplo, int *n, double *a, int *lda, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, double *work, int *lwork, int *iwork, int *ifail, int *info); +void BLAS_FUNC(dsygs2)(int *itype, char *uplo, int *n, double *a, int *lda, double *b, int *ldb, int *info); +void BLAS_FUNC(dsygst)(int *itype, char *uplo, int *n, double *a, int *lda, double *b, int *ldb, int *info); +void BLAS_FUNC(dsygv)(int *itype, char *jobz, char *uplo, int *n, double *a, int *lda, double *b, int *ldb, double *w, double *work, int *lwork, int *info); +void BLAS_FUNC(dsygvd)(int *itype, char *jobz, char *uplo, int *n, double *a, int *lda, double *b, int *ldb, double *w, double *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(dsygvx)(int *itype, char *jobz, char *range, char *uplo, int *n, double *a, int *lda, double *b, int *ldb, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, double *work, int *lwork, int *iwork, int *ifail, int *info); +void BLAS_FUNC(dsyrfs)(char *uplo, int *n, int *nrhs, double *a, int *lda, double *af, int *ldaf, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info); +void BLAS_FUNC(dsysv)(char *uplo, int *n, int *nrhs, double *a, int *lda, int *ipiv, double *b, int *ldb, double *work, int *lwork, int *info); +void BLAS_FUNC(dsysvx)(char *fact, char *uplo, int *n, int *nrhs, double *a, int *lda, double *af, int *ldaf, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *lwork, int *iwork, int *info); +void BLAS_FUNC(dsyswapr)(char *uplo, int *n, double *a, int *lda, int *i1, int *i2); +void BLAS_FUNC(dsytd2)(char *uplo, int *n, double *a, int *lda, double *d, double *e, double *tau, int *info); +void BLAS_FUNC(dsytf2)(char *uplo, int *n, double *a, int *lda, int *ipiv, int *info); +void BLAS_FUNC(dsytrd)(char *uplo, int *n, double *a, int *lda, double *d, double *e, double *tau, double *work, int *lwork, int *info); +void BLAS_FUNC(dsytrf)(char *uplo, int *n, double *a, int *lda, int *ipiv, double *work, int *lwork, int *info); +void BLAS_FUNC(dsytri)(char *uplo, int *n, double *a, int *lda, int *ipiv, double *work, int *info); +void BLAS_FUNC(dsytri2)(char *uplo, int *n, double *a, int *lda, int *ipiv, double *work, int *lwork, int *info); +void BLAS_FUNC(dsytri2x)(char *uplo, int *n, double *a, int *lda, int *ipiv, double *work, int *nb, int *info); +void BLAS_FUNC(dsytrs)(char *uplo, int *n, int *nrhs, double *a, int *lda, int *ipiv, double *b, int *ldb, int *info); +void BLAS_FUNC(dsytrs2)(char *uplo, int *n, int *nrhs, double *a, int *lda, int *ipiv, double *b, int *ldb, double *work, int *info); +void BLAS_FUNC(dtbcon)(char *norm, char *uplo, char *diag, int *n, int *kd, double *ab, int *ldab, double *rcond, double *work, int *iwork, int *info); +void BLAS_FUNC(dtbrfs)(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, double *ab, int *ldab, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info); +void BLAS_FUNC(dtbtrs)(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, double *ab, int *ldab, double *b, int *ldb, int *info); +void BLAS_FUNC(dtfsm)(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, double *alpha, double *a, double *b, int *ldb); +void BLAS_FUNC(dtftri)(char *transr, char *uplo, char *diag, int *n, double *a, int *info); +void BLAS_FUNC(dtfttp)(char *transr, char *uplo, int *n, double *arf, double *ap, int *info); +void BLAS_FUNC(dtfttr)(char *transr, char *uplo, int *n, double *arf, double *a, int *lda, int *info); +void BLAS_FUNC(dtgevc)(char *side, char *howmny, int *select, int *n, double *s, int *lds, double *p, int *ldp, double *vl, int *ldvl, double *vr, int *ldvr, int *mm, int *m, double *work, int *info); +void BLAS_FUNC(dtgex2)(int *wantq, int *wantz, int *n, double *a, int *lda, double *b, int *ldb, double *q, int *ldq, double *z, int *ldz, int *j1, int *n1, int *n2, double *work, int *lwork, int *info); +void BLAS_FUNC(dtgexc)(int *wantq, int *wantz, int *n, double *a, int *lda, double *b, int *ldb, double *q, int *ldq, double *z, int *ldz, int *ifst, int *ilst, double *work, int *lwork, int *info); +void BLAS_FUNC(dtgsen)(int *ijob, int *wantq, int *wantz, int *select, int *n, double *a, int *lda, double *b, int *ldb, double *alphar, double *alphai, double *beta, double *q, int *ldq, double *z, int *ldz, int *m, double *pl, double *pr, double *dif, double *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(dtgsja)(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, double *a, int *lda, double *b, int *ldb, double *tola, double *tolb, double *alpha, double *beta, double *u, int *ldu, double *v, int *ldv, double *q, int *ldq, double *work, int *ncycle, int *info); +void BLAS_FUNC(dtgsna)(char *job, char *howmny, int *select, int *n, double *a, int *lda, double *b, int *ldb, double *vl, int *ldvl, double *vr, int *ldvr, double *s, double *dif, int *mm, int *m, double *work, int *lwork, int *iwork, int *info); +void BLAS_FUNC(dtgsy2)(char *trans, int *ijob, int *m, int *n, double *a, int *lda, double *b, int *ldb, double *c, int *ldc, double *d, int *ldd, double *e, int *lde, double *f, int *ldf, double *scale, double *rdsum, double *rdscal, int *iwork, int *pq, int *info); +void BLAS_FUNC(dtgsyl)(char *trans, int *ijob, int *m, int *n, double *a, int *lda, double *b, int *ldb, double *c, int *ldc, double *d, int *ldd, double *e, int *lde, double *f, int *ldf, double *scale, double *dif, double *work, int *lwork, int *iwork, int *info); +void BLAS_FUNC(dtpcon)(char *norm, char *uplo, char *diag, int *n, double *ap, double *rcond, double *work, int *iwork, int *info); +void BLAS_FUNC(dtpmqrt)(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, double *v, int *ldv, double *t, int *ldt, double *a, int *lda, double *b, int *ldb, double *work, int *info); +void BLAS_FUNC(dtpqrt)(int *m, int *n, int *l, int *nb, double *a, int *lda, double *b, int *ldb, double *t, int *ldt, double *work, int *info); +void BLAS_FUNC(dtpqrt2)(int *m, int *n, int *l, double *a, int *lda, double *b, int *ldb, double *t, int *ldt, int *info); +void BLAS_FUNC(dtprfb)(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, double *v, int *ldv, double *t, int *ldt, double *a, int *lda, double *b, int *ldb, double *work, int *ldwork); +void BLAS_FUNC(dtprfs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, double *ap, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info); +void BLAS_FUNC(dtptri)(char *uplo, char *diag, int *n, double *ap, int *info); +void BLAS_FUNC(dtptrs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, double *ap, double *b, int *ldb, int *info); +void BLAS_FUNC(dtpttf)(char *transr, char *uplo, int *n, double *ap, double *arf, int *info); +void BLAS_FUNC(dtpttr)(char *uplo, int *n, double *ap, double *a, int *lda, int *info); +void BLAS_FUNC(dtrcon)(char *norm, char *uplo, char *diag, int *n, double *a, int *lda, double *rcond, double *work, int *iwork, int *info); +void BLAS_FUNC(dtrevc)(char *side, char *howmny, int *select, int *n, double *t, int *ldt, double *vl, int *ldvl, double *vr, int *ldvr, int *mm, int *m, double *work, int *info); +void BLAS_FUNC(dtrexc)(char *compq, int *n, double *t, int *ldt, double *q, int *ldq, int *ifst, int *ilst, double *work, int *info); +void BLAS_FUNC(dtrrfs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info); +void BLAS_FUNC(dtrsen)(char *job, char *compq, int *select, int *n, double *t, int *ldt, double *q, int *ldq, double *wr, double *wi, int *m, double *s, double *sep, double *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(dtrsna)(char *job, char *howmny, int *select, int *n, double *t, int *ldt, double *vl, int *ldvl, double *vr, int *ldvr, double *s, double *sep, int *mm, int *m, double *work, int *ldwork, int *iwork, int *info); +void BLAS_FUNC(dtrsyl)(char *trana, char *tranb, int *isgn, int *m, int *n, double *a, int *lda, double *b, int *ldb, double *c, int *ldc, double *scale, int *info); +void BLAS_FUNC(dtrti2)(char *uplo, char *diag, int *n, double *a, int *lda, int *info); +void BLAS_FUNC(dtrtri)(char *uplo, char *diag, int *n, double *a, int *lda, int *info); +void BLAS_FUNC(dtrtrs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, int *info); +void BLAS_FUNC(dtrttf)(char *transr, char *uplo, int *n, double *a, int *lda, double *arf, int *info); +void BLAS_FUNC(dtrttp)(char *uplo, int *n, double *a, int *lda, double *ap, int *info); +void BLAS_FUNC(dtzrzf)(int *m, int *n, double *a, int *lda, double *tau, double *work, int *lwork, int *info); +double BLAS_FUNC(dzsum1)(int *n, npy_complex128 *cx, int *incx); +int BLAS_FUNC(icmax1)(int *n, npy_complex64 *cx, int *incx); +int BLAS_FUNC(ieeeck)(int *ispec, float *zero, float *one); +int BLAS_FUNC(ilaclc)(int *m, int *n, npy_complex64 *a, int *lda); +int BLAS_FUNC(ilaclr)(int *m, int *n, npy_complex64 *a, int *lda); +int BLAS_FUNC(iladiag)(char *diag); +int BLAS_FUNC(iladlc)(int *m, int *n, double *a, int *lda); +int BLAS_FUNC(iladlr)(int *m, int *n, double *a, int *lda); +int BLAS_FUNC(ilaprec)(char *prec); +int BLAS_FUNC(ilaslc)(int *m, int *n, float *a, int *lda); +int BLAS_FUNC(ilaslr)(int *m, int *n, float *a, int *lda); +int BLAS_FUNC(ilatrans)(char *trans); +int BLAS_FUNC(ilauplo)(char *uplo); +void BLAS_FUNC(ilaver)(int *vers_major, int *vers_minor, int *vers_patch); +int BLAS_FUNC(ilazlc)(int *m, int *n, npy_complex128 *a, int *lda); +int BLAS_FUNC(ilazlr)(int *m, int *n, npy_complex128 *a, int *lda); +int BLAS_FUNC(izmax1)(int *n, npy_complex128 *cx, int *incx); +void BLAS_FUNC(sbbcsd)(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, float *theta, float *phi, float *u1, int *ldu1, float *u2, int *ldu2, float *v1t, int *ldv1t, float *v2t, int *ldv2t, float *b11d, float *b11e, float *b12d, float *b12e, float *b21d, float *b21e, float *b22d, float *b22e, float *work, int *lwork, int *info); +void BLAS_FUNC(sbdsdc)(char *uplo, char *compq, int *n, float *d, float *e, float *u, int *ldu, float *vt, int *ldvt, float *q, int *iq, float *work, int *iwork, int *info); +void BLAS_FUNC(sbdsqr)(char *uplo, int *n, int *ncvt, int *nru, int *ncc, float *d, float *e, float *vt, int *ldvt, float *u, int *ldu, float *c, int *ldc, float *work, int *info); +float BLAS_FUNC(scsum1)(int *n, npy_complex64 *cx, int *incx); +void BLAS_FUNC(sdisna)(char *job, int *m, int *n, float *d, float *sep, int *info); +void BLAS_FUNC(sgbbrd)(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, float *ab, int *ldab, float *d, float *e, float *q, int *ldq, float *pt, int *ldpt, float *c, int *ldc, float *work, int *info); +void BLAS_FUNC(sgbcon)(char *norm, int *n, int *kl, int *ku, float *ab, int *ldab, int *ipiv, float *anorm, float *rcond, float *work, int *iwork, int *info); +void BLAS_FUNC(sgbequ)(int *m, int *n, int *kl, int *ku, float *ab, int *ldab, float *r, float *c, float *rowcnd, float *colcnd, float *amax, int *info); +void BLAS_FUNC(sgbequb)(int *m, int *n, int *kl, int *ku, float *ab, int *ldab, float *r, float *c, float *rowcnd, float *colcnd, float *amax, int *info); +void BLAS_FUNC(sgbrfs)(char *trans, int *n, int *kl, int *ku, int *nrhs, float *ab, int *ldab, float *afb, int *ldafb, int *ipiv, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info); +void BLAS_FUNC(sgbsv)(int *n, int *kl, int *ku, int *nrhs, float *ab, int *ldab, int *ipiv, float *b, int *ldb, int *info); +void BLAS_FUNC(sgbsvx)(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, float *ab, int *ldab, float *afb, int *ldafb, int *ipiv, char *equed, float *r, float *c, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *iwork, int *info); +void BLAS_FUNC(sgbtf2)(int *m, int *n, int *kl, int *ku, float *ab, int *ldab, int *ipiv, int *info); +void BLAS_FUNC(sgbtrf)(int *m, int *n, int *kl, int *ku, float *ab, int *ldab, int *ipiv, int *info); +void BLAS_FUNC(sgbtrs)(char *trans, int *n, int *kl, int *ku, int *nrhs, float *ab, int *ldab, int *ipiv, float *b, int *ldb, int *info); +void BLAS_FUNC(sgebak)(char *job, char *side, int *n, int *ilo, int *ihi, float *scale, int *m, float *v, int *ldv, int *info); +void BLAS_FUNC(sgebal)(char *job, int *n, float *a, int *lda, int *ilo, int *ihi, float *scale, int *info); +void BLAS_FUNC(sgebd2)(int *m, int *n, float *a, int *lda, float *d, float *e, float *tauq, float *taup, float *work, int *info); +void BLAS_FUNC(sgebrd)(int *m, int *n, float *a, int *lda, float *d, float *e, float *tauq, float *taup, float *work, int *lwork, int *info); +void BLAS_FUNC(sgecon)(char *norm, int *n, float *a, int *lda, float *anorm, float *rcond, float *work, int *iwork, int *info); +void BLAS_FUNC(sgeequ)(int *m, int *n, float *a, int *lda, float *r, float *c, float *rowcnd, float *colcnd, float *amax, int *info); +void BLAS_FUNC(sgeequb)(int *m, int *n, float *a, int *lda, float *r, float *c, float *rowcnd, float *colcnd, float *amax, int *info); +void BLAS_FUNC(sgees)(char *jobvs, char *sort, _sselect2 *select, int *n, float *a, int *lda, int *sdim, float *wr, float *wi, float *vs, int *ldvs, float *work, int *lwork, int *bwork, int *info); +void BLAS_FUNC(sgeesx)(char *jobvs, char *sort, _sselect2 *select, char *sense, int *n, float *a, int *lda, int *sdim, float *wr, float *wi, float *vs, int *ldvs, float *rconde, float *rcondv, float *work, int *lwork, int *iwork, int *liwork, int *bwork, int *info); +void BLAS_FUNC(sgeev)(char *jobvl, char *jobvr, int *n, float *a, int *lda, float *wr, float *wi, float *vl, int *ldvl, float *vr, int *ldvr, float *work, int *lwork, int *info); +void BLAS_FUNC(sgeevx)(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, float *a, int *lda, float *wr, float *wi, float *vl, int *ldvl, float *vr, int *ldvr, int *ilo, int *ihi, float *scale, float *abnrm, float *rconde, float *rcondv, float *work, int *lwork, int *iwork, int *info); +void BLAS_FUNC(sgehd2)(int *n, int *ilo, int *ihi, float *a, int *lda, float *tau, float *work, int *info); +void BLAS_FUNC(sgehrd)(int *n, int *ilo, int *ihi, float *a, int *lda, float *tau, float *work, int *lwork, int *info); +void BLAS_FUNC(sgejsv)(char *joba, char *jobu, char *jobv, char *jobr, char *jobt, char *jobp, int *m, int *n, float *a, int *lda, float *sva, float *u, int *ldu, float *v, int *ldv, float *work, int *lwork, int *iwork, int *info); +void BLAS_FUNC(sgelq2)(int *m, int *n, float *a, int *lda, float *tau, float *work, int *info); +void BLAS_FUNC(sgelqf)(int *m, int *n, float *a, int *lda, float *tau, float *work, int *lwork, int *info); +void BLAS_FUNC(sgels)(char *trans, int *m, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, float *work, int *lwork, int *info); +void BLAS_FUNC(sgelsd)(int *m, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, float *s, float *rcond, int *rank, float *work, int *lwork, int *iwork, int *info); +void BLAS_FUNC(sgelss)(int *m, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, float *s, float *rcond, int *rank, float *work, int *lwork, int *info); +void BLAS_FUNC(sgelsy)(int *m, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, int *jpvt, float *rcond, int *rank, float *work, int *lwork, int *info); +void BLAS_FUNC(sgemqrt)(char *side, char *trans, int *m, int *n, int *k, int *nb, float *v, int *ldv, float *t, int *ldt, float *c, int *ldc, float *work, int *info); +void BLAS_FUNC(sgeql2)(int *m, int *n, float *a, int *lda, float *tau, float *work, int *info); +void BLAS_FUNC(sgeqlf)(int *m, int *n, float *a, int *lda, float *tau, float *work, int *lwork, int *info); +void BLAS_FUNC(sgeqp3)(int *m, int *n, float *a, int *lda, int *jpvt, float *tau, float *work, int *lwork, int *info); +void BLAS_FUNC(sgeqr2)(int *m, int *n, float *a, int *lda, float *tau, float *work, int *info); +void BLAS_FUNC(sgeqr2p)(int *m, int *n, float *a, int *lda, float *tau, float *work, int *info); +void BLAS_FUNC(sgeqrf)(int *m, int *n, float *a, int *lda, float *tau, float *work, int *lwork, int *info); +void BLAS_FUNC(sgeqrfp)(int *m, int *n, float *a, int *lda, float *tau, float *work, int *lwork, int *info); +void BLAS_FUNC(sgeqrt)(int *m, int *n, int *nb, float *a, int *lda, float *t, int *ldt, float *work, int *info); +void BLAS_FUNC(sgeqrt2)(int *m, int *n, float *a, int *lda, float *t, int *ldt, int *info); +void BLAS_FUNC(sgeqrt3)(int *m, int *n, float *a, int *lda, float *t, int *ldt, int *info); +void BLAS_FUNC(sgerfs)(char *trans, int *n, int *nrhs, float *a, int *lda, float *af, int *ldaf, int *ipiv, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info); +void BLAS_FUNC(sgerq2)(int *m, int *n, float *a, int *lda, float *tau, float *work, int *info); +void BLAS_FUNC(sgerqf)(int *m, int *n, float *a, int *lda, float *tau, float *work, int *lwork, int *info); +void BLAS_FUNC(sgesc2)(int *n, float *a, int *lda, float *rhs, int *ipiv, int *jpiv, float *scale); +void BLAS_FUNC(sgesdd)(char *jobz, int *m, int *n, float *a, int *lda, float *s, float *u, int *ldu, float *vt, int *ldvt, float *work, int *lwork, int *iwork, int *info); +void BLAS_FUNC(sgesv)(int *n, int *nrhs, float *a, int *lda, int *ipiv, float *b, int *ldb, int *info); +void BLAS_FUNC(sgesvd)(char *jobu, char *jobvt, int *m, int *n, float *a, int *lda, float *s, float *u, int *ldu, float *vt, int *ldvt, float *work, int *lwork, int *info); +void BLAS_FUNC(sgesvj)(char *joba, char *jobu, char *jobv, int *m, int *n, float *a, int *lda, float *sva, int *mv, float *v, int *ldv, float *work, int *lwork, int *info); +void BLAS_FUNC(sgesvx)(char *fact, char *trans, int *n, int *nrhs, float *a, int *lda, float *af, int *ldaf, int *ipiv, char *equed, float *r, float *c, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *iwork, int *info); +void BLAS_FUNC(sgetc2)(int *n, float *a, int *lda, int *ipiv, int *jpiv, int *info); +void BLAS_FUNC(sgetf2)(int *m, int *n, float *a, int *lda, int *ipiv, int *info); +void BLAS_FUNC(sgetrf)(int *m, int *n, float *a, int *lda, int *ipiv, int *info); +void BLAS_FUNC(sgetri)(int *n, float *a, int *lda, int *ipiv, float *work, int *lwork, int *info); +void BLAS_FUNC(sgetrs)(char *trans, int *n, int *nrhs, float *a, int *lda, int *ipiv, float *b, int *ldb, int *info); +void BLAS_FUNC(sggbak)(char *job, char *side, int *n, int *ilo, int *ihi, float *lscale, float *rscale, int *m, float *v, int *ldv, int *info); +void BLAS_FUNC(sggbal)(char *job, int *n, float *a, int *lda, float *b, int *ldb, int *ilo, int *ihi, float *lscale, float *rscale, float *work, int *info); +void BLAS_FUNC(sgges)(char *jobvsl, char *jobvsr, char *sort, _sselect3 *selctg, int *n, float *a, int *lda, float *b, int *ldb, int *sdim, float *alphar, float *alphai, float *beta, float *vsl, int *ldvsl, float *vsr, int *ldvsr, float *work, int *lwork, int *bwork, int *info); +void BLAS_FUNC(sggesx)(char *jobvsl, char *jobvsr, char *sort, _sselect3 *selctg, char *sense, int *n, float *a, int *lda, float *b, int *ldb, int *sdim, float *alphar, float *alphai, float *beta, float *vsl, int *ldvsl, float *vsr, int *ldvsr, float *rconde, float *rcondv, float *work, int *lwork, int *iwork, int *liwork, int *bwork, int *info); +void BLAS_FUNC(sggev)(char *jobvl, char *jobvr, int *n, float *a, int *lda, float *b, int *ldb, float *alphar, float *alphai, float *beta, float *vl, int *ldvl, float *vr, int *ldvr, float *work, int *lwork, int *info); +void BLAS_FUNC(sggevx)(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, float *a, int *lda, float *b, int *ldb, float *alphar, float *alphai, float *beta, float *vl, int *ldvl, float *vr, int *ldvr, int *ilo, int *ihi, float *lscale, float *rscale, float *abnrm, float *bbnrm, float *rconde, float *rcondv, float *work, int *lwork, int *iwork, int *bwork, int *info); +void BLAS_FUNC(sggglm)(int *n, int *m, int *p, float *a, int *lda, float *b, int *ldb, float *d, float *x, float *y, float *work, int *lwork, int *info); +void BLAS_FUNC(sgghrd)(char *compq, char *compz, int *n, int *ilo, int *ihi, float *a, int *lda, float *b, int *ldb, float *q, int *ldq, float *z, int *ldz, int *info); +void BLAS_FUNC(sgglse)(int *m, int *n, int *p, float *a, int *lda, float *b, int *ldb, float *c, float *d, float *x, float *work, int *lwork, int *info); +void BLAS_FUNC(sggqrf)(int *n, int *m, int *p, float *a, int *lda, float *taua, float *b, int *ldb, float *taub, float *work, int *lwork, int *info); +void BLAS_FUNC(sggrqf)(int *m, int *p, int *n, float *a, int *lda, float *taua, float *b, int *ldb, float *taub, float *work, int *lwork, int *info); +void BLAS_FUNC(sgsvj0)(char *jobv, int *m, int *n, float *a, int *lda, float *d, float *sva, int *mv, float *v, int *ldv, float *eps, float *sfmin, float *tol, int *nsweep, float *work, int *lwork, int *info); +void BLAS_FUNC(sgsvj1)(char *jobv, int *m, int *n, int *n1, float *a, int *lda, float *d, float *sva, int *mv, float *v, int *ldv, float *eps, float *sfmin, float *tol, int *nsweep, float *work, int *lwork, int *info); +void BLAS_FUNC(sgtcon)(char *norm, int *n, float *dl, float *d, float *du, float *du2, int *ipiv, float *anorm, float *rcond, float *work, int *iwork, int *info); +void BLAS_FUNC(sgtrfs)(char *trans, int *n, int *nrhs, float *dl, float *d, float *du, float *dlf, float *df, float *duf, float *du2, int *ipiv, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info); +void BLAS_FUNC(sgtsv)(int *n, int *nrhs, float *dl, float *d, float *du, float *b, int *ldb, int *info); +void BLAS_FUNC(sgtsvx)(char *fact, char *trans, int *n, int *nrhs, float *dl, float *d, float *du, float *dlf, float *df, float *duf, float *du2, int *ipiv, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *iwork, int *info); +void BLAS_FUNC(sgttrf)(int *n, float *dl, float *d, float *du, float *du2, int *ipiv, int *info); +void BLAS_FUNC(sgttrs)(char *trans, int *n, int *nrhs, float *dl, float *d, float *du, float *du2, int *ipiv, float *b, int *ldb, int *info); +void BLAS_FUNC(sgtts2)(int *itrans, int *n, int *nrhs, float *dl, float *d, float *du, float *du2, int *ipiv, float *b, int *ldb); +void BLAS_FUNC(shgeqz)(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, float *h, int *ldh, float *t, int *ldt, float *alphar, float *alphai, float *beta, float *q, int *ldq, float *z, int *ldz, float *work, int *lwork, int *info); +void BLAS_FUNC(shsein)(char *side, char *eigsrc, char *initv, int *select, int *n, float *h, int *ldh, float *wr, float *wi, float *vl, int *ldvl, float *vr, int *ldvr, int *mm, int *m, float *work, int *ifaill, int *ifailr, int *info); +void BLAS_FUNC(shseqr)(char *job, char *compz, int *n, int *ilo, int *ihi, float *h, int *ldh, float *wr, float *wi, float *z, int *ldz, float *work, int *lwork, int *info); +void BLAS_FUNC(slabad)(float *small, float *large); +void BLAS_FUNC(slabrd)(int *m, int *n, int *nb, float *a, int *lda, float *d, float *e, float *tauq, float *taup, float *x, int *ldx, float *y, int *ldy); +void BLAS_FUNC(slacn2)(int *n, float *v, float *x, int *isgn, float *est, int *kase, int *isave); +void BLAS_FUNC(slacon)(int *n, float *v, float *x, int *isgn, float *est, int *kase); +void BLAS_FUNC(slacpy)(char *uplo, int *m, int *n, float *a, int *lda, float *b, int *ldb); +void BLAS_FUNC(sladiv)(float *a, float *b, float *c, float *d, float *p, float *q); +void BLAS_FUNC(slae2)(float *a, float *b, float *c, float *rt1, float *rt2); +void BLAS_FUNC(slaebz)(int *ijob, int *nitmax, int *n, int *mmax, int *minp, int *nbmin, float *abstol, float *reltol, float *pivmin, float *d, float *e, float *e2, int *nval, float *ab, float *c, int *mout, int *nab, float *work, int *iwork, int *info); +void BLAS_FUNC(slaed0)(int *icompq, int *qsiz, int *n, float *d, float *e, float *q, int *ldq, float *qstore, int *ldqs, float *work, int *iwork, int *info); +void BLAS_FUNC(slaed1)(int *n, float *d, float *q, int *ldq, int *indxq, float *rho, int *cutpnt, float *work, int *iwork, int *info); +void BLAS_FUNC(slaed2)(int *k, int *n, int *n1, float *d, float *q, int *ldq, int *indxq, float *rho, float *z, float *dlamda, float *w, float *q2, int *indx, int *indxc, int *indxp, int *coltyp, int *info); +void BLAS_FUNC(slaed3)(int *k, int *n, int *n1, float *d, float *q, int *ldq, float *rho, float *dlamda, float *q2, int *indx, int *ctot, float *w, float *s, int *info); +void BLAS_FUNC(slaed4)(int *n, int *i, float *d, float *z, float *delta, float *rho, float *dlam, int *info); +void BLAS_FUNC(slaed5)(int *i, float *d, float *z, float *delta, float *rho, float *dlam); +void BLAS_FUNC(slaed6)(int *kniter, int *orgati, float *rho, float *d, float *z, float *finit, float *tau, int *info); +void BLAS_FUNC(slaed7)(int *icompq, int *n, int *qsiz, int *tlvls, int *curlvl, int *curpbm, float *d, float *q, int *ldq, int *indxq, float *rho, int *cutpnt, float *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, float *givnum, float *work, int *iwork, int *info); +void BLAS_FUNC(slaed8)(int *icompq, int *k, int *n, int *qsiz, float *d, float *q, int *ldq, int *indxq, float *rho, int *cutpnt, float *z, float *dlamda, float *q2, int *ldq2, float *w, int *perm, int *givptr, int *givcol, float *givnum, int *indxp, int *indx, int *info); +void BLAS_FUNC(slaed9)(int *k, int *kstart, int *kstop, int *n, float *d, float *q, int *ldq, float *rho, float *dlamda, float *w, float *s, int *lds, int *info); +void BLAS_FUNC(slaeda)(int *n, int *tlvls, int *curlvl, int *curpbm, int *prmptr, int *perm, int *givptr, int *givcol, float *givnum, float *q, int *qptr, float *z, float *ztemp, int *info); +void BLAS_FUNC(slaein)(int *rightv, int *noinit, int *n, float *h, int *ldh, float *wr, float *wi, float *vr, float *vi, float *b, int *ldb, float *work, float *eps3, float *smlnum, float *bignum, int *info); +void BLAS_FUNC(slaev2)(float *a, float *b, float *c, float *rt1, float *rt2, float *cs1, float *sn1); +void BLAS_FUNC(slaexc)(int *wantq, int *n, float *t, int *ldt, float *q, int *ldq, int *j1, int *n1, int *n2, float *work, int *info); +void BLAS_FUNC(slag2)(float *a, int *lda, float *b, int *ldb, float *safmin, float *scale1, float *scale2, float *wr1, float *wr2, float *wi); +void BLAS_FUNC(slag2d)(int *m, int *n, float *sa, int *ldsa, double *a, int *lda, int *info); +void BLAS_FUNC(slags2)(int *upper, float *a1, float *a2, float *a3, float *b1, float *b2, float *b3, float *csu, float *snu, float *csv, float *snv, float *csq, float *snq); +void BLAS_FUNC(slagtf)(int *n, float *a, float *lambda_, float *b, float *c, float *tol, float *d, int *in_, int *info); +void BLAS_FUNC(slagtm)(char *trans, int *n, int *nrhs, float *alpha, float *dl, float *d, float *du, float *x, int *ldx, float *beta, float *b, int *ldb); +void BLAS_FUNC(slagts)(int *job, int *n, float *a, float *b, float *c, float *d, int *in_, float *y, float *tol, int *info); +void BLAS_FUNC(slagv2)(float *a, int *lda, float *b, int *ldb, float *alphar, float *alphai, float *beta, float *csl, float *snl, float *csr, float *snr); +void BLAS_FUNC(slahqr)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, float *h, int *ldh, float *wr, float *wi, int *iloz, int *ihiz, float *z, int *ldz, int *info); +void BLAS_FUNC(slahr2)(int *n, int *k, int *nb, float *a, int *lda, float *tau, float *t, int *ldt, float *y, int *ldy); +void BLAS_FUNC(slaic1)(int *job, int *j, float *x, float *sest, float *w, float *gamma, float *sestpr, float *s, float *c); +void BLAS_FUNC(slaln2)(int *ltrans, int *na, int *nw, float *smin, float *ca, float *a, int *lda, float *d1, float *d2, float *b, int *ldb, float *wr, float *wi, float *x, int *ldx, float *scale, float *xnorm, int *info); +void BLAS_FUNC(slals0)(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, float *b, int *ldb, float *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, float *givnum, int *ldgnum, float *poles, float *difl, float *difr, float *z, int *k, float *c, float *s, float *work, int *info); +void BLAS_FUNC(slalsa)(int *icompq, int *smlsiz, int *n, int *nrhs, float *b, int *ldb, float *bx, int *ldbx, float *u, int *ldu, float *vt, int *k, float *difl, float *difr, float *z, float *poles, int *givptr, int *givcol, int *ldgcol, int *perm, float *givnum, float *c, float *s, float *work, int *iwork, int *info); +void BLAS_FUNC(slalsd)(char *uplo, int *smlsiz, int *n, int *nrhs, float *d, float *e, float *b, int *ldb, float *rcond, int *rank, float *work, int *iwork, int *info); +float BLAS_FUNC(slamch)(char *cmach); +void BLAS_FUNC(slamrg)(int *n1, int *n2, float *a, int *strd1, int *strd2, int *index_bn); +float BLAS_FUNC(slangb)(char *norm, int *n, int *kl, int *ku, float *ab, int *ldab, float *work); +float BLAS_FUNC(slange)(char *norm, int *m, int *n, float *a, int *lda, float *work); +float BLAS_FUNC(slangt)(char *norm, int *n, float *dl, float *d, float *du); +float BLAS_FUNC(slanhs)(char *norm, int *n, float *a, int *lda, float *work); +float BLAS_FUNC(slansb)(char *norm, char *uplo, int *n, int *k, float *ab, int *ldab, float *work); +float BLAS_FUNC(slansf)(char *norm, char *transr, char *uplo, int *n, float *a, float *work); +float BLAS_FUNC(slansp)(char *norm, char *uplo, int *n, float *ap, float *work); +float BLAS_FUNC(slanst)(char *norm, int *n, float *d, float *e); +float BLAS_FUNC(slansy)(char *norm, char *uplo, int *n, float *a, int *lda, float *work); +float BLAS_FUNC(slantb)(char *norm, char *uplo, char *diag, int *n, int *k, float *ab, int *ldab, float *work); +float BLAS_FUNC(slantp)(char *norm, char *uplo, char *diag, int *n, float *ap, float *work); +float BLAS_FUNC(slantr)(char *norm, char *uplo, char *diag, int *m, int *n, float *a, int *lda, float *work); +void BLAS_FUNC(slanv2)(float *a, float *b, float *c, float *d, float *rt1r, float *rt1i, float *rt2r, float *rt2i, float *cs, float *sn); +void BLAS_FUNC(slapll)(int *n, float *x, int *incx, float *y, int *incy, float *ssmin); +void BLAS_FUNC(slapmr)(int *forwrd, int *m, int *n, float *x, int *ldx, int *k); +void BLAS_FUNC(slapmt)(int *forwrd, int *m, int *n, float *x, int *ldx, int *k); +float BLAS_FUNC(slapy2)(float *x, float *y); +float BLAS_FUNC(slapy3)(float *x, float *y, float *z); +void BLAS_FUNC(slaqgb)(int *m, int *n, int *kl, int *ku, float *ab, int *ldab, float *r, float *c, float *rowcnd, float *colcnd, float *amax, char *equed); +void BLAS_FUNC(slaqge)(int *m, int *n, float *a, int *lda, float *r, float *c, float *rowcnd, float *colcnd, float *amax, char *equed); +void BLAS_FUNC(slaqp2)(int *m, int *n, int *offset, float *a, int *lda, int *jpvt, float *tau, float *vn1, float *vn2, float *work); +void BLAS_FUNC(slaqps)(int *m, int *n, int *offset, int *nb, int *kb, float *a, int *lda, int *jpvt, float *tau, float *vn1, float *vn2, float *auxv, float *f, int *ldf); +void BLAS_FUNC(slaqr0)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, float *h, int *ldh, float *wr, float *wi, int *iloz, int *ihiz, float *z, int *ldz, float *work, int *lwork, int *info); +void BLAS_FUNC(slaqr1)(int *n, float *h, int *ldh, float *sr1, float *si1, float *sr2, float *si2, float *v); +void BLAS_FUNC(slaqr2)(int *wantt, int *wantz, int *n, int *ktop, int *kbot, int *nw, float *h, int *ldh, int *iloz, int *ihiz, float *z, int *ldz, int *ns, int *nd, float *sr, float *si, float *v, int *ldv, int *nh, float *t, int *ldt, int *nv, float *wv, int *ldwv, float *work, int *lwork); +void BLAS_FUNC(slaqr3)(int *wantt, int *wantz, int *n, int *ktop, int *kbot, int *nw, float *h, int *ldh, int *iloz, int *ihiz, float *z, int *ldz, int *ns, int *nd, float *sr, float *si, float *v, int *ldv, int *nh, float *t, int *ldt, int *nv, float *wv, int *ldwv, float *work, int *lwork); +void BLAS_FUNC(slaqr4)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, float *h, int *ldh, float *wr, float *wi, int *iloz, int *ihiz, float *z, int *ldz, float *work, int *lwork, int *info); +void BLAS_FUNC(slaqr5)(int *wantt, int *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, float *sr, float *si, float *h, int *ldh, int *iloz, int *ihiz, float *z, int *ldz, float *v, int *ldv, float *u, int *ldu, int *nv, float *wv, int *ldwv, int *nh, float *wh, int *ldwh); +void BLAS_FUNC(slaqsb)(char *uplo, int *n, int *kd, float *ab, int *ldab, float *s, float *scond, float *amax, char *equed); +void BLAS_FUNC(slaqsp)(char *uplo, int *n, float *ap, float *s, float *scond, float *amax, char *equed); +void BLAS_FUNC(slaqsy)(char *uplo, int *n, float *a, int *lda, float *s, float *scond, float *amax, char *equed); +void BLAS_FUNC(slaqtr)(int *ltran, int *lreal, int *n, float *t, int *ldt, float *b, float *w, float *scale, float *x, float *work, int *info); +void BLAS_FUNC(slar1v)(int *n, int *b1, int *bn, float *lambda_, float *d, float *l, float *ld, float *lld, float *pivmin, float *gaptol, float *z, int *wantnc, int *negcnt, float *ztz, float *mingma, int *r, int *isuppz, float *nrminv, float *resid, float *rqcorr, float *work); +void BLAS_FUNC(slar2v)(int *n, float *x, float *y, float *z, int *incx, float *c, float *s, int *incc); +void BLAS_FUNC(slarf)(char *side, int *m, int *n, float *v, int *incv, float *tau, float *c, int *ldc, float *work); +void BLAS_FUNC(slarfb)(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, float *v, int *ldv, float *t, int *ldt, float *c, int *ldc, float *work, int *ldwork); +void BLAS_FUNC(slarfg)(int *n, float *alpha, float *x, int *incx, float *tau); +void BLAS_FUNC(slarfgp)(int *n, float *alpha, float *x, int *incx, float *tau); +void BLAS_FUNC(slarft)(char *direct, char *storev, int *n, int *k, float *v, int *ldv, float *tau, float *t, int *ldt); +void BLAS_FUNC(slarfx)(char *side, int *m, int *n, float *v, float *tau, float *c, int *ldc, float *work); +void BLAS_FUNC(slargv)(int *n, float *x, int *incx, float *y, int *incy, float *c, int *incc); +void BLAS_FUNC(slarnv)(int *idist, int *iseed, int *n, float *x); +void BLAS_FUNC(slarra)(int *n, float *d, float *e, float *e2, float *spltol, float *tnrm, int *nsplit, int *isplit, int *info); +void BLAS_FUNC(slarrb)(int *n, float *d, float *lld, int *ifirst, int *ilast, float *rtol1, float *rtol2, int *offset, float *w, float *wgap, float *werr, float *work, int *iwork, float *pivmin, float *spdiam, int *twist, int *info); +void BLAS_FUNC(slarrc)(char *jobt, int *n, float *vl, float *vu, float *d, float *e, float *pivmin, int *eigcnt, int *lcnt, int *rcnt, int *info); +void BLAS_FUNC(slarrd)(char *range, char *order, int *n, float *vl, float *vu, int *il, int *iu, float *gers, float *reltol, float *d, float *e, float *e2, float *pivmin, int *nsplit, int *isplit, int *m, float *w, float *werr, float *wl, float *wu, int *iblock, int *indexw, float *work, int *iwork, int *info); +void BLAS_FUNC(slarre)(char *range, int *n, float *vl, float *vu, int *il, int *iu, float *d, float *e, float *e2, float *rtol1, float *rtol2, float *spltol, int *nsplit, int *isplit, int *m, float *w, float *werr, float *wgap, int *iblock, int *indexw, float *gers, float *pivmin, float *work, int *iwork, int *info); +void BLAS_FUNC(slarrf)(int *n, float *d, float *l, float *ld, int *clstrt, int *clend, float *w, float *wgap, float *werr, float *spdiam, float *clgapl, float *clgapr, float *pivmin, float *sigma, float *dplus, float *lplus, float *work, int *info); +void BLAS_FUNC(slarrj)(int *n, float *d, float *e2, int *ifirst, int *ilast, float *rtol, int *offset, float *w, float *werr, float *work, int *iwork, float *pivmin, float *spdiam, int *info); +void BLAS_FUNC(slarrk)(int *n, int *iw, float *gl, float *gu, float *d, float *e2, float *pivmin, float *reltol, float *w, float *werr, int *info); +void BLAS_FUNC(slarrr)(int *n, float *d, float *e, int *info); +void BLAS_FUNC(slarrv)(int *n, float *vl, float *vu, float *d, float *l, float *pivmin, int *isplit, int *m, int *dol, int *dou, float *minrgp, float *rtol1, float *rtol2, float *w, float *werr, float *wgap, int *iblock, int *indexw, float *gers, float *z, int *ldz, int *isuppz, float *work, int *iwork, int *info); +void BLAS_FUNC(slartg)(float *f, float *g, float *cs, float *sn, float *r); +void BLAS_FUNC(slartgp)(float *f, float *g, float *cs, float *sn, float *r); +void BLAS_FUNC(slartgs)(float *x, float *y, float *sigma, float *cs, float *sn); +void BLAS_FUNC(slartv)(int *n, float *x, int *incx, float *y, int *incy, float *c, float *s, int *incc); +void BLAS_FUNC(slaruv)(int *iseed, int *n, float *x); +void BLAS_FUNC(slarz)(char *side, int *m, int *n, int *l, float *v, int *incv, float *tau, float *c, int *ldc, float *work); +void BLAS_FUNC(slarzb)(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, float *v, int *ldv, float *t, int *ldt, float *c, int *ldc, float *work, int *ldwork); +void BLAS_FUNC(slarzt)(char *direct, char *storev, int *n, int *k, float *v, int *ldv, float *tau, float *t, int *ldt); +void BLAS_FUNC(slas2)(float *f, float *g, float *h, float *ssmin, float *ssmax); +void BLAS_FUNC(slascl)(char *type_bn, int *kl, int *ku, float *cfrom, float *cto, int *m, int *n, float *a, int *lda, int *info); +void BLAS_FUNC(slasd0)(int *n, int *sqre, float *d, float *e, float *u, int *ldu, float *vt, int *ldvt, int *smlsiz, int *iwork, float *work, int *info); +void BLAS_FUNC(slasd1)(int *nl, int *nr, int *sqre, float *d, float *alpha, float *beta, float *u, int *ldu, float *vt, int *ldvt, int *idxq, int *iwork, float *work, int *info); +void BLAS_FUNC(slasd2)(int *nl, int *nr, int *sqre, int *k, float *d, float *z, float *alpha, float *beta, float *u, int *ldu, float *vt, int *ldvt, float *dsigma, float *u2, int *ldu2, float *vt2, int *ldvt2, int *idxp, int *idx, int *idxc, int *idxq, int *coltyp, int *info); +void BLAS_FUNC(slasd3)(int *nl, int *nr, int *sqre, int *k, float *d, float *q, int *ldq, float *dsigma, float *u, int *ldu, float *u2, int *ldu2, float *vt, int *ldvt, float *vt2, int *ldvt2, int *idxc, int *ctot, float *z, int *info); +void BLAS_FUNC(slasd4)(int *n, int *i, float *d, float *z, float *delta, float *rho, float *sigma, float *work, int *info); +void BLAS_FUNC(slasd5)(int *i, float *d, float *z, float *delta, float *rho, float *dsigma, float *work); +void BLAS_FUNC(slasd6)(int *icompq, int *nl, int *nr, int *sqre, float *d, float *vf, float *vl, float *alpha, float *beta, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, float *givnum, int *ldgnum, float *poles, float *difl, float *difr, float *z, int *k, float *c, float *s, float *work, int *iwork, int *info); +void BLAS_FUNC(slasd7)(int *icompq, int *nl, int *nr, int *sqre, int *k, float *d, float *z, float *zw, float *vf, float *vfw, float *vl, float *vlw, float *alpha, float *beta, float *dsigma, int *idx, int *idxp, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, float *givnum, int *ldgnum, float *c, float *s, int *info); +void BLAS_FUNC(slasd8)(int *icompq, int *k, float *d, float *z, float *vf, float *vl, float *difl, float *difr, int *lddifr, float *dsigma, float *work, int *info); +void BLAS_FUNC(slasda)(int *icompq, int *smlsiz, int *n, int *sqre, float *d, float *e, float *u, int *ldu, float *vt, int *k, float *difl, float *difr, float *z, float *poles, int *givptr, int *givcol, int *ldgcol, int *perm, float *givnum, float *c, float *s, float *work, int *iwork, int *info); +void BLAS_FUNC(slasdq)(char *uplo, int *sqre, int *n, int *ncvt, int *nru, int *ncc, float *d, float *e, float *vt, int *ldvt, float *u, int *ldu, float *c, int *ldc, float *work, int *info); +void BLAS_FUNC(slasdt)(int *n, int *lvl, int *nd, int *inode, int *ndiml, int *ndimr, int *msub); +void BLAS_FUNC(slaset)(char *uplo, int *m, int *n, float *alpha, float *beta, float *a, int *lda); +void BLAS_FUNC(slasq1)(int *n, float *d, float *e, float *work, int *info); +void BLAS_FUNC(slasq2)(int *n, float *z, int *info); +void BLAS_FUNC(slasq3)(int *i0, int *n0, float *z, int *pp, float *dmin, float *sigma, float *desig, float *qmax, int *nfail, int *iter, int *ndiv, int *ieee, int *ttype, float *dmin1, float *dmin2, float *dn, float *dn1, float *dn2, float *g, float *tau); +void BLAS_FUNC(slasq4)(int *i0, int *n0, float *z, int *pp, int *n0in, float *dmin, float *dmin1, float *dmin2, float *dn, float *dn1, float *dn2, float *tau, int *ttype, float *g); +void BLAS_FUNC(slasq6)(int *i0, int *n0, float *z, int *pp, float *dmin, float *dmin1, float *dmin2, float *dn, float *dnm1, float *dnm2); +void BLAS_FUNC(slasr)(char *side, char *pivot, char *direct, int *m, int *n, float *c, float *s, float *a, int *lda); +void BLAS_FUNC(slasrt)(char *id, int *n, float *d, int *info); +void BLAS_FUNC(slassq)(int *n, float *x, int *incx, float *scale, float *sumsq); +void BLAS_FUNC(slasv2)(float *f, float *g, float *h, float *ssmin, float *ssmax, float *snr, float *csr, float *snl, float *csl); +void BLAS_FUNC(slaswp)(int *n, float *a, int *lda, int *k1, int *k2, int *ipiv, int *incx); +void BLAS_FUNC(slasy2)(int *ltranl, int *ltranr, int *isgn, int *n1, int *n2, float *tl, int *ldtl, float *tr, int *ldtr, float *b, int *ldb, float *scale, float *x, int *ldx, float *xnorm, int *info); +void BLAS_FUNC(slasyf)(char *uplo, int *n, int *nb, int *kb, float *a, int *lda, int *ipiv, float *w, int *ldw, int *info); +void BLAS_FUNC(slatbs)(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, float *ab, int *ldab, float *x, float *scale, float *cnorm, int *info); +void BLAS_FUNC(slatdf)(int *ijob, int *n, float *z, int *ldz, float *rhs, float *rdsum, float *rdscal, int *ipiv, int *jpiv); +void BLAS_FUNC(slatps)(char *uplo, char *trans, char *diag, char *normin, int *n, float *ap, float *x, float *scale, float *cnorm, int *info); +void BLAS_FUNC(slatrd)(char *uplo, int *n, int *nb, float *a, int *lda, float *e, float *tau, float *w, int *ldw); +void BLAS_FUNC(slatrs)(char *uplo, char *trans, char *diag, char *normin, int *n, float *a, int *lda, float *x, float *scale, float *cnorm, int *info); +void BLAS_FUNC(slatrz)(int *m, int *n, int *l, float *a, int *lda, float *tau, float *work); +void BLAS_FUNC(slauu2)(char *uplo, int *n, float *a, int *lda, int *info); +void BLAS_FUNC(slauum)(char *uplo, int *n, float *a, int *lda, int *info); +void BLAS_FUNC(sopgtr)(char *uplo, int *n, float *ap, float *tau, float *q, int *ldq, float *work, int *info); +void BLAS_FUNC(sopmtr)(char *side, char *uplo, char *trans, int *m, int *n, float *ap, float *tau, float *c, int *ldc, float *work, int *info); +void BLAS_FUNC(sorbdb)(char *trans, char *signs, int *m, int *p, int *q, float *x11, int *ldx11, float *x12, int *ldx12, float *x21, int *ldx21, float *x22, int *ldx22, float *theta, float *phi, float *taup1, float *taup2, float *tauq1, float *tauq2, float *work, int *lwork, int *info); +void BLAS_FUNC(sorcsd)(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, float *x11, int *ldx11, float *x12, int *ldx12, float *x21, int *ldx21, float *x22, int *ldx22, float *theta, float *u1, int *ldu1, float *u2, int *ldu2, float *v1t, int *ldv1t, float *v2t, int *ldv2t, float *work, int *lwork, int *iwork, int *info); +void BLAS_FUNC(sorg2l)(int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *info); +void BLAS_FUNC(sorg2r)(int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *info); +void BLAS_FUNC(sorgbr)(char *vect, int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *lwork, int *info); +void BLAS_FUNC(sorghr)(int *n, int *ilo, int *ihi, float *a, int *lda, float *tau, float *work, int *lwork, int *info); +void BLAS_FUNC(sorgl2)(int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *info); +void BLAS_FUNC(sorglq)(int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *lwork, int *info); +void BLAS_FUNC(sorgql)(int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *lwork, int *info); +void BLAS_FUNC(sorgqr)(int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *lwork, int *info); +void BLAS_FUNC(sorgr2)(int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *info); +void BLAS_FUNC(sorgrq)(int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *lwork, int *info); +void BLAS_FUNC(sorgtr)(char *uplo, int *n, float *a, int *lda, float *tau, float *work, int *lwork, int *info); +void BLAS_FUNC(sorm2l)(char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *info); +void BLAS_FUNC(sorm2r)(char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *info); +void BLAS_FUNC(sormbr)(char *vect, char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info); +void BLAS_FUNC(sormhr)(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info); +void BLAS_FUNC(sorml2)(char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *info); +void BLAS_FUNC(sormlq)(char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info); +void BLAS_FUNC(sormql)(char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info); +void BLAS_FUNC(sormqr)(char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info); +void BLAS_FUNC(sormr2)(char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *info); +void BLAS_FUNC(sormr3)(char *side, char *trans, int *m, int *n, int *k, int *l, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *info); +void BLAS_FUNC(sormrq)(char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info); +void BLAS_FUNC(sormrz)(char *side, char *trans, int *m, int *n, int *k, int *l, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info); +void BLAS_FUNC(sormtr)(char *side, char *uplo, char *trans, int *m, int *n, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info); +void BLAS_FUNC(spbcon)(char *uplo, int *n, int *kd, float *ab, int *ldab, float *anorm, float *rcond, float *work, int *iwork, int *info); +void BLAS_FUNC(spbequ)(char *uplo, int *n, int *kd, float *ab, int *ldab, float *s, float *scond, float *amax, int *info); +void BLAS_FUNC(spbrfs)(char *uplo, int *n, int *kd, int *nrhs, float *ab, int *ldab, float *afb, int *ldafb, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info); +void BLAS_FUNC(spbstf)(char *uplo, int *n, int *kd, float *ab, int *ldab, int *info); +void BLAS_FUNC(spbsv)(char *uplo, int *n, int *kd, int *nrhs, float *ab, int *ldab, float *b, int *ldb, int *info); +void BLAS_FUNC(spbsvx)(char *fact, char *uplo, int *n, int *kd, int *nrhs, float *ab, int *ldab, float *afb, int *ldafb, char *equed, float *s, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *iwork, int *info); +void BLAS_FUNC(spbtf2)(char *uplo, int *n, int *kd, float *ab, int *ldab, int *info); +void BLAS_FUNC(spbtrf)(char *uplo, int *n, int *kd, float *ab, int *ldab, int *info); +void BLAS_FUNC(spbtrs)(char *uplo, int *n, int *kd, int *nrhs, float *ab, int *ldab, float *b, int *ldb, int *info); +void BLAS_FUNC(spftrf)(char *transr, char *uplo, int *n, float *a, int *info); +void BLAS_FUNC(spftri)(char *transr, char *uplo, int *n, float *a, int *info); +void BLAS_FUNC(spftrs)(char *transr, char *uplo, int *n, int *nrhs, float *a, float *b, int *ldb, int *info); +void BLAS_FUNC(spocon)(char *uplo, int *n, float *a, int *lda, float *anorm, float *rcond, float *work, int *iwork, int *info); +void BLAS_FUNC(spoequ)(int *n, float *a, int *lda, float *s, float *scond, float *amax, int *info); +void BLAS_FUNC(spoequb)(int *n, float *a, int *lda, float *s, float *scond, float *amax, int *info); +void BLAS_FUNC(sporfs)(char *uplo, int *n, int *nrhs, float *a, int *lda, float *af, int *ldaf, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info); +void BLAS_FUNC(sposv)(char *uplo, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, int *info); +void BLAS_FUNC(sposvx)(char *fact, char *uplo, int *n, int *nrhs, float *a, int *lda, float *af, int *ldaf, char *equed, float *s, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *iwork, int *info); +void BLAS_FUNC(spotf2)(char *uplo, int *n, float *a, int *lda, int *info); +void BLAS_FUNC(spotrf)(char *uplo, int *n, float *a, int *lda, int *info); +void BLAS_FUNC(spotri)(char *uplo, int *n, float *a, int *lda, int *info); +void BLAS_FUNC(spotrs)(char *uplo, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, int *info); +void BLAS_FUNC(sppcon)(char *uplo, int *n, float *ap, float *anorm, float *rcond, float *work, int *iwork, int *info); +void BLAS_FUNC(sppequ)(char *uplo, int *n, float *ap, float *s, float *scond, float *amax, int *info); +void BLAS_FUNC(spprfs)(char *uplo, int *n, int *nrhs, float *ap, float *afp, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info); +void BLAS_FUNC(sppsv)(char *uplo, int *n, int *nrhs, float *ap, float *b, int *ldb, int *info); +void BLAS_FUNC(sppsvx)(char *fact, char *uplo, int *n, int *nrhs, float *ap, float *afp, char *equed, float *s, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *iwork, int *info); +void BLAS_FUNC(spptrf)(char *uplo, int *n, float *ap, int *info); +void BLAS_FUNC(spptri)(char *uplo, int *n, float *ap, int *info); +void BLAS_FUNC(spptrs)(char *uplo, int *n, int *nrhs, float *ap, float *b, int *ldb, int *info); +void BLAS_FUNC(spstf2)(char *uplo, int *n, float *a, int *lda, int *piv, int *rank, float *tol, float *work, int *info); +void BLAS_FUNC(spstrf)(char *uplo, int *n, float *a, int *lda, int *piv, int *rank, float *tol, float *work, int *info); +void BLAS_FUNC(sptcon)(int *n, float *d, float *e, float *anorm, float *rcond, float *work, int *info); +void BLAS_FUNC(spteqr)(char *compz, int *n, float *d, float *e, float *z, int *ldz, float *work, int *info); +void BLAS_FUNC(sptrfs)(int *n, int *nrhs, float *d, float *e, float *df, float *ef, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *info); +void BLAS_FUNC(sptsv)(int *n, int *nrhs, float *d, float *e, float *b, int *ldb, int *info); +void BLAS_FUNC(sptsvx)(char *fact, int *n, int *nrhs, float *d, float *e, float *df, float *ef, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *info); +void BLAS_FUNC(spttrf)(int *n, float *d, float *e, int *info); +void BLAS_FUNC(spttrs)(int *n, int *nrhs, float *d, float *e, float *b, int *ldb, int *info); +void BLAS_FUNC(sptts2)(int *n, int *nrhs, float *d, float *e, float *b, int *ldb); +void BLAS_FUNC(srscl)(int *n, float *sa, float *sx, int *incx); +void BLAS_FUNC(ssbev)(char *jobz, char *uplo, int *n, int *kd, float *ab, int *ldab, float *w, float *z, int *ldz, float *work, int *info); +void BLAS_FUNC(ssbevd)(char *jobz, char *uplo, int *n, int *kd, float *ab, int *ldab, float *w, float *z, int *ldz, float *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(ssbevx)(char *jobz, char *range, char *uplo, int *n, int *kd, float *ab, int *ldab, float *q, int *ldq, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, float *work, int *iwork, int *ifail, int *info); +void BLAS_FUNC(ssbgst)(char *vect, char *uplo, int *n, int *ka, int *kb, float *ab, int *ldab, float *bb, int *ldbb, float *x, int *ldx, float *work, int *info); +void BLAS_FUNC(ssbgv)(char *jobz, char *uplo, int *n, int *ka, int *kb, float *ab, int *ldab, float *bb, int *ldbb, float *w, float *z, int *ldz, float *work, int *info); +void BLAS_FUNC(ssbgvd)(char *jobz, char *uplo, int *n, int *ka, int *kb, float *ab, int *ldab, float *bb, int *ldbb, float *w, float *z, int *ldz, float *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(ssbgvx)(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, float *ab, int *ldab, float *bb, int *ldbb, float *q, int *ldq, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, float *work, int *iwork, int *ifail, int *info); +void BLAS_FUNC(ssbtrd)(char *vect, char *uplo, int *n, int *kd, float *ab, int *ldab, float *d, float *e, float *q, int *ldq, float *work, int *info); +void BLAS_FUNC(ssfrk)(char *transr, char *uplo, char *trans, int *n, int *k, float *alpha, float *a, int *lda, float *beta, float *c); +void BLAS_FUNC(sspcon)(char *uplo, int *n, float *ap, int *ipiv, float *anorm, float *rcond, float *work, int *iwork, int *info); +void BLAS_FUNC(sspev)(char *jobz, char *uplo, int *n, float *ap, float *w, float *z, int *ldz, float *work, int *info); +void BLAS_FUNC(sspevd)(char *jobz, char *uplo, int *n, float *ap, float *w, float *z, int *ldz, float *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(sspevx)(char *jobz, char *range, char *uplo, int *n, float *ap, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, float *work, int *iwork, int *ifail, int *info); +void BLAS_FUNC(sspgst)(int *itype, char *uplo, int *n, float *ap, float *bp, int *info); +void BLAS_FUNC(sspgv)(int *itype, char *jobz, char *uplo, int *n, float *ap, float *bp, float *w, float *z, int *ldz, float *work, int *info); +void BLAS_FUNC(sspgvd)(int *itype, char *jobz, char *uplo, int *n, float *ap, float *bp, float *w, float *z, int *ldz, float *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(sspgvx)(int *itype, char *jobz, char *range, char *uplo, int *n, float *ap, float *bp, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, float *work, int *iwork, int *ifail, int *info); +void BLAS_FUNC(ssprfs)(char *uplo, int *n, int *nrhs, float *ap, float *afp, int *ipiv, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info); +void BLAS_FUNC(sspsv)(char *uplo, int *n, int *nrhs, float *ap, int *ipiv, float *b, int *ldb, int *info); +void BLAS_FUNC(sspsvx)(char *fact, char *uplo, int *n, int *nrhs, float *ap, float *afp, int *ipiv, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *iwork, int *info); +void BLAS_FUNC(ssptrd)(char *uplo, int *n, float *ap, float *d, float *e, float *tau, int *info); +void BLAS_FUNC(ssptrf)(char *uplo, int *n, float *ap, int *ipiv, int *info); +void BLAS_FUNC(ssptri)(char *uplo, int *n, float *ap, int *ipiv, float *work, int *info); +void BLAS_FUNC(ssptrs)(char *uplo, int *n, int *nrhs, float *ap, int *ipiv, float *b, int *ldb, int *info); +void BLAS_FUNC(sstebz)(char *range, char *order, int *n, float *vl, float *vu, int *il, int *iu, float *abstol, float *d, float *e, int *m, int *nsplit, float *w, int *iblock, int *isplit, float *work, int *iwork, int *info); +void BLAS_FUNC(sstedc)(char *compz, int *n, float *d, float *e, float *z, int *ldz, float *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(sstegr)(char *jobz, char *range, int *n, float *d, float *e, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, int *isuppz, float *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(sstein)(int *n, float *d, float *e, int *m, float *w, int *iblock, int *isplit, float *z, int *ldz, float *work, int *iwork, int *ifail, int *info); +void BLAS_FUNC(sstemr)(char *jobz, char *range, int *n, float *d, float *e, float *vl, float *vu, int *il, int *iu, int *m, float *w, float *z, int *ldz, int *nzc, int *isuppz, int *tryrac, float *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(ssteqr)(char *compz, int *n, float *d, float *e, float *z, int *ldz, float *work, int *info); +void BLAS_FUNC(ssterf)(int *n, float *d, float *e, int *info); +void BLAS_FUNC(sstev)(char *jobz, int *n, float *d, float *e, float *z, int *ldz, float *work, int *info); +void BLAS_FUNC(sstevd)(char *jobz, int *n, float *d, float *e, float *z, int *ldz, float *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(sstevr)(char *jobz, char *range, int *n, float *d, float *e, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, int *isuppz, float *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(sstevx)(char *jobz, char *range, int *n, float *d, float *e, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, float *work, int *iwork, int *ifail, int *info); +void BLAS_FUNC(ssycon)(char *uplo, int *n, float *a, int *lda, int *ipiv, float *anorm, float *rcond, float *work, int *iwork, int *info); +void BLAS_FUNC(ssyconv)(char *uplo, char *way, int *n, float *a, int *lda, int *ipiv, float *work, int *info); +void BLAS_FUNC(ssyequb)(char *uplo, int *n, float *a, int *lda, float *s, float *scond, float *amax, float *work, int *info); +void BLAS_FUNC(ssyev)(char *jobz, char *uplo, int *n, float *a, int *lda, float *w, float *work, int *lwork, int *info); +void BLAS_FUNC(ssyevd)(char *jobz, char *uplo, int *n, float *a, int *lda, float *w, float *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(ssyevr)(char *jobz, char *range, char *uplo, int *n, float *a, int *lda, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, int *isuppz, float *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(ssyevx)(char *jobz, char *range, char *uplo, int *n, float *a, int *lda, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, float *work, int *lwork, int *iwork, int *ifail, int *info); +void BLAS_FUNC(ssygs2)(int *itype, char *uplo, int *n, float *a, int *lda, float *b, int *ldb, int *info); +void BLAS_FUNC(ssygst)(int *itype, char *uplo, int *n, float *a, int *lda, float *b, int *ldb, int *info); +void BLAS_FUNC(ssygv)(int *itype, char *jobz, char *uplo, int *n, float *a, int *lda, float *b, int *ldb, float *w, float *work, int *lwork, int *info); +void BLAS_FUNC(ssygvd)(int *itype, char *jobz, char *uplo, int *n, float *a, int *lda, float *b, int *ldb, float *w, float *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(ssygvx)(int *itype, char *jobz, char *range, char *uplo, int *n, float *a, int *lda, float *b, int *ldb, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, float *work, int *lwork, int *iwork, int *ifail, int *info); +void BLAS_FUNC(ssyrfs)(char *uplo, int *n, int *nrhs, float *a, int *lda, float *af, int *ldaf, int *ipiv, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info); +void BLAS_FUNC(ssysv)(char *uplo, int *n, int *nrhs, float *a, int *lda, int *ipiv, float *b, int *ldb, float *work, int *lwork, int *info); +void BLAS_FUNC(ssysvx)(char *fact, char *uplo, int *n, int *nrhs, float *a, int *lda, float *af, int *ldaf, int *ipiv, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *lwork, int *iwork, int *info); +void BLAS_FUNC(ssyswapr)(char *uplo, int *n, float *a, int *lda, int *i1, int *i2); +void BLAS_FUNC(ssytd2)(char *uplo, int *n, float *a, int *lda, float *d, float *e, float *tau, int *info); +void BLAS_FUNC(ssytf2)(char *uplo, int *n, float *a, int *lda, int *ipiv, int *info); +void BLAS_FUNC(ssytrd)(char *uplo, int *n, float *a, int *lda, float *d, float *e, float *tau, float *work, int *lwork, int *info); +void BLAS_FUNC(ssytrf)(char *uplo, int *n, float *a, int *lda, int *ipiv, float *work, int *lwork, int *info); +void BLAS_FUNC(ssytri)(char *uplo, int *n, float *a, int *lda, int *ipiv, float *work, int *info); +void BLAS_FUNC(ssytri2)(char *uplo, int *n, float *a, int *lda, int *ipiv, float *work, int *lwork, int *info); +void BLAS_FUNC(ssytri2x)(char *uplo, int *n, float *a, int *lda, int *ipiv, float *work, int *nb, int *info); +void BLAS_FUNC(ssytrs)(char *uplo, int *n, int *nrhs, float *a, int *lda, int *ipiv, float *b, int *ldb, int *info); +void BLAS_FUNC(ssytrs2)(char *uplo, int *n, int *nrhs, float *a, int *lda, int *ipiv, float *b, int *ldb, float *work, int *info); +void BLAS_FUNC(stbcon)(char *norm, char *uplo, char *diag, int *n, int *kd, float *ab, int *ldab, float *rcond, float *work, int *iwork, int *info); +void BLAS_FUNC(stbrfs)(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, float *ab, int *ldab, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info); +void BLAS_FUNC(stbtrs)(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, float *ab, int *ldab, float *b, int *ldb, int *info); +void BLAS_FUNC(stfsm)(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, float *alpha, float *a, float *b, int *ldb); +void BLAS_FUNC(stftri)(char *transr, char *uplo, char *diag, int *n, float *a, int *info); +void BLAS_FUNC(stfttp)(char *transr, char *uplo, int *n, float *arf, float *ap, int *info); +void BLAS_FUNC(stfttr)(char *transr, char *uplo, int *n, float *arf, float *a, int *lda, int *info); +void BLAS_FUNC(stgevc)(char *side, char *howmny, int *select, int *n, float *s, int *lds, float *p, int *ldp, float *vl, int *ldvl, float *vr, int *ldvr, int *mm, int *m, float *work, int *info); +void BLAS_FUNC(stgex2)(int *wantq, int *wantz, int *n, float *a, int *lda, float *b, int *ldb, float *q, int *ldq, float *z, int *ldz, int *j1, int *n1, int *n2, float *work, int *lwork, int *info); +void BLAS_FUNC(stgexc)(int *wantq, int *wantz, int *n, float *a, int *lda, float *b, int *ldb, float *q, int *ldq, float *z, int *ldz, int *ifst, int *ilst, float *work, int *lwork, int *info); +void BLAS_FUNC(stgsen)(int *ijob, int *wantq, int *wantz, int *select, int *n, float *a, int *lda, float *b, int *ldb, float *alphar, float *alphai, float *beta, float *q, int *ldq, float *z, int *ldz, int *m, float *pl, float *pr, float *dif, float *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(stgsja)(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, float *a, int *lda, float *b, int *ldb, float *tola, float *tolb, float *alpha, float *beta, float *u, int *ldu, float *v, int *ldv, float *q, int *ldq, float *work, int *ncycle, int *info); +void BLAS_FUNC(stgsna)(char *job, char *howmny, int *select, int *n, float *a, int *lda, float *b, int *ldb, float *vl, int *ldvl, float *vr, int *ldvr, float *s, float *dif, int *mm, int *m, float *work, int *lwork, int *iwork, int *info); +void BLAS_FUNC(stgsy2)(char *trans, int *ijob, int *m, int *n, float *a, int *lda, float *b, int *ldb, float *c, int *ldc, float *d, int *ldd, float *e, int *lde, float *f, int *ldf, float *scale, float *rdsum, float *rdscal, int *iwork, int *pq, int *info); +void BLAS_FUNC(stgsyl)(char *trans, int *ijob, int *m, int *n, float *a, int *lda, float *b, int *ldb, float *c, int *ldc, float *d, int *ldd, float *e, int *lde, float *f, int *ldf, float *scale, float *dif, float *work, int *lwork, int *iwork, int *info); +void BLAS_FUNC(stpcon)(char *norm, char *uplo, char *diag, int *n, float *ap, float *rcond, float *work, int *iwork, int *info); +void BLAS_FUNC(stpmqrt)(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, float *v, int *ldv, float *t, int *ldt, float *a, int *lda, float *b, int *ldb, float *work, int *info); +void BLAS_FUNC(stpqrt)(int *m, int *n, int *l, int *nb, float *a, int *lda, float *b, int *ldb, float *t, int *ldt, float *work, int *info); +void BLAS_FUNC(stpqrt2)(int *m, int *n, int *l, float *a, int *lda, float *b, int *ldb, float *t, int *ldt, int *info); +void BLAS_FUNC(stprfb)(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, float *v, int *ldv, float *t, int *ldt, float *a, int *lda, float *b, int *ldb, float *work, int *ldwork); +void BLAS_FUNC(stprfs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, float *ap, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info); +void BLAS_FUNC(stptri)(char *uplo, char *diag, int *n, float *ap, int *info); +void BLAS_FUNC(stptrs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, float *ap, float *b, int *ldb, int *info); +void BLAS_FUNC(stpttf)(char *transr, char *uplo, int *n, float *ap, float *arf, int *info); +void BLAS_FUNC(stpttr)(char *uplo, int *n, float *ap, float *a, int *lda, int *info); +void BLAS_FUNC(strcon)(char *norm, char *uplo, char *diag, int *n, float *a, int *lda, float *rcond, float *work, int *iwork, int *info); +void BLAS_FUNC(strevc)(char *side, char *howmny, int *select, int *n, float *t, int *ldt, float *vl, int *ldvl, float *vr, int *ldvr, int *mm, int *m, float *work, int *info); +void BLAS_FUNC(strexc)(char *compq, int *n, float *t, int *ldt, float *q, int *ldq, int *ifst, int *ilst, float *work, int *info); +void BLAS_FUNC(strrfs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info); +void BLAS_FUNC(strsen)(char *job, char *compq, int *select, int *n, float *t, int *ldt, float *q, int *ldq, float *wr, float *wi, int *m, float *s, float *sep, float *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(strsna)(char *job, char *howmny, int *select, int *n, float *t, int *ldt, float *vl, int *ldvl, float *vr, int *ldvr, float *s, float *sep, int *mm, int *m, float *work, int *ldwork, int *iwork, int *info); +void BLAS_FUNC(strsyl)(char *trana, char *tranb, int *isgn, int *m, int *n, float *a, int *lda, float *b, int *ldb, float *c, int *ldc, float *scale, int *info); +void BLAS_FUNC(strti2)(char *uplo, char *diag, int *n, float *a, int *lda, int *info); +void BLAS_FUNC(strtri)(char *uplo, char *diag, int *n, float *a, int *lda, int *info); +void BLAS_FUNC(strtrs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, int *info); +void BLAS_FUNC(strttf)(char *transr, char *uplo, int *n, float *a, int *lda, float *arf, int *info); +void BLAS_FUNC(strttp)(char *uplo, int *n, float *a, int *lda, float *ap, int *info); +void BLAS_FUNC(stzrzf)(int *m, int *n, float *a, int *lda, float *tau, float *work, int *lwork, int *info); +void BLAS_FUNC(xerbla_array)(char *srname_array, int *srname_len, int *info); +void BLAS_FUNC(zbbcsd)(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, double *theta, double *phi, npy_complex128 *u1, int *ldu1, npy_complex128 *u2, int *ldu2, npy_complex128 *v1t, int *ldv1t, npy_complex128 *v2t, int *ldv2t, double *b11d, double *b11e, double *b12d, double *b12e, double *b21d, double *b21e, double *b22d, double *b22e, double *rwork, int *lrwork, int *info); +void BLAS_FUNC(zbdsqr)(char *uplo, int *n, int *ncvt, int *nru, int *ncc, double *d, double *e, npy_complex128 *vt, int *ldvt, npy_complex128 *u, int *ldu, npy_complex128 *c, int *ldc, double *rwork, int *info); +void BLAS_FUNC(zcgesv)(int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, npy_complex128 *work, npy_complex64 *swork, double *rwork, int *iter, int *info); +void BLAS_FUNC(zcposv)(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, npy_complex128 *work, npy_complex64 *swork, double *rwork, int *iter, int *info); +void BLAS_FUNC(zdrscl)(int *n, double *sa, npy_complex128 *sx, int *incx); +void BLAS_FUNC(zgbbrd)(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, npy_complex128 *ab, int *ldab, double *d, double *e, npy_complex128 *q, int *ldq, npy_complex128 *pt, int *ldpt, npy_complex128 *c, int *ldc, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zgbcon)(char *norm, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, int *ipiv, double *anorm, double *rcond, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zgbequ)(int *m, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, double *r, double *c, double *rowcnd, double *colcnd, double *amax, int *info); +void BLAS_FUNC(zgbequb)(int *m, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, double *r, double *c, double *rowcnd, double *colcnd, double *amax, int *info); +void BLAS_FUNC(zgbrfs)(char *trans, int *n, int *kl, int *ku, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *afb, int *ldafb, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zgbsv)(int *n, int *kl, int *ku, int *nrhs, npy_complex128 *ab, int *ldab, int *ipiv, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(zgbsvx)(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *afb, int *ldafb, int *ipiv, char *equed, double *r, double *c, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *rcond, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zgbtf2)(int *m, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, int *ipiv, int *info); +void BLAS_FUNC(zgbtrf)(int *m, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, int *ipiv, int *info); +void BLAS_FUNC(zgbtrs)(char *trans, int *n, int *kl, int *ku, int *nrhs, npy_complex128 *ab, int *ldab, int *ipiv, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(zgebak)(char *job, char *side, int *n, int *ilo, int *ihi, double *scale, int *m, npy_complex128 *v, int *ldv, int *info); +void BLAS_FUNC(zgebal)(char *job, int *n, npy_complex128 *a, int *lda, int *ilo, int *ihi, double *scale, int *info); +void BLAS_FUNC(zgebd2)(int *m, int *n, npy_complex128 *a, int *lda, double *d, double *e, npy_complex128 *tauq, npy_complex128 *taup, npy_complex128 *work, int *info); +void BLAS_FUNC(zgebrd)(int *m, int *n, npy_complex128 *a, int *lda, double *d, double *e, npy_complex128 *tauq, npy_complex128 *taup, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zgecon)(char *norm, int *n, npy_complex128 *a, int *lda, double *anorm, double *rcond, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zgeequ)(int *m, int *n, npy_complex128 *a, int *lda, double *r, double *c, double *rowcnd, double *colcnd, double *amax, int *info); +void BLAS_FUNC(zgeequb)(int *m, int *n, npy_complex128 *a, int *lda, double *r, double *c, double *rowcnd, double *colcnd, double *amax, int *info); +void BLAS_FUNC(zgees)(char *jobvs, char *sort, _zselect1 *select, int *n, npy_complex128 *a, int *lda, int *sdim, npy_complex128 *w, npy_complex128 *vs, int *ldvs, npy_complex128 *work, int *lwork, double *rwork, int *bwork, int *info); +void BLAS_FUNC(zgeesx)(char *jobvs, char *sort, _zselect1 *select, char *sense, int *n, npy_complex128 *a, int *lda, int *sdim, npy_complex128 *w, npy_complex128 *vs, int *ldvs, double *rconde, double *rcondv, npy_complex128 *work, int *lwork, double *rwork, int *bwork, int *info); +void BLAS_FUNC(zgeev)(char *jobvl, char *jobvr, int *n, npy_complex128 *a, int *lda, npy_complex128 *w, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, npy_complex128 *work, int *lwork, double *rwork, int *info); +void BLAS_FUNC(zgeevx)(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, npy_complex128 *a, int *lda, npy_complex128 *w, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, int *ilo, int *ihi, double *scale, double *abnrm, double *rconde, double *rcondv, npy_complex128 *work, int *lwork, double *rwork, int *info); +void BLAS_FUNC(zgehd2)(int *n, int *ilo, int *ihi, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info); +void BLAS_FUNC(zgehrd)(int *n, int *ilo, int *ihi, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zgelq2)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info); +void BLAS_FUNC(zgelqf)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zgels)(char *trans, int *m, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zgelsd)(int *m, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, double *s, double *rcond, int *rank, npy_complex128 *work, int *lwork, double *rwork, int *iwork, int *info); +void BLAS_FUNC(zgelss)(int *m, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, double *s, double *rcond, int *rank, npy_complex128 *work, int *lwork, double *rwork, int *info); +void BLAS_FUNC(zgelsy)(int *m, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *jpvt, double *rcond, int *rank, npy_complex128 *work, int *lwork, double *rwork, int *info); +void BLAS_FUNC(zgemqrt)(char *side, char *trans, int *m, int *n, int *k, int *nb, npy_complex128 *v, int *ldv, npy_complex128 *t, int *ldt, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info); +void BLAS_FUNC(zgeql2)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info); +void BLAS_FUNC(zgeqlf)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zgeqp3)(int *m, int *n, npy_complex128 *a, int *lda, int *jpvt, npy_complex128 *tau, npy_complex128 *work, int *lwork, double *rwork, int *info); +void BLAS_FUNC(zgeqr2)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info); +void BLAS_FUNC(zgeqr2p)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info); +void BLAS_FUNC(zgeqrf)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zgeqrfp)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zgeqrt)(int *m, int *n, int *nb, npy_complex128 *a, int *lda, npy_complex128 *t, int *ldt, npy_complex128 *work, int *info); +void BLAS_FUNC(zgeqrt2)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *t, int *ldt, int *info); +void BLAS_FUNC(zgeqrt3)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *t, int *ldt, int *info); +void BLAS_FUNC(zgerfs)(char *trans, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zgerq2)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info); +void BLAS_FUNC(zgerqf)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zgesc2)(int *n, npy_complex128 *a, int *lda, npy_complex128 *rhs, int *ipiv, int *jpiv, double *scale); +void BLAS_FUNC(zgesdd)(char *jobz, int *m, int *n, npy_complex128 *a, int *lda, double *s, npy_complex128 *u, int *ldu, npy_complex128 *vt, int *ldvt, npy_complex128 *work, int *lwork, double *rwork, int *iwork, int *info); +void BLAS_FUNC(zgesv)(int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(zgesvd)(char *jobu, char *jobvt, int *m, int *n, npy_complex128 *a, int *lda, double *s, npy_complex128 *u, int *ldu, npy_complex128 *vt, int *ldvt, npy_complex128 *work, int *lwork, double *rwork, int *info); +void BLAS_FUNC(zgesvx)(char *fact, char *trans, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, int *ipiv, char *equed, double *r, double *c, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *rcond, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zgetc2)(int *n, npy_complex128 *a, int *lda, int *ipiv, int *jpiv, int *info); +void BLAS_FUNC(zgetf2)(int *m, int *n, npy_complex128 *a, int *lda, int *ipiv, int *info); +void BLAS_FUNC(zgetrf)(int *m, int *n, npy_complex128 *a, int *lda, int *ipiv, int *info); +void BLAS_FUNC(zgetri)(int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zgetrs)(char *trans, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(zggbak)(char *job, char *side, int *n, int *ilo, int *ihi, double *lscale, double *rscale, int *m, npy_complex128 *v, int *ldv, int *info); +void BLAS_FUNC(zggbal)(char *job, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *ilo, int *ihi, double *lscale, double *rscale, double *work, int *info); +void BLAS_FUNC(zgges)(char *jobvsl, char *jobvsr, char *sort, _zselect2 *selctg, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *sdim, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *vsl, int *ldvsl, npy_complex128 *vsr, int *ldvsr, npy_complex128 *work, int *lwork, double *rwork, int *bwork, int *info); +void BLAS_FUNC(zggesx)(char *jobvsl, char *jobvsr, char *sort, _zselect2 *selctg, char *sense, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *sdim, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *vsl, int *ldvsl, npy_complex128 *vsr, int *ldvsr, double *rconde, double *rcondv, npy_complex128 *work, int *lwork, double *rwork, int *iwork, int *liwork, int *bwork, int *info); +void BLAS_FUNC(zggev)(char *jobvl, char *jobvr, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, npy_complex128 *work, int *lwork, double *rwork, int *info); +void BLAS_FUNC(zggevx)(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, int *ilo, int *ihi, double *lscale, double *rscale, double *abnrm, double *bbnrm, double *rconde, double *rcondv, npy_complex128 *work, int *lwork, double *rwork, int *iwork, int *bwork, int *info); +void BLAS_FUNC(zggglm)(int *n, int *m, int *p, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *d, npy_complex128 *x, npy_complex128 *y, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zgghrd)(char *compq, char *compz, int *n, int *ilo, int *ihi, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *q, int *ldq, npy_complex128 *z, int *ldz, int *info); +void BLAS_FUNC(zgglse)(int *m, int *n, int *p, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *c, npy_complex128 *d, npy_complex128 *x, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zggqrf)(int *n, int *m, int *p, npy_complex128 *a, int *lda, npy_complex128 *taua, npy_complex128 *b, int *ldb, npy_complex128 *taub, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zggrqf)(int *m, int *p, int *n, npy_complex128 *a, int *lda, npy_complex128 *taua, npy_complex128 *b, int *ldb, npy_complex128 *taub, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zgtcon)(char *norm, int *n, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *du2, int *ipiv, double *anorm, double *rcond, npy_complex128 *work, int *info); +void BLAS_FUNC(zgtrfs)(char *trans, int *n, int *nrhs, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *dlf, npy_complex128 *df, npy_complex128 *duf, npy_complex128 *du2, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zgtsv)(int *n, int *nrhs, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(zgtsvx)(char *fact, char *trans, int *n, int *nrhs, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *dlf, npy_complex128 *df, npy_complex128 *duf, npy_complex128 *du2, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *rcond, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zgttrf)(int *n, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *du2, int *ipiv, int *info); +void BLAS_FUNC(zgttrs)(char *trans, int *n, int *nrhs, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *du2, int *ipiv, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(zgtts2)(int *itrans, int *n, int *nrhs, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *du2, int *ipiv, npy_complex128 *b, int *ldb); +void BLAS_FUNC(zhbev)(char *jobz, char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zhbevd)(char *jobz, char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(zhbevx)(char *jobz, char *range, char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, npy_complex128 *q, int *ldq, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, double *rwork, int *iwork, int *ifail, int *info); +void BLAS_FUNC(zhbgst)(char *vect, char *uplo, int *n, int *ka, int *kb, npy_complex128 *ab, int *ldab, npy_complex128 *bb, int *ldbb, npy_complex128 *x, int *ldx, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zhbgv)(char *jobz, char *uplo, int *n, int *ka, int *kb, npy_complex128 *ab, int *ldab, npy_complex128 *bb, int *ldbb, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zhbgvd)(char *jobz, char *uplo, int *n, int *ka, int *kb, npy_complex128 *ab, int *ldab, npy_complex128 *bb, int *ldbb, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(zhbgvx)(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, npy_complex128 *ab, int *ldab, npy_complex128 *bb, int *ldbb, npy_complex128 *q, int *ldq, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, double *rwork, int *iwork, int *ifail, int *info); +void BLAS_FUNC(zhbtrd)(char *vect, char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, double *d, double *e, npy_complex128 *q, int *ldq, npy_complex128 *work, int *info); +void BLAS_FUNC(zhecon)(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, double *anorm, double *rcond, npy_complex128 *work, int *info); +void BLAS_FUNC(zheequb)(char *uplo, int *n, npy_complex128 *a, int *lda, double *s, double *scond, double *amax, npy_complex128 *work, int *info); +void BLAS_FUNC(zheev)(char *jobz, char *uplo, int *n, npy_complex128 *a, int *lda, double *w, npy_complex128 *work, int *lwork, double *rwork, int *info); +void BLAS_FUNC(zheevd)(char *jobz, char *uplo, int *n, npy_complex128 *a, int *lda, double *w, npy_complex128 *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(zheevr)(char *jobz, char *range, char *uplo, int *n, npy_complex128 *a, int *lda, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, npy_complex128 *z, int *ldz, int *isuppz, npy_complex128 *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(zheevx)(char *jobz, char *range, char *uplo, int *n, npy_complex128 *a, int *lda, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, double *rwork, int *iwork, int *ifail, int *info); +void BLAS_FUNC(zhegs2)(int *itype, char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(zhegst)(int *itype, char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(zhegv)(int *itype, char *jobz, char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, double *w, npy_complex128 *work, int *lwork, double *rwork, int *info); +void BLAS_FUNC(zhegvd)(int *itype, char *jobz, char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, double *w, npy_complex128 *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(zhegvx)(int *itype, char *jobz, char *range, char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, double *rwork, int *iwork, int *ifail, int *info); +void BLAS_FUNC(zherfs)(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zhesv)(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zhesvx)(char *fact, char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *rcond, double *ferr, double *berr, npy_complex128 *work, int *lwork, double *rwork, int *info); +void BLAS_FUNC(zheswapr)(char *uplo, int *n, npy_complex128 *a, int *lda, int *i1, int *i2); +void BLAS_FUNC(zhetd2)(char *uplo, int *n, npy_complex128 *a, int *lda, double *d, double *e, npy_complex128 *tau, int *info); +void BLAS_FUNC(zhetf2)(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, int *info); +void BLAS_FUNC(zhetrd)(char *uplo, int *n, npy_complex128 *a, int *lda, double *d, double *e, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zhetrf)(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zhetri)(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *info); +void BLAS_FUNC(zhetri2)(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zhetri2x)(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *nb, int *info); +void BLAS_FUNC(zhetrs)(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(zhetrs2)(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *work, int *info); +void BLAS_FUNC(zhfrk)(char *transr, char *uplo, char *trans, int *n, int *k, double *alpha, npy_complex128 *a, int *lda, double *beta, npy_complex128 *c); +void BLAS_FUNC(zhgeqz)(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, npy_complex128 *h, int *ldh, npy_complex128 *t, int *ldt, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *q, int *ldq, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, double *rwork, int *info); +void BLAS_FUNC(zhpcon)(char *uplo, int *n, npy_complex128 *ap, int *ipiv, double *anorm, double *rcond, npy_complex128 *work, int *info); +void BLAS_FUNC(zhpev)(char *jobz, char *uplo, int *n, npy_complex128 *ap, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zhpevd)(char *jobz, char *uplo, int *n, npy_complex128 *ap, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(zhpevx)(char *jobz, char *range, char *uplo, int *n, npy_complex128 *ap, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, double *rwork, int *iwork, int *ifail, int *info); +void BLAS_FUNC(zhpgst)(int *itype, char *uplo, int *n, npy_complex128 *ap, npy_complex128 *bp, int *info); +void BLAS_FUNC(zhpgv)(int *itype, char *jobz, char *uplo, int *n, npy_complex128 *ap, npy_complex128 *bp, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zhpgvd)(int *itype, char *jobz, char *uplo, int *n, npy_complex128 *ap, npy_complex128 *bp, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(zhpgvx)(int *itype, char *jobz, char *range, char *uplo, int *n, npy_complex128 *ap, npy_complex128 *bp, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, double *rwork, int *iwork, int *ifail, int *info); +void BLAS_FUNC(zhprfs)(char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *afp, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zhpsv)(char *uplo, int *n, int *nrhs, npy_complex128 *ap, int *ipiv, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(zhpsvx)(char *fact, char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *afp, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *rcond, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zhptrd)(char *uplo, int *n, npy_complex128 *ap, double *d, double *e, npy_complex128 *tau, int *info); +void BLAS_FUNC(zhptrf)(char *uplo, int *n, npy_complex128 *ap, int *ipiv, int *info); +void BLAS_FUNC(zhptri)(char *uplo, int *n, npy_complex128 *ap, int *ipiv, npy_complex128 *work, int *info); +void BLAS_FUNC(zhptrs)(char *uplo, int *n, int *nrhs, npy_complex128 *ap, int *ipiv, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(zhsein)(char *side, char *eigsrc, char *initv, int *select, int *n, npy_complex128 *h, int *ldh, npy_complex128 *w, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, int *mm, int *m, npy_complex128 *work, double *rwork, int *ifaill, int *ifailr, int *info); +void BLAS_FUNC(zhseqr)(char *job, char *compz, int *n, int *ilo, int *ihi, npy_complex128 *h, int *ldh, npy_complex128 *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zlabrd)(int *m, int *n, int *nb, npy_complex128 *a, int *lda, double *d, double *e, npy_complex128 *tauq, npy_complex128 *taup, npy_complex128 *x, int *ldx, npy_complex128 *y, int *ldy); +void BLAS_FUNC(zlacgv)(int *n, npy_complex128 *x, int *incx); +void BLAS_FUNC(zlacn2)(int *n, npy_complex128 *v, npy_complex128 *x, double *est, int *kase, int *isave); +void BLAS_FUNC(zlacon)(int *n, npy_complex128 *v, npy_complex128 *x, double *est, int *kase); +void BLAS_FUNC(zlacp2)(char *uplo, int *m, int *n, double *a, int *lda, npy_complex128 *b, int *ldb); +void BLAS_FUNC(zlacpy)(char *uplo, int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb); +void BLAS_FUNC(zlacrm)(int *m, int *n, npy_complex128 *a, int *lda, double *b, int *ldb, npy_complex128 *c, int *ldc, double *rwork); +void BLAS_FUNC(zlacrt)(int *n, npy_complex128 *cx, int *incx, npy_complex128 *cy, int *incy, npy_complex128 *c, npy_complex128 *s); +void (zladivwrp_)(npy_complex128 *out, npy_complex128 *x, npy_complex128 *y); +void BLAS_FUNC(zlaed0)(int *qsiz, int *n, double *d, double *e, npy_complex128 *q, int *ldq, npy_complex128 *qstore, int *ldqs, double *rwork, int *iwork, int *info); +void BLAS_FUNC(zlaed7)(int *n, int *cutpnt, int *qsiz, int *tlvls, int *curlvl, int *curpbm, double *d, npy_complex128 *q, int *ldq, double *rho, int *indxq, double *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, double *givnum, npy_complex128 *work, double *rwork, int *iwork, int *info); +void BLAS_FUNC(zlaed8)(int *k, int *n, int *qsiz, npy_complex128 *q, int *ldq, double *d, double *rho, int *cutpnt, double *z, double *dlamda, npy_complex128 *q2, int *ldq2, double *w, int *indxp, int *indx, int *indxq, int *perm, int *givptr, int *givcol, double *givnum, int *info); +void BLAS_FUNC(zlaein)(int *rightv, int *noinit, int *n, npy_complex128 *h, int *ldh, npy_complex128 *w, npy_complex128 *v, npy_complex128 *b, int *ldb, double *rwork, double *eps3, double *smlnum, int *info); +void BLAS_FUNC(zlaesy)(npy_complex128 *a, npy_complex128 *b, npy_complex128 *c, npy_complex128 *rt1, npy_complex128 *rt2, npy_complex128 *evscal, npy_complex128 *cs1, npy_complex128 *sn1); +void BLAS_FUNC(zlaev2)(npy_complex128 *a, npy_complex128 *b, npy_complex128 *c, double *rt1, double *rt2, double *cs1, npy_complex128 *sn1); +void BLAS_FUNC(zlag2c)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex64 *sa, int *ldsa, int *info); +void BLAS_FUNC(zlags2)(int *upper, double *a1, npy_complex128 *a2, double *a3, double *b1, npy_complex128 *b2, double *b3, double *csu, npy_complex128 *snu, double *csv, npy_complex128 *snv, double *csq, npy_complex128 *snq); +void BLAS_FUNC(zlagtm)(char *trans, int *n, int *nrhs, double *alpha, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *x, int *ldx, double *beta, npy_complex128 *b, int *ldb); +void BLAS_FUNC(zlahef)(char *uplo, int *n, int *nb, int *kb, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *w, int *ldw, int *info); +void BLAS_FUNC(zlahqr)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, npy_complex128 *h, int *ldh, npy_complex128 *w, int *iloz, int *ihiz, npy_complex128 *z, int *ldz, int *info); +void BLAS_FUNC(zlahr2)(int *n, int *k, int *nb, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *t, int *ldt, npy_complex128 *y, int *ldy); +void BLAS_FUNC(zlaic1)(int *job, int *j, npy_complex128 *x, double *sest, npy_complex128 *w, npy_complex128 *gamma, double *sestpr, npy_complex128 *s, npy_complex128 *c); +void BLAS_FUNC(zlals0)(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, npy_complex128 *b, int *ldb, npy_complex128 *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, double *givnum, int *ldgnum, double *poles, double *difl, double *difr, double *z, int *k, double *c, double *s, double *rwork, int *info); +void BLAS_FUNC(zlalsa)(int *icompq, int *smlsiz, int *n, int *nrhs, npy_complex128 *b, int *ldb, npy_complex128 *bx, int *ldbx, double *u, int *ldu, double *vt, int *k, double *difl, double *difr, double *z, double *poles, int *givptr, int *givcol, int *ldgcol, int *perm, double *givnum, double *c, double *s, double *rwork, int *iwork, int *info); +void BLAS_FUNC(zlalsd)(char *uplo, int *smlsiz, int *n, int *nrhs, double *d, double *e, npy_complex128 *b, int *ldb, double *rcond, int *rank, npy_complex128 *work, double *rwork, int *iwork, int *info); +double BLAS_FUNC(zlangb)(char *norm, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, double *work); +double BLAS_FUNC(zlange)(char *norm, int *m, int *n, npy_complex128 *a, int *lda, double *work); +double BLAS_FUNC(zlangt)(char *norm, int *n, npy_complex128 *dl, npy_complex128 *d_, npy_complex128 *du); +double BLAS_FUNC(zlanhb)(char *norm, char *uplo, int *n, int *k, npy_complex128 *ab, int *ldab, double *work); +double BLAS_FUNC(zlanhe)(char *norm, char *uplo, int *n, npy_complex128 *a, int *lda, double *work); +double BLAS_FUNC(zlanhf)(char *norm, char *transr, char *uplo, int *n, npy_complex128 *a, double *work); +double BLAS_FUNC(zlanhp)(char *norm, char *uplo, int *n, npy_complex128 *ap, double *work); +double BLAS_FUNC(zlanhs)(char *norm, int *n, npy_complex128 *a, int *lda, double *work); +double BLAS_FUNC(zlanht)(char *norm, int *n, double *d_, npy_complex128 *e); +double BLAS_FUNC(zlansb)(char *norm, char *uplo, int *n, int *k, npy_complex128 *ab, int *ldab, double *work); +double BLAS_FUNC(zlansp)(char *norm, char *uplo, int *n, npy_complex128 *ap, double *work); +double BLAS_FUNC(zlansy)(char *norm, char *uplo, int *n, npy_complex128 *a, int *lda, double *work); +double BLAS_FUNC(zlantb)(char *norm, char *uplo, char *diag, int *n, int *k, npy_complex128 *ab, int *ldab, double *work); +double BLAS_FUNC(zlantp)(char *norm, char *uplo, char *diag, int *n, npy_complex128 *ap, double *work); +double BLAS_FUNC(zlantr)(char *norm, char *uplo, char *diag, int *m, int *n, npy_complex128 *a, int *lda, double *work); +void BLAS_FUNC(zlapll)(int *n, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, double *ssmin); +void BLAS_FUNC(zlapmr)(int *forwrd, int *m, int *n, npy_complex128 *x, int *ldx, int *k); +void BLAS_FUNC(zlapmt)(int *forwrd, int *m, int *n, npy_complex128 *x, int *ldx, int *k); +void BLAS_FUNC(zlaqgb)(int *m, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, double *r, double *c, double *rowcnd, double *colcnd, double *amax, char *equed); +void BLAS_FUNC(zlaqge)(int *m, int *n, npy_complex128 *a, int *lda, double *r, double *c, double *rowcnd, double *colcnd, double *amax, char *equed); +void BLAS_FUNC(zlaqhb)(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, double *s, double *scond, double *amax, char *equed); +void BLAS_FUNC(zlaqhe)(char *uplo, int *n, npy_complex128 *a, int *lda, double *s, double *scond, double *amax, char *equed); +void BLAS_FUNC(zlaqhp)(char *uplo, int *n, npy_complex128 *ap, double *s, double *scond, double *amax, char *equed); +void BLAS_FUNC(zlaqp2)(int *m, int *n, int *offset, npy_complex128 *a, int *lda, int *jpvt, npy_complex128 *tau, double *vn1, double *vn2, npy_complex128 *work); +void BLAS_FUNC(zlaqps)(int *m, int *n, int *offset, int *nb, int *kb, npy_complex128 *a, int *lda, int *jpvt, npy_complex128 *tau, double *vn1, double *vn2, npy_complex128 *auxv, npy_complex128 *f, int *ldf); +void BLAS_FUNC(zlaqr0)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, npy_complex128 *h, int *ldh, npy_complex128 *w, int *iloz, int *ihiz, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zlaqr1)(int *n, npy_complex128 *h, int *ldh, npy_complex128 *s1, npy_complex128 *s2, npy_complex128 *v); +void BLAS_FUNC(zlaqr2)(int *wantt, int *wantz, int *n, int *ktop, int *kbot, int *nw, npy_complex128 *h, int *ldh, int *iloz, int *ihiz, npy_complex128 *z, int *ldz, int *ns, int *nd, npy_complex128 *sh, npy_complex128 *v, int *ldv, int *nh, npy_complex128 *t, int *ldt, int *nv, npy_complex128 *wv, int *ldwv, npy_complex128 *work, int *lwork); +void BLAS_FUNC(zlaqr3)(int *wantt, int *wantz, int *n, int *ktop, int *kbot, int *nw, npy_complex128 *h, int *ldh, int *iloz, int *ihiz, npy_complex128 *z, int *ldz, int *ns, int *nd, npy_complex128 *sh, npy_complex128 *v, int *ldv, int *nh, npy_complex128 *t, int *ldt, int *nv, npy_complex128 *wv, int *ldwv, npy_complex128 *work, int *lwork); +void BLAS_FUNC(zlaqr4)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, npy_complex128 *h, int *ldh, npy_complex128 *w, int *iloz, int *ihiz, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zlaqr5)(int *wantt, int *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, npy_complex128 *s, npy_complex128 *h, int *ldh, int *iloz, int *ihiz, npy_complex128 *z, int *ldz, npy_complex128 *v, int *ldv, npy_complex128 *u, int *ldu, int *nv, npy_complex128 *wv, int *ldwv, int *nh, npy_complex128 *wh, int *ldwh); +void BLAS_FUNC(zlaqsb)(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, double *s, double *scond, double *amax, char *equed); +void BLAS_FUNC(zlaqsp)(char *uplo, int *n, npy_complex128 *ap, double *s, double *scond, double *amax, char *equed); +void BLAS_FUNC(zlaqsy)(char *uplo, int *n, npy_complex128 *a, int *lda, double *s, double *scond, double *amax, char *equed); +void BLAS_FUNC(zlar1v)(int *n, int *b1, int *bn, double *lambda_, double *d, double *l, double *ld, double *lld, double *pivmin, double *gaptol, npy_complex128 *z, int *wantnc, int *negcnt, double *ztz, double *mingma, int *r, int *isuppz, double *nrminv, double *resid, double *rqcorr, double *work); +void BLAS_FUNC(zlar2v)(int *n, npy_complex128 *x, npy_complex128 *y, npy_complex128 *z, int *incx, double *c, npy_complex128 *s, int *incc); +void BLAS_FUNC(zlarcm)(int *m, int *n, double *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *c, int *ldc, double *rwork); +void BLAS_FUNC(zlarf)(char *side, int *m, int *n, npy_complex128 *v, int *incv, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work); +void BLAS_FUNC(zlarfb)(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, npy_complex128 *v, int *ldv, npy_complex128 *t, int *ldt, npy_complex128 *c, int *ldc, npy_complex128 *work, int *ldwork); +void BLAS_FUNC(zlarfg)(int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *tau); +void BLAS_FUNC(zlarfgp)(int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *tau); +void BLAS_FUNC(zlarft)(char *direct, char *storev, int *n, int *k, npy_complex128 *v, int *ldv, npy_complex128 *tau, npy_complex128 *t, int *ldt); +void BLAS_FUNC(zlarfx)(char *side, int *m, int *n, npy_complex128 *v, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work); +void BLAS_FUNC(zlargv)(int *n, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, double *c, int *incc); +void BLAS_FUNC(zlarnv)(int *idist, int *iseed, int *n, npy_complex128 *x); +void BLAS_FUNC(zlarrv)(int *n, double *vl, double *vu, double *d, double *l, double *pivmin, int *isplit, int *m, int *dol, int *dou, double *minrgp, double *rtol1, double *rtol2, double *w, double *werr, double *wgap, int *iblock, int *indexw, double *gers, npy_complex128 *z, int *ldz, int *isuppz, double *work, int *iwork, int *info); +void BLAS_FUNC(zlartg)(npy_complex128 *f, npy_complex128 *g, double *cs, npy_complex128 *sn, npy_complex128 *r); +void BLAS_FUNC(zlartv)(int *n, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, double *c, npy_complex128 *s, int *incc); +void BLAS_FUNC(zlarz)(char *side, int *m, int *n, int *l, npy_complex128 *v, int *incv, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work); +void BLAS_FUNC(zlarzb)(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, npy_complex128 *v, int *ldv, npy_complex128 *t, int *ldt, npy_complex128 *c, int *ldc, npy_complex128 *work, int *ldwork); +void BLAS_FUNC(zlarzt)(char *direct, char *storev, int *n, int *k, npy_complex128 *v, int *ldv, npy_complex128 *tau, npy_complex128 *t, int *ldt); +void BLAS_FUNC(zlascl)(char *type_bn, int *kl, int *ku, double *cfrom, double *cto, int *m, int *n, npy_complex128 *a, int *lda, int *info); +void BLAS_FUNC(zlaset)(char *uplo, int *m, int *n, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *a, int *lda); +void BLAS_FUNC(zlasr)(char *side, char *pivot, char *direct, int *m, int *n, double *c, double *s, npy_complex128 *a, int *lda); +void BLAS_FUNC(zlassq)(int *n, npy_complex128 *x, int *incx, double *scale, double *sumsq); +void BLAS_FUNC(zlaswp)(int *n, npy_complex128 *a, int *lda, int *k1, int *k2, int *ipiv, int *incx); +void BLAS_FUNC(zlasyf)(char *uplo, int *n, int *nb, int *kb, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *w, int *ldw, int *info); +void BLAS_FUNC(zlat2c)(char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex64 *sa, int *ldsa, int *info); +void BLAS_FUNC(zlatbs)(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, npy_complex128 *ab, int *ldab, npy_complex128 *x, double *scale, double *cnorm, int *info); +void BLAS_FUNC(zlatdf)(int *ijob, int *n, npy_complex128 *z, int *ldz, npy_complex128 *rhs, double *rdsum, double *rdscal, int *ipiv, int *jpiv); +void BLAS_FUNC(zlatps)(char *uplo, char *trans, char *diag, char *normin, int *n, npy_complex128 *ap, npy_complex128 *x, double *scale, double *cnorm, int *info); +void BLAS_FUNC(zlatrd)(char *uplo, int *n, int *nb, npy_complex128 *a, int *lda, double *e, npy_complex128 *tau, npy_complex128 *w, int *ldw); +void BLAS_FUNC(zlatrs)(char *uplo, char *trans, char *diag, char *normin, int *n, npy_complex128 *a, int *lda, npy_complex128 *x, double *scale, double *cnorm, int *info); +void BLAS_FUNC(zlatrz)(int *m, int *n, int *l, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work); +void BLAS_FUNC(zlauu2)(char *uplo, int *n, npy_complex128 *a, int *lda, int *info); +void BLAS_FUNC(zlauum)(char *uplo, int *n, npy_complex128 *a, int *lda, int *info); +void BLAS_FUNC(zpbcon)(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, double *anorm, double *rcond, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zpbequ)(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, double *s, double *scond, double *amax, int *info); +void BLAS_FUNC(zpbrfs)(char *uplo, int *n, int *kd, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *afb, int *ldafb, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zpbstf)(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, int *info); +void BLAS_FUNC(zpbsv)(char *uplo, int *n, int *kd, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(zpbsvx)(char *fact, char *uplo, int *n, int *kd, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *afb, int *ldafb, char *equed, double *s, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *rcond, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zpbtf2)(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, int *info); +void BLAS_FUNC(zpbtrf)(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, int *info); +void BLAS_FUNC(zpbtrs)(char *uplo, int *n, int *kd, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(zpftrf)(char *transr, char *uplo, int *n, npy_complex128 *a, int *info); +void BLAS_FUNC(zpftri)(char *transr, char *uplo, int *n, npy_complex128 *a, int *info); +void BLAS_FUNC(zpftrs)(char *transr, char *uplo, int *n, int *nrhs, npy_complex128 *a, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(zpocon)(char *uplo, int *n, npy_complex128 *a, int *lda, double *anorm, double *rcond, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zpoequ)(int *n, npy_complex128 *a, int *lda, double *s, double *scond, double *amax, int *info); +void BLAS_FUNC(zpoequb)(int *n, npy_complex128 *a, int *lda, double *s, double *scond, double *amax, int *info); +void BLAS_FUNC(zporfs)(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zposv)(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(zposvx)(char *fact, char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, char *equed, double *s, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *rcond, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zpotf2)(char *uplo, int *n, npy_complex128 *a, int *lda, int *info); +void BLAS_FUNC(zpotrf)(char *uplo, int *n, npy_complex128 *a, int *lda, int *info); +void BLAS_FUNC(zpotri)(char *uplo, int *n, npy_complex128 *a, int *lda, int *info); +void BLAS_FUNC(zpotrs)(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(zppcon)(char *uplo, int *n, npy_complex128 *ap, double *anorm, double *rcond, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zppequ)(char *uplo, int *n, npy_complex128 *ap, double *s, double *scond, double *amax, int *info); +void BLAS_FUNC(zpprfs)(char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *afp, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zppsv)(char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(zppsvx)(char *fact, char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *afp, char *equed, double *s, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *rcond, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zpptrf)(char *uplo, int *n, npy_complex128 *ap, int *info); +void BLAS_FUNC(zpptri)(char *uplo, int *n, npy_complex128 *ap, int *info); +void BLAS_FUNC(zpptrs)(char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(zpstf2)(char *uplo, int *n, npy_complex128 *a, int *lda, int *piv, int *rank, double *tol, double *work, int *info); +void BLAS_FUNC(zpstrf)(char *uplo, int *n, npy_complex128 *a, int *lda, int *piv, int *rank, double *tol, double *work, int *info); +void BLAS_FUNC(zptcon)(int *n, double *d, npy_complex128 *e, double *anorm, double *rcond, double *rwork, int *info); +void BLAS_FUNC(zpteqr)(char *compz, int *n, double *d, double *e, npy_complex128 *z, int *ldz, double *work, int *info); +void BLAS_FUNC(zptrfs)(char *uplo, int *n, int *nrhs, double *d, npy_complex128 *e, double *df, npy_complex128 *ef, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zptsv)(int *n, int *nrhs, double *d, npy_complex128 *e, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(zptsvx)(char *fact, int *n, int *nrhs, double *d, npy_complex128 *e, double *df, npy_complex128 *ef, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *rcond, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zpttrf)(int *n, double *d, npy_complex128 *e, int *info); +void BLAS_FUNC(zpttrs)(char *uplo, int *n, int *nrhs, double *d, npy_complex128 *e, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(zptts2)(int *iuplo, int *n, int *nrhs, double *d, npy_complex128 *e, npy_complex128 *b, int *ldb); +void BLAS_FUNC(zrot)(int *n, npy_complex128 *cx, int *incx, npy_complex128 *cy, int *incy, double *c, npy_complex128 *s); +void BLAS_FUNC(zspcon)(char *uplo, int *n, npy_complex128 *ap, int *ipiv, double *anorm, double *rcond, npy_complex128 *work, int *info); +void BLAS_FUNC(zspmv)(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *ap, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy); +void BLAS_FUNC(zspr)(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *ap); +void BLAS_FUNC(zsprfs)(char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *afp, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zspsv)(char *uplo, int *n, int *nrhs, npy_complex128 *ap, int *ipiv, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(zspsvx)(char *fact, char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *afp, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *rcond, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zsptrf)(char *uplo, int *n, npy_complex128 *ap, int *ipiv, int *info); +void BLAS_FUNC(zsptri)(char *uplo, int *n, npy_complex128 *ap, int *ipiv, npy_complex128 *work, int *info); +void BLAS_FUNC(zsptrs)(char *uplo, int *n, int *nrhs, npy_complex128 *ap, int *ipiv, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(zstedc)(char *compz, int *n, double *d, double *e, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(zstegr)(char *jobz, char *range, int *n, double *d, double *e, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, npy_complex128 *z, int *ldz, int *isuppz, double *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(zstein)(int *n, double *d, double *e, int *m, double *w, int *iblock, int *isplit, npy_complex128 *z, int *ldz, double *work, int *iwork, int *ifail, int *info); +void BLAS_FUNC(zstemr)(char *jobz, char *range, int *n, double *d, double *e, double *vl, double *vu, int *il, int *iu, int *m, double *w, npy_complex128 *z, int *ldz, int *nzc, int *isuppz, int *tryrac, double *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(zsteqr)(char *compz, int *n, double *d, double *e, npy_complex128 *z, int *ldz, double *work, int *info); +void BLAS_FUNC(zsycon)(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, double *anorm, double *rcond, npy_complex128 *work, int *info); +void BLAS_FUNC(zsyconv)(char *uplo, char *way, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *info); +void BLAS_FUNC(zsyequb)(char *uplo, int *n, npy_complex128 *a, int *lda, double *s, double *scond, double *amax, npy_complex128 *work, int *info); +void BLAS_FUNC(zsymv)(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy); +void BLAS_FUNC(zsyr)(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *a, int *lda); +void BLAS_FUNC(zsyrfs)(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(zsysv)(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zsysvx)(char *fact, char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *rcond, double *ferr, double *berr, npy_complex128 *work, int *lwork, double *rwork, int *info); +void BLAS_FUNC(zsyswapr)(char *uplo, int *n, npy_complex128 *a, int *lda, int *i1, int *i2); +void BLAS_FUNC(zsytf2)(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, int *info); +void BLAS_FUNC(zsytrf)(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zsytri)(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *info); +void BLAS_FUNC(zsytri2)(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zsytri2x)(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *nb, int *info); +void BLAS_FUNC(zsytrs)(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(zsytrs2)(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *work, int *info); +void BLAS_FUNC(ztbcon)(char *norm, char *uplo, char *diag, int *n, int *kd, npy_complex128 *ab, int *ldab, double *rcond, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(ztbrfs)(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(ztbtrs)(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(ztfsm)(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, npy_complex128 *b, int *ldb); +void BLAS_FUNC(ztftri)(char *transr, char *uplo, char *diag, int *n, npy_complex128 *a, int *info); +void BLAS_FUNC(ztfttp)(char *transr, char *uplo, int *n, npy_complex128 *arf, npy_complex128 *ap, int *info); +void BLAS_FUNC(ztfttr)(char *transr, char *uplo, int *n, npy_complex128 *arf, npy_complex128 *a, int *lda, int *info); +void BLAS_FUNC(ztgevc)(char *side, char *howmny, int *select, int *n, npy_complex128 *s, int *lds, npy_complex128 *p, int *ldp, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, int *mm, int *m, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(ztgex2)(int *wantq, int *wantz, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *q, int *ldq, npy_complex128 *z, int *ldz, int *j1, int *info); +void BLAS_FUNC(ztgexc)(int *wantq, int *wantz, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *q, int *ldq, npy_complex128 *z, int *ldz, int *ifst, int *ilst, int *info); +void BLAS_FUNC(ztgsen)(int *ijob, int *wantq, int *wantz, int *select, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *q, int *ldq, npy_complex128 *z, int *ldz, int *m, double *pl, double *pr, double *dif, npy_complex128 *work, int *lwork, int *iwork, int *liwork, int *info); +void BLAS_FUNC(ztgsja)(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, double *tola, double *tolb, double *alpha, double *beta, npy_complex128 *u, int *ldu, npy_complex128 *v, int *ldv, npy_complex128 *q, int *ldq, npy_complex128 *work, int *ncycle, int *info); +void BLAS_FUNC(ztgsna)(char *job, char *howmny, int *select, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, double *s, double *dif, int *mm, int *m, npy_complex128 *work, int *lwork, int *iwork, int *info); +void BLAS_FUNC(ztgsy2)(char *trans, int *ijob, int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *c, int *ldc, npy_complex128 *d, int *ldd, npy_complex128 *e, int *lde, npy_complex128 *f, int *ldf, double *scale, double *rdsum, double *rdscal, int *info); +void BLAS_FUNC(ztgsyl)(char *trans, int *ijob, int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *c, int *ldc, npy_complex128 *d, int *ldd, npy_complex128 *e, int *lde, npy_complex128 *f, int *ldf, double *scale, double *dif, npy_complex128 *work, int *lwork, int *iwork, int *info); +void BLAS_FUNC(ztpcon)(char *norm, char *uplo, char *diag, int *n, npy_complex128 *ap, double *rcond, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(ztpmqrt)(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, npy_complex128 *v, int *ldv, npy_complex128 *t, int *ldt, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *work, int *info); +void BLAS_FUNC(ztpqrt)(int *m, int *n, int *l, int *nb, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *t, int *ldt, npy_complex128 *work, int *info); +void BLAS_FUNC(ztpqrt2)(int *m, int *n, int *l, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *t, int *ldt, int *info); +void BLAS_FUNC(ztprfb)(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, npy_complex128 *v, int *ldv, npy_complex128 *t, int *ldt, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *work, int *ldwork); +void BLAS_FUNC(ztprfs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(ztptri)(char *uplo, char *diag, int *n, npy_complex128 *ap, int *info); +void BLAS_FUNC(ztptrs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(ztpttf)(char *transr, char *uplo, int *n, npy_complex128 *ap, npy_complex128 *arf, int *info); +void BLAS_FUNC(ztpttr)(char *uplo, int *n, npy_complex128 *ap, npy_complex128 *a, int *lda, int *info); +void BLAS_FUNC(ztrcon)(char *norm, char *uplo, char *diag, int *n, npy_complex128 *a, int *lda, double *rcond, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(ztrevc)(char *side, char *howmny, int *select, int *n, npy_complex128 *t, int *ldt, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, int *mm, int *m, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(ztrexc)(char *compq, int *n, npy_complex128 *t, int *ldt, npy_complex128 *q, int *ldq, int *ifst, int *ilst, int *info); +void BLAS_FUNC(ztrrfs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info); +void BLAS_FUNC(ztrsen)(char *job, char *compq, int *select, int *n, npy_complex128 *t, int *ldt, npy_complex128 *q, int *ldq, npy_complex128 *w, int *m, double *s, double *sep, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(ztrsna)(char *job, char *howmny, int *select, int *n, npy_complex128 *t, int *ldt, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, double *s, double *sep, int *mm, int *m, npy_complex128 *work, int *ldwork, double *rwork, int *info); +void BLAS_FUNC(ztrsyl)(char *trana, char *tranb, int *isgn, int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *c, int *ldc, double *scale, int *info); +void BLAS_FUNC(ztrti2)(char *uplo, char *diag, int *n, npy_complex128 *a, int *lda, int *info); +void BLAS_FUNC(ztrtri)(char *uplo, char *diag, int *n, npy_complex128 *a, int *lda, int *info); +void BLAS_FUNC(ztrtrs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *info); +void BLAS_FUNC(ztrttf)(char *transr, char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *arf, int *info); +void BLAS_FUNC(ztrttp)(char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *ap, int *info); +void BLAS_FUNC(ztzrzf)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zunbdb)(char *trans, char *signs, int *m, int *p, int *q, npy_complex128 *x11, int *ldx11, npy_complex128 *x12, int *ldx12, npy_complex128 *x21, int *ldx21, npy_complex128 *x22, int *ldx22, double *theta, double *phi, npy_complex128 *taup1, npy_complex128 *taup2, npy_complex128 *tauq1, npy_complex128 *tauq2, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zuncsd)(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, npy_complex128 *x11, int *ldx11, npy_complex128 *x12, int *ldx12, npy_complex128 *x21, int *ldx21, npy_complex128 *x22, int *ldx22, double *theta, npy_complex128 *u1, int *ldu1, npy_complex128 *u2, int *ldu2, npy_complex128 *v1t, int *ldv1t, npy_complex128 *v2t, int *ldv2t, npy_complex128 *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *info); +void BLAS_FUNC(zung2l)(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info); +void BLAS_FUNC(zung2r)(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info); +void BLAS_FUNC(zungbr)(char *vect, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zunghr)(int *n, int *ilo, int *ihi, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zungl2)(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info); +void BLAS_FUNC(zunglq)(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zungql)(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zungqr)(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zungr2)(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info); +void BLAS_FUNC(zungrq)(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zungtr)(char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zunm2l)(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info); +void BLAS_FUNC(zunm2r)(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info); +void BLAS_FUNC(zunmbr)(char *vect, char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zunmhr)(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zunml2)(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info); +void BLAS_FUNC(zunmlq)(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zunmql)(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zunmqr)(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zunmr2)(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info); +void BLAS_FUNC(zunmr3)(char *side, char *trans, int *m, int *n, int *k, int *l, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info); +void BLAS_FUNC(zunmrq)(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zunmrz)(char *side, char *trans, int *m, int *n, int *k, int *l, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zunmtr)(char *side, char *uplo, char *trans, int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info); +void BLAS_FUNC(zupgtr)(char *uplo, int *n, npy_complex128 *ap, npy_complex128 *tau, npy_complex128 *q, int *ldq, npy_complex128 *work, int *info); +void BLAS_FUNC(zupmtr)(char *side, char *uplo, char *trans, int *m, int *n, npy_complex128 *ap, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info); + +#ifdef __cplusplus +} +#endif diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs.py b/venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs.py new file mode 100644 index 0000000000000000000000000000000000000000..64fc65df291dcb1547d3c6c0f419eee3ff8e083d --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs.py @@ -0,0 +1,861 @@ +# +# Author: Travis Oliphant, March 2002 +# +from itertools import product + +import numpy as np +from numpy import (dot, diag, prod, logical_not, ravel, transpose, + conjugate, absolute, amax, sign, isfinite, triu) + +# Local imports +from scipy.linalg import LinAlgError, bandwidth +from ._misc import norm +from ._basic import solve, inv +from ._decomp_svd import svd +from ._decomp_schur import schur, rsf2csf +from ._expm_frechet import expm_frechet, expm_cond +from ._matfuncs_sqrtm import sqrtm +from ._matfuncs_expm import pick_pade_structure, pade_UV_calc + +# deprecated imports to be removed in SciPy 1.13.0 +from numpy import single # noqa: F401 + +__all__ = ['expm', 'cosm', 'sinm', 'tanm', 'coshm', 'sinhm', 'tanhm', 'logm', + 'funm', 'signm', 'sqrtm', 'fractional_matrix_power', 'expm_frechet', + 'expm_cond', 'khatri_rao'] + +eps = np.finfo('d').eps +feps = np.finfo('f').eps + +_array_precision = {'i': 1, 'l': 1, 'f': 0, 'd': 1, 'F': 0, 'D': 1} + + +############################################################################### +# Utility functions. + + +def _asarray_square(A): + """ + Wraps asarray with the extra requirement that the input be a square matrix. + + The motivation is that the matfuncs module has real functions that have + been lifted to square matrix functions. + + Parameters + ---------- + A : array_like + A square matrix. + + Returns + ------- + out : ndarray + An ndarray copy or view or other representation of A. + + """ + A = np.asarray(A) + if len(A.shape) != 2 or A.shape[0] != A.shape[1]: + raise ValueError('expected square array_like input') + return A + + +def _maybe_real(A, B, tol=None): + """ + Return either B or the real part of B, depending on properties of A and B. + + The motivation is that B has been computed as a complicated function of A, + and B may be perturbed by negligible imaginary components. + If A is real and B is complex with small imaginary components, + then return a real copy of B. The assumption in that case would be that + the imaginary components of B are numerical artifacts. + + Parameters + ---------- + A : ndarray + Input array whose type is to be checked as real vs. complex. + B : ndarray + Array to be returned, possibly without its imaginary part. + tol : float + Absolute tolerance. + + Returns + ------- + out : real or complex array + Either the input array B or only the real part of the input array B. + + """ + # Note that booleans and integers compare as real. + if np.isrealobj(A) and np.iscomplexobj(B): + if tol is None: + tol = {0: feps*1e3, 1: eps*1e6}[_array_precision[B.dtype.char]] + if np.allclose(B.imag, 0.0, atol=tol): + B = B.real + return B + + +############################################################################### +# Matrix functions. + + +def fractional_matrix_power(A, t): + """ + Compute the fractional power of a matrix. + + Proceeds according to the discussion in section (6) of [1]_. + + Parameters + ---------- + A : (N, N) array_like + Matrix whose fractional power to evaluate. + t : float + Fractional power. + + Returns + ------- + X : (N, N) array_like + The fractional power of the matrix. + + References + ---------- + .. [1] Nicholas J. Higham and Lijing lin (2011) + "A Schur-Pade Algorithm for Fractional Powers of a Matrix." + SIAM Journal on Matrix Analysis and Applications, + 32 (3). pp. 1056-1078. ISSN 0895-4798 + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import fractional_matrix_power + >>> a = np.array([[1.0, 3.0], [1.0, 4.0]]) + >>> b = fractional_matrix_power(a, 0.5) + >>> b + array([[ 0.75592895, 1.13389342], + [ 0.37796447, 1.88982237]]) + >>> np.dot(b, b) # Verify square root + array([[ 1., 3.], + [ 1., 4.]]) + + """ + # This fixes some issue with imports; + # this function calls onenormest which is in scipy.sparse. + A = _asarray_square(A) + import scipy.linalg._matfuncs_inv_ssq + return scipy.linalg._matfuncs_inv_ssq._fractional_matrix_power(A, t) + + +def logm(A, disp=True): + """ + Compute matrix logarithm. + + The matrix logarithm is the inverse of + expm: expm(logm(`A`)) == `A` + + Parameters + ---------- + A : (N, N) array_like + Matrix whose logarithm to evaluate + disp : bool, optional + Print warning if error in the result is estimated large + instead of returning estimated error. (Default: True) + + Returns + ------- + logm : (N, N) ndarray + Matrix logarithm of `A` + errest : float + (if disp == False) + + 1-norm of the estimated error, ||err||_1 / ||A||_1 + + References + ---------- + .. [1] Awad H. Al-Mohy and Nicholas J. Higham (2012) + "Improved Inverse Scaling and Squaring Algorithms + for the Matrix Logarithm." + SIAM Journal on Scientific Computing, 34 (4). C152-C169. + ISSN 1095-7197 + + .. [2] Nicholas J. Higham (2008) + "Functions of Matrices: Theory and Computation" + ISBN 978-0-898716-46-7 + + .. [3] Nicholas J. Higham and Lijing lin (2011) + "A Schur-Pade Algorithm for Fractional Powers of a Matrix." + SIAM Journal on Matrix Analysis and Applications, + 32 (3). pp. 1056-1078. ISSN 0895-4798 + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import logm, expm + >>> a = np.array([[1.0, 3.0], [1.0, 4.0]]) + >>> b = logm(a) + >>> b + array([[-1.02571087, 2.05142174], + [ 0.68380725, 1.02571087]]) + >>> expm(b) # Verify expm(logm(a)) returns a + array([[ 1., 3.], + [ 1., 4.]]) + + """ + A = _asarray_square(A) + # Avoid circular import ... this is OK, right? + import scipy.linalg._matfuncs_inv_ssq + F = scipy.linalg._matfuncs_inv_ssq._logm(A) + F = _maybe_real(A, F) + errtol = 1000*eps + # TODO use a better error approximation + errest = norm(expm(F)-A, 1) / norm(A, 1) + if disp: + if not isfinite(errest) or errest >= errtol: + print("logm result may be inaccurate, approximate err =", errest) + return F + else: + return F, errest + + +def expm(A): + """Compute the matrix exponential of an array. + + Parameters + ---------- + A : ndarray + Input with last two dimensions are square ``(..., n, n)``. + + Returns + ------- + eA : ndarray + The resulting matrix exponential with the same shape of ``A`` + + Notes + ----- + Implements the algorithm given in [1], which is essentially a Pade + approximation with a variable order that is decided based on the array + data. + + For input with size ``n``, the memory usage is in the worst case in the + order of ``8*(n**2)``. If the input data is not of single and double + precision of real and complex dtypes, it is copied to a new array. + + For cases ``n >= 400``, the exact 1-norm computation cost, breaks even with + 1-norm estimation and from that point on the estimation scheme given in + [2] is used to decide on the approximation order. + + References + ---------- + .. [1] Awad H. Al-Mohy and Nicholas J. Higham, (2009), "A New Scaling + and Squaring Algorithm for the Matrix Exponential", SIAM J. Matrix + Anal. Appl. 31(3):970-989, :doi:`10.1137/09074721X` + + .. [2] 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. 21(4):1185-1201, + :doi:`10.1137/S0895479899356080` + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import expm, sinm, cosm + + Matrix version of the formula exp(0) = 1: + + >>> expm(np.zeros((3, 2, 2))) + array([[[1., 0.], + [0., 1.]], + + [[1., 0.], + [0., 1.]], + + [[1., 0.], + [0., 1.]]]) + + Euler's identity (exp(i*theta) = cos(theta) + i*sin(theta)) + applied to a matrix: + + >>> a = np.array([[1.0, 2.0], [-1.0, 3.0]]) + >>> expm(1j*a) + array([[ 0.42645930+1.89217551j, -2.13721484-0.97811252j], + [ 1.06860742+0.48905626j, -1.71075555+0.91406299j]]) + >>> cosm(a) + 1j*sinm(a) + array([[ 0.42645930+1.89217551j, -2.13721484-0.97811252j], + [ 1.06860742+0.48905626j, -1.71075555+0.91406299j]]) + + """ + a = np.asarray(A) + if a.size == 1 and a.ndim < 2: + return np.array([[np.exp(a.item())]]) + + if a.ndim < 2: + raise LinAlgError('The input array must be at least two-dimensional') + if a.shape[-1] != a.shape[-2]: + raise LinAlgError('Last 2 dimensions of the array must be square') + n = a.shape[-1] + # Empty array + if min(*a.shape) == 0: + return np.empty_like(a) + + # Scalar case + if a.shape[-2:] == (1, 1): + return np.exp(a) + + if not np.issubdtype(a.dtype, np.inexact): + a = a.astype(np.float64) + elif a.dtype == np.float16: + a = a.astype(np.float32) + + # An explicit formula for 2x2 case exists (formula (2.2) in [1]). However, without + # Kahan's method, numerical instabilities can occur (See gh-19584). Hence removed + # here until we have a more stable implementation. + + n = a.shape[-1] + eA = np.empty(a.shape, dtype=a.dtype) + # working memory to hold intermediate arrays + Am = np.empty((5, n, n), dtype=a.dtype) + + # Main loop to go through the slices of an ndarray and passing to expm + for ind in product(*[range(x) for x in a.shape[:-2]]): + aw = a[ind] + + lu = bandwidth(aw) + if not any(lu): # a is diagonal? + eA[ind] = np.diag(np.exp(np.diag(aw))) + continue + + # Generic/triangular case; copy the slice into scratch and send. + # Am will be mutated by pick_pade_structure + Am[0, :, :] = aw + m, s = pick_pade_structure(Am) + + if s != 0: # scaling needed + Am[:4] *= [[[2**(-s)]], [[4**(-s)]], [[16**(-s)]], [[64**(-s)]]] + + pade_UV_calc(Am, n, m) + eAw = Am[0] + + if s != 0: # squaring needed + + if (lu[1] == 0) or (lu[0] == 0): # lower/upper triangular + # This branch implements Code Fragment 2.1 of [1] + + diag_aw = np.diag(aw) + # einsum returns a writable view + np.einsum('ii->i', eAw)[:] = np.exp(diag_aw * 2**(-s)) + # super/sub diagonal + sd = np.diag(aw, k=-1 if lu[1] == 0 else 1) + + for i in range(s-1, -1, -1): + eAw = eAw @ eAw + + # diagonal + np.einsum('ii->i', eAw)[:] = np.exp(diag_aw * 2.**(-i)) + exp_sd = _exp_sinch(diag_aw * (2.**(-i))) * (sd * 2**(-i)) + if lu[1] == 0: # lower + np.einsum('ii->i', eAw[1:, :-1])[:] = exp_sd + else: # upper + np.einsum('ii->i', eAw[:-1, 1:])[:] = exp_sd + + else: # generic + for _ in range(s): + eAw = eAw @ eAw + + # Zero out the entries from np.empty in case of triangular input + if (lu[0] == 0) or (lu[1] == 0): + eA[ind] = np.triu(eAw) if lu[0] == 0 else np.tril(eAw) + else: + eA[ind] = eAw + + return eA + + +def _exp_sinch(x): + # Higham's formula (10.42), might overflow, see GH-11839 + lexp_diff = np.diff(np.exp(x)) + l_diff = np.diff(x) + mask_z = l_diff == 0. + lexp_diff[~mask_z] /= l_diff[~mask_z] + lexp_diff[mask_z] = np.exp(x[:-1][mask_z]) + return lexp_diff + + +def cosm(A): + """ + Compute the matrix cosine. + + This routine uses expm to compute the matrix exponentials. + + Parameters + ---------- + A : (N, N) array_like + Input array + + Returns + ------- + cosm : (N, N) ndarray + Matrix cosine of A + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import expm, sinm, cosm + + Euler's identity (exp(i*theta) = cos(theta) + i*sin(theta)) + applied to a matrix: + + >>> a = np.array([[1.0, 2.0], [-1.0, 3.0]]) + >>> expm(1j*a) + array([[ 0.42645930+1.89217551j, -2.13721484-0.97811252j], + [ 1.06860742+0.48905626j, -1.71075555+0.91406299j]]) + >>> cosm(a) + 1j*sinm(a) + array([[ 0.42645930+1.89217551j, -2.13721484-0.97811252j], + [ 1.06860742+0.48905626j, -1.71075555+0.91406299j]]) + + """ + A = _asarray_square(A) + if np.iscomplexobj(A): + return 0.5*(expm(1j*A) + expm(-1j*A)) + else: + return expm(1j*A).real + + +def sinm(A): + """ + Compute the matrix sine. + + This routine uses expm to compute the matrix exponentials. + + Parameters + ---------- + A : (N, N) array_like + Input array. + + Returns + ------- + sinm : (N, N) ndarray + Matrix sine of `A` + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import expm, sinm, cosm + + Euler's identity (exp(i*theta) = cos(theta) + i*sin(theta)) + applied to a matrix: + + >>> a = np.array([[1.0, 2.0], [-1.0, 3.0]]) + >>> expm(1j*a) + array([[ 0.42645930+1.89217551j, -2.13721484-0.97811252j], + [ 1.06860742+0.48905626j, -1.71075555+0.91406299j]]) + >>> cosm(a) + 1j*sinm(a) + array([[ 0.42645930+1.89217551j, -2.13721484-0.97811252j], + [ 1.06860742+0.48905626j, -1.71075555+0.91406299j]]) + + """ + A = _asarray_square(A) + if np.iscomplexobj(A): + return -0.5j*(expm(1j*A) - expm(-1j*A)) + else: + return expm(1j*A).imag + + +def tanm(A): + """ + Compute the matrix tangent. + + This routine uses expm to compute the matrix exponentials. + + Parameters + ---------- + A : (N, N) array_like + Input array. + + Returns + ------- + tanm : (N, N) ndarray + Matrix tangent of `A` + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import tanm, sinm, cosm + >>> a = np.array([[1.0, 3.0], [1.0, 4.0]]) + >>> t = tanm(a) + >>> t + array([[ -2.00876993, -8.41880636], + [ -2.80626879, -10.42757629]]) + + Verify tanm(a) = sinm(a).dot(inv(cosm(a))) + + >>> s = sinm(a) + >>> c = cosm(a) + >>> s.dot(np.linalg.inv(c)) + array([[ -2.00876993, -8.41880636], + [ -2.80626879, -10.42757629]]) + + """ + A = _asarray_square(A) + return _maybe_real(A, solve(cosm(A), sinm(A))) + + +def coshm(A): + """ + Compute the hyperbolic matrix cosine. + + This routine uses expm to compute the matrix exponentials. + + Parameters + ---------- + A : (N, N) array_like + Input array. + + Returns + ------- + coshm : (N, N) ndarray + Hyperbolic matrix cosine of `A` + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import tanhm, sinhm, coshm + >>> a = np.array([[1.0, 3.0], [1.0, 4.0]]) + >>> c = coshm(a) + >>> c + array([[ 11.24592233, 38.76236492], + [ 12.92078831, 50.00828725]]) + + Verify tanhm(a) = sinhm(a).dot(inv(coshm(a))) + + >>> t = tanhm(a) + >>> s = sinhm(a) + >>> t - s.dot(np.linalg.inv(c)) + array([[ 2.72004641e-15, 4.55191440e-15], + [ 0.00000000e+00, -5.55111512e-16]]) + + """ + A = _asarray_square(A) + return _maybe_real(A, 0.5 * (expm(A) + expm(-A))) + + +def sinhm(A): + """ + Compute the hyperbolic matrix sine. + + This routine uses expm to compute the matrix exponentials. + + Parameters + ---------- + A : (N, N) array_like + Input array. + + Returns + ------- + sinhm : (N, N) ndarray + Hyperbolic matrix sine of `A` + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import tanhm, sinhm, coshm + >>> a = np.array([[1.0, 3.0], [1.0, 4.0]]) + >>> s = sinhm(a) + >>> s + array([[ 10.57300653, 39.28826594], + [ 13.09608865, 49.86127247]]) + + Verify tanhm(a) = sinhm(a).dot(inv(coshm(a))) + + >>> t = tanhm(a) + >>> c = coshm(a) + >>> t - s.dot(np.linalg.inv(c)) + array([[ 2.72004641e-15, 4.55191440e-15], + [ 0.00000000e+00, -5.55111512e-16]]) + + """ + A = _asarray_square(A) + return _maybe_real(A, 0.5 * (expm(A) - expm(-A))) + + +def tanhm(A): + """ + Compute the hyperbolic matrix tangent. + + This routine uses expm to compute the matrix exponentials. + + Parameters + ---------- + A : (N, N) array_like + Input array + + Returns + ------- + tanhm : (N, N) ndarray + Hyperbolic matrix tangent of `A` + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import tanhm, sinhm, coshm + >>> a = np.array([[1.0, 3.0], [1.0, 4.0]]) + >>> t = tanhm(a) + >>> t + array([[ 0.3428582 , 0.51987926], + [ 0.17329309, 0.86273746]]) + + Verify tanhm(a) = sinhm(a).dot(inv(coshm(a))) + + >>> s = sinhm(a) + >>> c = coshm(a) + >>> t - s.dot(np.linalg.inv(c)) + array([[ 2.72004641e-15, 4.55191440e-15], + [ 0.00000000e+00, -5.55111512e-16]]) + + """ + A = _asarray_square(A) + return _maybe_real(A, solve(coshm(A), sinhm(A))) + + +def funm(A, func, disp=True): + """ + Evaluate a matrix function specified by a callable. + + Returns the value of matrix-valued function ``f`` at `A`. The + function ``f`` is an extension of the scalar-valued function `func` + to matrices. + + Parameters + ---------- + A : (N, N) array_like + Matrix at which to evaluate the function + func : callable + Callable object that evaluates a scalar function f. + Must be vectorized (eg. using vectorize). + disp : bool, optional + Print warning if error in the result is estimated large + instead of returning estimated error. (Default: True) + + Returns + ------- + funm : (N, N) ndarray + Value of the matrix function specified by func evaluated at `A` + errest : float + (if disp == False) + + 1-norm of the estimated error, ||err||_1 / ||A||_1 + + Notes + ----- + This function implements the general algorithm based on Schur decomposition + (Algorithm 9.1.1. in [1]_). + + If the input matrix is known to be diagonalizable, then relying on the + eigendecomposition is likely to be faster. For example, if your matrix is + Hermitian, you can do + + >>> from scipy.linalg import eigh + >>> def funm_herm(a, func, check_finite=False): + ... w, v = eigh(a, check_finite=check_finite) + ... ## if you further know that your matrix is positive semidefinite, + ... ## you can optionally guard against precision errors by doing + ... # w = np.maximum(w, 0) + ... w = func(w) + ... return (v * w).dot(v.conj().T) + + References + ---------- + .. [1] Gene H. Golub, Charles F. van Loan, Matrix Computations 4th ed. + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import funm + >>> a = np.array([[1.0, 3.0], [1.0, 4.0]]) + >>> funm(a, lambda x: x*x) + array([[ 4., 15.], + [ 5., 19.]]) + >>> a.dot(a) + array([[ 4., 15.], + [ 5., 19.]]) + + """ + A = _asarray_square(A) + # Perform Shur decomposition (lapack ?gees) + T, Z = schur(A) + T, Z = rsf2csf(T, Z) + n, n = T.shape + F = diag(func(diag(T))) # apply function to diagonal elements + F = F.astype(T.dtype.char) # e.g., when F is real but T is complex + + minden = abs(T[0, 0]) + + # implement Algorithm 11.1.1 from Golub and Van Loan + # "matrix Computations." + for p in range(1, n): + for i in range(1, n-p+1): + j = i + p + s = T[i-1, j-1] * (F[j-1, j-1] - F[i-1, i-1]) + ksl = slice(i, j-1) + val = dot(T[i-1, ksl], F[ksl, j-1]) - dot(F[i-1, ksl], T[ksl, j-1]) + s = s + val + den = T[j-1, j-1] - T[i-1, i-1] + if den != 0.0: + s = s / den + F[i-1, j-1] = s + minden = min(minden, abs(den)) + + F = dot(dot(Z, F), transpose(conjugate(Z))) + F = _maybe_real(A, F) + + tol = {0: feps, 1: eps}[_array_precision[F.dtype.char]] + if minden == 0.0: + minden = tol + err = min(1, max(tol, (tol/minden)*norm(triu(T, 1), 1))) + if prod(ravel(logical_not(isfinite(F))), axis=0): + err = np.inf + if disp: + if err > 1000*tol: + print("funm result may be inaccurate, approximate err =", err) + return F + else: + return F, err + + +def signm(A, disp=True): + """ + Matrix sign function. + + Extension of the scalar sign(x) to matrices. + + Parameters + ---------- + A : (N, N) array_like + Matrix at which to evaluate the sign function + disp : bool, optional + Print warning if error in the result is estimated large + instead of returning estimated error. (Default: True) + + Returns + ------- + signm : (N, N) ndarray + Value of the sign function at `A` + errest : float + (if disp == False) + + 1-norm of the estimated error, ||err||_1 / ||A||_1 + + Examples + -------- + >>> from scipy.linalg import signm, eigvals + >>> a = [[1,2,3], [1,2,1], [1,1,1]] + >>> eigvals(a) + array([ 4.12488542+0.j, -0.76155718+0.j, 0.63667176+0.j]) + >>> eigvals(signm(a)) + array([-1.+0.j, 1.+0.j, 1.+0.j]) + + """ + A = _asarray_square(A) + + def rounded_sign(x): + rx = np.real(x) + if rx.dtype.char == 'f': + c = 1e3*feps*amax(x) + else: + c = 1e3*eps*amax(x) + return sign((absolute(rx) > c) * rx) + result, errest = funm(A, rounded_sign, disp=0) + errtol = {0: 1e3*feps, 1: 1e3*eps}[_array_precision[result.dtype.char]] + if errest < errtol: + return result + + # Handle signm of defective matrices: + + # See "E.D.Denman and J.Leyva-Ramos, Appl.Math.Comp., + # 8:237-250,1981" for how to improve the following (currently a + # rather naive) iteration process: + + # a = result # sometimes iteration converges faster but where?? + + # Shifting to avoid zero eigenvalues. How to ensure that shifting does + # not change the spectrum too much? + vals = svd(A, compute_uv=False) + max_sv = np.amax(vals) + # min_nonzero_sv = vals[(vals>max_sv*errtol).tolist().count(1)-1] + # c = 0.5/min_nonzero_sv + c = 0.5/max_sv + S0 = A + c*np.identity(A.shape[0]) + prev_errest = errest + for i in range(100): + iS0 = inv(S0) + S0 = 0.5*(S0 + iS0) + Pp = 0.5*(dot(S0, S0)+S0) + errest = norm(dot(Pp, Pp)-Pp, 1) + if errest < errtol or prev_errest == errest: + break + prev_errest = errest + if disp: + if not isfinite(errest) or errest >= errtol: + print("signm result may be inaccurate, approximate err =", errest) + return S0 + else: + return S0, errest + + +def khatri_rao(a, b): + r""" + Khatri-rao product + + A column-wise Kronecker product of two matrices + + Parameters + ---------- + a : (n, k) array_like + Input array + b : (m, k) array_like + Input array + + Returns + ------- + c: (n*m, k) ndarray + Khatri-rao product of `a` and `b`. + + See Also + -------- + kron : Kronecker product + + Notes + ----- + The mathematical definition of the Khatri-Rao product is: + + .. math:: + + (A_{ij} \bigotimes B_{ij})_{ij} + + which is the Kronecker product of every column of A and B, e.g.:: + + c = np.vstack([np.kron(a[:, k], b[:, k]) for k in range(b.shape[1])]).T + + Examples + -------- + >>> import numpy as np + >>> from scipy import linalg + >>> a = np.array([[1, 2, 3], [4, 5, 6]]) + >>> b = np.array([[3, 4, 5], [6, 7, 8], [2, 3, 9]]) + >>> linalg.khatri_rao(a, b) + array([[ 3, 8, 15], + [ 6, 14, 24], + [ 2, 6, 27], + [12, 20, 30], + [24, 35, 48], + [ 8, 15, 54]]) + + """ + a = np.asarray(a) + b = np.asarray(b) + + if not (a.ndim == 2 and b.ndim == 2): + raise ValueError("The both arrays should be 2-dimensional.") + + if not a.shape[1] == b.shape[1]: + raise ValueError("The number of columns for both arrays " + "should be equal.") + + # c = np.vstack([np.kron(a[:, k], b[:, k]) for k in range(b.shape[1])]).T + c = a[..., :, np.newaxis, :] * b[..., np.newaxis, :, :] + return c.reshape((-1,) + c.shape[2:]) diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs_expm.cpython-310-x86_64-linux-gnu.so b/venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs_expm.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..85da0f54cabbc67f2bed480376b0e3ce936577d6 Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs_expm.cpython-310-x86_64-linux-gnu.so differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs_expm.pyi b/venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs_expm.pyi new file mode 100644 index 0000000000000000000000000000000000000000..2b675a7cd9bd18023d4c14ce253ea68754c726b1 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs_expm.pyi @@ -0,0 +1,6 @@ +from numpy.typing import NDArray +from typing import Any + +def pick_pade_structure(a: NDArray[Any]) -> tuple[int, int]: ... + +def pade_UV_calc(Am: NDArray[Any], n: int, m: int) -> None: ... diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs_inv_ssq.py b/venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs_inv_ssq.py new file mode 100644 index 0000000000000000000000000000000000000000..d84f53dc6c8309e2732becd846d257df8487d7d2 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs_inv_ssq.py @@ -0,0 +1,886 @@ +""" +Matrix functions that use Pade approximation with inverse scaling and squaring. + +""" +import warnings + +import numpy as np + +from scipy.linalg._matfuncs_sqrtm import SqrtmError, _sqrtm_triu +from scipy.linalg._decomp_schur import schur, rsf2csf +from scipy.linalg._matfuncs import funm +from scipy.linalg import svdvals, solve_triangular +from scipy.sparse.linalg._interface import LinearOperator +from scipy.sparse.linalg import onenormest +import scipy.special + + +class LogmRankWarning(UserWarning): + pass + + +class LogmExactlySingularWarning(LogmRankWarning): + pass + + +class LogmNearlySingularWarning(LogmRankWarning): + pass + + +class LogmError(np.linalg.LinAlgError): + pass + + +class FractionalMatrixPowerError(np.linalg.LinAlgError): + pass + + +#TODO renovate or move this class when scipy operators are more mature +class _MatrixM1PowerOperator(LinearOperator): + """ + A representation of the linear operator (A - I)^p. + """ + + def __init__(self, A, p): + if A.ndim != 2 or A.shape[0] != A.shape[1]: + raise ValueError('expected A to be like a square matrix') + if p < 0 or p != int(p): + raise ValueError('expected p to be a non-negative integer') + self._A = A + self._p = p + self.ndim = A.ndim + self.shape = A.shape + + def _matvec(self, x): + for i in range(self._p): + x = self._A.dot(x) - x + return x + + def _rmatvec(self, x): + for i in range(self._p): + x = x.dot(self._A) - x + return x + + def _matmat(self, X): + for i in range(self._p): + X = self._A.dot(X) - X + return X + + def _adjoint(self): + return _MatrixM1PowerOperator(self._A.T, self._p) + + +#TODO renovate or move this function when SciPy operators are more mature +def _onenormest_m1_power(A, p, + t=2, itmax=5, compute_v=False, compute_w=False): + """ + Efficiently estimate the 1-norm of (A - I)^p. + + Parameters + ---------- + A : ndarray + Matrix whose 1-norm of a power is to be computed. + p : int + Non-negative integer power. + 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. + + """ + return onenormest(_MatrixM1PowerOperator(A, p), + t=t, itmax=itmax, compute_v=compute_v, compute_w=compute_w) + + +def _unwindk(z): + """ + Compute the scalar unwinding number. + + Uses Eq. (5.3) in [1]_, and should be equal to (z - log(exp(z)) / (2 pi i). + Note that this definition differs in sign from the original definition + in equations (5, 6) in [2]_. The sign convention is justified in [3]_. + + Parameters + ---------- + z : complex + A complex number. + + Returns + ------- + unwinding_number : integer + The scalar unwinding number of z. + + References + ---------- + .. [1] Nicholas J. Higham and Lijing lin (2011) + "A Schur-Pade Algorithm for Fractional Powers of a Matrix." + SIAM Journal on Matrix Analysis and Applications, + 32 (3). pp. 1056-1078. ISSN 0895-4798 + + .. [2] Robert M. Corless and David J. Jeffrey, + "The unwinding number." Newsletter ACM SIGSAM Bulletin + Volume 30, Issue 2, June 1996, Pages 28-35. + + .. [3] Russell Bradford and Robert M. Corless and James H. Davenport and + David J. Jeffrey and Stephen M. Watt, + "Reasoning about the elementary functions of complex analysis" + Annals of Mathematics and Artificial Intelligence, + 36: 303-318, 2002. + + """ + return int(np.ceil((z.imag - np.pi) / (2*np.pi))) + + +def _briggs_helper_function(a, k): + """ + Computes r = a^(1 / (2^k)) - 1. + + This is algorithm (2) of [1]_. + The purpose is to avoid a danger of subtractive cancellation. + For more computational efficiency it should probably be cythonized. + + Parameters + ---------- + a : complex + A complex number. + k : integer + A nonnegative integer. + + Returns + ------- + r : complex + The value r = a^(1 / (2^k)) - 1 computed with less cancellation. + + Notes + ----- + The algorithm as formulated in the reference does not handle k=0 or k=1 + correctly, so these are special-cased in this implementation. + This function is intended to not allow `a` to belong to the closed + negative real axis, but this constraint is relaxed. + + References + ---------- + .. [1] Awad H. Al-Mohy (2012) + "A more accurate Briggs method for the logarithm", + Numerical Algorithms, 59 : 393--402. + + """ + if k < 0 or int(k) != k: + raise ValueError('expected a nonnegative integer k') + if k == 0: + return a - 1 + elif k == 1: + return np.sqrt(a) - 1 + else: + k_hat = k + if np.angle(a) >= np.pi / 2: + a = np.sqrt(a) + k_hat = k - 1 + z0 = a - 1 + a = np.sqrt(a) + r = 1 + a + for j in range(1, k_hat): + a = np.sqrt(a) + r = r * (1 + a) + r = z0 / r + return r + + +def _fractional_power_superdiag_entry(l1, l2, t12, p): + """ + Compute a superdiagonal entry of a fractional matrix power. + + This is Eq. (5.6) in [1]_. + + Parameters + ---------- + l1 : complex + A diagonal entry of the matrix. + l2 : complex + A diagonal entry of the matrix. + t12 : complex + A superdiagonal entry of the matrix. + p : float + A fractional power. + + Returns + ------- + f12 : complex + A superdiagonal entry of the fractional matrix power. + + Notes + ----- + Care has been taken to return a real number if possible when + all of the inputs are real numbers. + + References + ---------- + .. [1] Nicholas J. Higham and Lijing lin (2011) + "A Schur-Pade Algorithm for Fractional Powers of a Matrix." + SIAM Journal on Matrix Analysis and Applications, + 32 (3). pp. 1056-1078. ISSN 0895-4798 + + """ + if l1 == l2: + f12 = t12 * p * l1**(p-1) + elif abs(l2 - l1) > abs(l1 + l2) / 2: + f12 = t12 * ((l2**p) - (l1**p)) / (l2 - l1) + else: + # This is Eq. (5.5) in [1]. + z = (l2 - l1) / (l2 + l1) + log_l1 = np.log(l1) + log_l2 = np.log(l2) + arctanh_z = np.arctanh(z) + tmp_a = t12 * np.exp((p/2)*(log_l2 + log_l1)) + tmp_u = _unwindk(log_l2 - log_l1) + if tmp_u: + tmp_b = p * (arctanh_z + np.pi * 1j * tmp_u) + else: + tmp_b = p * arctanh_z + tmp_c = 2 * np.sinh(tmp_b) / (l2 - l1) + f12 = tmp_a * tmp_c + return f12 + + +def _logm_superdiag_entry(l1, l2, t12): + """ + Compute a superdiagonal entry of a matrix logarithm. + + This is like Eq. (11.28) in [1]_, except the determination of whether + l1 and l2 are sufficiently far apart has been modified. + + Parameters + ---------- + l1 : complex + A diagonal entry of the matrix. + l2 : complex + A diagonal entry of the matrix. + t12 : complex + A superdiagonal entry of the matrix. + + Returns + ------- + f12 : complex + A superdiagonal entry of the matrix logarithm. + + Notes + ----- + Care has been taken to return a real number if possible when + all of the inputs are real numbers. + + References + ---------- + .. [1] Nicholas J. Higham (2008) + "Functions of Matrices: Theory and Computation" + ISBN 978-0-898716-46-7 + + """ + if l1 == l2: + f12 = t12 / l1 + elif abs(l2 - l1) > abs(l1 + l2) / 2: + f12 = t12 * (np.log(l2) - np.log(l1)) / (l2 - l1) + else: + z = (l2 - l1) / (l2 + l1) + u = _unwindk(np.log(l2) - np.log(l1)) + if u: + f12 = t12 * 2 * (np.arctanh(z) + np.pi*1j*u) / (l2 - l1) + else: + f12 = t12 * 2 * np.arctanh(z) / (l2 - l1) + return f12 + + +def _inverse_squaring_helper(T0, theta): + """ + A helper function for inverse scaling and squaring for Pade approximation. + + Parameters + ---------- + T0 : (N, N) array_like upper triangular + Matrix involved in inverse scaling and squaring. + theta : indexable + The values theta[1] .. theta[7] must be available. + They represent bounds related to Pade approximation, and they depend + on the matrix function which is being computed. + For example, different values of theta are required for + matrix logarithm than for fractional matrix power. + + Returns + ------- + R : (N, N) array_like upper triangular + Composition of zero or more matrix square roots of T0, minus I. + s : non-negative integer + Number of square roots taken. + m : positive integer + The degree of the Pade approximation. + + Notes + ----- + This subroutine appears as a chunk of lines within + a couple of published algorithms; for example it appears + as lines 4--35 in algorithm (3.1) of [1]_, and + as lines 3--34 in algorithm (4.1) of [2]_. + The instances of 'goto line 38' in algorithm (3.1) of [1]_ + probably mean 'goto line 36' and have been interpreted accordingly. + + References + ---------- + .. [1] Nicholas J. Higham and Lijing Lin (2013) + "An Improved Schur-Pade Algorithm for Fractional Powers + of a Matrix and their Frechet Derivatives." + + .. [2] Awad H. Al-Mohy and Nicholas J. Higham (2012) + "Improved Inverse Scaling and Squaring Algorithms + for the Matrix Logarithm." + SIAM Journal on Scientific Computing, 34 (4). C152-C169. + ISSN 1095-7197 + + """ + if len(T0.shape) != 2 or T0.shape[0] != T0.shape[1]: + raise ValueError('expected an upper triangular square matrix') + n, n = T0.shape + T = T0 + + # Find s0, the smallest s such that the spectral radius + # of a certain diagonal matrix is at most theta[7]. + # Note that because theta[7] < 1, + # this search will not terminate if any diagonal entry of T is zero. + s0 = 0 + tmp_diag = np.diag(T) + if np.count_nonzero(tmp_diag) != n: + raise Exception('Diagonal entries of T must be nonzero') + while np.max(np.absolute(tmp_diag - 1)) > theta[7]: + tmp_diag = np.sqrt(tmp_diag) + s0 += 1 + + # Take matrix square roots of T. + for i in range(s0): + T = _sqrtm_triu(T) + + # Flow control in this section is a little odd. + # This is because I am translating algorithm descriptions + # which have GOTOs in the publication. + s = s0 + k = 0 + d2 = _onenormest_m1_power(T, 2) ** (1/2) + d3 = _onenormest_m1_power(T, 3) ** (1/3) + a2 = max(d2, d3) + m = None + for i in (1, 2): + if a2 <= theta[i]: + m = i + break + while m is None: + if s > s0: + d3 = _onenormest_m1_power(T, 3) ** (1/3) + d4 = _onenormest_m1_power(T, 4) ** (1/4) + a3 = max(d3, d4) + if a3 <= theta[7]: + j1 = min(i for i in (3, 4, 5, 6, 7) if a3 <= theta[i]) + if j1 <= 6: + m = j1 + break + elif a3 / 2 <= theta[5] and k < 2: + k += 1 + T = _sqrtm_triu(T) + s += 1 + continue + d5 = _onenormest_m1_power(T, 5) ** (1/5) + a4 = max(d4, d5) + eta = min(a3, a4) + for i in (6, 7): + if eta <= theta[i]: + m = i + break + if m is not None: + break + T = _sqrtm_triu(T) + s += 1 + + # The subtraction of the identity is redundant here, + # because the diagonal will be replaced for improved numerical accuracy, + # but this formulation should help clarify the meaning of R. + R = T - np.identity(n) + + # Replace the diagonal and first superdiagonal of T0^(1/(2^s)) - I + # using formulas that have less subtractive cancellation. + # Skip this step if the principal branch + # does not exist at T0; this happens when a diagonal entry of T0 + # is negative with imaginary part 0. + has_principal_branch = all(x.real > 0 or x.imag != 0 for x in np.diag(T0)) + if has_principal_branch: + for j in range(n): + a = T0[j, j] + r = _briggs_helper_function(a, s) + R[j, j] = r + p = np.exp2(-s) + for j in range(n-1): + l1 = T0[j, j] + l2 = T0[j+1, j+1] + t12 = T0[j, j+1] + f12 = _fractional_power_superdiag_entry(l1, l2, t12, p) + R[j, j+1] = f12 + + # Return the T-I matrix, the number of square roots, and the Pade degree. + if not np.array_equal(R, np.triu(R)): + raise Exception('R is not upper triangular') + return R, s, m + + +def _fractional_power_pade_constant(i, t): + # A helper function for matrix fractional power. + if i < 1: + raise ValueError('expected a positive integer i') + if not (-1 < t < 1): + raise ValueError('expected -1 < t < 1') + if i == 1: + return -t + elif i % 2 == 0: + j = i // 2 + return (-j + t) / (2 * (2*j - 1)) + elif i % 2 == 1: + j = (i - 1) // 2 + return (-j - t) / (2 * (2*j + 1)) + else: + raise Exception(f'unnexpected value of i, i = {i}') + + +def _fractional_power_pade(R, t, m): + """ + Evaluate the Pade approximation of a fractional matrix power. + + Evaluate the degree-m Pade approximation of R + to the fractional matrix power t using the continued fraction + in bottom-up fashion using algorithm (4.1) in [1]_. + + Parameters + ---------- + R : (N, N) array_like + Upper triangular matrix whose fractional power to evaluate. + t : float + Fractional power between -1 and 1 exclusive. + m : positive integer + Degree of Pade approximation. + + Returns + ------- + U : (N, N) array_like + The degree-m Pade approximation of R to the fractional power t. + This matrix will be upper triangular. + + References + ---------- + .. [1] Nicholas J. Higham and Lijing lin (2011) + "A Schur-Pade Algorithm for Fractional Powers of a Matrix." + SIAM Journal on Matrix Analysis and Applications, + 32 (3). pp. 1056-1078. ISSN 0895-4798 + + """ + if m < 1 or int(m) != m: + raise ValueError('expected a positive integer m') + if not (-1 < t < 1): + raise ValueError('expected -1 < t < 1') + R = np.asarray(R) + if len(R.shape) != 2 or R.shape[0] != R.shape[1]: + raise ValueError('expected an upper triangular square matrix') + n, n = R.shape + ident = np.identity(n) + Y = R * _fractional_power_pade_constant(2*m, t) + for j in range(2*m - 1, 0, -1): + rhs = R * _fractional_power_pade_constant(j, t) + Y = solve_triangular(ident + Y, rhs) + U = ident + Y + if not np.array_equal(U, np.triu(U)): + raise Exception('U is not upper triangular') + return U + + +def _remainder_matrix_power_triu(T, t): + """ + Compute a fractional power of an upper triangular matrix. + + The fractional power is restricted to fractions -1 < t < 1. + This uses algorithm (3.1) of [1]_. + The Pade approximation itself uses algorithm (4.1) of [2]_. + + Parameters + ---------- + T : (N, N) array_like + Upper triangular matrix whose fractional power to evaluate. + t : float + Fractional power between -1 and 1 exclusive. + + Returns + ------- + X : (N, N) array_like + The fractional power of the matrix. + + References + ---------- + .. [1] Nicholas J. Higham and Lijing Lin (2013) + "An Improved Schur-Pade Algorithm for Fractional Powers + of a Matrix and their Frechet Derivatives." + + .. [2] Nicholas J. Higham and Lijing lin (2011) + "A Schur-Pade Algorithm for Fractional Powers of a Matrix." + SIAM Journal on Matrix Analysis and Applications, + 32 (3). pp. 1056-1078. ISSN 0895-4798 + + """ + m_to_theta = { + 1: 1.51e-5, + 2: 2.24e-3, + 3: 1.88e-2, + 4: 6.04e-2, + 5: 1.24e-1, + 6: 2.00e-1, + 7: 2.79e-1, + } + n, n = T.shape + T0 = T + T0_diag = np.diag(T0) + if np.array_equal(T0, np.diag(T0_diag)): + U = np.diag(T0_diag ** t) + else: + R, s, m = _inverse_squaring_helper(T0, m_to_theta) + + # Evaluate the Pade approximation. + # Note that this function expects the negative of the matrix + # returned by the inverse squaring helper. + U = _fractional_power_pade(-R, t, m) + + # Undo the inverse scaling and squaring. + # Be less clever about this + # if the principal branch does not exist at T0; + # this happens when a diagonal entry of T0 + # is negative with imaginary part 0. + eivals = np.diag(T0) + has_principal_branch = all(x.real > 0 or x.imag != 0 for x in eivals) + for i in range(s, -1, -1): + if i < s: + U = U.dot(U) + else: + if has_principal_branch: + p = t * np.exp2(-i) + U[np.diag_indices(n)] = T0_diag ** p + for j in range(n-1): + l1 = T0[j, j] + l2 = T0[j+1, j+1] + t12 = T0[j, j+1] + f12 = _fractional_power_superdiag_entry(l1, l2, t12, p) + U[j, j+1] = f12 + if not np.array_equal(U, np.triu(U)): + raise Exception('U is not upper triangular') + return U + + +def _remainder_matrix_power(A, t): + """ + Compute the fractional power of a matrix, for fractions -1 < t < 1. + + This uses algorithm (3.1) of [1]_. + The Pade approximation itself uses algorithm (4.1) of [2]_. + + Parameters + ---------- + A : (N, N) array_like + Matrix whose fractional power to evaluate. + t : float + Fractional power between -1 and 1 exclusive. + + Returns + ------- + X : (N, N) array_like + The fractional power of the matrix. + + References + ---------- + .. [1] Nicholas J. Higham and Lijing Lin (2013) + "An Improved Schur-Pade Algorithm for Fractional Powers + of a Matrix and their Frechet Derivatives." + + .. [2] Nicholas J. Higham and Lijing lin (2011) + "A Schur-Pade Algorithm for Fractional Powers of a Matrix." + SIAM Journal on Matrix Analysis and Applications, + 32 (3). pp. 1056-1078. ISSN 0895-4798 + + """ + # This code block is copied from numpy.matrix_power(). + A = np.asarray(A) + if len(A.shape) != 2 or A.shape[0] != A.shape[1]: + raise ValueError('input must be a square array') + + # Get the number of rows and columns. + n, n = A.shape + + # Triangularize the matrix if necessary, + # attempting to preserve dtype if possible. + if np.array_equal(A, np.triu(A)): + Z = None + T = A + else: + if np.isrealobj(A): + T, Z = schur(A) + if not np.array_equal(T, np.triu(T)): + T, Z = rsf2csf(T, Z) + else: + T, Z = schur(A, output='complex') + + # Zeros on the diagonal of the triangular matrix are forbidden, + # because the inverse scaling and squaring cannot deal with it. + T_diag = np.diag(T) + if np.count_nonzero(T_diag) != n: + raise FractionalMatrixPowerError( + 'cannot use inverse scaling and squaring to find ' + 'the fractional matrix power of a singular matrix') + + # If the triangular matrix is real and has a negative + # entry on the diagonal, then force the matrix to be complex. + if np.isrealobj(T) and np.min(T_diag) < 0: + T = T.astype(complex) + + # Get the fractional power of the triangular matrix, + # and de-triangularize it if necessary. + U = _remainder_matrix_power_triu(T, t) + if Z is not None: + ZH = np.conjugate(Z).T + return Z.dot(U).dot(ZH) + else: + return U + + +def _fractional_matrix_power(A, p): + """ + Compute the fractional power of a matrix. + + See the fractional_matrix_power docstring in matfuncs.py for more info. + + """ + A = np.asarray(A) + if len(A.shape) != 2 or A.shape[0] != A.shape[1]: + raise ValueError('expected a square matrix') + if p == int(p): + return np.linalg.matrix_power(A, int(p)) + # Compute singular values. + s = svdvals(A) + # Inverse scaling and squaring cannot deal with a singular matrix, + # because the process of repeatedly taking square roots + # would not converge to the identity matrix. + if s[-1]: + # Compute the condition number relative to matrix inversion, + # and use this to decide between floor(p) and ceil(p). + k2 = s[0] / s[-1] + p1 = p - np.floor(p) + p2 = p - np.ceil(p) + if p1 * k2 ** (1 - p1) <= -p2 * k2: + a = int(np.floor(p)) + b = p1 + else: + a = int(np.ceil(p)) + b = p2 + try: + R = _remainder_matrix_power(A, b) + Q = np.linalg.matrix_power(A, a) + return Q.dot(R) + except np.linalg.LinAlgError: + pass + # If p is negative then we are going to give up. + # If p is non-negative then we can fall back to generic funm. + if p < 0: + X = np.empty_like(A) + X.fill(np.nan) + return X + else: + p1 = p - np.floor(p) + a = int(np.floor(p)) + b = p1 + R, info = funm(A, lambda x: pow(x, b), disp=False) + Q = np.linalg.matrix_power(A, a) + return Q.dot(R) + + +def _logm_triu(T): + """ + Compute matrix logarithm of an upper triangular matrix. + + The matrix logarithm is the inverse of + expm: expm(logm(`T`)) == `T` + + Parameters + ---------- + T : (N, N) array_like + Upper triangular matrix whose logarithm to evaluate + + Returns + ------- + logm : (N, N) ndarray + Matrix logarithm of `T` + + References + ---------- + .. [1] Awad H. Al-Mohy and Nicholas J. Higham (2012) + "Improved Inverse Scaling and Squaring Algorithms + for the Matrix Logarithm." + SIAM Journal on Scientific Computing, 34 (4). C152-C169. + ISSN 1095-7197 + + .. [2] Nicholas J. Higham (2008) + "Functions of Matrices: Theory and Computation" + ISBN 978-0-898716-46-7 + + .. [3] Nicholas J. Higham and Lijing lin (2011) + "A Schur-Pade Algorithm for Fractional Powers of a Matrix." + SIAM Journal on Matrix Analysis and Applications, + 32 (3). pp. 1056-1078. ISSN 0895-4798 + + """ + T = np.asarray(T) + if len(T.shape) != 2 or T.shape[0] != T.shape[1]: + raise ValueError('expected an upper triangular square matrix') + n, n = T.shape + + # Construct T0 with the appropriate type, + # depending on the dtype and the spectrum of T. + T_diag = np.diag(T) + keep_it_real = np.isrealobj(T) and np.min(T_diag) >= 0 + if keep_it_real: + T0 = T + else: + T0 = T.astype(complex) + + # Define bounds given in Table (2.1). + theta = (None, + 1.59e-5, 2.31e-3, 1.94e-2, 6.21e-2, + 1.28e-1, 2.06e-1, 2.88e-1, 3.67e-1, + 4.39e-1, 5.03e-1, 5.60e-1, 6.09e-1, + 6.52e-1, 6.89e-1, 7.21e-1, 7.49e-1) + + R, s, m = _inverse_squaring_helper(T0, theta) + + # Evaluate U = 2**s r_m(T - I) using the partial fraction expansion (1.1). + # This requires the nodes and weights + # corresponding to degree-m Gauss-Legendre quadrature. + # These quadrature arrays need to be transformed from the [-1, 1] interval + # to the [0, 1] interval. + nodes, weights = scipy.special.p_roots(m) + nodes = nodes.real + if nodes.shape != (m,) or weights.shape != (m,): + raise Exception('internal error') + nodes = 0.5 + 0.5 * nodes + weights = 0.5 * weights + ident = np.identity(n) + U = np.zeros_like(R) + for alpha, beta in zip(weights, nodes): + U += solve_triangular(ident + beta*R, alpha*R) + U *= np.exp2(s) + + # Skip this step if the principal branch + # does not exist at T0; this happens when a diagonal entry of T0 + # is negative with imaginary part 0. + has_principal_branch = all(x.real > 0 or x.imag != 0 for x in np.diag(T0)) + if has_principal_branch: + + # Recompute diagonal entries of U. + U[np.diag_indices(n)] = np.log(np.diag(T0)) + + # Recompute superdiagonal entries of U. + # This indexing of this code should be renovated + # when newer np.diagonal() becomes available. + for i in range(n-1): + l1 = T0[i, i] + l2 = T0[i+1, i+1] + t12 = T0[i, i+1] + U[i, i+1] = _logm_superdiag_entry(l1, l2, t12) + + # Return the logm of the upper triangular matrix. + if not np.array_equal(U, np.triu(U)): + raise Exception('U is not upper triangular') + return U + + +def _logm_force_nonsingular_triangular_matrix(T, inplace=False): + # The input matrix should be upper triangular. + # The eps is ad hoc and is not meant to be machine precision. + tri_eps = 1e-20 + abs_diag = np.absolute(np.diag(T)) + if np.any(abs_diag == 0): + exact_singularity_msg = 'The logm input matrix is exactly singular.' + warnings.warn(exact_singularity_msg, LogmExactlySingularWarning, stacklevel=3) + if not inplace: + T = T.copy() + n = T.shape[0] + for i in range(n): + if not T[i, i]: + T[i, i] = tri_eps + elif np.any(abs_diag < tri_eps): + near_singularity_msg = 'The logm input matrix may be nearly singular.' + warnings.warn(near_singularity_msg, LogmNearlySingularWarning, stacklevel=3) + return T + + +def _logm(A): + """ + Compute the matrix logarithm. + + See the logm docstring in matfuncs.py for more info. + + Notes + ----- + In this function we look at triangular matrices that are similar + to the input matrix. If any diagonal entry of such a triangular matrix + is exactly zero then the original matrix is singular. + The matrix logarithm does not exist for such matrices, + but in such cases we will pretend that the diagonal entries that are zero + are actually slightly positive by an ad-hoc amount, in the interest + of returning something more useful than NaN. This will cause a warning. + + """ + A = np.asarray(A) + if len(A.shape) != 2 or A.shape[0] != A.shape[1]: + raise ValueError('expected a square matrix') + + # If the input matrix dtype is integer then copy to a float dtype matrix. + if issubclass(A.dtype.type, np.integer): + A = np.asarray(A, dtype=float) + + keep_it_real = np.isrealobj(A) + try: + if np.array_equal(A, np.triu(A)): + A = _logm_force_nonsingular_triangular_matrix(A) + if np.min(np.diag(A)) < 0: + A = A.astype(complex) + return _logm_triu(A) + else: + if keep_it_real: + T, Z = schur(A) + if not np.array_equal(T, np.triu(T)): + T, Z = rsf2csf(T, Z) + else: + T, Z = schur(A, output='complex') + T = _logm_force_nonsingular_triangular_matrix(T, inplace=True) + U = _logm_triu(T) + ZH = np.conjugate(Z).T + return Z.dot(U).dot(ZH) + except (SqrtmError, LogmError): + X = np.empty_like(A) + X.fill(np.nan) + return X diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs_sqrtm.py b/venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs_sqrtm.py new file mode 100644 index 0000000000000000000000000000000000000000..9c84ca573bd29641a8b1ba32163cddd15854abf9 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs_sqrtm.py @@ -0,0 +1,214 @@ +""" +Matrix square root for general matrices and for upper triangular matrices. + +This module exists to avoid cyclic imports. + +""" +__all__ = ['sqrtm'] + +import numpy as np + +from scipy._lib._util import _asarray_validated + +# Local imports +from ._misc import norm +from .lapack import ztrsyl, dtrsyl +from ._decomp_schur import schur, rsf2csf + + + +class SqrtmError(np.linalg.LinAlgError): + pass + + +from ._matfuncs_sqrtm_triu import within_block_loop # noqa: E402 + + +def _sqrtm_triu(T, blocksize=64): + """ + Matrix square root of an upper triangular matrix. + + This is a helper function for `sqrtm` and `logm`. + + Parameters + ---------- + T : (N, N) array_like upper triangular + Matrix whose square root to evaluate + blocksize : int, optional + If the blocksize is not degenerate with respect to the + size of the input array, then use a blocked algorithm. (Default: 64) + + Returns + ------- + sqrtm : (N, N) ndarray + Value of the sqrt function at `T` + + References + ---------- + .. [1] Edvin Deadman, Nicholas J. Higham, Rui Ralha (2013) + "Blocked Schur Algorithms for Computing the Matrix Square Root, + Lecture Notes in Computer Science, 7782. pp. 171-182. + + """ + T_diag = np.diag(T) + keep_it_real = np.isrealobj(T) and np.min(T_diag) >= 0 + + # Cast to complex as necessary + ensure double precision + if not keep_it_real: + T = np.asarray(T, dtype=np.complex128, order="C") + T_diag = np.asarray(T_diag, dtype=np.complex128) + else: + T = np.asarray(T, dtype=np.float64, order="C") + T_diag = np.asarray(T_diag, dtype=np.float64) + + R = np.diag(np.sqrt(T_diag)) + + # Compute the number of blocks to use; use at least one block. + n, n = T.shape + nblocks = max(n // blocksize, 1) + + # Compute the smaller of the two sizes of blocks that + # we will actually use, and compute the number of large blocks. + bsmall, nlarge = divmod(n, nblocks) + blarge = bsmall + 1 + nsmall = nblocks - nlarge + if nsmall * bsmall + nlarge * blarge != n: + raise Exception('internal inconsistency') + + # Define the index range covered by each block. + start_stop_pairs = [] + start = 0 + for count, size in ((nsmall, bsmall), (nlarge, blarge)): + for i in range(count): + start_stop_pairs.append((start, start + size)) + start += size + + # Within-block interactions (Cythonized) + try: + within_block_loop(R, T, start_stop_pairs, nblocks) + except RuntimeError as e: + raise SqrtmError(*e.args) from e + + # Between-block interactions (Cython would give no significant speedup) + for j in range(nblocks): + jstart, jstop = start_stop_pairs[j] + for i in range(j-1, -1, -1): + istart, istop = start_stop_pairs[i] + S = T[istart:istop, jstart:jstop] + if j - i > 1: + S = S - R[istart:istop, istop:jstart].dot(R[istop:jstart, + jstart:jstop]) + + # Invoke LAPACK. + # For more details, see the solve_sylvester implementation + # and the fortran dtrsyl and ztrsyl docs. + Rii = R[istart:istop, istart:istop] + Rjj = R[jstart:jstop, jstart:jstop] + if keep_it_real: + x, scale, info = dtrsyl(Rii, Rjj, S) + else: + x, scale, info = ztrsyl(Rii, Rjj, S) + R[istart:istop, jstart:jstop] = x * scale + + # Return the matrix square root. + return R + + +def sqrtm(A, disp=True, blocksize=64): + """ + Matrix square root. + + Parameters + ---------- + A : (N, N) array_like + Matrix whose square root to evaluate + disp : bool, optional + Print warning if error in the result is estimated large + instead of returning estimated error. (Default: True) + blocksize : integer, optional + If the blocksize is not degenerate with respect to the + size of the input array, then use a blocked algorithm. (Default: 64) + + Returns + ------- + sqrtm : (N, N) ndarray + Value of the sqrt function at `A`. The dtype is float or complex. + The precision (data size) is determined based on the precision of + input `A`. When the dtype is float, the precision is the same as `A`. + When the dtype is complex, the precision is double that of `A`. The + precision might be clipped by each dtype precision range. + + errest : float + (if disp == False) + + Frobenius norm of the estimated error, ||err||_F / ||A||_F + + References + ---------- + .. [1] Edvin Deadman, Nicholas J. Higham, Rui Ralha (2013) + "Blocked Schur Algorithms for Computing the Matrix Square Root, + Lecture Notes in Computer Science, 7782. pp. 171-182. + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import sqrtm + >>> a = np.array([[1.0, 3.0], [1.0, 4.0]]) + >>> r = sqrtm(a) + >>> r + array([[ 0.75592895, 1.13389342], + [ 0.37796447, 1.88982237]]) + >>> r.dot(r) + array([[ 1., 3.], + [ 1., 4.]]) + + """ + byte_size = np.asarray(A).dtype.itemsize + A = _asarray_validated(A, check_finite=True, as_inexact=True) + if len(A.shape) != 2: + raise ValueError("Non-matrix input to matrix function.") + if blocksize < 1: + raise ValueError("The blocksize should be at least 1.") + keep_it_real = np.isrealobj(A) + if keep_it_real: + T, Z = schur(A) + d0 = np.diagonal(T) + d1 = np.diagonal(T, -1) + eps = np.finfo(T.dtype).eps + needs_conversion = abs(d1) > eps * (abs(d0[1:]) + abs(d0[:-1])) + if needs_conversion.any(): + T, Z = rsf2csf(T, Z) + else: + T, Z = schur(A, output='complex') + failflag = False + try: + R = _sqrtm_triu(T, blocksize=blocksize) + ZH = np.conjugate(Z).T + X = Z.dot(R).dot(ZH) + if not np.iscomplexobj(X): + # float byte size range: f2 ~ f16 + X = X.astype(f"f{np.clip(byte_size, 2, 16)}", copy=False) + else: + # complex byte size range: c8 ~ c32. + # c32(complex256) might not be supported in some environments. + if hasattr(np, 'complex256'): + X = X.astype(f"c{np.clip(byte_size*2, 8, 32)}", copy=False) + else: + X = X.astype(f"c{np.clip(byte_size*2, 8, 16)}", copy=False) + except SqrtmError: + failflag = True + X = np.empty_like(A) + X.fill(np.nan) + + if disp: + if failflag: + print("Failed to find a square root.") + return X + else: + try: + arg2 = norm(X.dot(X) - A, 'fro')**2 / norm(A, 'fro') + except ValueError: + # NaNs in matrix + arg2 = np.inf + + return X, arg2 diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs_sqrtm_triu.cpython-310-x86_64-linux-gnu.so b/venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs_sqrtm_triu.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..74867d9cfeeba679bde114d3c863b70455a72185 Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs_sqrtm_triu.cpython-310-x86_64-linux-gnu.so differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_misc.py b/venv/lib/python3.10/site-packages/scipy/linalg/_misc.py new file mode 100644 index 0000000000000000000000000000000000000000..79341f78435945d5562571e55b5e28c57cd44e21 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_misc.py @@ -0,0 +1,191 @@ +import numpy as np +from numpy.linalg import LinAlgError +from .blas import get_blas_funcs +from .lapack import get_lapack_funcs + +__all__ = ['LinAlgError', 'LinAlgWarning', 'norm'] + + +class LinAlgWarning(RuntimeWarning): + """ + The warning emitted when a linear algebra related operation is close + to fail conditions of the algorithm or loss of accuracy is expected. + """ + pass + + +def norm(a, ord=None, axis=None, keepdims=False, check_finite=True): + """ + Matrix or vector norm. + + This function is able to return one of eight different matrix norms, + or one of an infinite number of vector norms (described below), depending + on the value of the ``ord`` parameter. For tensors with rank different from + 1 or 2, only `ord=None` is supported. + + Parameters + ---------- + a : array_like + Input array. If `axis` is None, `a` must be 1-D or 2-D, unless `ord` + is None. If both `axis` and `ord` are None, the 2-norm of + ``a.ravel`` will be returned. + ord : {int, inf, -inf, 'fro', 'nuc', None}, optional + Order of the norm (see table under ``Notes``). inf means NumPy's + `inf` object. + axis : {int, 2-tuple of ints, None}, optional + If `axis` is an integer, it specifies the axis of `a` along which to + compute the vector norms. If `axis` is a 2-tuple, it specifies the + axes that hold 2-D matrices, and the matrix norms of these matrices + are computed. If `axis` is None then either a vector norm (when `a` + is 1-D) or a matrix norm (when `a` is 2-D) is returned. + keepdims : bool, optional + If this is set to True, the axes which are normed over are left in the + result as dimensions with size one. With this option the result will + broadcast correctly against the original `a`. + check_finite : bool, optional + Whether to check that the input matrix contains only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + n : float or ndarray + Norm of the matrix or vector(s). + + Notes + ----- + For values of ``ord <= 0``, the result is, strictly speaking, not a + mathematical 'norm', but it may still be useful for various numerical + purposes. + + The following norms can be calculated: + + ===== ============================ ========================== + ord norm for matrices norm for vectors + ===== ============================ ========================== + None Frobenius norm 2-norm + 'fro' Frobenius norm -- + 'nuc' nuclear norm -- + inf max(sum(abs(a), axis=1)) max(abs(a)) + -inf min(sum(abs(a), axis=1)) min(abs(a)) + 0 -- sum(a != 0) + 1 max(sum(abs(a), axis=0)) as below + -1 min(sum(abs(a), axis=0)) as below + 2 2-norm (largest sing. value) as below + -2 smallest singular value as below + other -- sum(abs(a)**ord)**(1./ord) + ===== ============================ ========================== + + The Frobenius norm is given by [1]_: + + :math:`||A||_F = [\\sum_{i,j} abs(a_{i,j})^2]^{1/2}` + + The nuclear norm is the sum of the singular values. + + Both the Frobenius and nuclear norm orders are only defined for + matrices. + + References + ---------- + .. [1] G. H. Golub and C. F. Van Loan, *Matrix Computations*, + Baltimore, MD, Johns Hopkins University Press, 1985, pg. 15 + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import norm + >>> a = np.arange(9) - 4.0 + >>> a + array([-4., -3., -2., -1., 0., 1., 2., 3., 4.]) + >>> b = a.reshape((3, 3)) + >>> b + array([[-4., -3., -2.], + [-1., 0., 1.], + [ 2., 3., 4.]]) + + >>> norm(a) + 7.745966692414834 + >>> norm(b) + 7.745966692414834 + >>> norm(b, 'fro') + 7.745966692414834 + >>> norm(a, np.inf) + 4 + >>> norm(b, np.inf) + 9 + >>> norm(a, -np.inf) + 0 + >>> norm(b, -np.inf) + 2 + + >>> norm(a, 1) + 20 + >>> norm(b, 1) + 7 + >>> norm(a, -1) + -4.6566128774142013e-010 + >>> norm(b, -1) + 6 + >>> norm(a, 2) + 7.745966692414834 + >>> norm(b, 2) + 7.3484692283495345 + + >>> norm(a, -2) + 0 + >>> norm(b, -2) + 1.8570331885190563e-016 + >>> norm(a, 3) + 5.8480354764257312 + >>> norm(a, -3) + 0 + + """ + # Differs from numpy only in non-finite handling and the use of blas. + if check_finite: + a = np.asarray_chkfinite(a) + else: + a = np.asarray(a) + + if a.size and a.dtype.char in 'fdFD' and axis is None and not keepdims: + + if ord in (None, 2) and (a.ndim == 1): + # use blas for fast and stable euclidean norm + nrm2 = get_blas_funcs('nrm2', dtype=a.dtype, ilp64='preferred') + return nrm2(a) + + if a.ndim == 2: + # Use lapack for a couple fast matrix norms. + # For some reason the *lange frobenius norm is slow. + lange_args = None + # Make sure this works if the user uses the axis keywords + # to apply the norm to the transpose. + if ord == 1: + if np.isfortran(a): + lange_args = '1', a + elif np.isfortran(a.T): + lange_args = 'i', a.T + elif ord == np.inf: + if np.isfortran(a): + lange_args = 'i', a + elif np.isfortran(a.T): + lange_args = '1', a.T + if lange_args: + lange = get_lapack_funcs('lange', dtype=a.dtype, ilp64='preferred') + return lange(*lange_args) + + # fall back to numpy in every other case + return np.linalg.norm(a, ord=ord, axis=axis, keepdims=keepdims) + + +def _datacopied(arr, original): + """ + Strict check for `arr` not sharing any data with `original`, + under the assumption that arr = asarray(original) + + """ + if arr is original: + return False + if not isinstance(original, np.ndarray) and hasattr(original, '__array__'): + return False + return arr.base is None diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_procrustes.py b/venv/lib/python3.10/site-packages/scipy/linalg/_procrustes.py new file mode 100644 index 0000000000000000000000000000000000000000..1e835f15681c74fedbadb6a621ef6e36a2f4c3f5 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_procrustes.py @@ -0,0 +1,90 @@ +""" +Solve the orthogonal Procrustes problem. + +""" +import numpy as np +from ._decomp_svd import svd + + +__all__ = ['orthogonal_procrustes'] + + +def orthogonal_procrustes(A, B, check_finite=True): + """ + Compute the matrix solution of the orthogonal Procrustes problem. + + Given matrices A and B of equal shape, find an orthogonal matrix R + that most closely maps A to B using the algorithm given in [1]_. + + Parameters + ---------- + A : (M, N) array_like + Matrix to be mapped. + B : (M, N) array_like + Target matrix. + check_finite : bool, optional + Whether to check that the input matrices contain only finite numbers. + Disabling may give a performance gain, but may result in problems + (crashes, non-termination) if the inputs do contain infinities or NaNs. + + Returns + ------- + R : (N, N) ndarray + The matrix solution of the orthogonal Procrustes problem. + Minimizes the Frobenius norm of ``(A @ R) - B``, subject to + ``R.T @ R = I``. + scale : float + Sum of the singular values of ``A.T @ B``. + + Raises + ------ + ValueError + If the input array shapes don't match or if check_finite is True and + the arrays contain Inf or NaN. + + Notes + ----- + Note that unlike higher level Procrustes analyses of spatial data, this + function only uses orthogonal transformations like rotations and + reflections, and it does not use scaling or translation. + + .. versionadded:: 0.15.0 + + References + ---------- + .. [1] Peter H. Schonemann, "A generalized solution of the orthogonal + Procrustes problem", Psychometrica -- Vol. 31, No. 1, March, 1966. + :doi:`10.1007/BF02289451` + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import orthogonal_procrustes + >>> A = np.array([[ 2, 0, 1], [-2, 0, 0]]) + + Flip the order of columns and check for the anti-diagonal mapping + + >>> R, sca = orthogonal_procrustes(A, np.fliplr(A)) + >>> R + array([[-5.34384992e-17, 0.00000000e+00, 1.00000000e+00], + [ 0.00000000e+00, 1.00000000e+00, 0.00000000e+00], + [ 1.00000000e+00, 0.00000000e+00, -7.85941422e-17]]) + >>> sca + 9.0 + + """ + if check_finite: + A = np.asarray_chkfinite(A) + B = np.asarray_chkfinite(B) + else: + A = np.asanyarray(A) + B = np.asanyarray(B) + if A.ndim != 2: + raise ValueError('expected ndim to be 2, but observed %s' % A.ndim) + if A.shape != B.shape: + raise ValueError(f'the shapes of A and B differ ({A.shape} vs {B.shape})') + # Be clever with transposes, with the intention to save memory. + u, w, vt = svd(B.T.dot(A).T) + R = u.dot(vt) + scale = w.sum() + return R, scale diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_sketches.py b/venv/lib/python3.10/site-packages/scipy/linalg/_sketches.py new file mode 100644 index 0000000000000000000000000000000000000000..0cefc68637ee235fdd5132d3fc1362861493cc29 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_sketches.py @@ -0,0 +1,179 @@ +""" Sketching-based Matrix Computations """ + +# Author: Jordi Montes +# August 28, 2017 + +import numpy as np + +from scipy._lib._util import check_random_state, rng_integers +from scipy.sparse import csc_matrix + +__all__ = ['clarkson_woodruff_transform'] + + +def cwt_matrix(n_rows, n_columns, seed=None): + r""" + Generate a matrix S which represents a Clarkson-Woodruff transform. + + Given the desired size of matrix, the method returns a matrix S of size + (n_rows, n_columns) where each column has all the entries set to 0 + except for one position which has been randomly set to +1 or -1 with + equal probability. + + Parameters + ---------- + n_rows : int + Number of rows of S + n_columns : int + Number of columns of S + seed : {None, int, `numpy.random.Generator`, `numpy.random.RandomState`}, optional + If `seed` is None (or `np.random`), the `numpy.random.RandomState` + singleton is used. + If `seed` is an int, a new ``RandomState`` instance is used, + seeded with `seed`. + If `seed` is already a ``Generator`` or ``RandomState`` instance then + that instance is used. + + Returns + ------- + S : (n_rows, n_columns) csc_matrix + The returned matrix has ``n_columns`` nonzero entries. + + Notes + ----- + Given a matrix A, with probability at least 9/10, + .. math:: \|SA\| = (1 \pm \epsilon)\|A\| + Where the error epsilon is related to the size of S. + """ + rng = check_random_state(seed) + rows = rng_integers(rng, 0, n_rows, n_columns) + cols = np.arange(n_columns+1) + signs = rng.choice([1, -1], n_columns) + S = csc_matrix((signs, rows, cols),shape=(n_rows, n_columns)) + return S + + +def clarkson_woodruff_transform(input_matrix, sketch_size, seed=None): + r""" + Applies a Clarkson-Woodruff Transform/sketch to the input matrix. + + Given an input_matrix ``A`` of size ``(n, d)``, compute a matrix ``A'`` of + size (sketch_size, d) so that + + .. math:: \|Ax\| \approx \|A'x\| + + with high probability via the Clarkson-Woodruff Transform, otherwise + known as the CountSketch matrix. + + Parameters + ---------- + input_matrix : array_like + Input matrix, of shape ``(n, d)``. + sketch_size : int + Number of rows for the sketch. + seed : {None, int, `numpy.random.Generator`, `numpy.random.RandomState`}, optional + If `seed` is None (or `np.random`), the `numpy.random.RandomState` + singleton is used. + If `seed` is an int, a new ``RandomState`` instance is used, + seeded with `seed`. + If `seed` is already a ``Generator`` or ``RandomState`` instance then + that instance is used. + + Returns + ------- + A' : array_like + Sketch of the input matrix ``A``, of size ``(sketch_size, d)``. + + Notes + ----- + To make the statement + + .. math:: \|Ax\| \approx \|A'x\| + + precise, observe the following result which is adapted from the + proof of Theorem 14 of [2]_ via Markov's Inequality. If we have + a sketch size ``sketch_size=k`` which is at least + + .. math:: k \geq \frac{2}{\epsilon^2\delta} + + Then for any fixed vector ``x``, + + .. math:: \|Ax\| = (1\pm\epsilon)\|A'x\| + + with probability at least one minus delta. + + This implementation takes advantage of sparsity: computing + a sketch takes time proportional to ``A.nnz``. Data ``A`` which + is in ``scipy.sparse.csc_matrix`` format gives the quickest + computation time for sparse input. + + >>> import numpy as np + >>> from scipy import linalg + >>> from scipy import sparse + >>> rng = np.random.default_rng() + >>> n_rows, n_columns, density, sketch_n_rows = 15000, 100, 0.01, 200 + >>> A = sparse.rand(n_rows, n_columns, density=density, format='csc') + >>> B = sparse.rand(n_rows, n_columns, density=density, format='csr') + >>> C = sparse.rand(n_rows, n_columns, density=density, format='coo') + >>> D = rng.standard_normal((n_rows, n_columns)) + >>> SA = linalg.clarkson_woodruff_transform(A, sketch_n_rows) # fastest + >>> SB = linalg.clarkson_woodruff_transform(B, sketch_n_rows) # fast + >>> SC = linalg.clarkson_woodruff_transform(C, sketch_n_rows) # slower + >>> SD = linalg.clarkson_woodruff_transform(D, sketch_n_rows) # slowest + + That said, this method does perform well on dense inputs, just slower + on a relative scale. + + References + ---------- + .. [1] Kenneth L. Clarkson and David P. Woodruff. Low rank approximation + and regression in input sparsity time. In STOC, 2013. + .. [2] David P. Woodruff. Sketching as a tool for numerical linear algebra. + In Foundations and Trends in Theoretical Computer Science, 2014. + + Examples + -------- + Create a big dense matrix ``A`` for the example: + + >>> import numpy as np + >>> from scipy import linalg + >>> n_rows, n_columns = 15000, 100 + >>> rng = np.random.default_rng() + >>> A = rng.standard_normal((n_rows, n_columns)) + + Apply the transform to create a new matrix with 200 rows: + + >>> sketch_n_rows = 200 + >>> sketch = linalg.clarkson_woodruff_transform(A, sketch_n_rows, seed=rng) + >>> sketch.shape + (200, 100) + + Now with high probability, the true norm is close to the sketched norm + in absolute value. + + >>> linalg.norm(A) + 1224.2812927123198 + >>> linalg.norm(sketch) + 1226.518328407333 + + Similarly, applying our sketch preserves the solution to a linear + regression of :math:`\min \|Ax - b\|`. + + >>> b = rng.standard_normal(n_rows) + >>> x = linalg.lstsq(A, b)[0] + >>> Ab = np.hstack((A, b.reshape(-1, 1))) + >>> SAb = linalg.clarkson_woodruff_transform(Ab, sketch_n_rows, seed=rng) + >>> SA, Sb = SAb[:, :-1], SAb[:, -1] + >>> x_sketched = linalg.lstsq(SA, Sb)[0] + + As with the matrix norm example, ``linalg.norm(A @ x - b)`` is close + to ``linalg.norm(A @ x_sketched - b)`` with high probability. + + >>> linalg.norm(A @ x - b) + 122.83242365433877 + >>> linalg.norm(A @ x_sketched - b) + 166.58473879945151 + + """ + S = cwt_matrix(sketch_size, input_matrix.shape[0], seed) + return S.dot(input_matrix) diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_solve_toeplitz.cpython-310-x86_64-linux-gnu.so b/venv/lib/python3.10/site-packages/scipy/linalg/_solve_toeplitz.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..d5e5e62eb6543ac6f056bdc80a8d914350a9b0d0 Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/_solve_toeplitz.cpython-310-x86_64-linux-gnu.so differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_solvers.py b/venv/lib/python3.10/site-packages/scipy/linalg/_solvers.py new file mode 100644 index 0000000000000000000000000000000000000000..36da31c9a23957cbc08c493ae37000dca6fc0719 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_solvers.py @@ -0,0 +1,846 @@ +"""Matrix equation solver routines""" +# Author: Jeffrey Armstrong +# February 24, 2012 + +# Modified: Chad Fulton +# June 19, 2014 + +# Modified: Ilhan Polat +# September 13, 2016 + +import warnings +import numpy as np +from numpy.linalg import inv, LinAlgError, norm, cond, svd + +from ._basic import solve, solve_triangular, matrix_balance +from .lapack import get_lapack_funcs +from ._decomp_schur import schur +from ._decomp_lu import lu +from ._decomp_qr import qr +from ._decomp_qz import ordqz +from ._decomp import _asarray_validated +from ._special_matrices import kron, block_diag + +__all__ = ['solve_sylvester', + 'solve_continuous_lyapunov', 'solve_discrete_lyapunov', + 'solve_lyapunov', + 'solve_continuous_are', 'solve_discrete_are'] + + +def solve_sylvester(a, b, q): + """ + Computes a solution (X) to the Sylvester equation :math:`AX + XB = Q`. + + Parameters + ---------- + a : (M, M) array_like + Leading matrix of the Sylvester equation + b : (N, N) array_like + Trailing matrix of the Sylvester equation + q : (M, N) array_like + Right-hand side + + Returns + ------- + x : (M, N) ndarray + The solution to the Sylvester equation. + + Raises + ------ + LinAlgError + If solution was not found + + Notes + ----- + Computes a solution to the Sylvester matrix equation via the Bartels- + Stewart algorithm. The A and B matrices first undergo Schur + decompositions. The resulting matrices are used to construct an + alternative Sylvester equation (``RY + YS^T = F``) where the R and S + matrices are in quasi-triangular form (or, when R, S or F are complex, + triangular form). The simplified equation is then solved using + ``*TRSYL`` from LAPACK directly. + + .. versionadded:: 0.11.0 + + Examples + -------- + Given `a`, `b`, and `q` solve for `x`: + + >>> import numpy as np + >>> from scipy import linalg + >>> a = np.array([[-3, -2, 0], [-1, -1, 3], [3, -5, -1]]) + >>> b = np.array([[1]]) + >>> q = np.array([[1],[2],[3]]) + >>> x = linalg.solve_sylvester(a, b, q) + >>> x + array([[ 0.0625], + [-0.5625], + [ 0.6875]]) + >>> np.allclose(a.dot(x) + x.dot(b), q) + True + + """ + + # Compute the Schur decomposition form of a + r, u = schur(a, output='real') + + # Compute the Schur decomposition of b + s, v = schur(b.conj().transpose(), output='real') + + # Construct f = u'*q*v + f = np.dot(np.dot(u.conj().transpose(), q), v) + + # Call the Sylvester equation solver + trsyl, = get_lapack_funcs(('trsyl',), (r, s, f)) + if trsyl is None: + raise RuntimeError('LAPACK implementation does not contain a proper ' + 'Sylvester equation solver (TRSYL)') + y, scale, info = trsyl(r, s, f, tranb='C') + + y = scale*y + + if info < 0: + raise LinAlgError("Illegal value encountered in " + "the %d term" % (-info,)) + + return np.dot(np.dot(u, y), v.conj().transpose()) + + +def solve_continuous_lyapunov(a, q): + """ + Solves the continuous Lyapunov equation :math:`AX + XA^H = Q`. + + Uses the Bartels-Stewart algorithm to find :math:`X`. + + Parameters + ---------- + a : array_like + A square matrix + + q : array_like + Right-hand side square matrix + + Returns + ------- + x : ndarray + Solution to the continuous Lyapunov equation + + See Also + -------- + solve_discrete_lyapunov : computes the solution to the discrete-time + Lyapunov equation + solve_sylvester : computes the solution to the Sylvester equation + + Notes + ----- + The continuous Lyapunov equation is a special form of the Sylvester + equation, hence this solver relies on LAPACK routine ?TRSYL. + + .. versionadded:: 0.11.0 + + Examples + -------- + Given `a` and `q` solve for `x`: + + >>> import numpy as np + >>> from scipy import linalg + >>> a = np.array([[-3, -2, 0], [-1, -1, 0], [0, -5, -1]]) + >>> b = np.array([2, 4, -1]) + >>> q = np.eye(3) + >>> x = linalg.solve_continuous_lyapunov(a, q) + >>> x + array([[ -0.75 , 0.875 , -3.75 ], + [ 0.875 , -1.375 , 5.3125], + [ -3.75 , 5.3125, -27.0625]]) + >>> np.allclose(a.dot(x) + x.dot(a.T), q) + True + """ + + a = np.atleast_2d(_asarray_validated(a, check_finite=True)) + q = np.atleast_2d(_asarray_validated(q, check_finite=True)) + + r_or_c = float + + for ind, _ in enumerate((a, q)): + if np.iscomplexobj(_): + r_or_c = complex + + if not np.equal(*_.shape): + raise ValueError("Matrix {} should be square.".format("aq"[ind])) + + # Shape consistency check + if a.shape != q.shape: + raise ValueError("Matrix a and q should have the same shape.") + + # Compute the Schur decomposition form of a + r, u = schur(a, output='real') + + # Construct f = u'*q*u + f = u.conj().T.dot(q.dot(u)) + + # Call the Sylvester equation solver + trsyl = get_lapack_funcs('trsyl', (r, f)) + + dtype_string = 'T' if r_or_c == float else 'C' + y, scale, info = trsyl(r, r, f, tranb=dtype_string) + + if info < 0: + raise ValueError('?TRSYL exited with the internal error ' + f'"illegal value in argument number {-info}.". See ' + 'LAPACK documentation for the ?TRSYL error codes.') + elif info == 1: + warnings.warn('Input "a" has an eigenvalue pair whose sum is ' + 'very close to or exactly zero. The solution is ' + 'obtained via perturbing the coefficients.', + RuntimeWarning, stacklevel=2) + y *= scale + + return u.dot(y).dot(u.conj().T) + + +# For backwards compatibility, keep the old name +solve_lyapunov = solve_continuous_lyapunov + + +def _solve_discrete_lyapunov_direct(a, q): + """ + Solves the discrete Lyapunov equation directly. + + This function is called by the `solve_discrete_lyapunov` function with + `method=direct`. It is not supposed to be called directly. + """ + + lhs = kron(a, a.conj()) + lhs = np.eye(lhs.shape[0]) - lhs + x = solve(lhs, q.flatten()) + + return np.reshape(x, q.shape) + + +def _solve_discrete_lyapunov_bilinear(a, q): + """ + Solves the discrete Lyapunov equation using a bilinear transformation. + + This function is called by the `solve_discrete_lyapunov` function with + `method=bilinear`. It is not supposed to be called directly. + """ + eye = np.eye(a.shape[0]) + aH = a.conj().transpose() + aHI_inv = inv(aH + eye) + b = np.dot(aH - eye, aHI_inv) + c = 2*np.dot(np.dot(inv(a + eye), q), aHI_inv) + return solve_lyapunov(b.conj().transpose(), -c) + + +def solve_discrete_lyapunov(a, q, method=None): + """ + Solves the discrete Lyapunov equation :math:`AXA^H - X + Q = 0`. + + Parameters + ---------- + a, q : (M, M) array_like + Square matrices corresponding to A and Q in the equation + above respectively. Must have the same shape. + + method : {'direct', 'bilinear'}, optional + Type of solver. + + If not given, chosen to be ``direct`` if ``M`` is less than 10 and + ``bilinear`` otherwise. + + Returns + ------- + x : ndarray + Solution to the discrete Lyapunov equation + + See Also + -------- + solve_continuous_lyapunov : computes the solution to the continuous-time + Lyapunov equation + + Notes + ----- + This section describes the available solvers that can be selected by the + 'method' parameter. The default method is *direct* if ``M`` is less than 10 + and ``bilinear`` otherwise. + + Method *direct* uses a direct analytical solution to the discrete Lyapunov + equation. The algorithm is given in, for example, [1]_. However, it requires + the linear solution of a system with dimension :math:`M^2` so that + performance degrades rapidly for even moderately sized matrices. + + Method *bilinear* uses a bilinear transformation to convert the discrete + Lyapunov equation to a continuous Lyapunov equation :math:`(BX+XB'=-C)` + where :math:`B=(A-I)(A+I)^{-1}` and + :math:`C=2(A' + I)^{-1} Q (A + I)^{-1}`. The continuous equation can be + efficiently solved since it is a special case of a Sylvester equation. + The transformation algorithm is from Popov (1964) as described in [2]_. + + .. versionadded:: 0.11.0 + + References + ---------- + .. [1] Hamilton, James D. Time Series Analysis, Princeton: Princeton + University Press, 1994. 265. Print. + http://doc1.lbfl.li/aca/FLMF037168.pdf + .. [2] Gajic, Z., and M.T.J. Qureshi. 2008. + Lyapunov Matrix Equation in System Stability and Control. + Dover Books on Engineering Series. Dover Publications. + + Examples + -------- + Given `a` and `q` solve for `x`: + + >>> import numpy as np + >>> from scipy import linalg + >>> a = np.array([[0.2, 0.5],[0.7, -0.9]]) + >>> q = np.eye(2) + >>> x = linalg.solve_discrete_lyapunov(a, q) + >>> x + array([[ 0.70872893, 1.43518822], + [ 1.43518822, -2.4266315 ]]) + >>> np.allclose(a.dot(x).dot(a.T)-x, -q) + True + + """ + a = np.asarray(a) + q = np.asarray(q) + if method is None: + # Select automatically based on size of matrices + if a.shape[0] >= 10: + method = 'bilinear' + else: + method = 'direct' + + meth = method.lower() + + if meth == 'direct': + x = _solve_discrete_lyapunov_direct(a, q) + elif meth == 'bilinear': + x = _solve_discrete_lyapunov_bilinear(a, q) + else: + raise ValueError('Unknown solver %s' % method) + + return x + + +def solve_continuous_are(a, b, q, r, e=None, s=None, balanced=True): + r""" + Solves the continuous-time algebraic Riccati equation (CARE). + + The CARE is defined as + + .. math:: + + X A + A^H X - X B R^{-1} B^H X + Q = 0 + + The limitations for a solution to exist are : + + * All eigenvalues of :math:`A` on the right half plane, should be + controllable. + + * The associated hamiltonian pencil (See Notes), should have + eigenvalues sufficiently away from the imaginary axis. + + Moreover, if ``e`` or ``s`` is not precisely ``None``, then the + generalized version of CARE + + .. math:: + + E^HXA + A^HXE - (E^HXB + S) R^{-1} (B^HXE + S^H) + Q = 0 + + is solved. When omitted, ``e`` is assumed to be the identity and ``s`` + is assumed to be the zero matrix with sizes compatible with ``a`` and + ``b``, respectively. + + Parameters + ---------- + a : (M, M) array_like + Square matrix + b : (M, N) array_like + Input + q : (M, M) array_like + Input + r : (N, N) array_like + Nonsingular square matrix + e : (M, M) array_like, optional + Nonsingular square matrix + s : (M, N) array_like, optional + Input + balanced : bool, optional + The boolean that indicates whether a balancing step is performed + on the data. The default is set to True. + + Returns + ------- + x : (M, M) ndarray + Solution to the continuous-time algebraic Riccati equation. + + Raises + ------ + LinAlgError + For cases where the stable subspace of the pencil could not be + isolated. See Notes section and the references for details. + + See Also + -------- + solve_discrete_are : Solves the discrete-time algebraic Riccati equation + + Notes + ----- + The equation is solved by forming the extended hamiltonian matrix pencil, + as described in [1]_, :math:`H - \lambda J` given by the block matrices :: + + [ A 0 B ] [ E 0 0 ] + [-Q -A^H -S ] - \lambda * [ 0 E^H 0 ] + [ S^H B^H R ] [ 0 0 0 ] + + and using a QZ decomposition method. + + In this algorithm, the fail conditions are linked to the symmetry + of the product :math:`U_2 U_1^{-1}` and condition number of + :math:`U_1`. Here, :math:`U` is the 2m-by-m matrix that holds the + eigenvectors spanning the stable subspace with 2-m rows and partitioned + into two m-row matrices. See [1]_ and [2]_ for more details. + + In order to improve the QZ decomposition accuracy, the pencil goes + through a balancing step where the sum of absolute values of + :math:`H` and :math:`J` entries (after removing the diagonal entries of + the sum) is balanced following the recipe given in [3]_. + + .. versionadded:: 0.11.0 + + References + ---------- + .. [1] P. van Dooren , "A Generalized Eigenvalue Approach For Solving + Riccati Equations.", SIAM Journal on Scientific and Statistical + Computing, Vol.2(2), :doi:`10.1137/0902010` + + .. [2] A.J. Laub, "A Schur Method for Solving Algebraic Riccati + Equations.", Massachusetts Institute of Technology. Laboratory for + Information and Decision Systems. LIDS-R ; 859. Available online : + http://hdl.handle.net/1721.1/1301 + + .. [3] P. Benner, "Symplectic Balancing of Hamiltonian Matrices", 2001, + SIAM J. Sci. Comput., 2001, Vol.22(5), :doi:`10.1137/S1064827500367993` + + Examples + -------- + Given `a`, `b`, `q`, and `r` solve for `x`: + + >>> import numpy as np + >>> from scipy import linalg + >>> a = np.array([[4, 3], [-4.5, -3.5]]) + >>> b = np.array([[1], [-1]]) + >>> q = np.array([[9, 6], [6, 4.]]) + >>> r = 1 + >>> x = linalg.solve_continuous_are(a, b, q, r) + >>> x + array([[ 21.72792206, 14.48528137], + [ 14.48528137, 9.65685425]]) + >>> np.allclose(a.T.dot(x) + x.dot(a)-x.dot(b).dot(b.T).dot(x), -q) + True + + """ + + # Validate input arguments + a, b, q, r, e, s, m, n, r_or_c, gen_are = _are_validate_args( + a, b, q, r, e, s, 'care') + + H = np.empty((2*m+n, 2*m+n), dtype=r_or_c) + H[:m, :m] = a + H[:m, m:2*m] = 0. + H[:m, 2*m:] = b + H[m:2*m, :m] = -q + H[m:2*m, m:2*m] = -a.conj().T + H[m:2*m, 2*m:] = 0. if s is None else -s + H[2*m:, :m] = 0. if s is None else s.conj().T + H[2*m:, m:2*m] = b.conj().T + H[2*m:, 2*m:] = r + + if gen_are and e is not None: + J = block_diag(e, e.conj().T, np.zeros_like(r, dtype=r_or_c)) + else: + J = block_diag(np.eye(2*m), np.zeros_like(r, dtype=r_or_c)) + + if balanced: + # xGEBAL does not remove the diagonals before scaling. Also + # to avoid destroying the Symplectic structure, we follow Ref.3 + M = np.abs(H) + np.abs(J) + np.fill_diagonal(M, 0.) + _, (sca, _) = matrix_balance(M, separate=1, permute=0) + # do we need to bother? + if not np.allclose(sca, np.ones_like(sca)): + # Now impose diag(D,inv(D)) from Benner where D is + # square root of s_i/s_(n+i) for i=0,.... + sca = np.log2(sca) + # NOTE: Py3 uses "Bankers Rounding: round to the nearest even" !! + s = np.round((sca[m:2*m] - sca[:m])/2) + sca = 2 ** np.r_[s, -s, sca[2*m:]] + # Elementwise multiplication via broadcasting. + elwisescale = sca[:, None] * np.reciprocal(sca) + H *= elwisescale + J *= elwisescale + + # Deflate the pencil to 2m x 2m ala Ref.1, eq.(55) + q, r = qr(H[:, -n:]) + H = q[:, n:].conj().T.dot(H[:, :2*m]) + J = q[:2*m, n:].conj().T.dot(J[:2*m, :2*m]) + + # Decide on which output type is needed for QZ + out_str = 'real' if r_or_c == float else 'complex' + + _, _, _, _, _, u = ordqz(H, J, sort='lhp', overwrite_a=True, + overwrite_b=True, check_finite=False, + output=out_str) + + # Get the relevant parts of the stable subspace basis + if e is not None: + u, _ = qr(np.vstack((e.dot(u[:m, :m]), u[m:, :m]))) + u00 = u[:m, :m] + u10 = u[m:, :m] + + # Solve via back-substituion after checking the condition of u00 + up, ul, uu = lu(u00) + if 1/cond(uu) < np.spacing(1.): + raise LinAlgError('Failed to find a finite solution.') + + # Exploit the triangular structure + x = solve_triangular(ul.conj().T, + solve_triangular(uu.conj().T, + u10.conj().T, + lower=True), + unit_diagonal=True, + ).conj().T.dot(up.conj().T) + if balanced: + x *= sca[:m, None] * sca[:m] + + # Check the deviation from symmetry for lack of success + # See proof of Thm.5 item 3 in [2] + u_sym = u00.conj().T.dot(u10) + n_u_sym = norm(u_sym, 1) + u_sym = u_sym - u_sym.conj().T + sym_threshold = np.max([np.spacing(1000.), 0.1*n_u_sym]) + + if norm(u_sym, 1) > sym_threshold: + raise LinAlgError('The associated Hamiltonian pencil has eigenvalues ' + 'too close to the imaginary axis') + + return (x + x.conj().T)/2 + + +def solve_discrete_are(a, b, q, r, e=None, s=None, balanced=True): + r""" + Solves the discrete-time algebraic Riccati equation (DARE). + + The DARE is defined as + + .. math:: + + A^HXA - X - (A^HXB) (R + B^HXB)^{-1} (B^HXA) + Q = 0 + + The limitations for a solution to exist are : + + * All eigenvalues of :math:`A` outside the unit disc, should be + controllable. + + * The associated symplectic pencil (See Notes), should have + eigenvalues sufficiently away from the unit circle. + + Moreover, if ``e`` and ``s`` are not both precisely ``None``, then the + generalized version of DARE + + .. math:: + + A^HXA - E^HXE - (A^HXB+S) (R+B^HXB)^{-1} (B^HXA+S^H) + Q = 0 + + is solved. When omitted, ``e`` is assumed to be the identity and ``s`` + is assumed to be the zero matrix. + + Parameters + ---------- + a : (M, M) array_like + Square matrix + b : (M, N) array_like + Input + q : (M, M) array_like + Input + r : (N, N) array_like + Square matrix + e : (M, M) array_like, optional + Nonsingular square matrix + s : (M, N) array_like, optional + Input + balanced : bool + The boolean that indicates whether a balancing step is performed + on the data. The default is set to True. + + Returns + ------- + x : (M, M) ndarray + Solution to the discrete algebraic Riccati equation. + + Raises + ------ + LinAlgError + For cases where the stable subspace of the pencil could not be + isolated. See Notes section and the references for details. + + See Also + -------- + solve_continuous_are : Solves the continuous algebraic Riccati equation + + Notes + ----- + The equation is solved by forming the extended symplectic matrix pencil, + as described in [1]_, :math:`H - \lambda J` given by the block matrices :: + + [ A 0 B ] [ E 0 B ] + [ -Q E^H -S ] - \lambda * [ 0 A^H 0 ] + [ S^H 0 R ] [ 0 -B^H 0 ] + + and using a QZ decomposition method. + + In this algorithm, the fail conditions are linked to the symmetry + of the product :math:`U_2 U_1^{-1}` and condition number of + :math:`U_1`. Here, :math:`U` is the 2m-by-m matrix that holds the + eigenvectors spanning the stable subspace with 2-m rows and partitioned + into two m-row matrices. See [1]_ and [2]_ for more details. + + In order to improve the QZ decomposition accuracy, the pencil goes + through a balancing step where the sum of absolute values of + :math:`H` and :math:`J` rows/cols (after removing the diagonal entries) + is balanced following the recipe given in [3]_. If the data has small + numerical noise, balancing may amplify their effects and some clean up + is required. + + .. versionadded:: 0.11.0 + + References + ---------- + .. [1] P. van Dooren , "A Generalized Eigenvalue Approach For Solving + Riccati Equations.", SIAM Journal on Scientific and Statistical + Computing, Vol.2(2), :doi:`10.1137/0902010` + + .. [2] A.J. Laub, "A Schur Method for Solving Algebraic Riccati + Equations.", Massachusetts Institute of Technology. Laboratory for + Information and Decision Systems. LIDS-R ; 859. Available online : + http://hdl.handle.net/1721.1/1301 + + .. [3] P. Benner, "Symplectic Balancing of Hamiltonian Matrices", 2001, + SIAM J. Sci. Comput., 2001, Vol.22(5), :doi:`10.1137/S1064827500367993` + + Examples + -------- + Given `a`, `b`, `q`, and `r` solve for `x`: + + >>> import numpy as np + >>> from scipy import linalg as la + >>> a = np.array([[0, 1], [0, -1]]) + >>> b = np.array([[1, 0], [2, 1]]) + >>> q = np.array([[-4, -4], [-4, 7]]) + >>> r = np.array([[9, 3], [3, 1]]) + >>> x = la.solve_discrete_are(a, b, q, r) + >>> x + array([[-4., -4.], + [-4., 7.]]) + >>> R = la.solve(r + b.T.dot(x).dot(b), b.T.dot(x).dot(a)) + >>> np.allclose(a.T.dot(x).dot(a) - x - a.T.dot(x).dot(b).dot(R), -q) + True + + """ + + # Validate input arguments + a, b, q, r, e, s, m, n, r_or_c, gen_are = _are_validate_args( + a, b, q, r, e, s, 'dare') + + # Form the matrix pencil + H = np.zeros((2*m+n, 2*m+n), dtype=r_or_c) + H[:m, :m] = a + H[:m, 2*m:] = b + H[m:2*m, :m] = -q + H[m:2*m, m:2*m] = np.eye(m) if e is None else e.conj().T + H[m:2*m, 2*m:] = 0. if s is None else -s + H[2*m:, :m] = 0. if s is None else s.conj().T + H[2*m:, 2*m:] = r + + J = np.zeros_like(H, dtype=r_or_c) + J[:m, :m] = np.eye(m) if e is None else e + J[m:2*m, m:2*m] = a.conj().T + J[2*m:, m:2*m] = -b.conj().T + + if balanced: + # xGEBAL does not remove the diagonals before scaling. Also + # to avoid destroying the Symplectic structure, we follow Ref.3 + M = np.abs(H) + np.abs(J) + np.fill_diagonal(M, 0.) + _, (sca, _) = matrix_balance(M, separate=1, permute=0) + # do we need to bother? + if not np.allclose(sca, np.ones_like(sca)): + # Now impose diag(D,inv(D)) from Benner where D is + # square root of s_i/s_(n+i) for i=0,.... + sca = np.log2(sca) + # NOTE: Py3 uses "Bankers Rounding: round to the nearest even" !! + s = np.round((sca[m:2*m] - sca[:m])/2) + sca = 2 ** np.r_[s, -s, sca[2*m:]] + # Elementwise multiplication via broadcasting. + elwisescale = sca[:, None] * np.reciprocal(sca) + H *= elwisescale + J *= elwisescale + + # Deflate the pencil by the R column ala Ref.1 + q_of_qr, _ = qr(H[:, -n:]) + H = q_of_qr[:, n:].conj().T.dot(H[:, :2*m]) + J = q_of_qr[:, n:].conj().T.dot(J[:, :2*m]) + + # Decide on which output type is needed for QZ + out_str = 'real' if r_or_c == float else 'complex' + + _, _, _, _, _, u = ordqz(H, J, sort='iuc', + overwrite_a=True, + overwrite_b=True, + check_finite=False, + output=out_str) + + # Get the relevant parts of the stable subspace basis + if e is not None: + u, _ = qr(np.vstack((e.dot(u[:m, :m]), u[m:, :m]))) + u00 = u[:m, :m] + u10 = u[m:, :m] + + # Solve via back-substituion after checking the condition of u00 + up, ul, uu = lu(u00) + + if 1/cond(uu) < np.spacing(1.): + raise LinAlgError('Failed to find a finite solution.') + + # Exploit the triangular structure + x = solve_triangular(ul.conj().T, + solve_triangular(uu.conj().T, + u10.conj().T, + lower=True), + unit_diagonal=True, + ).conj().T.dot(up.conj().T) + if balanced: + x *= sca[:m, None] * sca[:m] + + # Check the deviation from symmetry for lack of success + # See proof of Thm.5 item 3 in [2] + u_sym = u00.conj().T.dot(u10) + n_u_sym = norm(u_sym, 1) + u_sym = u_sym - u_sym.conj().T + sym_threshold = np.max([np.spacing(1000.), 0.1*n_u_sym]) + + if norm(u_sym, 1) > sym_threshold: + raise LinAlgError('The associated symplectic pencil has eigenvalues ' + 'too close to the unit circle') + + return (x + x.conj().T)/2 + + +def _are_validate_args(a, b, q, r, e, s, eq_type='care'): + """ + A helper function to validate the arguments supplied to the + Riccati equation solvers. Any discrepancy found in the input + matrices leads to a ``ValueError`` exception. + + Essentially, it performs: + + - a check whether the input is free of NaN and Infs + - a pass for the data through ``numpy.atleast_2d()`` + - squareness check of the relevant arrays + - shape consistency check of the arrays + - singularity check of the relevant arrays + - symmetricity check of the relevant matrices + - a check whether the regular or the generalized version is asked. + + This function is used by ``solve_continuous_are`` and + ``solve_discrete_are``. + + Parameters + ---------- + a, b, q, r, e, s : array_like + Input data + eq_type : str + Accepted arguments are 'care' and 'dare'. + + Returns + ------- + a, b, q, r, e, s : ndarray + Regularized input data + m, n : int + shape of the problem + r_or_c : type + Data type of the problem, returns float or complex + gen_or_not : bool + Type of the equation, True for generalized and False for regular ARE. + + """ + + if eq_type.lower() not in ("dare", "care"): + raise ValueError("Equation type unknown. " + "Only 'care' and 'dare' is understood") + + a = np.atleast_2d(_asarray_validated(a, check_finite=True)) + b = np.atleast_2d(_asarray_validated(b, check_finite=True)) + q = np.atleast_2d(_asarray_validated(q, check_finite=True)) + r = np.atleast_2d(_asarray_validated(r, check_finite=True)) + + # Get the correct data types otherwise NumPy complains + # about pushing complex numbers into real arrays. + r_or_c = complex if np.iscomplexobj(b) else float + + for ind, mat in enumerate((a, q, r)): + if np.iscomplexobj(mat): + r_or_c = complex + + if not np.equal(*mat.shape): + raise ValueError("Matrix {} should be square.".format("aqr"[ind])) + + # Shape consistency checks + m, n = b.shape + if m != a.shape[0]: + raise ValueError("Matrix a and b should have the same number of rows.") + if m != q.shape[0]: + raise ValueError("Matrix a and q should have the same shape.") + if n != r.shape[0]: + raise ValueError("Matrix b and r should have the same number of cols.") + + # Check if the data matrices q, r are (sufficiently) hermitian + for ind, mat in enumerate((q, r)): + if norm(mat - mat.conj().T, 1) > np.spacing(norm(mat, 1))*100: + raise ValueError("Matrix {} should be symmetric/hermitian." + "".format("qr"[ind])) + + # Continuous time ARE should have a nonsingular r matrix. + if eq_type == 'care': + min_sv = svd(r, compute_uv=False)[-1] + if min_sv == 0. or min_sv < np.spacing(1.)*norm(r, 1): + raise ValueError('Matrix r is numerically singular.') + + # Check if the generalized case is required with omitted arguments + # perform late shape checking etc. + generalized_case = e is not None or s is not None + + if generalized_case: + if e is not None: + e = np.atleast_2d(_asarray_validated(e, check_finite=True)) + if not np.equal(*e.shape): + raise ValueError("Matrix e should be square.") + if m != e.shape[0]: + raise ValueError("Matrix a and e should have the same shape.") + # numpy.linalg.cond doesn't check for exact zeros and + # emits a runtime warning. Hence the following manual check. + min_sv = svd(e, compute_uv=False)[-1] + if min_sv == 0. or min_sv < np.spacing(1.) * norm(e, 1): + raise ValueError('Matrix e is numerically singular.') + if np.iscomplexobj(e): + r_or_c = complex + if s is not None: + s = np.atleast_2d(_asarray_validated(s, check_finite=True)) + if s.shape != b.shape: + raise ValueError("Matrix b and s should have the same shape.") + if np.iscomplexobj(s): + r_or_c = complex + + return a, b, q, r, e, s, m, n, r_or_c, generalized_case diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_special_matrices.py b/venv/lib/python3.10/site-packages/scipy/linalg/_special_matrices.py new file mode 100644 index 0000000000000000000000000000000000000000..df9b767481d16f880c69516b62ff2388594e57e7 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_special_matrices.py @@ -0,0 +1,1257 @@ +import math + +import numpy as np +from numpy.lib.stride_tricks import as_strided + +__all__ = ['toeplitz', 'circulant', 'hankel', + 'hadamard', 'leslie', 'kron', 'block_diag', 'companion', + 'helmert', 'hilbert', 'invhilbert', 'pascal', 'invpascal', 'dft', + 'fiedler', 'fiedler_companion', 'convolution_matrix'] + + +# ----------------------------------------------------------------------------- +# matrix construction functions +# ----------------------------------------------------------------------------- + + +def toeplitz(c, r=None): + """ + Construct a Toeplitz matrix. + + The Toeplitz matrix has constant diagonals, with c as its first column + and r as its first row. If r is not given, ``r == conjugate(c)`` is + assumed. + + Parameters + ---------- + c : array_like + First column of the matrix. Whatever the actual shape of `c`, it + will be converted to a 1-D array. + r : array_like, optional + First row of the matrix. If None, ``r = conjugate(c)`` is assumed; + in this case, if c[0] is real, the result is a Hermitian matrix. + r[0] is ignored; the first row of the returned matrix is + ``[c[0], r[1:]]``. Whatever the actual shape of `r`, it will be + converted to a 1-D array. + + Returns + ------- + A : (len(c), len(r)) ndarray + The Toeplitz matrix. Dtype is the same as ``(c[0] + r[0]).dtype``. + + See Also + -------- + circulant : circulant matrix + hankel : Hankel matrix + solve_toeplitz : Solve a Toeplitz system. + + Notes + ----- + The behavior when `c` or `r` is a scalar, or when `c` is complex and + `r` is None, was changed in version 0.8.0. The behavior in previous + versions was undocumented and is no longer supported. + + Examples + -------- + >>> from scipy.linalg import toeplitz + >>> toeplitz([1,2,3], [1,4,5,6]) + array([[1, 4, 5, 6], + [2, 1, 4, 5], + [3, 2, 1, 4]]) + >>> toeplitz([1.0, 2+3j, 4-1j]) + array([[ 1.+0.j, 2.-3.j, 4.+1.j], + [ 2.+3.j, 1.+0.j, 2.-3.j], + [ 4.-1.j, 2.+3.j, 1.+0.j]]) + + """ + c = np.asarray(c).ravel() + if r is None: + r = c.conjugate() + else: + r = np.asarray(r).ravel() + # Form a 1-D array containing a reversed c followed by r[1:] that could be + # strided to give us toeplitz matrix. + vals = np.concatenate((c[::-1], r[1:])) + out_shp = len(c), len(r) + n = vals.strides[0] + return as_strided(vals[len(c)-1:], shape=out_shp, strides=(-n, n)).copy() + + +def circulant(c): + """ + Construct a circulant matrix. + + Parameters + ---------- + c : (N,) array_like + 1-D array, the first column of the matrix. + + Returns + ------- + A : (N, N) ndarray + A circulant matrix whose first column is `c`. + + See Also + -------- + toeplitz : Toeplitz matrix + hankel : Hankel matrix + solve_circulant : Solve a circulant system. + + Notes + ----- + .. versionadded:: 0.8.0 + + Examples + -------- + >>> from scipy.linalg import circulant + >>> circulant([1, 2, 3]) + array([[1, 3, 2], + [2, 1, 3], + [3, 2, 1]]) + + """ + c = np.asarray(c).ravel() + # Form an extended array that could be strided to give circulant version + c_ext = np.concatenate((c[::-1], c[:0:-1])) + L = len(c) + n = c_ext.strides[0] + return as_strided(c_ext[L-1:], shape=(L, L), strides=(-n, n)).copy() + + +def hankel(c, r=None): + """ + Construct a Hankel matrix. + + The Hankel matrix has constant anti-diagonals, with `c` as its + first column and `r` as its last row. If `r` is not given, then + `r = zeros_like(c)` is assumed. + + Parameters + ---------- + c : array_like + First column of the matrix. Whatever the actual shape of `c`, it + will be converted to a 1-D array. + r : array_like, optional + Last row of the matrix. If None, ``r = zeros_like(c)`` is assumed. + r[0] is ignored; the last row of the returned matrix is + ``[c[-1], r[1:]]``. Whatever the actual shape of `r`, it will be + converted to a 1-D array. + + Returns + ------- + A : (len(c), len(r)) ndarray + The Hankel matrix. Dtype is the same as ``(c[0] + r[0]).dtype``. + + See Also + -------- + toeplitz : Toeplitz matrix + circulant : circulant matrix + + Examples + -------- + >>> from scipy.linalg import hankel + >>> hankel([1, 17, 99]) + array([[ 1, 17, 99], + [17, 99, 0], + [99, 0, 0]]) + >>> hankel([1,2,3,4], [4,7,7,8,9]) + array([[1, 2, 3, 4, 7], + [2, 3, 4, 7, 7], + [3, 4, 7, 7, 8], + [4, 7, 7, 8, 9]]) + + """ + c = np.asarray(c).ravel() + if r is None: + r = np.zeros_like(c) + else: + r = np.asarray(r).ravel() + # Form a 1-D array of values to be used in the matrix, containing `c` + # followed by r[1:]. + vals = np.concatenate((c, r[1:])) + # Stride on concatenated array to get hankel matrix + out_shp = len(c), len(r) + n = vals.strides[0] + return as_strided(vals, shape=out_shp, strides=(n, n)).copy() + + +def hadamard(n, dtype=int): + """ + Construct an Hadamard matrix. + + Constructs an n-by-n Hadamard matrix, using Sylvester's + construction. `n` must be a power of 2. + + Parameters + ---------- + n : int + The order of the matrix. `n` must be a power of 2. + dtype : dtype, optional + The data type of the array to be constructed. + + Returns + ------- + H : (n, n) ndarray + The Hadamard matrix. + + Notes + ----- + .. versionadded:: 0.8.0 + + Examples + -------- + >>> from scipy.linalg import hadamard + >>> hadamard(2, dtype=complex) + array([[ 1.+0.j, 1.+0.j], + [ 1.+0.j, -1.-0.j]]) + >>> hadamard(4) + array([[ 1, 1, 1, 1], + [ 1, -1, 1, -1], + [ 1, 1, -1, -1], + [ 1, -1, -1, 1]]) + + """ + + # This function is a slightly modified version of the + # function contributed by Ivo in ticket #675. + + if n < 1: + lg2 = 0 + else: + lg2 = int(math.log(n, 2)) + if 2 ** lg2 != n: + raise ValueError("n must be an positive integer, and n must be " + "a power of 2") + + H = np.array([[1]], dtype=dtype) + + # Sylvester's construction + for i in range(0, lg2): + H = np.vstack((np.hstack((H, H)), np.hstack((H, -H)))) + + return H + + +def leslie(f, s): + """ + Create a Leslie matrix. + + Given the length n array of fecundity coefficients `f` and the length + n-1 array of survival coefficients `s`, return the associated Leslie + matrix. + + Parameters + ---------- + f : (N,) array_like + The "fecundity" coefficients. + s : (N-1,) array_like + The "survival" coefficients, has to be 1-D. The length of `s` + must be one less than the length of `f`, and it must be at least 1. + + Returns + ------- + L : (N, N) ndarray + The array is zero except for the first row, + which is `f`, and the first sub-diagonal, which is `s`. + The data-type of the array will be the data-type of ``f[0]+s[0]``. + + Notes + ----- + .. versionadded:: 0.8.0 + + The Leslie matrix is used to model discrete-time, age-structured + population growth [1]_ [2]_. In a population with `n` age classes, two sets + of parameters define a Leslie matrix: the `n` "fecundity coefficients", + which give the number of offspring per-capita produced by each age + class, and the `n` - 1 "survival coefficients", which give the + per-capita survival rate of each age class. + + References + ---------- + .. [1] P. H. Leslie, On the use of matrices in certain population + mathematics, Biometrika, Vol. 33, No. 3, 183--212 (Nov. 1945) + .. [2] P. H. Leslie, Some further notes on the use of matrices in + population mathematics, Biometrika, Vol. 35, No. 3/4, 213--245 + (Dec. 1948) + + Examples + -------- + >>> from scipy.linalg import leslie + >>> leslie([0.1, 2.0, 1.0, 0.1], [0.2, 0.8, 0.7]) + array([[ 0.1, 2. , 1. , 0.1], + [ 0.2, 0. , 0. , 0. ], + [ 0. , 0.8, 0. , 0. ], + [ 0. , 0. , 0.7, 0. ]]) + + """ + f = np.atleast_1d(f) + s = np.atleast_1d(s) + if f.ndim != 1: + raise ValueError("Incorrect shape for f. f must be 1D") + if s.ndim != 1: + raise ValueError("Incorrect shape for s. s must be 1D") + if f.size != s.size + 1: + raise ValueError("Incorrect lengths for f and s. The length" + " of s must be one less than the length of f.") + if s.size == 0: + raise ValueError("The length of s must be at least 1.") + + tmp = f[0] + s[0] + n = f.size + a = np.zeros((n, n), dtype=tmp.dtype) + a[0] = f + a[list(range(1, n)), list(range(0, n - 1))] = s + return a + + +def kron(a, b): + """ + Kronecker product. + + The result is the block matrix:: + + a[0,0]*b a[0,1]*b ... a[0,-1]*b + a[1,0]*b a[1,1]*b ... a[1,-1]*b + ... + a[-1,0]*b a[-1,1]*b ... a[-1,-1]*b + + Parameters + ---------- + a : (M, N) ndarray + Input array + b : (P, Q) ndarray + Input array + + Returns + ------- + A : (M*P, N*Q) ndarray + Kronecker product of `a` and `b`. + + Examples + -------- + >>> from numpy import array + >>> from scipy.linalg import kron + >>> kron(array([[1,2],[3,4]]), array([[1,1,1]])) + array([[1, 1, 1, 2, 2, 2], + [3, 3, 3, 4, 4, 4]]) + + """ + if not a.flags['CONTIGUOUS']: + a = np.reshape(a, a.shape) + if not b.flags['CONTIGUOUS']: + b = np.reshape(b, b.shape) + o = np.outer(a, b) + o = o.reshape(a.shape + b.shape) + return np.concatenate(np.concatenate(o, axis=1), axis=1) + + +def block_diag(*arrs): + """ + Create a block diagonal matrix from provided arrays. + + Given the inputs `A`, `B` and `C`, the output will have these + arrays arranged on the diagonal:: + + [[A, 0, 0], + [0, B, 0], + [0, 0, C]] + + Parameters + ---------- + A, B, C, ... : array_like, up to 2-D + Input arrays. A 1-D array or array_like sequence of length `n` is + treated as a 2-D array with shape ``(1,n)``. + + Returns + ------- + D : ndarray + Array with `A`, `B`, `C`, ... on the diagonal. `D` has the + same dtype as `A`. + + Notes + ----- + If all the input arrays are square, the output is known as a + block diagonal matrix. + + Empty sequences (i.e., array-likes of zero size) will not be ignored. + Noteworthy, both [] and [[]] are treated as matrices with shape ``(1,0)``. + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import block_diag + >>> A = [[1, 0], + ... [0, 1]] + >>> B = [[3, 4, 5], + ... [6, 7, 8]] + >>> C = [[7]] + >>> P = np.zeros((2, 0), dtype='int32') + >>> block_diag(A, B, C) + array([[1, 0, 0, 0, 0, 0], + [0, 1, 0, 0, 0, 0], + [0, 0, 3, 4, 5, 0], + [0, 0, 6, 7, 8, 0], + [0, 0, 0, 0, 0, 7]]) + >>> block_diag(A, P, B, C) + array([[1, 0, 0, 0, 0, 0], + [0, 1, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0], + [0, 0, 3, 4, 5, 0], + [0, 0, 6, 7, 8, 0], + [0, 0, 0, 0, 0, 7]]) + >>> block_diag(1.0, [2, 3], [[4, 5], [6, 7]]) + array([[ 1., 0., 0., 0., 0.], + [ 0., 2., 3., 0., 0.], + [ 0., 0., 0., 4., 5.], + [ 0., 0., 0., 6., 7.]]) + + """ + if arrs == (): + arrs = ([],) + arrs = [np.atleast_2d(a) for a in arrs] + + bad_args = [k for k in range(len(arrs)) if arrs[k].ndim > 2] + if bad_args: + raise ValueError("arguments in the following positions have dimension " + "greater than 2: %s" % bad_args) + + shapes = np.array([a.shape for a in arrs]) + out_dtype = np.result_type(*[arr.dtype for arr in arrs]) + out = np.zeros(np.sum(shapes, axis=0), dtype=out_dtype) + + r, c = 0, 0 + for i, (rr, cc) in enumerate(shapes): + out[r:r + rr, c:c + cc] = arrs[i] + r += rr + c += cc + return out + + +def companion(a): + """ + Create a companion matrix. + + Create the companion matrix [1]_ associated with the polynomial whose + coefficients are given in `a`. + + Parameters + ---------- + a : (N,) array_like + 1-D array of polynomial coefficients. The length of `a` must be + at least two, and ``a[0]`` must not be zero. + + Returns + ------- + c : (N-1, N-1) ndarray + The first row of `c` is ``-a[1:]/a[0]``, and the first + sub-diagonal is all ones. The data-type of the array is the same + as the data-type of ``1.0*a[0]``. + + Raises + ------ + ValueError + If any of the following are true: a) ``a.ndim != 1``; + b) ``a.size < 2``; c) ``a[0] == 0``. + + Notes + ----- + .. versionadded:: 0.8.0 + + References + ---------- + .. [1] R. A. Horn & C. R. Johnson, *Matrix Analysis*. Cambridge, UK: + Cambridge University Press, 1999, pp. 146-7. + + Examples + -------- + >>> from scipy.linalg import companion + >>> companion([1, -10, 31, -30]) + array([[ 10., -31., 30.], + [ 1., 0., 0.], + [ 0., 1., 0.]]) + + """ + a = np.atleast_1d(a) + + if a.ndim != 1: + raise ValueError("Incorrect shape for `a`. `a` must be " + "one-dimensional.") + + if a.size < 2: + raise ValueError("The length of `a` must be at least 2.") + + if a[0] == 0: + raise ValueError("The first coefficient in `a` must not be zero.") + + first_row = -a[1:] / (1.0 * a[0]) + n = a.size + c = np.zeros((n - 1, n - 1), dtype=first_row.dtype) + c[0] = first_row + c[list(range(1, n - 1)), list(range(0, n - 2))] = 1 + return c + + +def helmert(n, full=False): + """ + Create an Helmert matrix of order `n`. + + This has applications in statistics, compositional or simplicial analysis, + and in Aitchison geometry. + + Parameters + ---------- + n : int + The size of the array to create. + full : bool, optional + If True the (n, n) ndarray will be returned. + Otherwise the submatrix that does not include the first + row will be returned. + Default: False. + + Returns + ------- + M : ndarray + The Helmert matrix. + The shape is (n, n) or (n-1, n) depending on the `full` argument. + + Examples + -------- + >>> from scipy.linalg import helmert + >>> helmert(5, full=True) + array([[ 0.4472136 , 0.4472136 , 0.4472136 , 0.4472136 , 0.4472136 ], + [ 0.70710678, -0.70710678, 0. , 0. , 0. ], + [ 0.40824829, 0.40824829, -0.81649658, 0. , 0. ], + [ 0.28867513, 0.28867513, 0.28867513, -0.8660254 , 0. ], + [ 0.2236068 , 0.2236068 , 0.2236068 , 0.2236068 , -0.89442719]]) + + """ + H = np.tril(np.ones((n, n)), -1) - np.diag(np.arange(n)) + d = np.arange(n) * np.arange(1, n+1) + H[0] = 1 + d[0] = n + H_full = H / np.sqrt(d)[:, np.newaxis] + if full: + return H_full + else: + return H_full[1:] + + +def hilbert(n): + """ + Create a Hilbert matrix of order `n`. + + Returns the `n` by `n` array with entries `h[i,j] = 1 / (i + j + 1)`. + + Parameters + ---------- + n : int + The size of the array to create. + + Returns + ------- + h : (n, n) ndarray + The Hilbert matrix. + + See Also + -------- + invhilbert : Compute the inverse of a Hilbert matrix. + + Notes + ----- + .. versionadded:: 0.10.0 + + Examples + -------- + >>> from scipy.linalg import hilbert + >>> hilbert(3) + array([[ 1. , 0.5 , 0.33333333], + [ 0.5 , 0.33333333, 0.25 ], + [ 0.33333333, 0.25 , 0.2 ]]) + + """ + values = 1.0 / (1.0 + np.arange(2 * n - 1)) + h = hankel(values[:n], r=values[n - 1:]) + return h + + +def invhilbert(n, exact=False): + """ + Compute the inverse of the Hilbert matrix of order `n`. + + The entries in the inverse of a Hilbert matrix are integers. When `n` + is greater than 14, some entries in the inverse exceed the upper limit + of 64 bit integers. The `exact` argument provides two options for + dealing with these large integers. + + Parameters + ---------- + n : int + The order of the Hilbert matrix. + exact : bool, optional + If False, the data type of the array that is returned is np.float64, + and the array is an approximation of the inverse. + If True, the array is the exact integer inverse array. To represent + the exact inverse when n > 14, the returned array is an object array + of long integers. For n <= 14, the exact inverse is returned as an + array with data type np.int64. + + Returns + ------- + invh : (n, n) ndarray + The data type of the array is np.float64 if `exact` is False. + If `exact` is True, the data type is either np.int64 (for n <= 14) + or object (for n > 14). In the latter case, the objects in the + array will be long integers. + + See Also + -------- + hilbert : Create a Hilbert matrix. + + Notes + ----- + .. versionadded:: 0.10.0 + + Examples + -------- + >>> from scipy.linalg import invhilbert + >>> invhilbert(4) + array([[ 16., -120., 240., -140.], + [ -120., 1200., -2700., 1680.], + [ 240., -2700., 6480., -4200.], + [ -140., 1680., -4200., 2800.]]) + >>> invhilbert(4, exact=True) + array([[ 16, -120, 240, -140], + [ -120, 1200, -2700, 1680], + [ 240, -2700, 6480, -4200], + [ -140, 1680, -4200, 2800]], dtype=int64) + >>> invhilbert(16)[7,7] + 4.2475099528537506e+19 + >>> invhilbert(16, exact=True)[7,7] + 42475099528537378560 + + """ + from scipy.special import comb + if exact: + if n > 14: + dtype = object + else: + dtype = np.int64 + else: + dtype = np.float64 + invh = np.empty((n, n), dtype=dtype) + for i in range(n): + for j in range(0, i + 1): + s = i + j + invh[i, j] = ((-1) ** s * (s + 1) * + comb(n + i, n - j - 1, exact=exact) * + comb(n + j, n - i - 1, exact=exact) * + comb(s, i, exact=exact) ** 2) + if i != j: + invh[j, i] = invh[i, j] + return invh + + +def pascal(n, kind='symmetric', exact=True): + """ + Returns the n x n Pascal matrix. + + The Pascal matrix is a matrix containing the binomial coefficients as + its elements. + + Parameters + ---------- + n : int + The size of the matrix to create; that is, the result is an n x n + matrix. + kind : str, optional + Must be one of 'symmetric', 'lower', or 'upper'. + Default is 'symmetric'. + exact : bool, optional + If `exact` is True, the result is either an array of type + numpy.uint64 (if n < 35) or an object array of Python long integers. + If `exact` is False, the coefficients in the matrix are computed using + `scipy.special.comb` with `exact=False`. The result will be a floating + point array, and the values in the array will not be the exact + coefficients, but this version is much faster than `exact=True`. + + Returns + ------- + p : (n, n) ndarray + The Pascal matrix. + + See Also + -------- + invpascal + + Notes + ----- + See https://en.wikipedia.org/wiki/Pascal_matrix for more information + about Pascal matrices. + + .. versionadded:: 0.11.0 + + Examples + -------- + >>> from scipy.linalg import pascal + >>> pascal(4) + array([[ 1, 1, 1, 1], + [ 1, 2, 3, 4], + [ 1, 3, 6, 10], + [ 1, 4, 10, 20]], dtype=uint64) + >>> pascal(4, kind='lower') + array([[1, 0, 0, 0], + [1, 1, 0, 0], + [1, 2, 1, 0], + [1, 3, 3, 1]], dtype=uint64) + >>> pascal(50)[-1, -1] + 25477612258980856902730428600 + >>> from scipy.special import comb + >>> comb(98, 49, exact=True) + 25477612258980856902730428600 + + """ + + from scipy.special import comb + if kind not in ['symmetric', 'lower', 'upper']: + raise ValueError("kind must be 'symmetric', 'lower', or 'upper'") + + if exact: + if n >= 35: + L_n = np.empty((n, n), dtype=object) + L_n.fill(0) + else: + L_n = np.zeros((n, n), dtype=np.uint64) + for i in range(n): + for j in range(i + 1): + L_n[i, j] = comb(i, j, exact=True) + else: + L_n = comb(*np.ogrid[:n, :n]) + + if kind == 'lower': + p = L_n + elif kind == 'upper': + p = L_n.T + else: + p = np.dot(L_n, L_n.T) + + return p + + +def invpascal(n, kind='symmetric', exact=True): + """ + Returns the inverse of the n x n Pascal matrix. + + The Pascal matrix is a matrix containing the binomial coefficients as + its elements. + + Parameters + ---------- + n : int + The size of the matrix to create; that is, the result is an n x n + matrix. + kind : str, optional + Must be one of 'symmetric', 'lower', or 'upper'. + Default is 'symmetric'. + exact : bool, optional + If `exact` is True, the result is either an array of type + ``numpy.int64`` (if `n` <= 35) or an object array of Python integers. + If `exact` is False, the coefficients in the matrix are computed using + `scipy.special.comb` with `exact=False`. The result will be a floating + point array, and for large `n`, the values in the array will not be the + exact coefficients. + + Returns + ------- + invp : (n, n) ndarray + The inverse of the Pascal matrix. + + See Also + -------- + pascal + + Notes + ----- + + .. versionadded:: 0.16.0 + + References + ---------- + .. [1] "Pascal matrix", https://en.wikipedia.org/wiki/Pascal_matrix + .. [2] Cohen, A. M., "The inverse of a Pascal matrix", Mathematical + Gazette, 59(408), pp. 111-112, 1975. + + Examples + -------- + >>> from scipy.linalg import invpascal, pascal + >>> invp = invpascal(5) + >>> invp + array([[ 5, -10, 10, -5, 1], + [-10, 30, -35, 19, -4], + [ 10, -35, 46, -27, 6], + [ -5, 19, -27, 17, -4], + [ 1, -4, 6, -4, 1]]) + + >>> p = pascal(5) + >>> p.dot(invp) + array([[ 1., 0., 0., 0., 0.], + [ 0., 1., 0., 0., 0.], + [ 0., 0., 1., 0., 0.], + [ 0., 0., 0., 1., 0.], + [ 0., 0., 0., 0., 1.]]) + + An example of the use of `kind` and `exact`: + + >>> invpascal(5, kind='lower', exact=False) + array([[ 1., -0., 0., -0., 0.], + [-1., 1., -0., 0., -0.], + [ 1., -2., 1., -0., 0.], + [-1., 3., -3., 1., -0.], + [ 1., -4., 6., -4., 1.]]) + + """ + from scipy.special import comb + + if kind not in ['symmetric', 'lower', 'upper']: + raise ValueError("'kind' must be 'symmetric', 'lower' or 'upper'.") + + if kind == 'symmetric': + if exact: + if n > 34: + dt = object + else: + dt = np.int64 + else: + dt = np.float64 + invp = np.empty((n, n), dtype=dt) + for i in range(n): + for j in range(0, i + 1): + v = 0 + for k in range(n - i): + v += comb(i + k, k, exact=exact) * comb(i + k, i + k - j, + exact=exact) + invp[i, j] = (-1)**(i - j) * v + if i != j: + invp[j, i] = invp[i, j] + else: + # For the 'lower' and 'upper' cases, we computer the inverse by + # changing the sign of every other diagonal of the pascal matrix. + invp = pascal(n, kind=kind, exact=exact) + if invp.dtype == np.uint64: + # This cast from np.uint64 to int64 OK, because if `kind` is not + # "symmetric", the values in invp are all much less than 2**63. + invp = invp.view(np.int64) + + # The toeplitz matrix has alternating bands of 1 and -1. + invp *= toeplitz((-1)**np.arange(n)).astype(invp.dtype) + + return invp + + +def dft(n, scale=None): + """ + Discrete Fourier transform matrix. + + Create the matrix that computes the discrete Fourier transform of a + sequence [1]_. The nth primitive root of unity used to generate the + matrix is exp(-2*pi*i/n), where i = sqrt(-1). + + Parameters + ---------- + n : int + Size the matrix to create. + scale : str, optional + Must be None, 'sqrtn', or 'n'. + If `scale` is 'sqrtn', the matrix is divided by `sqrt(n)`. + If `scale` is 'n', the matrix is divided by `n`. + If `scale` is None (the default), the matrix is not normalized, and the + return value is simply the Vandermonde matrix of the roots of unity. + + Returns + ------- + m : (n, n) ndarray + The DFT matrix. + + Notes + ----- + When `scale` is None, multiplying a vector by the matrix returned by + `dft` is mathematically equivalent to (but much less efficient than) + the calculation performed by `scipy.fft.fft`. + + .. versionadded:: 0.14.0 + + References + ---------- + .. [1] "DFT matrix", https://en.wikipedia.org/wiki/DFT_matrix + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import dft + >>> np.set_printoptions(precision=2, suppress=True) # for compact output + >>> m = dft(5) + >>> m + array([[ 1. +0.j , 1. +0.j , 1. +0.j , 1. +0.j , 1. +0.j ], + [ 1. +0.j , 0.31-0.95j, -0.81-0.59j, -0.81+0.59j, 0.31+0.95j], + [ 1. +0.j , -0.81-0.59j, 0.31+0.95j, 0.31-0.95j, -0.81+0.59j], + [ 1. +0.j , -0.81+0.59j, 0.31-0.95j, 0.31+0.95j, -0.81-0.59j], + [ 1. +0.j , 0.31+0.95j, -0.81+0.59j, -0.81-0.59j, 0.31-0.95j]]) + >>> x = np.array([1, 2, 3, 0, 3]) + >>> m @ x # Compute the DFT of x + array([ 9. +0.j , 0.12-0.81j, -2.12+3.44j, -2.12-3.44j, 0.12+0.81j]) + + Verify that ``m @ x`` is the same as ``fft(x)``. + + >>> from scipy.fft import fft + >>> fft(x) # Same result as m @ x + array([ 9. +0.j , 0.12-0.81j, -2.12+3.44j, -2.12-3.44j, 0.12+0.81j]) + """ + if scale not in [None, 'sqrtn', 'n']: + raise ValueError("scale must be None, 'sqrtn', or 'n'; " + f"{scale!r} is not valid.") + + omegas = np.exp(-2j * np.pi * np.arange(n) / n).reshape(-1, 1) + m = omegas ** np.arange(n) + if scale == 'sqrtn': + m /= math.sqrt(n) + elif scale == 'n': + m /= n + return m + + +def fiedler(a): + """Returns a symmetric Fiedler matrix + + Given an sequence of numbers `a`, Fiedler matrices have the structure + ``F[i, j] = np.abs(a[i] - a[j])``, and hence zero diagonals and nonnegative + entries. A Fiedler matrix has a dominant positive eigenvalue and other + eigenvalues are negative. Although not valid generally, for certain inputs, + the inverse and the determinant can be derived explicitly as given in [1]_. + + Parameters + ---------- + a : (n,) array_like + coefficient array + + Returns + ------- + F : (n, n) ndarray + + See Also + -------- + circulant, toeplitz + + Notes + ----- + + .. versionadded:: 1.3.0 + + References + ---------- + .. [1] J. Todd, "Basic Numerical Mathematics: Vol.2 : Numerical Algebra", + 1977, Birkhauser, :doi:`10.1007/978-3-0348-7286-7` + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import det, inv, fiedler + >>> a = [1, 4, 12, 45, 77] + >>> n = len(a) + >>> A = fiedler(a) + >>> A + array([[ 0, 3, 11, 44, 76], + [ 3, 0, 8, 41, 73], + [11, 8, 0, 33, 65], + [44, 41, 33, 0, 32], + [76, 73, 65, 32, 0]]) + + The explicit formulas for determinant and inverse seem to hold only for + monotonically increasing/decreasing arrays. Note the tridiagonal structure + and the corners. + + >>> Ai = inv(A) + >>> Ai[np.abs(Ai) < 1e-12] = 0. # cleanup the numerical noise for display + >>> Ai + array([[-0.16008772, 0.16666667, 0. , 0. , 0.00657895], + [ 0.16666667, -0.22916667, 0.0625 , 0. , 0. ], + [ 0. , 0.0625 , -0.07765152, 0.01515152, 0. ], + [ 0. , 0. , 0.01515152, -0.03077652, 0.015625 ], + [ 0.00657895, 0. , 0. , 0.015625 , -0.00904605]]) + >>> det(A) + 15409151.999999998 + >>> (-1)**(n-1) * 2**(n-2) * np.diff(a).prod() * (a[-1] - a[0]) + 15409152 + + """ + a = np.atleast_1d(a) + + if a.ndim != 1: + raise ValueError("Input 'a' must be a 1D array.") + + if a.size == 0: + return np.array([], dtype=float) + elif a.size == 1: + return np.array([[0.]]) + else: + return np.abs(a[:, None] - a) + + +def fiedler_companion(a): + """ Returns a Fiedler companion matrix + + Given a polynomial coefficient array ``a``, this function forms a + pentadiagonal matrix with a special structure whose eigenvalues coincides + with the roots of ``a``. + + Parameters + ---------- + a : (N,) array_like + 1-D array of polynomial coefficients in descending order with a nonzero + leading coefficient. For ``N < 2``, an empty array is returned. + + Returns + ------- + c : (N-1, N-1) ndarray + Resulting companion matrix + + See Also + -------- + companion + + Notes + ----- + Similar to `companion` the leading coefficient should be nonzero. In the case + the leading coefficient is not 1, other coefficients are rescaled before + the array generation. To avoid numerical issues, it is best to provide a + monic polynomial. + + .. versionadded:: 1.3.0 + + References + ---------- + .. [1] M. Fiedler, " A note on companion matrices", Linear Algebra and its + Applications, 2003, :doi:`10.1016/S0024-3795(03)00548-2` + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import fiedler_companion, eigvals + >>> p = np.poly(np.arange(1, 9, 2)) # [1., -16., 86., -176., 105.] + >>> fc = fiedler_companion(p) + >>> fc + array([[ 16., -86., 1., 0.], + [ 1., 0., 0., 0.], + [ 0., 176., 0., -105.], + [ 0., 1., 0., 0.]]) + >>> eigvals(fc) + array([7.+0.j, 5.+0.j, 3.+0.j, 1.+0.j]) + + """ + a = np.atleast_1d(a) + + if a.ndim != 1: + raise ValueError("Input 'a' must be a 1-D array.") + + if a.size <= 2: + if a.size == 2: + return np.array([[-(a/a[0])[-1]]]) + return np.array([], dtype=a.dtype) + + if a[0] == 0.: + raise ValueError('Leading coefficient is zero.') + + a = a/a[0] + n = a.size - 1 + c = np.zeros((n, n), dtype=a.dtype) + # subdiagonals + c[range(3, n, 2), range(1, n-2, 2)] = 1. + c[range(2, n, 2), range(1, n-1, 2)] = -a[3::2] + # superdiagonals + c[range(0, n-2, 2), range(2, n, 2)] = 1. + c[range(0, n-1, 2), range(1, n, 2)] = -a[2::2] + c[[0, 1], 0] = [-a[1], 1] + + return c + + +def convolution_matrix(a, n, mode='full'): + """ + Construct a convolution matrix. + + Constructs the Toeplitz matrix representing one-dimensional + convolution [1]_. See the notes below for details. + + Parameters + ---------- + a : (m,) array_like + The 1-D array to convolve. + n : int + The number of columns in the resulting matrix. It gives the length + of the input to be convolved with `a`. This is analogous to the + length of `v` in ``numpy.convolve(a, v)``. + mode : str + This is analogous to `mode` in ``numpy.convolve(v, a, mode)``. + It must be one of ('full', 'valid', 'same'). + See below for how `mode` determines the shape of the result. + + Returns + ------- + A : (k, n) ndarray + The convolution matrix whose row count `k` depends on `mode`:: + + ======= ========================= + mode k + ======= ========================= + 'full' m + n -1 + 'same' max(m, n) + 'valid' max(m, n) - min(m, n) + 1 + ======= ========================= + + See Also + -------- + toeplitz : Toeplitz matrix + + Notes + ----- + The code:: + + A = convolution_matrix(a, n, mode) + + creates a Toeplitz matrix `A` such that ``A @ v`` is equivalent to + using ``convolve(a, v, mode)``. The returned array always has `n` + columns. The number of rows depends on the specified `mode`, as + explained above. + + In the default 'full' mode, the entries of `A` are given by:: + + A[i, j] == (a[i-j] if (0 <= (i-j) < m) else 0) + + where ``m = len(a)``. Suppose, for example, the input array is + ``[x, y, z]``. The convolution matrix has the form:: + + [x, 0, 0, ..., 0, 0] + [y, x, 0, ..., 0, 0] + [z, y, x, ..., 0, 0] + ... + [0, 0, 0, ..., x, 0] + [0, 0, 0, ..., y, x] + [0, 0, 0, ..., z, y] + [0, 0, 0, ..., 0, z] + + In 'valid' mode, the entries of `A` are given by:: + + A[i, j] == (a[i-j+m-1] if (0 <= (i-j+m-1) < m) else 0) + + This corresponds to a matrix whose rows are the subset of those from + the 'full' case where all the coefficients in `a` are contained in the + row. For input ``[x, y, z]``, this array looks like:: + + [z, y, x, 0, 0, ..., 0, 0, 0] + [0, z, y, x, 0, ..., 0, 0, 0] + [0, 0, z, y, x, ..., 0, 0, 0] + ... + [0, 0, 0, 0, 0, ..., x, 0, 0] + [0, 0, 0, 0, 0, ..., y, x, 0] + [0, 0, 0, 0, 0, ..., z, y, x] + + In the 'same' mode, the entries of `A` are given by:: + + d = (m - 1) // 2 + A[i, j] == (a[i-j+d] if (0 <= (i-j+d) < m) else 0) + + The typical application of the 'same' mode is when one has a signal of + length `n` (with `n` greater than ``len(a)``), and the desired output + is a filtered signal that is still of length `n`. + + For input ``[x, y, z]``, this array looks like:: + + [y, x, 0, 0, ..., 0, 0, 0] + [z, y, x, 0, ..., 0, 0, 0] + [0, z, y, x, ..., 0, 0, 0] + [0, 0, z, y, ..., 0, 0, 0] + ... + [0, 0, 0, 0, ..., y, x, 0] + [0, 0, 0, 0, ..., z, y, x] + [0, 0, 0, 0, ..., 0, z, y] + + .. versionadded:: 1.5.0 + + References + ---------- + .. [1] "Convolution", https://en.wikipedia.org/wiki/Convolution + + Examples + -------- + >>> import numpy as np + >>> from scipy.linalg import convolution_matrix + >>> A = convolution_matrix([-1, 4, -2], 5, mode='same') + >>> A + array([[ 4, -1, 0, 0, 0], + [-2, 4, -1, 0, 0], + [ 0, -2, 4, -1, 0], + [ 0, 0, -2, 4, -1], + [ 0, 0, 0, -2, 4]]) + + Compare multiplication by `A` with the use of `numpy.convolve`. + + >>> x = np.array([1, 2, 0, -3, 0.5]) + >>> A @ x + array([ 2. , 6. , -1. , -12.5, 8. ]) + + Verify that ``A @ x`` produced the same result as applying the + convolution function. + + >>> np.convolve([-1, 4, -2], x, mode='same') + array([ 2. , 6. , -1. , -12.5, 8. ]) + + For comparison to the case ``mode='same'`` shown above, here are the + matrices produced by ``mode='full'`` and ``mode='valid'`` for the + same coefficients and size. + + >>> convolution_matrix([-1, 4, -2], 5, mode='full') + array([[-1, 0, 0, 0, 0], + [ 4, -1, 0, 0, 0], + [-2, 4, -1, 0, 0], + [ 0, -2, 4, -1, 0], + [ 0, 0, -2, 4, -1], + [ 0, 0, 0, -2, 4], + [ 0, 0, 0, 0, -2]]) + + >>> convolution_matrix([-1, 4, -2], 5, mode='valid') + array([[-2, 4, -1, 0, 0], + [ 0, -2, 4, -1, 0], + [ 0, 0, -2, 4, -1]]) + """ + if n <= 0: + raise ValueError('n must be a positive integer.') + + a = np.asarray(a) + if a.ndim != 1: + raise ValueError('convolution_matrix expects a one-dimensional ' + 'array as input') + if a.size == 0: + raise ValueError('len(a) must be at least 1.') + + if mode not in ('full', 'valid', 'same'): + raise ValueError( + "'mode' argument must be one of ('full', 'valid', 'same')") + + # create zero padded versions of the array + az = np.pad(a, (0, n-1), 'constant') + raz = np.pad(a[::-1], (0, n-1), 'constant') + + if mode == 'same': + trim = min(n, len(a)) - 1 + tb = trim//2 + te = trim - tb + col0 = az[tb:len(az)-te] + row0 = raz[-n-tb:len(raz)-tb] + elif mode == 'valid': + tb = min(n, len(a)) - 1 + te = tb + col0 = az[tb:len(az)-te] + row0 = raz[-n-tb:len(raz)-tb] + else: # 'full' + col0 = az + row0 = raz[-n:] + return toeplitz(col0, row0) diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/_testutils.py b/venv/lib/python3.10/site-packages/scipy/linalg/_testutils.py new file mode 100644 index 0000000000000000000000000000000000000000..6aa6b47296f72fbbc54ed10116505ea93622b1f9 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/_testutils.py @@ -0,0 +1,63 @@ +import numpy as np + + +class _FakeMatrix: + def __init__(self, data): + self._data = data + self.__array_interface__ = data.__array_interface__ + + +class _FakeMatrix2: + def __init__(self, data): + self._data = data + + def __array__(self, dtype=None, copy=None): + return self._data + + +def _get_array(shape, dtype): + """ + Get a test array of given shape and data type. + Returned NxN matrices are posdef, and 2xN are banded-posdef. + + """ + if len(shape) == 2 and shape[0] == 2: + # yield a banded positive definite one + x = np.zeros(shape, dtype=dtype) + x[0, 1:] = -1 + x[1] = 2 + return x + elif len(shape) == 2 and shape[0] == shape[1]: + # always yield a positive definite matrix + x = np.zeros(shape, dtype=dtype) + j = np.arange(shape[0]) + x[j, j] = 2 + x[j[:-1], j[:-1]+1] = -1 + x[j[:-1]+1, j[:-1]] = -1 + return x + else: + np.random.seed(1234) + return np.random.randn(*shape).astype(dtype) + + +def _id(x): + return x + + +def assert_no_overwrite(call, shapes, dtypes=None): + """ + Test that a call does not overwrite its input arguments + """ + + if dtypes is None: + dtypes = [np.float32, np.float64, np.complex64, np.complex128] + + for dtype in dtypes: + for order in ["C", "F"]: + for faker in [_id, _FakeMatrix, _FakeMatrix2]: + orig_inputs = [_get_array(s, dtype) for s in shapes] + inputs = [faker(x.copy(order)) for x in orig_inputs] + call(*inputs) + msg = f"call modified inputs [{dtype!r}, {faker!r}]" + for a, b in zip(inputs, orig_inputs): + np.testing.assert_equal(a, b, err_msg=msg) diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/basic.py b/venv/lib/python3.10/site-packages/scipy/linalg/basic.py new file mode 100644 index 0000000000000000000000000000000000000000..643fbc74d02a13209e606fcdc53e9cfd1693dde0 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/basic.py @@ -0,0 +1,24 @@ +# This file is not meant for public use and will be removed in SciPy v2.0.0. +# Use the `scipy.linalg` namespace for importing the functions +# included below. + +from scipy._lib.deprecation import _sub_module_deprecation + + +__all__ = [ # noqa: F822 + 'solve', 'solve_triangular', 'solveh_banded', 'solve_banded', + 'solve_toeplitz', 'solve_circulant', 'inv', 'det', 'lstsq', + 'pinv', 'pinvh', 'matrix_balance', 'matmul_toeplitz', + 'atleast_1d', 'atleast_2d', 'get_lapack_funcs', + 'LinAlgError', 'LinAlgWarning', 'levinson', +] + + +def __dir__(): + return __all__ + + +def __getattr__(name): + return _sub_module_deprecation(sub_package="linalg", module="basic", + private_modules=["_basic"], all=__all__, + attribute=name) diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/blas.py b/venv/lib/python3.10/site-packages/scipy/linalg/blas.py new file mode 100644 index 0000000000000000000000000000000000000000..c42190ed453a6d4d460ca077eb2d1bf72b7aab00 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/blas.py @@ -0,0 +1,484 @@ +""" +Low-level BLAS functions (:mod:`scipy.linalg.blas`) +=================================================== + +This module contains low-level functions from the BLAS library. + +.. versionadded:: 0.12.0 + +.. note:: + + The common ``overwrite_<>`` option in many routines, allows the + input arrays to be overwritten to avoid extra memory allocation. + However this requires the array to satisfy two conditions + which are memory order and the data type to match exactly the + order and the type expected by the routine. + + As an example, if you pass a double precision float array to any + ``S....`` routine which expects single precision arguments, f2py + will create an intermediate array to match the argument types and + overwriting will be performed on that intermediate array. + + Similarly, if a C-contiguous array is passed, f2py will pass a + FORTRAN-contiguous array internally. Please make sure that these + details are satisfied. More information can be found in the f2py + documentation. + +.. warning:: + + These functions do little to no error checking. + It is possible to cause crashes by mis-using them, + so prefer using the higher-level routines in `scipy.linalg`. + +Finding functions +----------------- + +.. autosummary:: + :toctree: generated/ + + get_blas_funcs + find_best_blas_type + +BLAS Level 1 functions +---------------------- + +.. autosummary:: + :toctree: generated/ + + caxpy + ccopy + cdotc + cdotu + crotg + cscal + csrot + csscal + cswap + dasum + daxpy + dcopy + ddot + dnrm2 + drot + drotg + drotm + drotmg + dscal + dswap + dzasum + dznrm2 + icamax + idamax + isamax + izamax + sasum + saxpy + scasum + scnrm2 + scopy + sdot + snrm2 + srot + srotg + srotm + srotmg + sscal + sswap + zaxpy + zcopy + zdotc + zdotu + zdrot + zdscal + zrotg + zscal + zswap + +BLAS Level 2 functions +---------------------- + +.. autosummary:: + :toctree: generated/ + + sgbmv + sgemv + sger + ssbmv + sspr + sspr2 + ssymv + ssyr + ssyr2 + stbmv + stpsv + strmv + strsv + dgbmv + dgemv + dger + dsbmv + dspr + dspr2 + dsymv + dsyr + dsyr2 + dtbmv + dtpsv + dtrmv + dtrsv + cgbmv + cgemv + cgerc + cgeru + chbmv + chemv + cher + cher2 + chpmv + chpr + chpr2 + ctbmv + ctbsv + ctpmv + ctpsv + ctrmv + ctrsv + csyr + zgbmv + zgemv + zgerc + zgeru + zhbmv + zhemv + zher + zher2 + zhpmv + zhpr + zhpr2 + ztbmv + ztbsv + ztpmv + ztrmv + ztrsv + zsyr + +BLAS Level 3 functions +---------------------- + +.. autosummary:: + :toctree: generated/ + + sgemm + ssymm + ssyr2k + ssyrk + strmm + strsm + dgemm + dsymm + dsyr2k + dsyrk + dtrmm + dtrsm + cgemm + chemm + cher2k + cherk + csymm + csyr2k + csyrk + ctrmm + ctrsm + zgemm + zhemm + zher2k + zherk + zsymm + zsyr2k + zsyrk + ztrmm + ztrsm + +""" +# +# Author: Pearu Peterson, March 2002 +# refactoring by Fabian Pedregosa, March 2010 +# + +__all__ = ['get_blas_funcs', 'find_best_blas_type'] + +import numpy as _np +import functools + +from scipy.linalg import _fblas +try: + from scipy.linalg import _cblas +except ImportError: + _cblas = None + +try: + from scipy.linalg import _fblas_64 + HAS_ILP64 = True +except ImportError: + HAS_ILP64 = False + _fblas_64 = None + +# Expose all functions (only fblas --- cblas is an implementation detail) +empty_module = None +from scipy.linalg._fblas import * # noqa: E402, F403 +del empty_module + +# all numeric dtypes '?bBhHiIlLqQefdgFDGO' that are safe to be converted to + +# single precision float : '?bBhH!!!!!!ef!!!!!!' +# double precision float : '?bBhHiIlLqQefdg!!!!' +# single precision complex : '?bBhH!!!!!!ef!!F!!!' +# double precision complex : '?bBhHiIlLqQefdgFDG!' + +_type_score = {x: 1 for x in '?bBhHef'} +_type_score.update({x: 2 for x in 'iIlLqQd'}) + +# Handle float128(g) and complex256(G) separately in case non-Windows systems. +# On Windows, the values will be rewritten to the same key with the same value. +_type_score.update({'F': 3, 'D': 4, 'g': 2, 'G': 4}) + +# Final mapping to the actual prefixes and dtypes +_type_conv = {1: ('s', _np.dtype('float32')), + 2: ('d', _np.dtype('float64')), + 3: ('c', _np.dtype('complex64')), + 4: ('z', _np.dtype('complex128'))} + +# some convenience alias for complex functions +_blas_alias = {'cnrm2': 'scnrm2', 'znrm2': 'dznrm2', + 'cdot': 'cdotc', 'zdot': 'zdotc', + 'cger': 'cgerc', 'zger': 'zgerc', + 'sdotc': 'sdot', 'sdotu': 'sdot', + 'ddotc': 'ddot', 'ddotu': 'ddot'} + + +def find_best_blas_type(arrays=(), dtype=None): + """Find best-matching BLAS/LAPACK type. + + Arrays are used to determine the optimal prefix of BLAS routines. + + Parameters + ---------- + arrays : sequence of ndarrays, optional + Arrays can be given to determine optimal prefix of BLAS + routines. If not given, double-precision routines will be + used, otherwise the most generic type in arrays will be used. + dtype : str or dtype, optional + Data-type specifier. Not used if `arrays` is non-empty. + + Returns + ------- + prefix : str + BLAS/LAPACK prefix character. + dtype : dtype + Inferred Numpy data type. + prefer_fortran : bool + Whether to prefer Fortran order routines over C order. + + Examples + -------- + >>> import numpy as np + >>> import scipy.linalg.blas as bla + >>> rng = np.random.default_rng() + >>> a = rng.random((10,15)) + >>> b = np.asfortranarray(a) # Change the memory layout order + >>> bla.find_best_blas_type((a,)) + ('d', dtype('float64'), False) + >>> bla.find_best_blas_type((a*1j,)) + ('z', dtype('complex128'), False) + >>> bla.find_best_blas_type((b,)) + ('d', dtype('float64'), True) + + """ + dtype = _np.dtype(dtype) + max_score = _type_score.get(dtype.char, 5) + prefer_fortran = False + + if arrays: + # In most cases, single element is passed through, quicker route + if len(arrays) == 1: + max_score = _type_score.get(arrays[0].dtype.char, 5) + prefer_fortran = arrays[0].flags['FORTRAN'] + else: + # use the most generic type in arrays + scores = [_type_score.get(x.dtype.char, 5) for x in arrays] + max_score = max(scores) + ind_max_score = scores.index(max_score) + # safe upcasting for mix of float64 and complex64 --> prefix 'z' + if max_score == 3 and (2 in scores): + max_score = 4 + + if arrays[ind_max_score].flags['FORTRAN']: + # prefer Fortran for leading array with column major order + prefer_fortran = True + + # Get the LAPACK prefix and the corresponding dtype if not fall back + # to 'd' and double precision float. + prefix, dtype = _type_conv.get(max_score, ('d', _np.dtype('float64'))) + + return prefix, dtype, prefer_fortran + + +def _get_funcs(names, arrays, dtype, + lib_name, fmodule, cmodule, + fmodule_name, cmodule_name, alias, + ilp64=False): + """ + Return available BLAS/LAPACK functions. + + Used also in lapack.py. See get_blas_funcs for docstring. + """ + + funcs = [] + unpack = False + dtype = _np.dtype(dtype) + module1 = (cmodule, cmodule_name) + module2 = (fmodule, fmodule_name) + + if isinstance(names, str): + names = (names,) + unpack = True + + prefix, dtype, prefer_fortran = find_best_blas_type(arrays, dtype) + + if prefer_fortran: + module1, module2 = module2, module1 + + for name in names: + func_name = prefix + name + func_name = alias.get(func_name, func_name) + func = getattr(module1[0], func_name, None) + module_name = module1[1] + if func is None: + func = getattr(module2[0], func_name, None) + module_name = module2[1] + if func is None: + raise ValueError( + f'{lib_name} function {func_name} could not be found') + func.module_name, func.typecode = module_name, prefix + func.dtype = dtype + if not ilp64: + func.int_dtype = _np.dtype(_np.intc) + else: + func.int_dtype = _np.dtype(_np.int64) + func.prefix = prefix # Backward compatibility + funcs.append(func) + + if unpack: + return funcs[0] + else: + return funcs + + +def _memoize_get_funcs(func): + """ + Memoized fast path for _get_funcs instances + """ + memo = {} + func.memo = memo + + @functools.wraps(func) + def getter(names, arrays=(), dtype=None, ilp64=False): + key = (names, dtype, ilp64) + for array in arrays: + # cf. find_blas_funcs + key += (array.dtype.char, array.flags.fortran) + + try: + value = memo.get(key) + except TypeError: + # unhashable key etc. + key = None + value = None + + if value is not None: + return value + + value = func(names, arrays, dtype, ilp64) + + if key is not None: + memo[key] = value + + return value + + return getter + + +@_memoize_get_funcs +def get_blas_funcs(names, arrays=(), dtype=None, ilp64=False): + """Return available BLAS function objects from names. + + Arrays are used to determine the optimal prefix of BLAS routines. + + Parameters + ---------- + names : str or sequence of str + Name(s) of BLAS functions without type prefix. + + arrays : sequence of ndarrays, optional + Arrays can be given to determine optimal prefix of BLAS + routines. If not given, double-precision routines will be + used, otherwise the most generic type in arrays will be used. + + dtype : str or dtype, optional + Data-type specifier. Not used if `arrays` is non-empty. + + ilp64 : {True, False, 'preferred'}, optional + Whether to return ILP64 routine variant. + Choosing 'preferred' returns ILP64 routine if available, + and otherwise the 32-bit routine. Default: False + + Returns + ------- + funcs : list + List containing the found function(s). + + + Notes + ----- + This routine automatically chooses between Fortran/C + interfaces. Fortran code is used whenever possible for arrays with + column major order. In all other cases, C code is preferred. + + In BLAS, the naming convention is that all functions start with a + type prefix, which depends on the type of the principal + matrix. These can be one of {'s', 'd', 'c', 'z'} for the NumPy + types {float32, float64, complex64, complex128} respectively. + The code and the dtype are stored in attributes `typecode` and `dtype` + of the returned functions. + + Examples + -------- + >>> import numpy as np + >>> import scipy.linalg as LA + >>> rng = np.random.default_rng() + >>> a = rng.random((3,2)) + >>> x_gemv = LA.get_blas_funcs('gemv', (a,)) + >>> x_gemv.typecode + 'd' + >>> x_gemv = LA.get_blas_funcs('gemv',(a*1j,)) + >>> x_gemv.typecode + 'z' + + """ + if isinstance(ilp64, str): + if ilp64 == 'preferred': + ilp64 = HAS_ILP64 + else: + raise ValueError("Invalid value for 'ilp64'") + + if not ilp64: + return _get_funcs(names, arrays, dtype, + "BLAS", _fblas, _cblas, "fblas", "cblas", + _blas_alias, ilp64=False) + else: + if not HAS_ILP64: + raise RuntimeError("BLAS ILP64 routine requested, but Scipy " + "compiled only with 32-bit BLAS") + return _get_funcs(names, arrays, dtype, + "BLAS", _fblas_64, None, "fblas_64", None, + _blas_alias, ilp64=True) diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/cython_blas.cpython-310-x86_64-linux-gnu.so b/venv/lib/python3.10/site-packages/scipy/linalg/cython_blas.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..b8fbebfebf935e8d8ac3e84fe02c430974c4c45d Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/cython_blas.cpython-310-x86_64-linux-gnu.so differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/cython_blas.pxd b/venv/lib/python3.10/site-packages/scipy/linalg/cython_blas.pxd new file mode 100644 index 0000000000000000000000000000000000000000..7ed44f6ea8611f926e3ea5fd2670446cdf9b398c --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/cython_blas.pxd @@ -0,0 +1,169 @@ +""" +This file was generated by _generate_pyx.py. +Do not edit this file directly. +""" + +# Within scipy, these wrappers can be used via relative or absolute cimport. +# Examples: +# from ..linalg cimport cython_blas +# from scipy.linalg cimport cython_blas +# cimport scipy.linalg.cython_blas as cython_blas +# cimport ..linalg.cython_blas as cython_blas + +# Within SciPy, if BLAS functions are needed in C/C++/Fortran, +# these wrappers should not be used. +# The original libraries should be linked directly. + +ctypedef float s +ctypedef double d +ctypedef float complex c +ctypedef double complex z + +cdef void caxpy(int *n, c *ca, c *cx, int *incx, c *cy, int *incy) noexcept nogil +cdef void ccopy(int *n, c *cx, int *incx, c *cy, int *incy) noexcept nogil +cdef c cdotc(int *n, c *cx, int *incx, c *cy, int *incy) noexcept nogil +cdef c cdotu(int *n, c *cx, int *incx, c *cy, int *incy) noexcept nogil +cdef void cgbmv(char *trans, int *m, int *n, int *kl, int *ku, c *alpha, c *a, int *lda, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil +cdef void cgemm(char *transa, char *transb, int *m, int *n, int *k, c *alpha, c *a, int *lda, c *b, int *ldb, c *beta, c *c, int *ldc) noexcept nogil +cdef void cgemv(char *trans, int *m, int *n, c *alpha, c *a, int *lda, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil +cdef void cgerc(int *m, int *n, c *alpha, c *x, int *incx, c *y, int *incy, c *a, int *lda) noexcept nogil +cdef void cgeru(int *m, int *n, c *alpha, c *x, int *incx, c *y, int *incy, c *a, int *lda) noexcept nogil +cdef void chbmv(char *uplo, int *n, int *k, c *alpha, c *a, int *lda, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil +cdef void chemm(char *side, char *uplo, int *m, int *n, c *alpha, c *a, int *lda, c *b, int *ldb, c *beta, c *c, int *ldc) noexcept nogil +cdef void chemv(char *uplo, int *n, c *alpha, c *a, int *lda, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil +cdef void cher(char *uplo, int *n, s *alpha, c *x, int *incx, c *a, int *lda) noexcept nogil +cdef void cher2(char *uplo, int *n, c *alpha, c *x, int *incx, c *y, int *incy, c *a, int *lda) noexcept nogil +cdef void cher2k(char *uplo, char *trans, int *n, int *k, c *alpha, c *a, int *lda, c *b, int *ldb, s *beta, c *c, int *ldc) noexcept nogil +cdef void cherk(char *uplo, char *trans, int *n, int *k, s *alpha, c *a, int *lda, s *beta, c *c, int *ldc) noexcept nogil +cdef void chpmv(char *uplo, int *n, c *alpha, c *ap, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil +cdef void chpr(char *uplo, int *n, s *alpha, c *x, int *incx, c *ap) noexcept nogil +cdef void chpr2(char *uplo, int *n, c *alpha, c *x, int *incx, c *y, int *incy, c *ap) noexcept nogil +cdef void crotg(c *ca, c *cb, s *c, c *s) noexcept nogil +cdef void cscal(int *n, c *ca, c *cx, int *incx) noexcept nogil +cdef void csrot(int *n, c *cx, int *incx, c *cy, int *incy, s *c, s *s) noexcept nogil +cdef void csscal(int *n, s *sa, c *cx, int *incx) noexcept nogil +cdef void cswap(int *n, c *cx, int *incx, c *cy, int *incy) noexcept nogil +cdef void csymm(char *side, char *uplo, int *m, int *n, c *alpha, c *a, int *lda, c *b, int *ldb, c *beta, c *c, int *ldc) noexcept nogil +cdef void csyr2k(char *uplo, char *trans, int *n, int *k, c *alpha, c *a, int *lda, c *b, int *ldb, c *beta, c *c, int *ldc) noexcept nogil +cdef void csyrk(char *uplo, char *trans, int *n, int *k, c *alpha, c *a, int *lda, c *beta, c *c, int *ldc) noexcept nogil +cdef void ctbmv(char *uplo, char *trans, char *diag, int *n, int *k, c *a, int *lda, c *x, int *incx) noexcept nogil +cdef void ctbsv(char *uplo, char *trans, char *diag, int *n, int *k, c *a, int *lda, c *x, int *incx) noexcept nogil +cdef void ctpmv(char *uplo, char *trans, char *diag, int *n, c *ap, c *x, int *incx) noexcept nogil +cdef void ctpsv(char *uplo, char *trans, char *diag, int *n, c *ap, c *x, int *incx) noexcept nogil +cdef void ctrmm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, c *alpha, c *a, int *lda, c *b, int *ldb) noexcept nogil +cdef void ctrmv(char *uplo, char *trans, char *diag, int *n, c *a, int *lda, c *x, int *incx) noexcept nogil +cdef void ctrsm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, c *alpha, c *a, int *lda, c *b, int *ldb) noexcept nogil +cdef void ctrsv(char *uplo, char *trans, char *diag, int *n, c *a, int *lda, c *x, int *incx) noexcept nogil +cdef d dasum(int *n, d *dx, int *incx) noexcept nogil +cdef void daxpy(int *n, d *da, d *dx, int *incx, d *dy, int *incy) noexcept nogil +cdef d dcabs1(z *z) noexcept nogil +cdef void dcopy(int *n, d *dx, int *incx, d *dy, int *incy) noexcept nogil +cdef d ddot(int *n, d *dx, int *incx, d *dy, int *incy) noexcept nogil +cdef void dgbmv(char *trans, int *m, int *n, int *kl, int *ku, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) noexcept nogil +cdef void dgemm(char *transa, char *transb, int *m, int *n, int *k, d *alpha, d *a, int *lda, d *b, int *ldb, d *beta, d *c, int *ldc) noexcept nogil +cdef void dgemv(char *trans, int *m, int *n, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) noexcept nogil +cdef void dger(int *m, int *n, d *alpha, d *x, int *incx, d *y, int *incy, d *a, int *lda) noexcept nogil +cdef d dnrm2(int *n, d *x, int *incx) noexcept nogil +cdef void drot(int *n, d *dx, int *incx, d *dy, int *incy, d *c, d *s) noexcept nogil +cdef void drotg(d *da, d *db, d *c, d *s) noexcept nogil +cdef void drotm(int *n, d *dx, int *incx, d *dy, int *incy, d *dparam) noexcept nogil +cdef void drotmg(d *dd1, d *dd2, d *dx1, d *dy1, d *dparam) noexcept nogil +cdef void dsbmv(char *uplo, int *n, int *k, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) noexcept nogil +cdef void dscal(int *n, d *da, d *dx, int *incx) noexcept nogil +cdef d dsdot(int *n, s *sx, int *incx, s *sy, int *incy) noexcept nogil +cdef void dspmv(char *uplo, int *n, d *alpha, d *ap, d *x, int *incx, d *beta, d *y, int *incy) noexcept nogil +cdef void dspr(char *uplo, int *n, d *alpha, d *x, int *incx, d *ap) noexcept nogil +cdef void dspr2(char *uplo, int *n, d *alpha, d *x, int *incx, d *y, int *incy, d *ap) noexcept nogil +cdef void dswap(int *n, d *dx, int *incx, d *dy, int *incy) noexcept nogil +cdef void dsymm(char *side, char *uplo, int *m, int *n, d *alpha, d *a, int *lda, d *b, int *ldb, d *beta, d *c, int *ldc) noexcept nogil +cdef void dsymv(char *uplo, int *n, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) noexcept nogil +cdef void dsyr(char *uplo, int *n, d *alpha, d *x, int *incx, d *a, int *lda) noexcept nogil +cdef void dsyr2(char *uplo, int *n, d *alpha, d *x, int *incx, d *y, int *incy, d *a, int *lda) noexcept nogil +cdef void dsyr2k(char *uplo, char *trans, int *n, int *k, d *alpha, d *a, int *lda, d *b, int *ldb, d *beta, d *c, int *ldc) noexcept nogil +cdef void dsyrk(char *uplo, char *trans, int *n, int *k, d *alpha, d *a, int *lda, d *beta, d *c, int *ldc) noexcept nogil +cdef void dtbmv(char *uplo, char *trans, char *diag, int *n, int *k, d *a, int *lda, d *x, int *incx) noexcept nogil +cdef void dtbsv(char *uplo, char *trans, char *diag, int *n, int *k, d *a, int *lda, d *x, int *incx) noexcept nogil +cdef void dtpmv(char *uplo, char *trans, char *diag, int *n, d *ap, d *x, int *incx) noexcept nogil +cdef void dtpsv(char *uplo, char *trans, char *diag, int *n, d *ap, d *x, int *incx) noexcept nogil +cdef void dtrmm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, d *alpha, d *a, int *lda, d *b, int *ldb) noexcept nogil +cdef void dtrmv(char *uplo, char *trans, char *diag, int *n, d *a, int *lda, d *x, int *incx) noexcept nogil +cdef void dtrsm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, d *alpha, d *a, int *lda, d *b, int *ldb) noexcept nogil +cdef void dtrsv(char *uplo, char *trans, char *diag, int *n, d *a, int *lda, d *x, int *incx) noexcept nogil +cdef d dzasum(int *n, z *zx, int *incx) noexcept nogil +cdef d dznrm2(int *n, z *x, int *incx) noexcept nogil +cdef int icamax(int *n, c *cx, int *incx) noexcept nogil +cdef int idamax(int *n, d *dx, int *incx) noexcept nogil +cdef int isamax(int *n, s *sx, int *incx) noexcept nogil +cdef int izamax(int *n, z *zx, int *incx) noexcept nogil +cdef bint lsame(char *ca, char *cb) noexcept nogil +cdef s sasum(int *n, s *sx, int *incx) noexcept nogil +cdef void saxpy(int *n, s *sa, s *sx, int *incx, s *sy, int *incy) noexcept nogil +cdef s scasum(int *n, c *cx, int *incx) noexcept nogil +cdef s scnrm2(int *n, c *x, int *incx) noexcept nogil +cdef void scopy(int *n, s *sx, int *incx, s *sy, int *incy) noexcept nogil +cdef s sdot(int *n, s *sx, int *incx, s *sy, int *incy) noexcept nogil +cdef s sdsdot(int *n, s *sb, s *sx, int *incx, s *sy, int *incy) noexcept nogil +cdef void sgbmv(char *trans, int *m, int *n, int *kl, int *ku, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) noexcept nogil +cdef void sgemm(char *transa, char *transb, int *m, int *n, int *k, s *alpha, s *a, int *lda, s *b, int *ldb, s *beta, s *c, int *ldc) noexcept nogil +cdef void sgemv(char *trans, int *m, int *n, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) noexcept nogil +cdef void sger(int *m, int *n, s *alpha, s *x, int *incx, s *y, int *incy, s *a, int *lda) noexcept nogil +cdef s snrm2(int *n, s *x, int *incx) noexcept nogil +cdef void srot(int *n, s *sx, int *incx, s *sy, int *incy, s *c, s *s) noexcept nogil +cdef void srotg(s *sa, s *sb, s *c, s *s) noexcept nogil +cdef void srotm(int *n, s *sx, int *incx, s *sy, int *incy, s *sparam) noexcept nogil +cdef void srotmg(s *sd1, s *sd2, s *sx1, s *sy1, s *sparam) noexcept nogil +cdef void ssbmv(char *uplo, int *n, int *k, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) noexcept nogil +cdef void sscal(int *n, s *sa, s *sx, int *incx) noexcept nogil +cdef void sspmv(char *uplo, int *n, s *alpha, s *ap, s *x, int *incx, s *beta, s *y, int *incy) noexcept nogil +cdef void sspr(char *uplo, int *n, s *alpha, s *x, int *incx, s *ap) noexcept nogil +cdef void sspr2(char *uplo, int *n, s *alpha, s *x, int *incx, s *y, int *incy, s *ap) noexcept nogil +cdef void sswap(int *n, s *sx, int *incx, s *sy, int *incy) noexcept nogil +cdef void ssymm(char *side, char *uplo, int *m, int *n, s *alpha, s *a, int *lda, s *b, int *ldb, s *beta, s *c, int *ldc) noexcept nogil +cdef void ssymv(char *uplo, int *n, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) noexcept nogil +cdef void ssyr(char *uplo, int *n, s *alpha, s *x, int *incx, s *a, int *lda) noexcept nogil +cdef void ssyr2(char *uplo, int *n, s *alpha, s *x, int *incx, s *y, int *incy, s *a, int *lda) noexcept nogil +cdef void ssyr2k(char *uplo, char *trans, int *n, int *k, s *alpha, s *a, int *lda, s *b, int *ldb, s *beta, s *c, int *ldc) noexcept nogil +cdef void ssyrk(char *uplo, char *trans, int *n, int *k, s *alpha, s *a, int *lda, s *beta, s *c, int *ldc) noexcept nogil +cdef void stbmv(char *uplo, char *trans, char *diag, int *n, int *k, s *a, int *lda, s *x, int *incx) noexcept nogil +cdef void stbsv(char *uplo, char *trans, char *diag, int *n, int *k, s *a, int *lda, s *x, int *incx) noexcept nogil +cdef void stpmv(char *uplo, char *trans, char *diag, int *n, s *ap, s *x, int *incx) noexcept nogil +cdef void stpsv(char *uplo, char *trans, char *diag, int *n, s *ap, s *x, int *incx) noexcept nogil +cdef void strmm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, s *alpha, s *a, int *lda, s *b, int *ldb) noexcept nogil +cdef void strmv(char *uplo, char *trans, char *diag, int *n, s *a, int *lda, s *x, int *incx) noexcept nogil +cdef void strsm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, s *alpha, s *a, int *lda, s *b, int *ldb) noexcept nogil +cdef void strsv(char *uplo, char *trans, char *diag, int *n, s *a, int *lda, s *x, int *incx) noexcept nogil +cdef void zaxpy(int *n, z *za, z *zx, int *incx, z *zy, int *incy) noexcept nogil +cdef void zcopy(int *n, z *zx, int *incx, z *zy, int *incy) noexcept nogil +cdef z zdotc(int *n, z *zx, int *incx, z *zy, int *incy) noexcept nogil +cdef z zdotu(int *n, z *zx, int *incx, z *zy, int *incy) noexcept nogil +cdef void zdrot(int *n, z *cx, int *incx, z *cy, int *incy, d *c, d *s) noexcept nogil +cdef void zdscal(int *n, d *da, z *zx, int *incx) noexcept nogil +cdef void zgbmv(char *trans, int *m, int *n, int *kl, int *ku, z *alpha, z *a, int *lda, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil +cdef void zgemm(char *transa, char *transb, int *m, int *n, int *k, z *alpha, z *a, int *lda, z *b, int *ldb, z *beta, z *c, int *ldc) noexcept nogil +cdef void zgemv(char *trans, int *m, int *n, z *alpha, z *a, int *lda, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil +cdef void zgerc(int *m, int *n, z *alpha, z *x, int *incx, z *y, int *incy, z *a, int *lda) noexcept nogil +cdef void zgeru(int *m, int *n, z *alpha, z *x, int *incx, z *y, int *incy, z *a, int *lda) noexcept nogil +cdef void zhbmv(char *uplo, int *n, int *k, z *alpha, z *a, int *lda, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil +cdef void zhemm(char *side, char *uplo, int *m, int *n, z *alpha, z *a, int *lda, z *b, int *ldb, z *beta, z *c, int *ldc) noexcept nogil +cdef void zhemv(char *uplo, int *n, z *alpha, z *a, int *lda, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil +cdef void zher(char *uplo, int *n, d *alpha, z *x, int *incx, z *a, int *lda) noexcept nogil +cdef void zher2(char *uplo, int *n, z *alpha, z *x, int *incx, z *y, int *incy, z *a, int *lda) noexcept nogil +cdef void zher2k(char *uplo, char *trans, int *n, int *k, z *alpha, z *a, int *lda, z *b, int *ldb, d *beta, z *c, int *ldc) noexcept nogil +cdef void zherk(char *uplo, char *trans, int *n, int *k, d *alpha, z *a, int *lda, d *beta, z *c, int *ldc) noexcept nogil +cdef void zhpmv(char *uplo, int *n, z *alpha, z *ap, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil +cdef void zhpr(char *uplo, int *n, d *alpha, z *x, int *incx, z *ap) noexcept nogil +cdef void zhpr2(char *uplo, int *n, z *alpha, z *x, int *incx, z *y, int *incy, z *ap) noexcept nogil +cdef void zrotg(z *ca, z *cb, d *c, z *s) noexcept nogil +cdef void zscal(int *n, z *za, z *zx, int *incx) noexcept nogil +cdef void zswap(int *n, z *zx, int *incx, z *zy, int *incy) noexcept nogil +cdef void zsymm(char *side, char *uplo, int *m, int *n, z *alpha, z *a, int *lda, z *b, int *ldb, z *beta, z *c, int *ldc) noexcept nogil +cdef void zsyr2k(char *uplo, char *trans, int *n, int *k, z *alpha, z *a, int *lda, z *b, int *ldb, z *beta, z *c, int *ldc) noexcept nogil +cdef void zsyrk(char *uplo, char *trans, int *n, int *k, z *alpha, z *a, int *lda, z *beta, z *c, int *ldc) noexcept nogil +cdef void ztbmv(char *uplo, char *trans, char *diag, int *n, int *k, z *a, int *lda, z *x, int *incx) noexcept nogil +cdef void ztbsv(char *uplo, char *trans, char *diag, int *n, int *k, z *a, int *lda, z *x, int *incx) noexcept nogil +cdef void ztpmv(char *uplo, char *trans, char *diag, int *n, z *ap, z *x, int *incx) noexcept nogil +cdef void ztpsv(char *uplo, char *trans, char *diag, int *n, z *ap, z *x, int *incx) noexcept nogil +cdef void ztrmm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, z *alpha, z *a, int *lda, z *b, int *ldb) noexcept nogil +cdef void ztrmv(char *uplo, char *trans, char *diag, int *n, z *a, int *lda, z *x, int *incx) noexcept nogil +cdef void ztrsm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, z *alpha, z *a, int *lda, z *b, int *ldb) noexcept nogil +cdef void ztrsv(char *uplo, char *trans, char *diag, int *n, z *a, int *lda, z *x, int *incx) noexcept nogil diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/cython_blas.pyx b/venv/lib/python3.10/site-packages/scipy/linalg/cython_blas.pyx new file mode 100644 index 0000000000000000000000000000000000000000..86207f95fc7278d66a550c807609d9edd5706cdc --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/cython_blas.pyx @@ -0,0 +1,1422 @@ +# This file was generated by _generate_pyx.py. +# Do not edit this file directly. +# cython: boundscheck = False +# cython: wraparound = False +# cython: cdivision = True + +""" +BLAS Functions for Cython +========================= + +Usable from Cython via:: + + cimport scipy.linalg.cython_blas + +These wrappers do not check for alignment of arrays. +Alignment should be checked before these wrappers are used. + +Raw function pointers (Fortran-style pointer arguments): + +- caxpy +- ccopy +- cdotc +- cdotu +- cgbmv +- cgemm +- cgemv +- cgerc +- cgeru +- chbmv +- chemm +- chemv +- cher +- cher2 +- cher2k +- cherk +- chpmv +- chpr +- chpr2 +- crotg +- cscal +- csrot +- csscal +- cswap +- csymm +- csyr2k +- csyrk +- ctbmv +- ctbsv +- ctpmv +- ctpsv +- ctrmm +- ctrmv +- ctrsm +- ctrsv +- dasum +- daxpy +- dcabs1 +- dcopy +- ddot +- dgbmv +- dgemm +- dgemv +- dger +- dnrm2 +- drot +- drotg +- drotm +- drotmg +- dsbmv +- dscal +- dsdot +- dspmv +- dspr +- dspr2 +- dswap +- dsymm +- dsymv +- dsyr +- dsyr2 +- dsyr2k +- dsyrk +- dtbmv +- dtbsv +- dtpmv +- dtpsv +- dtrmm +- dtrmv +- dtrsm +- dtrsv +- dzasum +- dznrm2 +- icamax +- idamax +- isamax +- izamax +- lsame +- sasum +- saxpy +- scasum +- scnrm2 +- scopy +- sdot +- sdsdot +- sgbmv +- sgemm +- sgemv +- sger +- snrm2 +- srot +- srotg +- srotm +- srotmg +- ssbmv +- sscal +- sspmv +- sspr +- sspr2 +- sswap +- ssymm +- ssymv +- ssyr +- ssyr2 +- ssyr2k +- ssyrk +- stbmv +- stbsv +- stpmv +- stpsv +- strmm +- strmv +- strsm +- strsv +- zaxpy +- zcopy +- zdotc +- zdotu +- zdrot +- zdscal +- zgbmv +- zgemm +- zgemv +- zgerc +- zgeru +- zhbmv +- zhemm +- zhemv +- zher +- zher2 +- zher2k +- zherk +- zhpmv +- zhpr +- zhpr2 +- zrotg +- zscal +- zswap +- zsymm +- zsyr2k +- zsyrk +- ztbmv +- ztbsv +- ztpmv +- ztpsv +- ztrmm +- ztrmv +- ztrsm +- ztrsv + + +""" + +# Within SciPy, these wrappers can be used via relative or absolute cimport. +# Examples: +# from ..linalg cimport cython_blas +# from scipy.linalg cimport cython_blas +# cimport scipy.linalg.cython_blas as cython_blas +# cimport ..linalg.cython_blas as cython_blas + +# Within SciPy, if BLAS functions are needed in C/C++/Fortran, +# these wrappers should not be used. +# The original libraries should be linked directly. + +cdef extern from "fortran_defs.h": + pass + +from numpy cimport npy_complex64, npy_complex128 + + +cdef extern from "_blas_subroutines.h": + void _fortran_caxpy "BLAS_FUNC(caxpy)"(int *n, npy_complex64 *ca, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy) nogil +cdef void caxpy(int *n, c *ca, c *cx, int *incx, c *cy, int *incy) noexcept nogil: + + _fortran_caxpy(n, ca, cx, incx, cy, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_ccopy "BLAS_FUNC(ccopy)"(int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy) nogil +cdef void ccopy(int *n, c *cx, int *incx, c *cy, int *incy) noexcept nogil: + + _fortran_ccopy(n, cx, incx, cy, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_cdotc "(cdotcwrp_)"(npy_complex64 *out, int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy) nogil +cdef c cdotc(int *n, c *cx, int *incx, c *cy, int *incy) noexcept nogil: + cdef c out + _fortran_cdotc(&out, n, cx, incx, cy, incy) + return out + +cdef extern from "_blas_subroutines.h": + void _fortran_cdotu "(cdotuwrp_)"(npy_complex64 *out, int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy) nogil +cdef c cdotu(int *n, c *cx, int *incx, c *cy, int *incy) noexcept nogil: + cdef c out + _fortran_cdotu(&out, n, cx, incx, cy, incy) + return out + +cdef extern from "_blas_subroutines.h": + void _fortran_cgbmv "BLAS_FUNC(cgbmv)"(char *trans, int *m, int *n, int *kl, int *ku, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy) nogil +cdef void cgbmv(char *trans, int *m, int *n, int *kl, int *ku, c *alpha, c *a, int *lda, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil: + + _fortran_cgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_cgemm "BLAS_FUNC(cgemm)"(char *transa, char *transb, int *m, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *beta, npy_complex64 *c, int *ldc) nogil +cdef void cgemm(char *transa, char *transb, int *m, int *n, int *k, c *alpha, c *a, int *lda, c *b, int *ldb, c *beta, c *c, int *ldc) noexcept nogil: + + _fortran_cgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) + + +cdef extern from "_blas_subroutines.h": + void _fortran_cgemv "BLAS_FUNC(cgemv)"(char *trans, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy) nogil +cdef void cgemv(char *trans, int *m, int *n, c *alpha, c *a, int *lda, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil: + + _fortran_cgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_cgerc "BLAS_FUNC(cgerc)"(int *m, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, npy_complex64 *a, int *lda) nogil +cdef void cgerc(int *m, int *n, c *alpha, c *x, int *incx, c *y, int *incy, c *a, int *lda) noexcept nogil: + + _fortran_cgerc(m, n, alpha, x, incx, y, incy, a, lda) + + +cdef extern from "_blas_subroutines.h": + void _fortran_cgeru "BLAS_FUNC(cgeru)"(int *m, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, npy_complex64 *a, int *lda) nogil +cdef void cgeru(int *m, int *n, c *alpha, c *x, int *incx, c *y, int *incy, c *a, int *lda) noexcept nogil: + + _fortran_cgeru(m, n, alpha, x, incx, y, incy, a, lda) + + +cdef extern from "_blas_subroutines.h": + void _fortran_chbmv "BLAS_FUNC(chbmv)"(char *uplo, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy) nogil +cdef void chbmv(char *uplo, int *n, int *k, c *alpha, c *a, int *lda, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil: + + _fortran_chbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_chemm "BLAS_FUNC(chemm)"(char *side, char *uplo, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *beta, npy_complex64 *c, int *ldc) nogil +cdef void chemm(char *side, char *uplo, int *m, int *n, c *alpha, c *a, int *lda, c *b, int *ldb, c *beta, c *c, int *ldc) noexcept nogil: + + _fortran_chemm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) + + +cdef extern from "_blas_subroutines.h": + void _fortran_chemv "BLAS_FUNC(chemv)"(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy) nogil +cdef void chemv(char *uplo, int *n, c *alpha, c *a, int *lda, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil: + + _fortran_chemv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_cher "BLAS_FUNC(cher)"(char *uplo, int *n, s *alpha, npy_complex64 *x, int *incx, npy_complex64 *a, int *lda) nogil +cdef void cher(char *uplo, int *n, s *alpha, c *x, int *incx, c *a, int *lda) noexcept nogil: + + _fortran_cher(uplo, n, alpha, x, incx, a, lda) + + +cdef extern from "_blas_subroutines.h": + void _fortran_cher2 "BLAS_FUNC(cher2)"(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, npy_complex64 *a, int *lda) nogil +cdef void cher2(char *uplo, int *n, c *alpha, c *x, int *incx, c *y, int *incy, c *a, int *lda) noexcept nogil: + + _fortran_cher2(uplo, n, alpha, x, incx, y, incy, a, lda) + + +cdef extern from "_blas_subroutines.h": + void _fortran_cher2k "BLAS_FUNC(cher2k)"(char *uplo, char *trans, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, s *beta, npy_complex64 *c, int *ldc) nogil +cdef void cher2k(char *uplo, char *trans, int *n, int *k, c *alpha, c *a, int *lda, c *b, int *ldb, s *beta, c *c, int *ldc) noexcept nogil: + + _fortran_cher2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) + + +cdef extern from "_blas_subroutines.h": + void _fortran_cherk "BLAS_FUNC(cherk)"(char *uplo, char *trans, int *n, int *k, s *alpha, npy_complex64 *a, int *lda, s *beta, npy_complex64 *c, int *ldc) nogil +cdef void cherk(char *uplo, char *trans, int *n, int *k, s *alpha, c *a, int *lda, s *beta, c *c, int *ldc) noexcept nogil: + + _fortran_cherk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) + + +cdef extern from "_blas_subroutines.h": + void _fortran_chpmv "BLAS_FUNC(chpmv)"(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *ap, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy) nogil +cdef void chpmv(char *uplo, int *n, c *alpha, c *ap, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil: + + _fortran_chpmv(uplo, n, alpha, ap, x, incx, beta, y, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_chpr "BLAS_FUNC(chpr)"(char *uplo, int *n, s *alpha, npy_complex64 *x, int *incx, npy_complex64 *ap) nogil +cdef void chpr(char *uplo, int *n, s *alpha, c *x, int *incx, c *ap) noexcept nogil: + + _fortran_chpr(uplo, n, alpha, x, incx, ap) + + +cdef extern from "_blas_subroutines.h": + void _fortran_chpr2 "BLAS_FUNC(chpr2)"(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, npy_complex64 *ap) nogil +cdef void chpr2(char *uplo, int *n, c *alpha, c *x, int *incx, c *y, int *incy, c *ap) noexcept nogil: + + _fortran_chpr2(uplo, n, alpha, x, incx, y, incy, ap) + + +cdef extern from "_blas_subroutines.h": + void _fortran_crotg "BLAS_FUNC(crotg)"(npy_complex64 *ca, npy_complex64 *cb, s *c, npy_complex64 *s) nogil +cdef void crotg(c *ca, c *cb, s *c, c *s) noexcept nogil: + + _fortran_crotg(ca, cb, c, s) + + +cdef extern from "_blas_subroutines.h": + void _fortran_cscal "BLAS_FUNC(cscal)"(int *n, npy_complex64 *ca, npy_complex64 *cx, int *incx) nogil +cdef void cscal(int *n, c *ca, c *cx, int *incx) noexcept nogil: + + _fortran_cscal(n, ca, cx, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_csrot "BLAS_FUNC(csrot)"(int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy, s *c, s *s) nogil +cdef void csrot(int *n, c *cx, int *incx, c *cy, int *incy, s *c, s *s) noexcept nogil: + + _fortran_csrot(n, cx, incx, cy, incy, c, s) + + +cdef extern from "_blas_subroutines.h": + void _fortran_csscal "BLAS_FUNC(csscal)"(int *n, s *sa, npy_complex64 *cx, int *incx) nogil +cdef void csscal(int *n, s *sa, c *cx, int *incx) noexcept nogil: + + _fortran_csscal(n, sa, cx, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_cswap "BLAS_FUNC(cswap)"(int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy) nogil +cdef void cswap(int *n, c *cx, int *incx, c *cy, int *incy) noexcept nogil: + + _fortran_cswap(n, cx, incx, cy, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_csymm "BLAS_FUNC(csymm)"(char *side, char *uplo, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *beta, npy_complex64 *c, int *ldc) nogil +cdef void csymm(char *side, char *uplo, int *m, int *n, c *alpha, c *a, int *lda, c *b, int *ldb, c *beta, c *c, int *ldc) noexcept nogil: + + _fortran_csymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) + + +cdef extern from "_blas_subroutines.h": + void _fortran_csyr2k "BLAS_FUNC(csyr2k)"(char *uplo, char *trans, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *beta, npy_complex64 *c, int *ldc) nogil +cdef void csyr2k(char *uplo, char *trans, int *n, int *k, c *alpha, c *a, int *lda, c *b, int *ldb, c *beta, c *c, int *ldc) noexcept nogil: + + _fortran_csyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) + + +cdef extern from "_blas_subroutines.h": + void _fortran_csyrk "BLAS_FUNC(csyrk)"(char *uplo, char *trans, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *beta, npy_complex64 *c, int *ldc) nogil +cdef void csyrk(char *uplo, char *trans, int *n, int *k, c *alpha, c *a, int *lda, c *beta, c *c, int *ldc) noexcept nogil: + + _fortran_csyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) + + +cdef extern from "_blas_subroutines.h": + void _fortran_ctbmv "BLAS_FUNC(ctbmv)"(char *uplo, char *trans, char *diag, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx) nogil +cdef void ctbmv(char *uplo, char *trans, char *diag, int *n, int *k, c *a, int *lda, c *x, int *incx) noexcept nogil: + + _fortran_ctbmv(uplo, trans, diag, n, k, a, lda, x, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_ctbsv "BLAS_FUNC(ctbsv)"(char *uplo, char *trans, char *diag, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx) nogil +cdef void ctbsv(char *uplo, char *trans, char *diag, int *n, int *k, c *a, int *lda, c *x, int *incx) noexcept nogil: + + _fortran_ctbsv(uplo, trans, diag, n, k, a, lda, x, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_ctpmv "BLAS_FUNC(ctpmv)"(char *uplo, char *trans, char *diag, int *n, npy_complex64 *ap, npy_complex64 *x, int *incx) nogil +cdef void ctpmv(char *uplo, char *trans, char *diag, int *n, c *ap, c *x, int *incx) noexcept nogil: + + _fortran_ctpmv(uplo, trans, diag, n, ap, x, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_ctpsv "BLAS_FUNC(ctpsv)"(char *uplo, char *trans, char *diag, int *n, npy_complex64 *ap, npy_complex64 *x, int *incx) nogil +cdef void ctpsv(char *uplo, char *trans, char *diag, int *n, c *ap, c *x, int *incx) noexcept nogil: + + _fortran_ctpsv(uplo, trans, diag, n, ap, x, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_ctrmm "BLAS_FUNC(ctrmm)"(char *side, char *uplo, char *transa, char *diag, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb) nogil +cdef void ctrmm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, c *alpha, c *a, int *lda, c *b, int *ldb) noexcept nogil: + + _fortran_ctrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) + + +cdef extern from "_blas_subroutines.h": + void _fortran_ctrmv "BLAS_FUNC(ctrmv)"(char *uplo, char *trans, char *diag, int *n, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx) nogil +cdef void ctrmv(char *uplo, char *trans, char *diag, int *n, c *a, int *lda, c *x, int *incx) noexcept nogil: + + _fortran_ctrmv(uplo, trans, diag, n, a, lda, x, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_ctrsm "BLAS_FUNC(ctrsm)"(char *side, char *uplo, char *transa, char *diag, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb) nogil +cdef void ctrsm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, c *alpha, c *a, int *lda, c *b, int *ldb) noexcept nogil: + + _fortran_ctrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) + + +cdef extern from "_blas_subroutines.h": + void _fortran_ctrsv "BLAS_FUNC(ctrsv)"(char *uplo, char *trans, char *diag, int *n, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx) nogil +cdef void ctrsv(char *uplo, char *trans, char *diag, int *n, c *a, int *lda, c *x, int *incx) noexcept nogil: + + _fortran_ctrsv(uplo, trans, diag, n, a, lda, x, incx) + + +cdef extern from "_blas_subroutines.h": + d _fortran_dasum "BLAS_FUNC(dasum)"(int *n, d *dx, int *incx) nogil +cdef d dasum(int *n, d *dx, int *incx) noexcept nogil: + + return _fortran_dasum(n, dx, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_daxpy "BLAS_FUNC(daxpy)"(int *n, d *da, d *dx, int *incx, d *dy, int *incy) nogil +cdef void daxpy(int *n, d *da, d *dx, int *incx, d *dy, int *incy) noexcept nogil: + + _fortran_daxpy(n, da, dx, incx, dy, incy) + + +cdef extern from "_blas_subroutines.h": + d _fortran_dcabs1 "BLAS_FUNC(dcabs1)"(npy_complex128 *z) nogil +cdef d dcabs1(z *z) noexcept nogil: + + return _fortran_dcabs1(z) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dcopy "BLAS_FUNC(dcopy)"(int *n, d *dx, int *incx, d *dy, int *incy) nogil +cdef void dcopy(int *n, d *dx, int *incx, d *dy, int *incy) noexcept nogil: + + _fortran_dcopy(n, dx, incx, dy, incy) + + +cdef extern from "_blas_subroutines.h": + d _fortran_ddot "BLAS_FUNC(ddot)"(int *n, d *dx, int *incx, d *dy, int *incy) nogil +cdef d ddot(int *n, d *dx, int *incx, d *dy, int *incy) noexcept nogil: + + return _fortran_ddot(n, dx, incx, dy, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dgbmv "BLAS_FUNC(dgbmv)"(char *trans, int *m, int *n, int *kl, int *ku, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) nogil +cdef void dgbmv(char *trans, int *m, int *n, int *kl, int *ku, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) noexcept nogil: + + _fortran_dgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dgemm "BLAS_FUNC(dgemm)"(char *transa, char *transb, int *m, int *n, int *k, d *alpha, d *a, int *lda, d *b, int *ldb, d *beta, d *c, int *ldc) nogil +cdef void dgemm(char *transa, char *transb, int *m, int *n, int *k, d *alpha, d *a, int *lda, d *b, int *ldb, d *beta, d *c, int *ldc) noexcept nogil: + + _fortran_dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dgemv "BLAS_FUNC(dgemv)"(char *trans, int *m, int *n, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) nogil +cdef void dgemv(char *trans, int *m, int *n, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) noexcept nogil: + + _fortran_dgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dger "BLAS_FUNC(dger)"(int *m, int *n, d *alpha, d *x, int *incx, d *y, int *incy, d *a, int *lda) nogil +cdef void dger(int *m, int *n, d *alpha, d *x, int *incx, d *y, int *incy, d *a, int *lda) noexcept nogil: + + _fortran_dger(m, n, alpha, x, incx, y, incy, a, lda) + + +cdef extern from "_blas_subroutines.h": + d _fortran_dnrm2 "BLAS_FUNC(dnrm2)"(int *n, d *x, int *incx) nogil +cdef d dnrm2(int *n, d *x, int *incx) noexcept nogil: + + return _fortran_dnrm2(n, x, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_drot "BLAS_FUNC(drot)"(int *n, d *dx, int *incx, d *dy, int *incy, d *c, d *s) nogil +cdef void drot(int *n, d *dx, int *incx, d *dy, int *incy, d *c, d *s) noexcept nogil: + + _fortran_drot(n, dx, incx, dy, incy, c, s) + + +cdef extern from "_blas_subroutines.h": + void _fortran_drotg "BLAS_FUNC(drotg)"(d *da, d *db, d *c, d *s) nogil +cdef void drotg(d *da, d *db, d *c, d *s) noexcept nogil: + + _fortran_drotg(da, db, c, s) + + +cdef extern from "_blas_subroutines.h": + void _fortran_drotm "BLAS_FUNC(drotm)"(int *n, d *dx, int *incx, d *dy, int *incy, d *dparam) nogil +cdef void drotm(int *n, d *dx, int *incx, d *dy, int *incy, d *dparam) noexcept nogil: + + _fortran_drotm(n, dx, incx, dy, incy, dparam) + + +cdef extern from "_blas_subroutines.h": + void _fortran_drotmg "BLAS_FUNC(drotmg)"(d *dd1, d *dd2, d *dx1, d *dy1, d *dparam) nogil +cdef void drotmg(d *dd1, d *dd2, d *dx1, d *dy1, d *dparam) noexcept nogil: + + _fortran_drotmg(dd1, dd2, dx1, dy1, dparam) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dsbmv "BLAS_FUNC(dsbmv)"(char *uplo, int *n, int *k, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) nogil +cdef void dsbmv(char *uplo, int *n, int *k, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) noexcept nogil: + + _fortran_dsbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dscal "BLAS_FUNC(dscal)"(int *n, d *da, d *dx, int *incx) nogil +cdef void dscal(int *n, d *da, d *dx, int *incx) noexcept nogil: + + _fortran_dscal(n, da, dx, incx) + + +cdef extern from "_blas_subroutines.h": + d _fortran_dsdot "BLAS_FUNC(dsdot)"(int *n, s *sx, int *incx, s *sy, int *incy) nogil +cdef d dsdot(int *n, s *sx, int *incx, s *sy, int *incy) noexcept nogil: + + return _fortran_dsdot(n, sx, incx, sy, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dspmv "BLAS_FUNC(dspmv)"(char *uplo, int *n, d *alpha, d *ap, d *x, int *incx, d *beta, d *y, int *incy) nogil +cdef void dspmv(char *uplo, int *n, d *alpha, d *ap, d *x, int *incx, d *beta, d *y, int *incy) noexcept nogil: + + _fortran_dspmv(uplo, n, alpha, ap, x, incx, beta, y, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dspr "BLAS_FUNC(dspr)"(char *uplo, int *n, d *alpha, d *x, int *incx, d *ap) nogil +cdef void dspr(char *uplo, int *n, d *alpha, d *x, int *incx, d *ap) noexcept nogil: + + _fortran_dspr(uplo, n, alpha, x, incx, ap) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dspr2 "BLAS_FUNC(dspr2)"(char *uplo, int *n, d *alpha, d *x, int *incx, d *y, int *incy, d *ap) nogil +cdef void dspr2(char *uplo, int *n, d *alpha, d *x, int *incx, d *y, int *incy, d *ap) noexcept nogil: + + _fortran_dspr2(uplo, n, alpha, x, incx, y, incy, ap) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dswap "BLAS_FUNC(dswap)"(int *n, d *dx, int *incx, d *dy, int *incy) nogil +cdef void dswap(int *n, d *dx, int *incx, d *dy, int *incy) noexcept nogil: + + _fortran_dswap(n, dx, incx, dy, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dsymm "BLAS_FUNC(dsymm)"(char *side, char *uplo, int *m, int *n, d *alpha, d *a, int *lda, d *b, int *ldb, d *beta, d *c, int *ldc) nogil +cdef void dsymm(char *side, char *uplo, int *m, int *n, d *alpha, d *a, int *lda, d *b, int *ldb, d *beta, d *c, int *ldc) noexcept nogil: + + _fortran_dsymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dsymv "BLAS_FUNC(dsymv)"(char *uplo, int *n, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) nogil +cdef void dsymv(char *uplo, int *n, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) noexcept nogil: + + _fortran_dsymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dsyr "BLAS_FUNC(dsyr)"(char *uplo, int *n, d *alpha, d *x, int *incx, d *a, int *lda) nogil +cdef void dsyr(char *uplo, int *n, d *alpha, d *x, int *incx, d *a, int *lda) noexcept nogil: + + _fortran_dsyr(uplo, n, alpha, x, incx, a, lda) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dsyr2 "BLAS_FUNC(dsyr2)"(char *uplo, int *n, d *alpha, d *x, int *incx, d *y, int *incy, d *a, int *lda) nogil +cdef void dsyr2(char *uplo, int *n, d *alpha, d *x, int *incx, d *y, int *incy, d *a, int *lda) noexcept nogil: + + _fortran_dsyr2(uplo, n, alpha, x, incx, y, incy, a, lda) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dsyr2k "BLAS_FUNC(dsyr2k)"(char *uplo, char *trans, int *n, int *k, d *alpha, d *a, int *lda, d *b, int *ldb, d *beta, d *c, int *ldc) nogil +cdef void dsyr2k(char *uplo, char *trans, int *n, int *k, d *alpha, d *a, int *lda, d *b, int *ldb, d *beta, d *c, int *ldc) noexcept nogil: + + _fortran_dsyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dsyrk "BLAS_FUNC(dsyrk)"(char *uplo, char *trans, int *n, int *k, d *alpha, d *a, int *lda, d *beta, d *c, int *ldc) nogil +cdef void dsyrk(char *uplo, char *trans, int *n, int *k, d *alpha, d *a, int *lda, d *beta, d *c, int *ldc) noexcept nogil: + + _fortran_dsyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dtbmv "BLAS_FUNC(dtbmv)"(char *uplo, char *trans, char *diag, int *n, int *k, d *a, int *lda, d *x, int *incx) nogil +cdef void dtbmv(char *uplo, char *trans, char *diag, int *n, int *k, d *a, int *lda, d *x, int *incx) noexcept nogil: + + _fortran_dtbmv(uplo, trans, diag, n, k, a, lda, x, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dtbsv "BLAS_FUNC(dtbsv)"(char *uplo, char *trans, char *diag, int *n, int *k, d *a, int *lda, d *x, int *incx) nogil +cdef void dtbsv(char *uplo, char *trans, char *diag, int *n, int *k, d *a, int *lda, d *x, int *incx) noexcept nogil: + + _fortran_dtbsv(uplo, trans, diag, n, k, a, lda, x, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dtpmv "BLAS_FUNC(dtpmv)"(char *uplo, char *trans, char *diag, int *n, d *ap, d *x, int *incx) nogil +cdef void dtpmv(char *uplo, char *trans, char *diag, int *n, d *ap, d *x, int *incx) noexcept nogil: + + _fortran_dtpmv(uplo, trans, diag, n, ap, x, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dtpsv "BLAS_FUNC(dtpsv)"(char *uplo, char *trans, char *diag, int *n, d *ap, d *x, int *incx) nogil +cdef void dtpsv(char *uplo, char *trans, char *diag, int *n, d *ap, d *x, int *incx) noexcept nogil: + + _fortran_dtpsv(uplo, trans, diag, n, ap, x, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dtrmm "BLAS_FUNC(dtrmm)"(char *side, char *uplo, char *transa, char *diag, int *m, int *n, d *alpha, d *a, int *lda, d *b, int *ldb) nogil +cdef void dtrmm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, d *alpha, d *a, int *lda, d *b, int *ldb) noexcept nogil: + + _fortran_dtrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dtrmv "BLAS_FUNC(dtrmv)"(char *uplo, char *trans, char *diag, int *n, d *a, int *lda, d *x, int *incx) nogil +cdef void dtrmv(char *uplo, char *trans, char *diag, int *n, d *a, int *lda, d *x, int *incx) noexcept nogil: + + _fortran_dtrmv(uplo, trans, diag, n, a, lda, x, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dtrsm "BLAS_FUNC(dtrsm)"(char *side, char *uplo, char *transa, char *diag, int *m, int *n, d *alpha, d *a, int *lda, d *b, int *ldb) nogil +cdef void dtrsm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, d *alpha, d *a, int *lda, d *b, int *ldb) noexcept nogil: + + _fortran_dtrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) + + +cdef extern from "_blas_subroutines.h": + void _fortran_dtrsv "BLAS_FUNC(dtrsv)"(char *uplo, char *trans, char *diag, int *n, d *a, int *lda, d *x, int *incx) nogil +cdef void dtrsv(char *uplo, char *trans, char *diag, int *n, d *a, int *lda, d *x, int *incx) noexcept nogil: + + _fortran_dtrsv(uplo, trans, diag, n, a, lda, x, incx) + + +cdef extern from "_blas_subroutines.h": + d _fortran_dzasum "BLAS_FUNC(dzasum)"(int *n, npy_complex128 *zx, int *incx) nogil +cdef d dzasum(int *n, z *zx, int *incx) noexcept nogil: + + return _fortran_dzasum(n, zx, incx) + + +cdef extern from "_blas_subroutines.h": + d _fortran_dznrm2 "BLAS_FUNC(dznrm2)"(int *n, npy_complex128 *x, int *incx) nogil +cdef d dznrm2(int *n, z *x, int *incx) noexcept nogil: + + return _fortran_dznrm2(n, x, incx) + + +cdef extern from "_blas_subroutines.h": + int _fortran_icamax "BLAS_FUNC(icamax)"(int *n, npy_complex64 *cx, int *incx) nogil +cdef int icamax(int *n, c *cx, int *incx) noexcept nogil: + + return _fortran_icamax(n, cx, incx) + + +cdef extern from "_blas_subroutines.h": + int _fortran_idamax "BLAS_FUNC(idamax)"(int *n, d *dx, int *incx) nogil +cdef int idamax(int *n, d *dx, int *incx) noexcept nogil: + + return _fortran_idamax(n, dx, incx) + + +cdef extern from "_blas_subroutines.h": + int _fortran_isamax "BLAS_FUNC(isamax)"(int *n, s *sx, int *incx) nogil +cdef int isamax(int *n, s *sx, int *incx) noexcept nogil: + + return _fortran_isamax(n, sx, incx) + + +cdef extern from "_blas_subroutines.h": + int _fortran_izamax "BLAS_FUNC(izamax)"(int *n, npy_complex128 *zx, int *incx) nogil +cdef int izamax(int *n, z *zx, int *incx) noexcept nogil: + + return _fortran_izamax(n, zx, incx) + + +cdef extern from "_blas_subroutines.h": + bint _fortran_lsame "BLAS_FUNC(lsame)"(char *ca, char *cb) nogil +cdef bint lsame(char *ca, char *cb) noexcept nogil: + + return _fortran_lsame(ca, cb) + + +cdef extern from "_blas_subroutines.h": + s _fortran_sasum "BLAS_FUNC(sasum)"(int *n, s *sx, int *incx) nogil +cdef s sasum(int *n, s *sx, int *incx) noexcept nogil: + + return _fortran_sasum(n, sx, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_saxpy "BLAS_FUNC(saxpy)"(int *n, s *sa, s *sx, int *incx, s *sy, int *incy) nogil +cdef void saxpy(int *n, s *sa, s *sx, int *incx, s *sy, int *incy) noexcept nogil: + + _fortran_saxpy(n, sa, sx, incx, sy, incy) + + +cdef extern from "_blas_subroutines.h": + s _fortran_scasum "BLAS_FUNC(scasum)"(int *n, npy_complex64 *cx, int *incx) nogil +cdef s scasum(int *n, c *cx, int *incx) noexcept nogil: + + return _fortran_scasum(n, cx, incx) + + +cdef extern from "_blas_subroutines.h": + s _fortran_scnrm2 "BLAS_FUNC(scnrm2)"(int *n, npy_complex64 *x, int *incx) nogil +cdef s scnrm2(int *n, c *x, int *incx) noexcept nogil: + + return _fortran_scnrm2(n, x, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_scopy "BLAS_FUNC(scopy)"(int *n, s *sx, int *incx, s *sy, int *incy) nogil +cdef void scopy(int *n, s *sx, int *incx, s *sy, int *incy) noexcept nogil: + + _fortran_scopy(n, sx, incx, sy, incy) + + +cdef extern from "_blas_subroutines.h": + s _fortran_sdot "BLAS_FUNC(sdot)"(int *n, s *sx, int *incx, s *sy, int *incy) nogil +cdef s sdot(int *n, s *sx, int *incx, s *sy, int *incy) noexcept nogil: + + return _fortran_sdot(n, sx, incx, sy, incy) + + +cdef extern from "_blas_subroutines.h": + s _fortran_sdsdot "BLAS_FUNC(sdsdot)"(int *n, s *sb, s *sx, int *incx, s *sy, int *incy) nogil +cdef s sdsdot(int *n, s *sb, s *sx, int *incx, s *sy, int *incy) noexcept nogil: + + return _fortran_sdsdot(n, sb, sx, incx, sy, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_sgbmv "BLAS_FUNC(sgbmv)"(char *trans, int *m, int *n, int *kl, int *ku, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) nogil +cdef void sgbmv(char *trans, int *m, int *n, int *kl, int *ku, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) noexcept nogil: + + _fortran_sgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_sgemm "BLAS_FUNC(sgemm)"(char *transa, char *transb, int *m, int *n, int *k, s *alpha, s *a, int *lda, s *b, int *ldb, s *beta, s *c, int *ldc) nogil +cdef void sgemm(char *transa, char *transb, int *m, int *n, int *k, s *alpha, s *a, int *lda, s *b, int *ldb, s *beta, s *c, int *ldc) noexcept nogil: + + _fortran_sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) + + +cdef extern from "_blas_subroutines.h": + void _fortran_sgemv "BLAS_FUNC(sgemv)"(char *trans, int *m, int *n, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) nogil +cdef void sgemv(char *trans, int *m, int *n, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) noexcept nogil: + + _fortran_sgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_sger "BLAS_FUNC(sger)"(int *m, int *n, s *alpha, s *x, int *incx, s *y, int *incy, s *a, int *lda) nogil +cdef void sger(int *m, int *n, s *alpha, s *x, int *incx, s *y, int *incy, s *a, int *lda) noexcept nogil: + + _fortran_sger(m, n, alpha, x, incx, y, incy, a, lda) + + +cdef extern from "_blas_subroutines.h": + s _fortran_snrm2 "BLAS_FUNC(snrm2)"(int *n, s *x, int *incx) nogil +cdef s snrm2(int *n, s *x, int *incx) noexcept nogil: + + return _fortran_snrm2(n, x, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_srot "BLAS_FUNC(srot)"(int *n, s *sx, int *incx, s *sy, int *incy, s *c, s *s) nogil +cdef void srot(int *n, s *sx, int *incx, s *sy, int *incy, s *c, s *s) noexcept nogil: + + _fortran_srot(n, sx, incx, sy, incy, c, s) + + +cdef extern from "_blas_subroutines.h": + void _fortran_srotg "BLAS_FUNC(srotg)"(s *sa, s *sb, s *c, s *s) nogil +cdef void srotg(s *sa, s *sb, s *c, s *s) noexcept nogil: + + _fortran_srotg(sa, sb, c, s) + + +cdef extern from "_blas_subroutines.h": + void _fortran_srotm "BLAS_FUNC(srotm)"(int *n, s *sx, int *incx, s *sy, int *incy, s *sparam) nogil +cdef void srotm(int *n, s *sx, int *incx, s *sy, int *incy, s *sparam) noexcept nogil: + + _fortran_srotm(n, sx, incx, sy, incy, sparam) + + +cdef extern from "_blas_subroutines.h": + void _fortran_srotmg "BLAS_FUNC(srotmg)"(s *sd1, s *sd2, s *sx1, s *sy1, s *sparam) nogil +cdef void srotmg(s *sd1, s *sd2, s *sx1, s *sy1, s *sparam) noexcept nogil: + + _fortran_srotmg(sd1, sd2, sx1, sy1, sparam) + + +cdef extern from "_blas_subroutines.h": + void _fortran_ssbmv "BLAS_FUNC(ssbmv)"(char *uplo, int *n, int *k, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) nogil +cdef void ssbmv(char *uplo, int *n, int *k, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) noexcept nogil: + + _fortran_ssbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_sscal "BLAS_FUNC(sscal)"(int *n, s *sa, s *sx, int *incx) nogil +cdef void sscal(int *n, s *sa, s *sx, int *incx) noexcept nogil: + + _fortran_sscal(n, sa, sx, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_sspmv "BLAS_FUNC(sspmv)"(char *uplo, int *n, s *alpha, s *ap, s *x, int *incx, s *beta, s *y, int *incy) nogil +cdef void sspmv(char *uplo, int *n, s *alpha, s *ap, s *x, int *incx, s *beta, s *y, int *incy) noexcept nogil: + + _fortran_sspmv(uplo, n, alpha, ap, x, incx, beta, y, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_sspr "BLAS_FUNC(sspr)"(char *uplo, int *n, s *alpha, s *x, int *incx, s *ap) nogil +cdef void sspr(char *uplo, int *n, s *alpha, s *x, int *incx, s *ap) noexcept nogil: + + _fortran_sspr(uplo, n, alpha, x, incx, ap) + + +cdef extern from "_blas_subroutines.h": + void _fortran_sspr2 "BLAS_FUNC(sspr2)"(char *uplo, int *n, s *alpha, s *x, int *incx, s *y, int *incy, s *ap) nogil +cdef void sspr2(char *uplo, int *n, s *alpha, s *x, int *incx, s *y, int *incy, s *ap) noexcept nogil: + + _fortran_sspr2(uplo, n, alpha, x, incx, y, incy, ap) + + +cdef extern from "_blas_subroutines.h": + void _fortran_sswap "BLAS_FUNC(sswap)"(int *n, s *sx, int *incx, s *sy, int *incy) nogil +cdef void sswap(int *n, s *sx, int *incx, s *sy, int *incy) noexcept nogil: + + _fortran_sswap(n, sx, incx, sy, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_ssymm "BLAS_FUNC(ssymm)"(char *side, char *uplo, int *m, int *n, s *alpha, s *a, int *lda, s *b, int *ldb, s *beta, s *c, int *ldc) nogil +cdef void ssymm(char *side, char *uplo, int *m, int *n, s *alpha, s *a, int *lda, s *b, int *ldb, s *beta, s *c, int *ldc) noexcept nogil: + + _fortran_ssymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) + + +cdef extern from "_blas_subroutines.h": + void _fortran_ssymv "BLAS_FUNC(ssymv)"(char *uplo, int *n, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) nogil +cdef void ssymv(char *uplo, int *n, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) noexcept nogil: + + _fortran_ssymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_ssyr "BLAS_FUNC(ssyr)"(char *uplo, int *n, s *alpha, s *x, int *incx, s *a, int *lda) nogil +cdef void ssyr(char *uplo, int *n, s *alpha, s *x, int *incx, s *a, int *lda) noexcept nogil: + + _fortran_ssyr(uplo, n, alpha, x, incx, a, lda) + + +cdef extern from "_blas_subroutines.h": + void _fortran_ssyr2 "BLAS_FUNC(ssyr2)"(char *uplo, int *n, s *alpha, s *x, int *incx, s *y, int *incy, s *a, int *lda) nogil +cdef void ssyr2(char *uplo, int *n, s *alpha, s *x, int *incx, s *y, int *incy, s *a, int *lda) noexcept nogil: + + _fortran_ssyr2(uplo, n, alpha, x, incx, y, incy, a, lda) + + +cdef extern from "_blas_subroutines.h": + void _fortran_ssyr2k "BLAS_FUNC(ssyr2k)"(char *uplo, char *trans, int *n, int *k, s *alpha, s *a, int *lda, s *b, int *ldb, s *beta, s *c, int *ldc) nogil +cdef void ssyr2k(char *uplo, char *trans, int *n, int *k, s *alpha, s *a, int *lda, s *b, int *ldb, s *beta, s *c, int *ldc) noexcept nogil: + + _fortran_ssyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) + + +cdef extern from "_blas_subroutines.h": + void _fortran_ssyrk "BLAS_FUNC(ssyrk)"(char *uplo, char *trans, int *n, int *k, s *alpha, s *a, int *lda, s *beta, s *c, int *ldc) nogil +cdef void ssyrk(char *uplo, char *trans, int *n, int *k, s *alpha, s *a, int *lda, s *beta, s *c, int *ldc) noexcept nogil: + + _fortran_ssyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) + + +cdef extern from "_blas_subroutines.h": + void _fortran_stbmv "BLAS_FUNC(stbmv)"(char *uplo, char *trans, char *diag, int *n, int *k, s *a, int *lda, s *x, int *incx) nogil +cdef void stbmv(char *uplo, char *trans, char *diag, int *n, int *k, s *a, int *lda, s *x, int *incx) noexcept nogil: + + _fortran_stbmv(uplo, trans, diag, n, k, a, lda, x, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_stbsv "BLAS_FUNC(stbsv)"(char *uplo, char *trans, char *diag, int *n, int *k, s *a, int *lda, s *x, int *incx) nogil +cdef void stbsv(char *uplo, char *trans, char *diag, int *n, int *k, s *a, int *lda, s *x, int *incx) noexcept nogil: + + _fortran_stbsv(uplo, trans, diag, n, k, a, lda, x, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_stpmv "BLAS_FUNC(stpmv)"(char *uplo, char *trans, char *diag, int *n, s *ap, s *x, int *incx) nogil +cdef void stpmv(char *uplo, char *trans, char *diag, int *n, s *ap, s *x, int *incx) noexcept nogil: + + _fortran_stpmv(uplo, trans, diag, n, ap, x, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_stpsv "BLAS_FUNC(stpsv)"(char *uplo, char *trans, char *diag, int *n, s *ap, s *x, int *incx) nogil +cdef void stpsv(char *uplo, char *trans, char *diag, int *n, s *ap, s *x, int *incx) noexcept nogil: + + _fortran_stpsv(uplo, trans, diag, n, ap, x, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_strmm "BLAS_FUNC(strmm)"(char *side, char *uplo, char *transa, char *diag, int *m, int *n, s *alpha, s *a, int *lda, s *b, int *ldb) nogil +cdef void strmm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, s *alpha, s *a, int *lda, s *b, int *ldb) noexcept nogil: + + _fortran_strmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) + + +cdef extern from "_blas_subroutines.h": + void _fortran_strmv "BLAS_FUNC(strmv)"(char *uplo, char *trans, char *diag, int *n, s *a, int *lda, s *x, int *incx) nogil +cdef void strmv(char *uplo, char *trans, char *diag, int *n, s *a, int *lda, s *x, int *incx) noexcept nogil: + + _fortran_strmv(uplo, trans, diag, n, a, lda, x, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_strsm "BLAS_FUNC(strsm)"(char *side, char *uplo, char *transa, char *diag, int *m, int *n, s *alpha, s *a, int *lda, s *b, int *ldb) nogil +cdef void strsm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, s *alpha, s *a, int *lda, s *b, int *ldb) noexcept nogil: + + _fortran_strsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) + + +cdef extern from "_blas_subroutines.h": + void _fortran_strsv "BLAS_FUNC(strsv)"(char *uplo, char *trans, char *diag, int *n, s *a, int *lda, s *x, int *incx) nogil +cdef void strsv(char *uplo, char *trans, char *diag, int *n, s *a, int *lda, s *x, int *incx) noexcept nogil: + + _fortran_strsv(uplo, trans, diag, n, a, lda, x, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zaxpy "BLAS_FUNC(zaxpy)"(int *n, npy_complex128 *za, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy) nogil +cdef void zaxpy(int *n, z *za, z *zx, int *incx, z *zy, int *incy) noexcept nogil: + + _fortran_zaxpy(n, za, zx, incx, zy, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zcopy "BLAS_FUNC(zcopy)"(int *n, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy) nogil +cdef void zcopy(int *n, z *zx, int *incx, z *zy, int *incy) noexcept nogil: + + _fortran_zcopy(n, zx, incx, zy, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zdotc "(zdotcwrp_)"(npy_complex128 *out, int *n, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy) nogil +cdef z zdotc(int *n, z *zx, int *incx, z *zy, int *incy) noexcept nogil: + cdef z out + _fortran_zdotc(&out, n, zx, incx, zy, incy) + return out + +cdef extern from "_blas_subroutines.h": + void _fortran_zdotu "(zdotuwrp_)"(npy_complex128 *out, int *n, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy) nogil +cdef z zdotu(int *n, z *zx, int *incx, z *zy, int *incy) noexcept nogil: + cdef z out + _fortran_zdotu(&out, n, zx, incx, zy, incy) + return out + +cdef extern from "_blas_subroutines.h": + void _fortran_zdrot "BLAS_FUNC(zdrot)"(int *n, npy_complex128 *cx, int *incx, npy_complex128 *cy, int *incy, d *c, d *s) nogil +cdef void zdrot(int *n, z *cx, int *incx, z *cy, int *incy, d *c, d *s) noexcept nogil: + + _fortran_zdrot(n, cx, incx, cy, incy, c, s) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zdscal "BLAS_FUNC(zdscal)"(int *n, d *da, npy_complex128 *zx, int *incx) nogil +cdef void zdscal(int *n, d *da, z *zx, int *incx) noexcept nogil: + + _fortran_zdscal(n, da, zx, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zgbmv "BLAS_FUNC(zgbmv)"(char *trans, int *m, int *n, int *kl, int *ku, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy) nogil +cdef void zgbmv(char *trans, int *m, int *n, int *kl, int *ku, z *alpha, z *a, int *lda, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil: + + _fortran_zgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zgemm "BLAS_FUNC(zgemm)"(char *transa, char *transb, int *m, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *beta, npy_complex128 *c, int *ldc) nogil +cdef void zgemm(char *transa, char *transb, int *m, int *n, int *k, z *alpha, z *a, int *lda, z *b, int *ldb, z *beta, z *c, int *ldc) noexcept nogil: + + _fortran_zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zgemv "BLAS_FUNC(zgemv)"(char *trans, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy) nogil +cdef void zgemv(char *trans, int *m, int *n, z *alpha, z *a, int *lda, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil: + + _fortran_zgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zgerc "BLAS_FUNC(zgerc)"(int *m, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, npy_complex128 *a, int *lda) nogil +cdef void zgerc(int *m, int *n, z *alpha, z *x, int *incx, z *y, int *incy, z *a, int *lda) noexcept nogil: + + _fortran_zgerc(m, n, alpha, x, incx, y, incy, a, lda) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zgeru "BLAS_FUNC(zgeru)"(int *m, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, npy_complex128 *a, int *lda) nogil +cdef void zgeru(int *m, int *n, z *alpha, z *x, int *incx, z *y, int *incy, z *a, int *lda) noexcept nogil: + + _fortran_zgeru(m, n, alpha, x, incx, y, incy, a, lda) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zhbmv "BLAS_FUNC(zhbmv)"(char *uplo, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy) nogil +cdef void zhbmv(char *uplo, int *n, int *k, z *alpha, z *a, int *lda, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil: + + _fortran_zhbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zhemm "BLAS_FUNC(zhemm)"(char *side, char *uplo, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *beta, npy_complex128 *c, int *ldc) nogil +cdef void zhemm(char *side, char *uplo, int *m, int *n, z *alpha, z *a, int *lda, z *b, int *ldb, z *beta, z *c, int *ldc) noexcept nogil: + + _fortran_zhemm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zhemv "BLAS_FUNC(zhemv)"(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy) nogil +cdef void zhemv(char *uplo, int *n, z *alpha, z *a, int *lda, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil: + + _fortran_zhemv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zher "BLAS_FUNC(zher)"(char *uplo, int *n, d *alpha, npy_complex128 *x, int *incx, npy_complex128 *a, int *lda) nogil +cdef void zher(char *uplo, int *n, d *alpha, z *x, int *incx, z *a, int *lda) noexcept nogil: + + _fortran_zher(uplo, n, alpha, x, incx, a, lda) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zher2 "BLAS_FUNC(zher2)"(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, npy_complex128 *a, int *lda) nogil +cdef void zher2(char *uplo, int *n, z *alpha, z *x, int *incx, z *y, int *incy, z *a, int *lda) noexcept nogil: + + _fortran_zher2(uplo, n, alpha, x, incx, y, incy, a, lda) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zher2k "BLAS_FUNC(zher2k)"(char *uplo, char *trans, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, d *beta, npy_complex128 *c, int *ldc) nogil +cdef void zher2k(char *uplo, char *trans, int *n, int *k, z *alpha, z *a, int *lda, z *b, int *ldb, d *beta, z *c, int *ldc) noexcept nogil: + + _fortran_zher2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zherk "BLAS_FUNC(zherk)"(char *uplo, char *trans, int *n, int *k, d *alpha, npy_complex128 *a, int *lda, d *beta, npy_complex128 *c, int *ldc) nogil +cdef void zherk(char *uplo, char *trans, int *n, int *k, d *alpha, z *a, int *lda, d *beta, z *c, int *ldc) noexcept nogil: + + _fortran_zherk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zhpmv "BLAS_FUNC(zhpmv)"(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *ap, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy) nogil +cdef void zhpmv(char *uplo, int *n, z *alpha, z *ap, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil: + + _fortran_zhpmv(uplo, n, alpha, ap, x, incx, beta, y, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zhpr "BLAS_FUNC(zhpr)"(char *uplo, int *n, d *alpha, npy_complex128 *x, int *incx, npy_complex128 *ap) nogil +cdef void zhpr(char *uplo, int *n, d *alpha, z *x, int *incx, z *ap) noexcept nogil: + + _fortran_zhpr(uplo, n, alpha, x, incx, ap) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zhpr2 "BLAS_FUNC(zhpr2)"(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, npy_complex128 *ap) nogil +cdef void zhpr2(char *uplo, int *n, z *alpha, z *x, int *incx, z *y, int *incy, z *ap) noexcept nogil: + + _fortran_zhpr2(uplo, n, alpha, x, incx, y, incy, ap) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zrotg "BLAS_FUNC(zrotg)"(npy_complex128 *ca, npy_complex128 *cb, d *c, npy_complex128 *s) nogil +cdef void zrotg(z *ca, z *cb, d *c, z *s) noexcept nogil: + + _fortran_zrotg(ca, cb, c, s) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zscal "BLAS_FUNC(zscal)"(int *n, npy_complex128 *za, npy_complex128 *zx, int *incx) nogil +cdef void zscal(int *n, z *za, z *zx, int *incx) noexcept nogil: + + _fortran_zscal(n, za, zx, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zswap "BLAS_FUNC(zswap)"(int *n, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy) nogil +cdef void zswap(int *n, z *zx, int *incx, z *zy, int *incy) noexcept nogil: + + _fortran_zswap(n, zx, incx, zy, incy) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zsymm "BLAS_FUNC(zsymm)"(char *side, char *uplo, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *beta, npy_complex128 *c, int *ldc) nogil +cdef void zsymm(char *side, char *uplo, int *m, int *n, z *alpha, z *a, int *lda, z *b, int *ldb, z *beta, z *c, int *ldc) noexcept nogil: + + _fortran_zsymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zsyr2k "BLAS_FUNC(zsyr2k)"(char *uplo, char *trans, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *beta, npy_complex128 *c, int *ldc) nogil +cdef void zsyr2k(char *uplo, char *trans, int *n, int *k, z *alpha, z *a, int *lda, z *b, int *ldb, z *beta, z *c, int *ldc) noexcept nogil: + + _fortran_zsyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) + + +cdef extern from "_blas_subroutines.h": + void _fortran_zsyrk "BLAS_FUNC(zsyrk)"(char *uplo, char *trans, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *beta, npy_complex128 *c, int *ldc) nogil +cdef void zsyrk(char *uplo, char *trans, int *n, int *k, z *alpha, z *a, int *lda, z *beta, z *c, int *ldc) noexcept nogil: + + _fortran_zsyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) + + +cdef extern from "_blas_subroutines.h": + void _fortran_ztbmv "BLAS_FUNC(ztbmv)"(char *uplo, char *trans, char *diag, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx) nogil +cdef void ztbmv(char *uplo, char *trans, char *diag, int *n, int *k, z *a, int *lda, z *x, int *incx) noexcept nogil: + + _fortran_ztbmv(uplo, trans, diag, n, k, a, lda, x, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_ztbsv "BLAS_FUNC(ztbsv)"(char *uplo, char *trans, char *diag, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx) nogil +cdef void ztbsv(char *uplo, char *trans, char *diag, int *n, int *k, z *a, int *lda, z *x, int *incx) noexcept nogil: + + _fortran_ztbsv(uplo, trans, diag, n, k, a, lda, x, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_ztpmv "BLAS_FUNC(ztpmv)"(char *uplo, char *trans, char *diag, int *n, npy_complex128 *ap, npy_complex128 *x, int *incx) nogil +cdef void ztpmv(char *uplo, char *trans, char *diag, int *n, z *ap, z *x, int *incx) noexcept nogil: + + _fortran_ztpmv(uplo, trans, diag, n, ap, x, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_ztpsv "BLAS_FUNC(ztpsv)"(char *uplo, char *trans, char *diag, int *n, npy_complex128 *ap, npy_complex128 *x, int *incx) nogil +cdef void ztpsv(char *uplo, char *trans, char *diag, int *n, z *ap, z *x, int *incx) noexcept nogil: + + _fortran_ztpsv(uplo, trans, diag, n, ap, x, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_ztrmm "BLAS_FUNC(ztrmm)"(char *side, char *uplo, char *transa, char *diag, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb) nogil +cdef void ztrmm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, z *alpha, z *a, int *lda, z *b, int *ldb) noexcept nogil: + + _fortran_ztrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) + + +cdef extern from "_blas_subroutines.h": + void _fortran_ztrmv "BLAS_FUNC(ztrmv)"(char *uplo, char *trans, char *diag, int *n, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx) nogil +cdef void ztrmv(char *uplo, char *trans, char *diag, int *n, z *a, int *lda, z *x, int *incx) noexcept nogil: + + _fortran_ztrmv(uplo, trans, diag, n, a, lda, x, incx) + + +cdef extern from "_blas_subroutines.h": + void _fortran_ztrsm "BLAS_FUNC(ztrsm)"(char *side, char *uplo, char *transa, char *diag, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb) nogil +cdef void ztrsm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, z *alpha, z *a, int *lda, z *b, int *ldb) noexcept nogil: + + _fortran_ztrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) + + +cdef extern from "_blas_subroutines.h": + void _fortran_ztrsv "BLAS_FUNC(ztrsv)"(char *uplo, char *trans, char *diag, int *n, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx) nogil +cdef void ztrsv(char *uplo, char *trans, char *diag, int *n, z *a, int *lda, z *x, int *incx) noexcept nogil: + + _fortran_ztrsv(uplo, trans, diag, n, a, lda, x, incx) + + + +# Python-accessible wrappers for testing: + +cdef inline bint _is_contiguous(double[:,:] a, int axis) noexcept nogil: + return (a.strides[axis] == sizeof(a[0,0]) or a.shape[axis] == 1) + +cpdef float complex _test_cdotc(float complex[:] cx, float complex[:] cy) noexcept nogil: + cdef: + int n = cx.shape[0] + int incx = cx.strides[0] // sizeof(cx[0]) + int incy = cy.strides[0] // sizeof(cy[0]) + return cdotc(&n, &cx[0], &incx, &cy[0], &incy) + +cpdef float complex _test_cdotu(float complex[:] cx, float complex[:] cy) noexcept nogil: + cdef: + int n = cx.shape[0] + int incx = cx.strides[0] // sizeof(cx[0]) + int incy = cy.strides[0] // sizeof(cy[0]) + return cdotu(&n, &cx[0], &incx, &cy[0], &incy) + +cpdef double _test_dasum(double[:] dx) noexcept nogil: + cdef: + int n = dx.shape[0] + int incx = dx.strides[0] // sizeof(dx[0]) + return dasum(&n, &dx[0], &incx) + +cpdef double _test_ddot(double[:] dx, double[:] dy) noexcept nogil: + cdef: + int n = dx.shape[0] + int incx = dx.strides[0] // sizeof(dx[0]) + int incy = dy.strides[0] // sizeof(dy[0]) + return ddot(&n, &dx[0], &incx, &dy[0], &incy) + +cpdef int _test_dgemm(double alpha, double[:,:] a, double[:,:] b, double beta, + double[:,:] c) except -1 nogil: + cdef: + char *transa + char *transb + int m, n, k, lda, ldb, ldc + double *a0=&a[0,0] + double *b0=&b[0,0] + double *c0=&c[0,0] + # In the case that c is C contiguous, swap a and b and + # swap whether or not each of them is transposed. + # This can be done because a.dot(b) = b.T.dot(a.T).T. + if _is_contiguous(c, 1): + if _is_contiguous(a, 1): + transb = 'n' + ldb = (&a[1,0]) - a0 if a.shape[0] > 1 else 1 + elif _is_contiguous(a, 0): + transb = 't' + ldb = (&a[0,1]) - a0 if a.shape[1] > 1 else 1 + else: + with gil: + raise ValueError("Input 'a' is neither C nor Fortran contiguous.") + if _is_contiguous(b, 1): + transa = 'n' + lda = (&b[1,0]) - b0 if b.shape[0] > 1 else 1 + elif _is_contiguous(b, 0): + transa = 't' + lda = (&b[0,1]) - b0 if b.shape[1] > 1 else 1 + else: + with gil: + raise ValueError("Input 'b' is neither C nor Fortran contiguous.") + k = b.shape[0] + if k != a.shape[1]: + with gil: + raise ValueError("Shape mismatch in input arrays.") + m = b.shape[1] + n = a.shape[0] + if n != c.shape[0] or m != c.shape[1]: + with gil: + raise ValueError("Output array does not have the correct shape.") + ldc = (&c[1,0]) - c0 if c.shape[0] > 1 else 1 + dgemm(transa, transb, &m, &n, &k, &alpha, b0, &lda, a0, + &ldb, &beta, c0, &ldc) + elif _is_contiguous(c, 0): + if _is_contiguous(a, 1): + transa = 't' + lda = (&a[1,0]) - a0 if a.shape[0] > 1 else 1 + elif _is_contiguous(a, 0): + transa = 'n' + lda = (&a[0,1]) - a0 if a.shape[1] > 1 else 1 + else: + with gil: + raise ValueError("Input 'a' is neither C nor Fortran contiguous.") + if _is_contiguous(b, 1): + transb = 't' + ldb = (&b[1,0]) - b0 if b.shape[0] > 1 else 1 + elif _is_contiguous(b, 0): + transb = 'n' + ldb = (&b[0,1]) - b0 if b.shape[1] > 1 else 1 + else: + with gil: + raise ValueError("Input 'b' is neither C nor Fortran contiguous.") + m = a.shape[0] + k = a.shape[1] + if k != b.shape[0]: + with gil: + raise ValueError("Shape mismatch in input arrays.") + n = b.shape[1] + if m != c.shape[0] or n != c.shape[1]: + with gil: + raise ValueError("Output array does not have the correct shape.") + ldc = (&c[0,1]) - c0 if c.shape[1] > 1 else 1 + dgemm(transa, transb, &m, &n, &k, &alpha, a0, &lda, b0, + &ldb, &beta, c0, &ldc) + else: + with gil: + raise ValueError("Input 'c' is neither C nor Fortran contiguous.") + return 0 + +cpdef double _test_dnrm2(double[:] x) noexcept nogil: + cdef: + int n = x.shape[0] + int incx = x.strides[0] // sizeof(x[0]) + return dnrm2(&n, &x[0], &incx) + +cpdef double _test_dzasum(double complex[:] zx) noexcept nogil: + cdef: + int n = zx.shape[0] + int incx = zx.strides[0] // sizeof(zx[0]) + return dzasum(&n, &zx[0], &incx) + +cpdef double _test_dznrm2(double complex[:] x) noexcept nogil: + cdef: + int n = x.shape[0] + int incx = x.strides[0] // sizeof(x[0]) + return dznrm2(&n, &x[0], &incx) + +cpdef int _test_icamax(float complex[:] cx) noexcept nogil: + cdef: + int n = cx.shape[0] + int incx = cx.strides[0] // sizeof(cx[0]) + return icamax(&n, &cx[0], &incx) + +cpdef int _test_idamax(double[:] dx) noexcept nogil: + cdef: + int n = dx.shape[0] + int incx = dx.strides[0] // sizeof(dx[0]) + return idamax(&n, &dx[0], &incx) + +cpdef int _test_isamax(float[:] sx) noexcept nogil: + cdef: + int n = sx.shape[0] + int incx = sx.strides[0] // sizeof(sx[0]) + return isamax(&n, &sx[0], &incx) + +cpdef int _test_izamax(double complex[:] zx) noexcept nogil: + cdef: + int n = zx.shape[0] + int incx = zx.strides[0] // sizeof(zx[0]) + return izamax(&n, &zx[0], &incx) + +cpdef float _test_sasum(float[:] sx) noexcept nogil: + cdef: + int n = sx.shape[0] + int incx = sx.strides[0] // sizeof(sx[0]) + return sasum(&n, &sx[0], &incx) + +cpdef float _test_scasum(float complex[:] cx) noexcept nogil: + cdef: + int n = cx.shape[0] + int incx = cx.strides[0] // sizeof(cx[0]) + return scasum(&n, &cx[0], &incx) + +cpdef float _test_scnrm2(float complex[:] x) noexcept nogil: + cdef: + int n = x.shape[0] + int incx = x.strides[0] // sizeof(x[0]) + return scnrm2(&n, &x[0], &incx) + +cpdef float _test_sdot(float[:] sx, float[:] sy) noexcept nogil: + cdef: + int n = sx.shape[0] + int incx = sx.strides[0] // sizeof(sx[0]) + int incy = sy.strides[0] // sizeof(sy[0]) + return sdot(&n, &sx[0], &incx, &sy[0], &incy) + +cpdef float _test_snrm2(float[:] x) noexcept nogil: + cdef: + int n = x.shape[0] + int incx = x.strides[0] // sizeof(x[0]) + return snrm2(&n, &x[0], &incx) + +cpdef double complex _test_zdotc(double complex[:] zx, double complex[:] zy) noexcept nogil: + cdef: + int n = zx.shape[0] + int incx = zx.strides[0] // sizeof(zx[0]) + int incy = zy.strides[0] // sizeof(zy[0]) + return zdotc(&n, &zx[0], &incx, &zy[0], &incy) + +cpdef double complex _test_zdotu(double complex[:] zx, double complex[:] zy) noexcept nogil: + cdef: + int n = zx.shape[0] + int incx = zx.strides[0] // sizeof(zx[0]) + int incy = zy.strides[0] // sizeof(zy[0]) + return zdotu(&n, &zx[0], &incx, &zy[0], &incy) diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/cython_lapack.cpython-310-x86_64-linux-gnu.so b/venv/lib/python3.10/site-packages/scipy/linalg/cython_lapack.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..1ae6fbe49d8771523d9fcfa3c11c25d0ba3bcff5 Binary files /dev/null and b/venv/lib/python3.10/site-packages/scipy/linalg/cython_lapack.cpython-310-x86_64-linux-gnu.so differ diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/cython_lapack.pxd b/venv/lib/python3.10/site-packages/scipy/linalg/cython_lapack.pxd new file mode 100644 index 0000000000000000000000000000000000000000..7964c52d766cd1b08bda6411960a29dbeb6bfe2d --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/cython_lapack.pxd @@ -0,0 +1,1528 @@ +""" +This file was generated by _generate_pyx.py. +Do not edit this file directly. +""" + +# Within SciPy, these wrappers can be used via relative or absolute cimport. +# Examples: +# from ..linalg cimport cython_lapack +# from scipy.linalg cimport cython_lapack +# cimport scipy.linalg.cython_lapack as cython_lapack +# cimport ..linalg.cython_lapack as cython_lapack + +# Within SciPy, if LAPACK functions are needed in C/C++/Fortran, +# these wrappers should not be used. +# The original libraries should be linked directly. + +ctypedef float s +ctypedef double d +ctypedef float complex c +ctypedef double complex z + +# Function pointer type declarations for +# gees and gges families of functions. +ctypedef bint cselect1(c*) +ctypedef bint cselect2(c*, c*) +ctypedef bint dselect2(d*, d*) +ctypedef bint dselect3(d*, d*, d*) +ctypedef bint sselect2(s*, s*) +ctypedef bint sselect3(s*, s*, s*) +ctypedef bint zselect1(z*) +ctypedef bint zselect2(z*, z*) + +cdef void cbbcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, s *theta, s *phi, c *u1, int *ldu1, c *u2, int *ldu2, c *v1t, int *ldv1t, c *v2t, int *ldv2t, s *b11d, s *b11e, s *b12d, s *b12e, s *b21d, s *b21e, s *b22d, s *b22e, s *rwork, int *lrwork, int *info) noexcept nogil +cdef void cbdsqr(char *uplo, int *n, int *ncvt, int *nru, int *ncc, s *d, s *e, c *vt, int *ldvt, c *u, int *ldu, c *c, int *ldc, s *rwork, int *info) noexcept nogil +cdef void cgbbrd(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, c *ab, int *ldab, s *d, s *e, c *q, int *ldq, c *pt, int *ldpt, c *c, int *ldc, c *work, s *rwork, int *info) noexcept nogil +cdef void cgbcon(char *norm, int *n, int *kl, int *ku, c *ab, int *ldab, int *ipiv, s *anorm, s *rcond, c *work, s *rwork, int *info) noexcept nogil +cdef void cgbequ(int *m, int *n, int *kl, int *ku, c *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil +cdef void cgbequb(int *m, int *n, int *kl, int *ku, c *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil +cdef void cgbrfs(char *trans, int *n, int *kl, int *ku, int *nrhs, c *ab, int *ldab, c *afb, int *ldafb, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil +cdef void cgbsv(int *n, int *kl, int *ku, int *nrhs, c *ab, int *ldab, int *ipiv, c *b, int *ldb, int *info) noexcept nogil +cdef void cgbsvx(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, c *ab, int *ldab, c *afb, int *ldafb, int *ipiv, char *equed, s *r, s *c, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil +cdef void cgbtf2(int *m, int *n, int *kl, int *ku, c *ab, int *ldab, int *ipiv, int *info) noexcept nogil +cdef void cgbtrf(int *m, int *n, int *kl, int *ku, c *ab, int *ldab, int *ipiv, int *info) noexcept nogil +cdef void cgbtrs(char *trans, int *n, int *kl, int *ku, int *nrhs, c *ab, int *ldab, int *ipiv, c *b, int *ldb, int *info) noexcept nogil +cdef void cgebak(char *job, char *side, int *n, int *ilo, int *ihi, s *scale, int *m, c *v, int *ldv, int *info) noexcept nogil +cdef void cgebal(char *job, int *n, c *a, int *lda, int *ilo, int *ihi, s *scale, int *info) noexcept nogil +cdef void cgebd2(int *m, int *n, c *a, int *lda, s *d, s *e, c *tauq, c *taup, c *work, int *info) noexcept nogil +cdef void cgebrd(int *m, int *n, c *a, int *lda, s *d, s *e, c *tauq, c *taup, c *work, int *lwork, int *info) noexcept nogil +cdef void cgecon(char *norm, int *n, c *a, int *lda, s *anorm, s *rcond, c *work, s *rwork, int *info) noexcept nogil +cdef void cgeequ(int *m, int *n, c *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil +cdef void cgeequb(int *m, int *n, c *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil +cdef void cgees(char *jobvs, char *sort, cselect1 *select, int *n, c *a, int *lda, int *sdim, c *w, c *vs, int *ldvs, c *work, int *lwork, s *rwork, bint *bwork, int *info) noexcept nogil +cdef void cgeesx(char *jobvs, char *sort, cselect1 *select, char *sense, int *n, c *a, int *lda, int *sdim, c *w, c *vs, int *ldvs, s *rconde, s *rcondv, c *work, int *lwork, s *rwork, bint *bwork, int *info) noexcept nogil +cdef void cgeev(char *jobvl, char *jobvr, int *n, c *a, int *lda, c *w, c *vl, int *ldvl, c *vr, int *ldvr, c *work, int *lwork, s *rwork, int *info) noexcept nogil +cdef void cgeevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, c *a, int *lda, c *w, c *vl, int *ldvl, c *vr, int *ldvr, int *ilo, int *ihi, s *scale, s *abnrm, s *rconde, s *rcondv, c *work, int *lwork, s *rwork, int *info) noexcept nogil +cdef void cgehd2(int *n, int *ilo, int *ihi, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil +cdef void cgehrd(int *n, int *ilo, int *ihi, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil +cdef void cgelq2(int *m, int *n, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil +cdef void cgelqf(int *m, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil +cdef void cgels(char *trans, int *m, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, c *work, int *lwork, int *info) noexcept nogil +cdef void cgelsd(int *m, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, s *s, s *rcond, int *rank, c *work, int *lwork, s *rwork, int *iwork, int *info) noexcept nogil +cdef void cgelss(int *m, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, s *s, s *rcond, int *rank, c *work, int *lwork, s *rwork, int *info) noexcept nogil +cdef void cgelsy(int *m, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, int *jpvt, s *rcond, int *rank, c *work, int *lwork, s *rwork, int *info) noexcept nogil +cdef void cgemqrt(char *side, char *trans, int *m, int *n, int *k, int *nb, c *v, int *ldv, c *t, int *ldt, c *c, int *ldc, c *work, int *info) noexcept nogil +cdef void cgeql2(int *m, int *n, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil +cdef void cgeqlf(int *m, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil +cdef void cgeqp3(int *m, int *n, c *a, int *lda, int *jpvt, c *tau, c *work, int *lwork, s *rwork, int *info) noexcept nogil +cdef void cgeqr2(int *m, int *n, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil +cdef void cgeqr2p(int *m, int *n, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil +cdef void cgeqrf(int *m, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil +cdef void cgeqrfp(int *m, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil +cdef void cgeqrt(int *m, int *n, int *nb, c *a, int *lda, c *t, int *ldt, c *work, int *info) noexcept nogil +cdef void cgeqrt2(int *m, int *n, c *a, int *lda, c *t, int *ldt, int *info) noexcept nogil +cdef void cgeqrt3(int *m, int *n, c *a, int *lda, c *t, int *ldt, int *info) noexcept nogil +cdef void cgerfs(char *trans, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil +cdef void cgerq2(int *m, int *n, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil +cdef void cgerqf(int *m, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil +cdef void cgesc2(int *n, c *a, int *lda, c *rhs, int *ipiv, int *jpiv, s *scale) noexcept nogil +cdef void cgesdd(char *jobz, int *m, int *n, c *a, int *lda, s *s, c *u, int *ldu, c *vt, int *ldvt, c *work, int *lwork, s *rwork, int *iwork, int *info) noexcept nogil +cdef void cgesv(int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, int *info) noexcept nogil +cdef void cgesvd(char *jobu, char *jobvt, int *m, int *n, c *a, int *lda, s *s, c *u, int *ldu, c *vt, int *ldvt, c *work, int *lwork, s *rwork, int *info) noexcept nogil +cdef void cgesvx(char *fact, char *trans, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, int *ipiv, char *equed, s *r, s *c, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil +cdef void cgetc2(int *n, c *a, int *lda, int *ipiv, int *jpiv, int *info) noexcept nogil +cdef void cgetf2(int *m, int *n, c *a, int *lda, int *ipiv, int *info) noexcept nogil +cdef void cgetrf(int *m, int *n, c *a, int *lda, int *ipiv, int *info) noexcept nogil +cdef void cgetri(int *n, c *a, int *lda, int *ipiv, c *work, int *lwork, int *info) noexcept nogil +cdef void cgetrs(char *trans, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, int *info) noexcept nogil +cdef void cggbak(char *job, char *side, int *n, int *ilo, int *ihi, s *lscale, s *rscale, int *m, c *v, int *ldv, int *info) noexcept nogil +cdef void cggbal(char *job, int *n, c *a, int *lda, c *b, int *ldb, int *ilo, int *ihi, s *lscale, s *rscale, s *work, int *info) noexcept nogil +cdef void cgges(char *jobvsl, char *jobvsr, char *sort, cselect2 *selctg, int *n, c *a, int *lda, c *b, int *ldb, int *sdim, c *alpha, c *beta, c *vsl, int *ldvsl, c *vsr, int *ldvsr, c *work, int *lwork, s *rwork, bint *bwork, int *info) noexcept nogil +cdef void cggesx(char *jobvsl, char *jobvsr, char *sort, cselect2 *selctg, char *sense, int *n, c *a, int *lda, c *b, int *ldb, int *sdim, c *alpha, c *beta, c *vsl, int *ldvsl, c *vsr, int *ldvsr, s *rconde, s *rcondv, c *work, int *lwork, s *rwork, int *iwork, int *liwork, bint *bwork, int *info) noexcept nogil +cdef void cggev(char *jobvl, char *jobvr, int *n, c *a, int *lda, c *b, int *ldb, c *alpha, c *beta, c *vl, int *ldvl, c *vr, int *ldvr, c *work, int *lwork, s *rwork, int *info) noexcept nogil +cdef void cggevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, c *a, int *lda, c *b, int *ldb, c *alpha, c *beta, c *vl, int *ldvl, c *vr, int *ldvr, int *ilo, int *ihi, s *lscale, s *rscale, s *abnrm, s *bbnrm, s *rconde, s *rcondv, c *work, int *lwork, s *rwork, int *iwork, bint *bwork, int *info) noexcept nogil +cdef void cggglm(int *n, int *m, int *p, c *a, int *lda, c *b, int *ldb, c *d, c *x, c *y, c *work, int *lwork, int *info) noexcept nogil +cdef void cgghrd(char *compq, char *compz, int *n, int *ilo, int *ihi, c *a, int *lda, c *b, int *ldb, c *q, int *ldq, c *z, int *ldz, int *info) noexcept nogil +cdef void cgglse(int *m, int *n, int *p, c *a, int *lda, c *b, int *ldb, c *c, c *d, c *x, c *work, int *lwork, int *info) noexcept nogil +cdef void cggqrf(int *n, int *m, int *p, c *a, int *lda, c *taua, c *b, int *ldb, c *taub, c *work, int *lwork, int *info) noexcept nogil +cdef void cggrqf(int *m, int *p, int *n, c *a, int *lda, c *taua, c *b, int *ldb, c *taub, c *work, int *lwork, int *info) noexcept nogil +cdef void cgtcon(char *norm, int *n, c *dl, c *d, c *du, c *du2, int *ipiv, s *anorm, s *rcond, c *work, int *info) noexcept nogil +cdef void cgtrfs(char *trans, int *n, int *nrhs, c *dl, c *d, c *du, c *dlf, c *df, c *duf, c *du2, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil +cdef void cgtsv(int *n, int *nrhs, c *dl, c *d, c *du, c *b, int *ldb, int *info) noexcept nogil +cdef void cgtsvx(char *fact, char *trans, int *n, int *nrhs, c *dl, c *d, c *du, c *dlf, c *df, c *duf, c *du2, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil +cdef void cgttrf(int *n, c *dl, c *d, c *du, c *du2, int *ipiv, int *info) noexcept nogil +cdef void cgttrs(char *trans, int *n, int *nrhs, c *dl, c *d, c *du, c *du2, int *ipiv, c *b, int *ldb, int *info) noexcept nogil +cdef void cgtts2(int *itrans, int *n, int *nrhs, c *dl, c *d, c *du, c *du2, int *ipiv, c *b, int *ldb) noexcept nogil +cdef void chbev(char *jobz, char *uplo, int *n, int *kd, c *ab, int *ldab, s *w, c *z, int *ldz, c *work, s *rwork, int *info) noexcept nogil +cdef void chbevd(char *jobz, char *uplo, int *n, int *kd, c *ab, int *ldab, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void chbevx(char *jobz, char *range, char *uplo, int *n, int *kd, c *ab, int *ldab, c *q, int *ldq, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, c *work, s *rwork, int *iwork, int *ifail, int *info) noexcept nogil +cdef void chbgst(char *vect, char *uplo, int *n, int *ka, int *kb, c *ab, int *ldab, c *bb, int *ldbb, c *x, int *ldx, c *work, s *rwork, int *info) noexcept nogil +cdef void chbgv(char *jobz, char *uplo, int *n, int *ka, int *kb, c *ab, int *ldab, c *bb, int *ldbb, s *w, c *z, int *ldz, c *work, s *rwork, int *info) noexcept nogil +cdef void chbgvd(char *jobz, char *uplo, int *n, int *ka, int *kb, c *ab, int *ldab, c *bb, int *ldbb, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void chbgvx(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, c *ab, int *ldab, c *bb, int *ldbb, c *q, int *ldq, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, c *work, s *rwork, int *iwork, int *ifail, int *info) noexcept nogil +cdef void chbtrd(char *vect, char *uplo, int *n, int *kd, c *ab, int *ldab, s *d, s *e, c *q, int *ldq, c *work, int *info) noexcept nogil +cdef void checon(char *uplo, int *n, c *a, int *lda, int *ipiv, s *anorm, s *rcond, c *work, int *info) noexcept nogil +cdef void cheequb(char *uplo, int *n, c *a, int *lda, s *s, s *scond, s *amax, c *work, int *info) noexcept nogil +cdef void cheev(char *jobz, char *uplo, int *n, c *a, int *lda, s *w, c *work, int *lwork, s *rwork, int *info) noexcept nogil +cdef void cheevd(char *jobz, char *uplo, int *n, c *a, int *lda, s *w, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void cheevr(char *jobz, char *range, char *uplo, int *n, c *a, int *lda, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, int *isuppz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void cheevx(char *jobz, char *range, char *uplo, int *n, c *a, int *lda, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *iwork, int *ifail, int *info) noexcept nogil +cdef void chegs2(int *itype, char *uplo, int *n, c *a, int *lda, c *b, int *ldb, int *info) noexcept nogil +cdef void chegst(int *itype, char *uplo, int *n, c *a, int *lda, c *b, int *ldb, int *info) noexcept nogil +cdef void chegv(int *itype, char *jobz, char *uplo, int *n, c *a, int *lda, c *b, int *ldb, s *w, c *work, int *lwork, s *rwork, int *info) noexcept nogil +cdef void chegvd(int *itype, char *jobz, char *uplo, int *n, c *a, int *lda, c *b, int *ldb, s *w, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void chegvx(int *itype, char *jobz, char *range, char *uplo, int *n, c *a, int *lda, c *b, int *ldb, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *iwork, int *ifail, int *info) noexcept nogil +cdef void cherfs(char *uplo, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil +cdef void chesv(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, c *work, int *lwork, int *info) noexcept nogil +cdef void chesvx(char *fact, char *uplo, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, int *lwork, s *rwork, int *info) noexcept nogil +cdef void cheswapr(char *uplo, int *n, c *a, int *lda, int *i1, int *i2) noexcept nogil +cdef void chetd2(char *uplo, int *n, c *a, int *lda, s *d, s *e, c *tau, int *info) noexcept nogil +cdef void chetf2(char *uplo, int *n, c *a, int *lda, int *ipiv, int *info) noexcept nogil +cdef void chetrd(char *uplo, int *n, c *a, int *lda, s *d, s *e, c *tau, c *work, int *lwork, int *info) noexcept nogil +cdef void chetrf(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *lwork, int *info) noexcept nogil +cdef void chetri(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *info) noexcept nogil +cdef void chetri2(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *lwork, int *info) noexcept nogil +cdef void chetri2x(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *nb, int *info) noexcept nogil +cdef void chetrs(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, int *info) noexcept nogil +cdef void chetrs2(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, c *work, int *info) noexcept nogil +cdef void chfrk(char *transr, char *uplo, char *trans, int *n, int *k, s *alpha, c *a, int *lda, s *beta, c *c) noexcept nogil +cdef void chgeqz(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, c *h, int *ldh, c *t, int *ldt, c *alpha, c *beta, c *q, int *ldq, c *z, int *ldz, c *work, int *lwork, s *rwork, int *info) noexcept nogil +cdef char chla_transtype(int *trans) noexcept nogil +cdef void chpcon(char *uplo, int *n, c *ap, int *ipiv, s *anorm, s *rcond, c *work, int *info) noexcept nogil +cdef void chpev(char *jobz, char *uplo, int *n, c *ap, s *w, c *z, int *ldz, c *work, s *rwork, int *info) noexcept nogil +cdef void chpevd(char *jobz, char *uplo, int *n, c *ap, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void chpevx(char *jobz, char *range, char *uplo, int *n, c *ap, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, c *work, s *rwork, int *iwork, int *ifail, int *info) noexcept nogil +cdef void chpgst(int *itype, char *uplo, int *n, c *ap, c *bp, int *info) noexcept nogil +cdef void chpgv(int *itype, char *jobz, char *uplo, int *n, c *ap, c *bp, s *w, c *z, int *ldz, c *work, s *rwork, int *info) noexcept nogil +cdef void chpgvd(int *itype, char *jobz, char *uplo, int *n, c *ap, c *bp, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void chpgvx(int *itype, char *jobz, char *range, char *uplo, int *n, c *ap, c *bp, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, c *work, s *rwork, int *iwork, int *ifail, int *info) noexcept nogil +cdef void chprfs(char *uplo, int *n, int *nrhs, c *ap, c *afp, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil +cdef void chpsv(char *uplo, int *n, int *nrhs, c *ap, int *ipiv, c *b, int *ldb, int *info) noexcept nogil +cdef void chpsvx(char *fact, char *uplo, int *n, int *nrhs, c *ap, c *afp, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil +cdef void chptrd(char *uplo, int *n, c *ap, s *d, s *e, c *tau, int *info) noexcept nogil +cdef void chptrf(char *uplo, int *n, c *ap, int *ipiv, int *info) noexcept nogil +cdef void chptri(char *uplo, int *n, c *ap, int *ipiv, c *work, int *info) noexcept nogil +cdef void chptrs(char *uplo, int *n, int *nrhs, c *ap, int *ipiv, c *b, int *ldb, int *info) noexcept nogil +cdef void chsein(char *side, char *eigsrc, char *initv, bint *select, int *n, c *h, int *ldh, c *w, c *vl, int *ldvl, c *vr, int *ldvr, int *mm, int *m, c *work, s *rwork, int *ifaill, int *ifailr, int *info) noexcept nogil +cdef void chseqr(char *job, char *compz, int *n, int *ilo, int *ihi, c *h, int *ldh, c *w, c *z, int *ldz, c *work, int *lwork, int *info) noexcept nogil +cdef void clabrd(int *m, int *n, int *nb, c *a, int *lda, s *d, s *e, c *tauq, c *taup, c *x, int *ldx, c *y, int *ldy) noexcept nogil +cdef void clacgv(int *n, c *x, int *incx) noexcept nogil +cdef void clacn2(int *n, c *v, c *x, s *est, int *kase, int *isave) noexcept nogil +cdef void clacon(int *n, c *v, c *x, s *est, int *kase) noexcept nogil +cdef void clacp2(char *uplo, int *m, int *n, s *a, int *lda, c *b, int *ldb) noexcept nogil +cdef void clacpy(char *uplo, int *m, int *n, c *a, int *lda, c *b, int *ldb) noexcept nogil +cdef void clacrm(int *m, int *n, c *a, int *lda, s *b, int *ldb, c *c, int *ldc, s *rwork) noexcept nogil +cdef void clacrt(int *n, c *cx, int *incx, c *cy, int *incy, c *c, c *s) noexcept nogil +cdef c cladiv(c *x, c *y) noexcept nogil +cdef void claed0(int *qsiz, int *n, s *d, s *e, c *q, int *ldq, c *qstore, int *ldqs, s *rwork, int *iwork, int *info) noexcept nogil +cdef void claed7(int *n, int *cutpnt, int *qsiz, int *tlvls, int *curlvl, int *curpbm, s *d, c *q, int *ldq, s *rho, int *indxq, s *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, s *givnum, c *work, s *rwork, int *iwork, int *info) noexcept nogil +cdef void claed8(int *k, int *n, int *qsiz, c *q, int *ldq, s *d, s *rho, int *cutpnt, s *z, s *dlamda, c *q2, int *ldq2, s *w, int *indxp, int *indx, int *indxq, int *perm, int *givptr, int *givcol, s *givnum, int *info) noexcept nogil +cdef void claein(bint *rightv, bint *noinit, int *n, c *h, int *ldh, c *w, c *v, c *b, int *ldb, s *rwork, s *eps3, s *smlnum, int *info) noexcept nogil +cdef void claesy(c *a, c *b, c *c, c *rt1, c *rt2, c *evscal, c *cs1, c *sn1) noexcept nogil +cdef void claev2(c *a, c *b, c *c, s *rt1, s *rt2, s *cs1, c *sn1) noexcept nogil +cdef void clag2z(int *m, int *n, c *sa, int *ldsa, z *a, int *lda, int *info) noexcept nogil +cdef void clags2(bint *upper, s *a1, c *a2, s *a3, s *b1, c *b2, s *b3, s *csu, c *snu, s *csv, c *snv, s *csq, c *snq) noexcept nogil +cdef void clagtm(char *trans, int *n, int *nrhs, s *alpha, c *dl, c *d, c *du, c *x, int *ldx, s *beta, c *b, int *ldb) noexcept nogil +cdef void clahef(char *uplo, int *n, int *nb, int *kb, c *a, int *lda, int *ipiv, c *w, int *ldw, int *info) noexcept nogil +cdef void clahqr(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, c *h, int *ldh, c *w, int *iloz, int *ihiz, c *z, int *ldz, int *info) noexcept nogil +cdef void clahr2(int *n, int *k, int *nb, c *a, int *lda, c *tau, c *t, int *ldt, c *y, int *ldy) noexcept nogil +cdef void claic1(int *job, int *j, c *x, s *sest, c *w, c *gamma, s *sestpr, c *s, c *c) noexcept nogil +cdef void clals0(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, c *b, int *ldb, c *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, s *givnum, int *ldgnum, s *poles, s *difl, s *difr, s *z, int *k, s *c, s *s, s *rwork, int *info) noexcept nogil +cdef void clalsa(int *icompq, int *smlsiz, int *n, int *nrhs, c *b, int *ldb, c *bx, int *ldbx, s *u, int *ldu, s *vt, int *k, s *difl, s *difr, s *z, s *poles, int *givptr, int *givcol, int *ldgcol, int *perm, s *givnum, s *c, s *s, s *rwork, int *iwork, int *info) noexcept nogil +cdef void clalsd(char *uplo, int *smlsiz, int *n, int *nrhs, s *d, s *e, c *b, int *ldb, s *rcond, int *rank, c *work, s *rwork, int *iwork, int *info) noexcept nogil +cdef s clangb(char *norm, int *n, int *kl, int *ku, c *ab, int *ldab, s *work) noexcept nogil +cdef s clange(char *norm, int *m, int *n, c *a, int *lda, s *work) noexcept nogil +cdef s clangt(char *norm, int *n, c *dl, c *d, c *du) noexcept nogil +cdef s clanhb(char *norm, char *uplo, int *n, int *k, c *ab, int *ldab, s *work) noexcept nogil +cdef s clanhe(char *norm, char *uplo, int *n, c *a, int *lda, s *work) noexcept nogil +cdef s clanhf(char *norm, char *transr, char *uplo, int *n, c *a, s *work) noexcept nogil +cdef s clanhp(char *norm, char *uplo, int *n, c *ap, s *work) noexcept nogil +cdef s clanhs(char *norm, int *n, c *a, int *lda, s *work) noexcept nogil +cdef s clanht(char *norm, int *n, s *d, c *e) noexcept nogil +cdef s clansb(char *norm, char *uplo, int *n, int *k, c *ab, int *ldab, s *work) noexcept nogil +cdef s clansp(char *norm, char *uplo, int *n, c *ap, s *work) noexcept nogil +cdef s clansy(char *norm, char *uplo, int *n, c *a, int *lda, s *work) noexcept nogil +cdef s clantb(char *norm, char *uplo, char *diag, int *n, int *k, c *ab, int *ldab, s *work) noexcept nogil +cdef s clantp(char *norm, char *uplo, char *diag, int *n, c *ap, s *work) noexcept nogil +cdef s clantr(char *norm, char *uplo, char *diag, int *m, int *n, c *a, int *lda, s *work) noexcept nogil +cdef void clapll(int *n, c *x, int *incx, c *y, int *incy, s *ssmin) noexcept nogil +cdef void clapmr(bint *forwrd, int *m, int *n, c *x, int *ldx, int *k) noexcept nogil +cdef void clapmt(bint *forwrd, int *m, int *n, c *x, int *ldx, int *k) noexcept nogil +cdef void claqgb(int *m, int *n, int *kl, int *ku, c *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, char *equed) noexcept nogil +cdef void claqge(int *m, int *n, c *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, char *equed) noexcept nogil +cdef void claqhb(char *uplo, int *n, int *kd, c *ab, int *ldab, s *s, s *scond, s *amax, char *equed) noexcept nogil +cdef void claqhe(char *uplo, int *n, c *a, int *lda, s *s, s *scond, s *amax, char *equed) noexcept nogil +cdef void claqhp(char *uplo, int *n, c *ap, s *s, s *scond, s *amax, char *equed) noexcept nogil +cdef void claqp2(int *m, int *n, int *offset, c *a, int *lda, int *jpvt, c *tau, s *vn1, s *vn2, c *work) noexcept nogil +cdef void claqps(int *m, int *n, int *offset, int *nb, int *kb, c *a, int *lda, int *jpvt, c *tau, s *vn1, s *vn2, c *auxv, c *f, int *ldf) noexcept nogil +cdef void claqr0(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, c *h, int *ldh, c *w, int *iloz, int *ihiz, c *z, int *ldz, c *work, int *lwork, int *info) noexcept nogil +cdef void claqr1(int *n, c *h, int *ldh, c *s1, c *s2, c *v) noexcept nogil +cdef void claqr2(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, c *h, int *ldh, int *iloz, int *ihiz, c *z, int *ldz, int *ns, int *nd, c *sh, c *v, int *ldv, int *nh, c *t, int *ldt, int *nv, c *wv, int *ldwv, c *work, int *lwork) noexcept nogil +cdef void claqr3(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, c *h, int *ldh, int *iloz, int *ihiz, c *z, int *ldz, int *ns, int *nd, c *sh, c *v, int *ldv, int *nh, c *t, int *ldt, int *nv, c *wv, int *ldwv, c *work, int *lwork) noexcept nogil +cdef void claqr4(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, c *h, int *ldh, c *w, int *iloz, int *ihiz, c *z, int *ldz, c *work, int *lwork, int *info) noexcept nogil +cdef void claqr5(bint *wantt, bint *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, c *s, c *h, int *ldh, int *iloz, int *ihiz, c *z, int *ldz, c *v, int *ldv, c *u, int *ldu, int *nv, c *wv, int *ldwv, int *nh, c *wh, int *ldwh) noexcept nogil +cdef void claqsb(char *uplo, int *n, int *kd, c *ab, int *ldab, s *s, s *scond, s *amax, char *equed) noexcept nogil +cdef void claqsp(char *uplo, int *n, c *ap, s *s, s *scond, s *amax, char *equed) noexcept nogil +cdef void claqsy(char *uplo, int *n, c *a, int *lda, s *s, s *scond, s *amax, char *equed) noexcept nogil +cdef void clar1v(int *n, int *b1, int *bn, s *lambda_, s *d, s *l, s *ld, s *lld, s *pivmin, s *gaptol, c *z, bint *wantnc, int *negcnt, s *ztz, s *mingma, int *r, int *isuppz, s *nrminv, s *resid, s *rqcorr, s *work) noexcept nogil +cdef void clar2v(int *n, c *x, c *y, c *z, int *incx, s *c, c *s, int *incc) noexcept nogil +cdef void clarcm(int *m, int *n, s *a, int *lda, c *b, int *ldb, c *c, int *ldc, s *rwork) noexcept nogil +cdef void clarf(char *side, int *m, int *n, c *v, int *incv, c *tau, c *c, int *ldc, c *work) noexcept nogil +cdef void clarfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, c *v, int *ldv, c *t, int *ldt, c *c, int *ldc, c *work, int *ldwork) noexcept nogil +cdef void clarfg(int *n, c *alpha, c *x, int *incx, c *tau) noexcept nogil +cdef void clarfgp(int *n, c *alpha, c *x, int *incx, c *tau) noexcept nogil +cdef void clarft(char *direct, char *storev, int *n, int *k, c *v, int *ldv, c *tau, c *t, int *ldt) noexcept nogil +cdef void clarfx(char *side, int *m, int *n, c *v, c *tau, c *c, int *ldc, c *work) noexcept nogil +cdef void clargv(int *n, c *x, int *incx, c *y, int *incy, s *c, int *incc) noexcept nogil +cdef void clarnv(int *idist, int *iseed, int *n, c *x) noexcept nogil +cdef void clarrv(int *n, s *vl, s *vu, s *d, s *l, s *pivmin, int *isplit, int *m, int *dol, int *dou, s *minrgp, s *rtol1, s *rtol2, s *w, s *werr, s *wgap, int *iblock, int *indexw, s *gers, c *z, int *ldz, int *isuppz, s *work, int *iwork, int *info) noexcept nogil +cdef void clartg(c *f, c *g, s *cs, c *sn, c *r) noexcept nogil +cdef void clartv(int *n, c *x, int *incx, c *y, int *incy, s *c, c *s, int *incc) noexcept nogil +cdef void clarz(char *side, int *m, int *n, int *l, c *v, int *incv, c *tau, c *c, int *ldc, c *work) noexcept nogil +cdef void clarzb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, c *v, int *ldv, c *t, int *ldt, c *c, int *ldc, c *work, int *ldwork) noexcept nogil +cdef void clarzt(char *direct, char *storev, int *n, int *k, c *v, int *ldv, c *tau, c *t, int *ldt) noexcept nogil +cdef void clascl(char *type_bn, int *kl, int *ku, s *cfrom, s *cto, int *m, int *n, c *a, int *lda, int *info) noexcept nogil +cdef void claset(char *uplo, int *m, int *n, c *alpha, c *beta, c *a, int *lda) noexcept nogil +cdef void clasr(char *side, char *pivot, char *direct, int *m, int *n, s *c, s *s, c *a, int *lda) noexcept nogil +cdef void classq(int *n, c *x, int *incx, s *scale, s *sumsq) noexcept nogil +cdef void claswp(int *n, c *a, int *lda, int *k1, int *k2, int *ipiv, int *incx) noexcept nogil +cdef void clasyf(char *uplo, int *n, int *nb, int *kb, c *a, int *lda, int *ipiv, c *w, int *ldw, int *info) noexcept nogil +cdef void clatbs(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, c *ab, int *ldab, c *x, s *scale, s *cnorm, int *info) noexcept nogil +cdef void clatdf(int *ijob, int *n, c *z, int *ldz, c *rhs, s *rdsum, s *rdscal, int *ipiv, int *jpiv) noexcept nogil +cdef void clatps(char *uplo, char *trans, char *diag, char *normin, int *n, c *ap, c *x, s *scale, s *cnorm, int *info) noexcept nogil +cdef void clatrd(char *uplo, int *n, int *nb, c *a, int *lda, s *e, c *tau, c *w, int *ldw) noexcept nogil +cdef void clatrs(char *uplo, char *trans, char *diag, char *normin, int *n, c *a, int *lda, c *x, s *scale, s *cnorm, int *info) noexcept nogil +cdef void clatrz(int *m, int *n, int *l, c *a, int *lda, c *tau, c *work) noexcept nogil +cdef void clauu2(char *uplo, int *n, c *a, int *lda, int *info) noexcept nogil +cdef void clauum(char *uplo, int *n, c *a, int *lda, int *info) noexcept nogil +cdef void cpbcon(char *uplo, int *n, int *kd, c *ab, int *ldab, s *anorm, s *rcond, c *work, s *rwork, int *info) noexcept nogil +cdef void cpbequ(char *uplo, int *n, int *kd, c *ab, int *ldab, s *s, s *scond, s *amax, int *info) noexcept nogil +cdef void cpbrfs(char *uplo, int *n, int *kd, int *nrhs, c *ab, int *ldab, c *afb, int *ldafb, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil +cdef void cpbstf(char *uplo, int *n, int *kd, c *ab, int *ldab, int *info) noexcept nogil +cdef void cpbsv(char *uplo, int *n, int *kd, int *nrhs, c *ab, int *ldab, c *b, int *ldb, int *info) noexcept nogil +cdef void cpbsvx(char *fact, char *uplo, int *n, int *kd, int *nrhs, c *ab, int *ldab, c *afb, int *ldafb, char *equed, s *s, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil +cdef void cpbtf2(char *uplo, int *n, int *kd, c *ab, int *ldab, int *info) noexcept nogil +cdef void cpbtrf(char *uplo, int *n, int *kd, c *ab, int *ldab, int *info) noexcept nogil +cdef void cpbtrs(char *uplo, int *n, int *kd, int *nrhs, c *ab, int *ldab, c *b, int *ldb, int *info) noexcept nogil +cdef void cpftrf(char *transr, char *uplo, int *n, c *a, int *info) noexcept nogil +cdef void cpftri(char *transr, char *uplo, int *n, c *a, int *info) noexcept nogil +cdef void cpftrs(char *transr, char *uplo, int *n, int *nrhs, c *a, c *b, int *ldb, int *info) noexcept nogil +cdef void cpocon(char *uplo, int *n, c *a, int *lda, s *anorm, s *rcond, c *work, s *rwork, int *info) noexcept nogil +cdef void cpoequ(int *n, c *a, int *lda, s *s, s *scond, s *amax, int *info) noexcept nogil +cdef void cpoequb(int *n, c *a, int *lda, s *s, s *scond, s *amax, int *info) noexcept nogil +cdef void cporfs(char *uplo, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil +cdef void cposv(char *uplo, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, int *info) noexcept nogil +cdef void cposvx(char *fact, char *uplo, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, char *equed, s *s, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil +cdef void cpotf2(char *uplo, int *n, c *a, int *lda, int *info) noexcept nogil +cdef void cpotrf(char *uplo, int *n, c *a, int *lda, int *info) noexcept nogil +cdef void cpotri(char *uplo, int *n, c *a, int *lda, int *info) noexcept nogil +cdef void cpotrs(char *uplo, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, int *info) noexcept nogil +cdef void cppcon(char *uplo, int *n, c *ap, s *anorm, s *rcond, c *work, s *rwork, int *info) noexcept nogil +cdef void cppequ(char *uplo, int *n, c *ap, s *s, s *scond, s *amax, int *info) noexcept nogil +cdef void cpprfs(char *uplo, int *n, int *nrhs, c *ap, c *afp, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil +cdef void cppsv(char *uplo, int *n, int *nrhs, c *ap, c *b, int *ldb, int *info) noexcept nogil +cdef void cppsvx(char *fact, char *uplo, int *n, int *nrhs, c *ap, c *afp, char *equed, s *s, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil +cdef void cpptrf(char *uplo, int *n, c *ap, int *info) noexcept nogil +cdef void cpptri(char *uplo, int *n, c *ap, int *info) noexcept nogil +cdef void cpptrs(char *uplo, int *n, int *nrhs, c *ap, c *b, int *ldb, int *info) noexcept nogil +cdef void cpstf2(char *uplo, int *n, c *a, int *lda, int *piv, int *rank, s *tol, s *work, int *info) noexcept nogil +cdef void cpstrf(char *uplo, int *n, c *a, int *lda, int *piv, int *rank, s *tol, s *work, int *info) noexcept nogil +cdef void cptcon(int *n, s *d, c *e, s *anorm, s *rcond, s *rwork, int *info) noexcept nogil +cdef void cpteqr(char *compz, int *n, s *d, s *e, c *z, int *ldz, s *work, int *info) noexcept nogil +cdef void cptrfs(char *uplo, int *n, int *nrhs, s *d, c *e, s *df, c *ef, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil +cdef void cptsv(int *n, int *nrhs, s *d, c *e, c *b, int *ldb, int *info) noexcept nogil +cdef void cptsvx(char *fact, int *n, int *nrhs, s *d, c *e, s *df, c *ef, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil +cdef void cpttrf(int *n, s *d, c *e, int *info) noexcept nogil +cdef void cpttrs(char *uplo, int *n, int *nrhs, s *d, c *e, c *b, int *ldb, int *info) noexcept nogil +cdef void cptts2(int *iuplo, int *n, int *nrhs, s *d, c *e, c *b, int *ldb) noexcept nogil +cdef void crot(int *n, c *cx, int *incx, c *cy, int *incy, s *c, c *s) noexcept nogil +cdef void cspcon(char *uplo, int *n, c *ap, int *ipiv, s *anorm, s *rcond, c *work, int *info) noexcept nogil +cdef void cspmv(char *uplo, int *n, c *alpha, c *ap, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil +cdef void cspr(char *uplo, int *n, c *alpha, c *x, int *incx, c *ap) noexcept nogil +cdef void csprfs(char *uplo, int *n, int *nrhs, c *ap, c *afp, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil +cdef void cspsv(char *uplo, int *n, int *nrhs, c *ap, int *ipiv, c *b, int *ldb, int *info) noexcept nogil +cdef void cspsvx(char *fact, char *uplo, int *n, int *nrhs, c *ap, c *afp, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil +cdef void csptrf(char *uplo, int *n, c *ap, int *ipiv, int *info) noexcept nogil +cdef void csptri(char *uplo, int *n, c *ap, int *ipiv, c *work, int *info) noexcept nogil +cdef void csptrs(char *uplo, int *n, int *nrhs, c *ap, int *ipiv, c *b, int *ldb, int *info) noexcept nogil +cdef void csrscl(int *n, s *sa, c *sx, int *incx) noexcept nogil +cdef void cstedc(char *compz, int *n, s *d, s *e, c *z, int *ldz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void cstegr(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, int *isuppz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void cstein(int *n, s *d, s *e, int *m, s *w, int *iblock, int *isplit, c *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil +cdef void cstemr(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, int *m, s *w, c *z, int *ldz, int *nzc, int *isuppz, bint *tryrac, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void csteqr(char *compz, int *n, s *d, s *e, c *z, int *ldz, s *work, int *info) noexcept nogil +cdef void csycon(char *uplo, int *n, c *a, int *lda, int *ipiv, s *anorm, s *rcond, c *work, int *info) noexcept nogil +cdef void csyconv(char *uplo, char *way, int *n, c *a, int *lda, int *ipiv, c *work, int *info) noexcept nogil +cdef void csyequb(char *uplo, int *n, c *a, int *lda, s *s, s *scond, s *amax, c *work, int *info) noexcept nogil +cdef void csymv(char *uplo, int *n, c *alpha, c *a, int *lda, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil +cdef void csyr(char *uplo, int *n, c *alpha, c *x, int *incx, c *a, int *lda) noexcept nogil +cdef void csyrfs(char *uplo, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil +cdef void csysv(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, c *work, int *lwork, int *info) noexcept nogil +cdef void csysvx(char *fact, char *uplo, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, int *lwork, s *rwork, int *info) noexcept nogil +cdef void csyswapr(char *uplo, int *n, c *a, int *lda, int *i1, int *i2) noexcept nogil +cdef void csytf2(char *uplo, int *n, c *a, int *lda, int *ipiv, int *info) noexcept nogil +cdef void csytrf(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *lwork, int *info) noexcept nogil +cdef void csytri(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *info) noexcept nogil +cdef void csytri2(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *lwork, int *info) noexcept nogil +cdef void csytri2x(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *nb, int *info) noexcept nogil +cdef void csytrs(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, int *info) noexcept nogil +cdef void csytrs2(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, c *work, int *info) noexcept nogil +cdef void ctbcon(char *norm, char *uplo, char *diag, int *n, int *kd, c *ab, int *ldab, s *rcond, c *work, s *rwork, int *info) noexcept nogil +cdef void ctbrfs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, c *ab, int *ldab, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil +cdef void ctbtrs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, c *ab, int *ldab, c *b, int *ldb, int *info) noexcept nogil +cdef void ctfsm(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, c *alpha, c *a, c *b, int *ldb) noexcept nogil +cdef void ctftri(char *transr, char *uplo, char *diag, int *n, c *a, int *info) noexcept nogil +cdef void ctfttp(char *transr, char *uplo, int *n, c *arf, c *ap, int *info) noexcept nogil +cdef void ctfttr(char *transr, char *uplo, int *n, c *arf, c *a, int *lda, int *info) noexcept nogil +cdef void ctgevc(char *side, char *howmny, bint *select, int *n, c *s, int *lds, c *p, int *ldp, c *vl, int *ldvl, c *vr, int *ldvr, int *mm, int *m, c *work, s *rwork, int *info) noexcept nogil +cdef void ctgex2(bint *wantq, bint *wantz, int *n, c *a, int *lda, c *b, int *ldb, c *q, int *ldq, c *z, int *ldz, int *j1, int *info) noexcept nogil +cdef void ctgexc(bint *wantq, bint *wantz, int *n, c *a, int *lda, c *b, int *ldb, c *q, int *ldq, c *z, int *ldz, int *ifst, int *ilst, int *info) noexcept nogil +cdef void ctgsen(int *ijob, bint *wantq, bint *wantz, bint *select, int *n, c *a, int *lda, c *b, int *ldb, c *alpha, c *beta, c *q, int *ldq, c *z, int *ldz, int *m, s *pl, s *pr, s *dif, c *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void ctgsja(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, c *a, int *lda, c *b, int *ldb, s *tola, s *tolb, s *alpha, s *beta, c *u, int *ldu, c *v, int *ldv, c *q, int *ldq, c *work, int *ncycle, int *info) noexcept nogil +cdef void ctgsna(char *job, char *howmny, bint *select, int *n, c *a, int *lda, c *b, int *ldb, c *vl, int *ldvl, c *vr, int *ldvr, s *s, s *dif, int *mm, int *m, c *work, int *lwork, int *iwork, int *info) noexcept nogil +cdef void ctgsy2(char *trans, int *ijob, int *m, int *n, c *a, int *lda, c *b, int *ldb, c *c, int *ldc, c *d, int *ldd, c *e, int *lde, c *f, int *ldf, s *scale, s *rdsum, s *rdscal, int *info) noexcept nogil +cdef void ctgsyl(char *trans, int *ijob, int *m, int *n, c *a, int *lda, c *b, int *ldb, c *c, int *ldc, c *d, int *ldd, c *e, int *lde, c *f, int *ldf, s *scale, s *dif, c *work, int *lwork, int *iwork, int *info) noexcept nogil +cdef void ctpcon(char *norm, char *uplo, char *diag, int *n, c *ap, s *rcond, c *work, s *rwork, int *info) noexcept nogil +cdef void ctpmqrt(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, c *v, int *ldv, c *t, int *ldt, c *a, int *lda, c *b, int *ldb, c *work, int *info) noexcept nogil +cdef void ctpqrt(int *m, int *n, int *l, int *nb, c *a, int *lda, c *b, int *ldb, c *t, int *ldt, c *work, int *info) noexcept nogil +cdef void ctpqrt2(int *m, int *n, int *l, c *a, int *lda, c *b, int *ldb, c *t, int *ldt, int *info) noexcept nogil +cdef void ctprfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, c *v, int *ldv, c *t, int *ldt, c *a, int *lda, c *b, int *ldb, c *work, int *ldwork) noexcept nogil +cdef void ctprfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, c *ap, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil +cdef void ctptri(char *uplo, char *diag, int *n, c *ap, int *info) noexcept nogil +cdef void ctptrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, c *ap, c *b, int *ldb, int *info) noexcept nogil +cdef void ctpttf(char *transr, char *uplo, int *n, c *ap, c *arf, int *info) noexcept nogil +cdef void ctpttr(char *uplo, int *n, c *ap, c *a, int *lda, int *info) noexcept nogil +cdef void ctrcon(char *norm, char *uplo, char *diag, int *n, c *a, int *lda, s *rcond, c *work, s *rwork, int *info) noexcept nogil +cdef void ctrevc(char *side, char *howmny, bint *select, int *n, c *t, int *ldt, c *vl, int *ldvl, c *vr, int *ldvr, int *mm, int *m, c *work, s *rwork, int *info) noexcept nogil +cdef void ctrexc(char *compq, int *n, c *t, int *ldt, c *q, int *ldq, int *ifst, int *ilst, int *info) noexcept nogil +cdef void ctrrfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil +cdef void ctrsen(char *job, char *compq, bint *select, int *n, c *t, int *ldt, c *q, int *ldq, c *w, int *m, s *s, s *sep, c *work, int *lwork, int *info) noexcept nogil +cdef void ctrsna(char *job, char *howmny, bint *select, int *n, c *t, int *ldt, c *vl, int *ldvl, c *vr, int *ldvr, s *s, s *sep, int *mm, int *m, c *work, int *ldwork, s *rwork, int *info) noexcept nogil +cdef void ctrsyl(char *trana, char *tranb, int *isgn, int *m, int *n, c *a, int *lda, c *b, int *ldb, c *c, int *ldc, s *scale, int *info) noexcept nogil +cdef void ctrti2(char *uplo, char *diag, int *n, c *a, int *lda, int *info) noexcept nogil +cdef void ctrtri(char *uplo, char *diag, int *n, c *a, int *lda, int *info) noexcept nogil +cdef void ctrtrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, int *info) noexcept nogil +cdef void ctrttf(char *transr, char *uplo, int *n, c *a, int *lda, c *arf, int *info) noexcept nogil +cdef void ctrttp(char *uplo, int *n, c *a, int *lda, c *ap, int *info) noexcept nogil +cdef void ctzrzf(int *m, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil +cdef void cunbdb(char *trans, char *signs, int *m, int *p, int *q, c *x11, int *ldx11, c *x12, int *ldx12, c *x21, int *ldx21, c *x22, int *ldx22, s *theta, s *phi, c *taup1, c *taup2, c *tauq1, c *tauq2, c *work, int *lwork, int *info) noexcept nogil +cdef void cuncsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, c *x11, int *ldx11, c *x12, int *ldx12, c *x21, int *ldx21, c *x22, int *ldx22, s *theta, c *u1, int *ldu1, c *u2, int *ldu2, c *v1t, int *ldv1t, c *v2t, int *ldv2t, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *info) noexcept nogil +cdef void cung2l(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil +cdef void cung2r(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil +cdef void cungbr(char *vect, int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil +cdef void cunghr(int *n, int *ilo, int *ihi, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil +cdef void cungl2(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil +cdef void cunglq(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil +cdef void cungql(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil +cdef void cungqr(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil +cdef void cungr2(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil +cdef void cungrq(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil +cdef void cungtr(char *uplo, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil +cdef void cunm2l(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *info) noexcept nogil +cdef void cunm2r(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *info) noexcept nogil +cdef void cunmbr(char *vect, char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil +cdef void cunmhr(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil +cdef void cunml2(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *info) noexcept nogil +cdef void cunmlq(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil +cdef void cunmql(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil +cdef void cunmqr(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil +cdef void cunmr2(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *info) noexcept nogil +cdef void cunmr3(char *side, char *trans, int *m, int *n, int *k, int *l, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *info) noexcept nogil +cdef void cunmrq(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil +cdef void cunmrz(char *side, char *trans, int *m, int *n, int *k, int *l, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil +cdef void cunmtr(char *side, char *uplo, char *trans, int *m, int *n, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil +cdef void cupgtr(char *uplo, int *n, c *ap, c *tau, c *q, int *ldq, c *work, int *info) noexcept nogil +cdef void cupmtr(char *side, char *uplo, char *trans, int *m, int *n, c *ap, c *tau, c *c, int *ldc, c *work, int *info) noexcept nogil +cdef void dbbcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, d *theta, d *phi, d *u1, int *ldu1, d *u2, int *ldu2, d *v1t, int *ldv1t, d *v2t, int *ldv2t, d *b11d, d *b11e, d *b12d, d *b12e, d *b21d, d *b21e, d *b22d, d *b22e, d *work, int *lwork, int *info) noexcept nogil +cdef void dbdsdc(char *uplo, char *compq, int *n, d *d, d *e, d *u, int *ldu, d *vt, int *ldvt, d *q, int *iq, d *work, int *iwork, int *info) noexcept nogil +cdef void dbdsqr(char *uplo, int *n, int *ncvt, int *nru, int *ncc, d *d, d *e, d *vt, int *ldvt, d *u, int *ldu, d *c, int *ldc, d *work, int *info) noexcept nogil +cdef void ddisna(char *job, int *m, int *n, d *d, d *sep, int *info) noexcept nogil +cdef void dgbbrd(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, d *ab, int *ldab, d *d, d *e, d *q, int *ldq, d *pt, int *ldpt, d *c, int *ldc, d *work, int *info) noexcept nogil +cdef void dgbcon(char *norm, int *n, int *kl, int *ku, d *ab, int *ldab, int *ipiv, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil +cdef void dgbequ(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil +cdef void dgbequb(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil +cdef void dgbrfs(char *trans, int *n, int *kl, int *ku, int *nrhs, d *ab, int *ldab, d *afb, int *ldafb, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil +cdef void dgbsv(int *n, int *kl, int *ku, int *nrhs, d *ab, int *ldab, int *ipiv, d *b, int *ldb, int *info) noexcept nogil +cdef void dgbsvx(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, d *ab, int *ldab, d *afb, int *ldafb, int *ipiv, char *equed, d *r, d *c, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil +cdef void dgbtf2(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, int *ipiv, int *info) noexcept nogil +cdef void dgbtrf(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, int *ipiv, int *info) noexcept nogil +cdef void dgbtrs(char *trans, int *n, int *kl, int *ku, int *nrhs, d *ab, int *ldab, int *ipiv, d *b, int *ldb, int *info) noexcept nogil +cdef void dgebak(char *job, char *side, int *n, int *ilo, int *ihi, d *scale, int *m, d *v, int *ldv, int *info) noexcept nogil +cdef void dgebal(char *job, int *n, d *a, int *lda, int *ilo, int *ihi, d *scale, int *info) noexcept nogil +cdef void dgebd2(int *m, int *n, d *a, int *lda, d *d, d *e, d *tauq, d *taup, d *work, int *info) noexcept nogil +cdef void dgebrd(int *m, int *n, d *a, int *lda, d *d, d *e, d *tauq, d *taup, d *work, int *lwork, int *info) noexcept nogil +cdef void dgecon(char *norm, int *n, d *a, int *lda, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil +cdef void dgeequ(int *m, int *n, d *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil +cdef void dgeequb(int *m, int *n, d *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil +cdef void dgees(char *jobvs, char *sort, dselect2 *select, int *n, d *a, int *lda, int *sdim, d *wr, d *wi, d *vs, int *ldvs, d *work, int *lwork, bint *bwork, int *info) noexcept nogil +cdef void dgeesx(char *jobvs, char *sort, dselect2 *select, char *sense, int *n, d *a, int *lda, int *sdim, d *wr, d *wi, d *vs, int *ldvs, d *rconde, d *rcondv, d *work, int *lwork, int *iwork, int *liwork, bint *bwork, int *info) noexcept nogil +cdef void dgeev(char *jobvl, char *jobvr, int *n, d *a, int *lda, d *wr, d *wi, d *vl, int *ldvl, d *vr, int *ldvr, d *work, int *lwork, int *info) noexcept nogil +cdef void dgeevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, d *a, int *lda, d *wr, d *wi, d *vl, int *ldvl, d *vr, int *ldvr, int *ilo, int *ihi, d *scale, d *abnrm, d *rconde, d *rcondv, d *work, int *lwork, int *iwork, int *info) noexcept nogil +cdef void dgehd2(int *n, int *ilo, int *ihi, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil +cdef void dgehrd(int *n, int *ilo, int *ihi, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil +cdef void dgejsv(char *joba, char *jobu, char *jobv, char *jobr, char *jobt, char *jobp, int *m, int *n, d *a, int *lda, d *sva, d *u, int *ldu, d *v, int *ldv, d *work, int *lwork, int *iwork, int *info) noexcept nogil +cdef void dgelq2(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil +cdef void dgelqf(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil +cdef void dgels(char *trans, int *m, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *work, int *lwork, int *info) noexcept nogil +cdef void dgelsd(int *m, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *s, d *rcond, int *rank, d *work, int *lwork, int *iwork, int *info) noexcept nogil +cdef void dgelss(int *m, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *s, d *rcond, int *rank, d *work, int *lwork, int *info) noexcept nogil +cdef void dgelsy(int *m, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, int *jpvt, d *rcond, int *rank, d *work, int *lwork, int *info) noexcept nogil +cdef void dgemqrt(char *side, char *trans, int *m, int *n, int *k, int *nb, d *v, int *ldv, d *t, int *ldt, d *c, int *ldc, d *work, int *info) noexcept nogil +cdef void dgeql2(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil +cdef void dgeqlf(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil +cdef void dgeqp3(int *m, int *n, d *a, int *lda, int *jpvt, d *tau, d *work, int *lwork, int *info) noexcept nogil +cdef void dgeqr2(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil +cdef void dgeqr2p(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil +cdef void dgeqrf(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil +cdef void dgeqrfp(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil +cdef void dgeqrt(int *m, int *n, int *nb, d *a, int *lda, d *t, int *ldt, d *work, int *info) noexcept nogil +cdef void dgeqrt2(int *m, int *n, d *a, int *lda, d *t, int *ldt, int *info) noexcept nogil +cdef void dgeqrt3(int *m, int *n, d *a, int *lda, d *t, int *ldt, int *info) noexcept nogil +cdef void dgerfs(char *trans, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil +cdef void dgerq2(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil +cdef void dgerqf(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil +cdef void dgesc2(int *n, d *a, int *lda, d *rhs, int *ipiv, int *jpiv, d *scale) noexcept nogil +cdef void dgesdd(char *jobz, int *m, int *n, d *a, int *lda, d *s, d *u, int *ldu, d *vt, int *ldvt, d *work, int *lwork, int *iwork, int *info) noexcept nogil +cdef void dgesv(int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, int *info) noexcept nogil +cdef void dgesvd(char *jobu, char *jobvt, int *m, int *n, d *a, int *lda, d *s, d *u, int *ldu, d *vt, int *ldvt, d *work, int *lwork, int *info) noexcept nogil +cdef void dgesvj(char *joba, char *jobu, char *jobv, int *m, int *n, d *a, int *lda, d *sva, int *mv, d *v, int *ldv, d *work, int *lwork, int *info) noexcept nogil +cdef void dgesvx(char *fact, char *trans, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, int *ipiv, char *equed, d *r, d *c, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil +cdef void dgetc2(int *n, d *a, int *lda, int *ipiv, int *jpiv, int *info) noexcept nogil +cdef void dgetf2(int *m, int *n, d *a, int *lda, int *ipiv, int *info) noexcept nogil +cdef void dgetrf(int *m, int *n, d *a, int *lda, int *ipiv, int *info) noexcept nogil +cdef void dgetri(int *n, d *a, int *lda, int *ipiv, d *work, int *lwork, int *info) noexcept nogil +cdef void dgetrs(char *trans, int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, int *info) noexcept nogil +cdef void dggbak(char *job, char *side, int *n, int *ilo, int *ihi, d *lscale, d *rscale, int *m, d *v, int *ldv, int *info) noexcept nogil +cdef void dggbal(char *job, int *n, d *a, int *lda, d *b, int *ldb, int *ilo, int *ihi, d *lscale, d *rscale, d *work, int *info) noexcept nogil +cdef void dgges(char *jobvsl, char *jobvsr, char *sort, dselect3 *selctg, int *n, d *a, int *lda, d *b, int *ldb, int *sdim, d *alphar, d *alphai, d *beta, d *vsl, int *ldvsl, d *vsr, int *ldvsr, d *work, int *lwork, bint *bwork, int *info) noexcept nogil +cdef void dggesx(char *jobvsl, char *jobvsr, char *sort, dselect3 *selctg, char *sense, int *n, d *a, int *lda, d *b, int *ldb, int *sdim, d *alphar, d *alphai, d *beta, d *vsl, int *ldvsl, d *vsr, int *ldvsr, d *rconde, d *rcondv, d *work, int *lwork, int *iwork, int *liwork, bint *bwork, int *info) noexcept nogil +cdef void dggev(char *jobvl, char *jobvr, int *n, d *a, int *lda, d *b, int *ldb, d *alphar, d *alphai, d *beta, d *vl, int *ldvl, d *vr, int *ldvr, d *work, int *lwork, int *info) noexcept nogil +cdef void dggevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, d *a, int *lda, d *b, int *ldb, d *alphar, d *alphai, d *beta, d *vl, int *ldvl, d *vr, int *ldvr, int *ilo, int *ihi, d *lscale, d *rscale, d *abnrm, d *bbnrm, d *rconde, d *rcondv, d *work, int *lwork, int *iwork, bint *bwork, int *info) noexcept nogil +cdef void dggglm(int *n, int *m, int *p, d *a, int *lda, d *b, int *ldb, d *d, d *x, d *y, d *work, int *lwork, int *info) noexcept nogil +cdef void dgghrd(char *compq, char *compz, int *n, int *ilo, int *ihi, d *a, int *lda, d *b, int *ldb, d *q, int *ldq, d *z, int *ldz, int *info) noexcept nogil +cdef void dgglse(int *m, int *n, int *p, d *a, int *lda, d *b, int *ldb, d *c, d *d, d *x, d *work, int *lwork, int *info) noexcept nogil +cdef void dggqrf(int *n, int *m, int *p, d *a, int *lda, d *taua, d *b, int *ldb, d *taub, d *work, int *lwork, int *info) noexcept nogil +cdef void dggrqf(int *m, int *p, int *n, d *a, int *lda, d *taua, d *b, int *ldb, d *taub, d *work, int *lwork, int *info) noexcept nogil +cdef void dgsvj0(char *jobv, int *m, int *n, d *a, int *lda, d *d, d *sva, int *mv, d *v, int *ldv, d *eps, d *sfmin, d *tol, int *nsweep, d *work, int *lwork, int *info) noexcept nogil +cdef void dgsvj1(char *jobv, int *m, int *n, int *n1, d *a, int *lda, d *d, d *sva, int *mv, d *v, int *ldv, d *eps, d *sfmin, d *tol, int *nsweep, d *work, int *lwork, int *info) noexcept nogil +cdef void dgtcon(char *norm, int *n, d *dl, d *d, d *du, d *du2, int *ipiv, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil +cdef void dgtrfs(char *trans, int *n, int *nrhs, d *dl, d *d, d *du, d *dlf, d *df, d *duf, d *du2, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil +cdef void dgtsv(int *n, int *nrhs, d *dl, d *d, d *du, d *b, int *ldb, int *info) noexcept nogil +cdef void dgtsvx(char *fact, char *trans, int *n, int *nrhs, d *dl, d *d, d *du, d *dlf, d *df, d *duf, d *du2, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil +cdef void dgttrf(int *n, d *dl, d *d, d *du, d *du2, int *ipiv, int *info) noexcept nogil +cdef void dgttrs(char *trans, int *n, int *nrhs, d *dl, d *d, d *du, d *du2, int *ipiv, d *b, int *ldb, int *info) noexcept nogil +cdef void dgtts2(int *itrans, int *n, int *nrhs, d *dl, d *d, d *du, d *du2, int *ipiv, d *b, int *ldb) noexcept nogil +cdef void dhgeqz(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *t, int *ldt, d *alphar, d *alphai, d *beta, d *q, int *ldq, d *z, int *ldz, d *work, int *lwork, int *info) noexcept nogil +cdef void dhsein(char *side, char *eigsrc, char *initv, bint *select, int *n, d *h, int *ldh, d *wr, d *wi, d *vl, int *ldvl, d *vr, int *ldvr, int *mm, int *m, d *work, int *ifaill, int *ifailr, int *info) noexcept nogil +cdef void dhseqr(char *job, char *compz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *wr, d *wi, d *z, int *ldz, d *work, int *lwork, int *info) noexcept nogil +cdef bint disnan(d *din) noexcept nogil +cdef void dlabad(d *small, d *large) noexcept nogil +cdef void dlabrd(int *m, int *n, int *nb, d *a, int *lda, d *d, d *e, d *tauq, d *taup, d *x, int *ldx, d *y, int *ldy) noexcept nogil +cdef void dlacn2(int *n, d *v, d *x, int *isgn, d *est, int *kase, int *isave) noexcept nogil +cdef void dlacon(int *n, d *v, d *x, int *isgn, d *est, int *kase) noexcept nogil +cdef void dlacpy(char *uplo, int *m, int *n, d *a, int *lda, d *b, int *ldb) noexcept nogil +cdef void dladiv(d *a, d *b, d *c, d *d, d *p, d *q) noexcept nogil +cdef void dlae2(d *a, d *b, d *c, d *rt1, d *rt2) noexcept nogil +cdef void dlaebz(int *ijob, int *nitmax, int *n, int *mmax, int *minp, int *nbmin, d *abstol, d *reltol, d *pivmin, d *d, d *e, d *e2, int *nval, d *ab, d *c, int *mout, int *nab, d *work, int *iwork, int *info) noexcept nogil +cdef void dlaed0(int *icompq, int *qsiz, int *n, d *d, d *e, d *q, int *ldq, d *qstore, int *ldqs, d *work, int *iwork, int *info) noexcept nogil +cdef void dlaed1(int *n, d *d, d *q, int *ldq, int *indxq, d *rho, int *cutpnt, d *work, int *iwork, int *info) noexcept nogil +cdef void dlaed2(int *k, int *n, int *n1, d *d, d *q, int *ldq, int *indxq, d *rho, d *z, d *dlamda, d *w, d *q2, int *indx, int *indxc, int *indxp, int *coltyp, int *info) noexcept nogil +cdef void dlaed3(int *k, int *n, int *n1, d *d, d *q, int *ldq, d *rho, d *dlamda, d *q2, int *indx, int *ctot, d *w, d *s, int *info) noexcept nogil +cdef void dlaed4(int *n, int *i, d *d, d *z, d *delta, d *rho, d *dlam, int *info) noexcept nogil +cdef void dlaed5(int *i, d *d, d *z, d *delta, d *rho, d *dlam) noexcept nogil +cdef void dlaed6(int *kniter, bint *orgati, d *rho, d *d, d *z, d *finit, d *tau, int *info) noexcept nogil +cdef void dlaed7(int *icompq, int *n, int *qsiz, int *tlvls, int *curlvl, int *curpbm, d *d, d *q, int *ldq, int *indxq, d *rho, int *cutpnt, d *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, d *givnum, d *work, int *iwork, int *info) noexcept nogil +cdef void dlaed8(int *icompq, int *k, int *n, int *qsiz, d *d, d *q, int *ldq, int *indxq, d *rho, int *cutpnt, d *z, d *dlamda, d *q2, int *ldq2, d *w, int *perm, int *givptr, int *givcol, d *givnum, int *indxp, int *indx, int *info) noexcept nogil +cdef void dlaed9(int *k, int *kstart, int *kstop, int *n, d *d, d *q, int *ldq, d *rho, d *dlamda, d *w, d *s, int *lds, int *info) noexcept nogil +cdef void dlaeda(int *n, int *tlvls, int *curlvl, int *curpbm, int *prmptr, int *perm, int *givptr, int *givcol, d *givnum, d *q, int *qptr, d *z, d *ztemp, int *info) noexcept nogil +cdef void dlaein(bint *rightv, bint *noinit, int *n, d *h, int *ldh, d *wr, d *wi, d *vr, d *vi, d *b, int *ldb, d *work, d *eps3, d *smlnum, d *bignum, int *info) noexcept nogil +cdef void dlaev2(d *a, d *b, d *c, d *rt1, d *rt2, d *cs1, d *sn1) noexcept nogil +cdef void dlaexc(bint *wantq, int *n, d *t, int *ldt, d *q, int *ldq, int *j1, int *n1, int *n2, d *work, int *info) noexcept nogil +cdef void dlag2(d *a, int *lda, d *b, int *ldb, d *safmin, d *scale1, d *scale2, d *wr1, d *wr2, d *wi) noexcept nogil +cdef void dlag2s(int *m, int *n, d *a, int *lda, s *sa, int *ldsa, int *info) noexcept nogil +cdef void dlags2(bint *upper, d *a1, d *a2, d *a3, d *b1, d *b2, d *b3, d *csu, d *snu, d *csv, d *snv, d *csq, d *snq) noexcept nogil +cdef void dlagtf(int *n, d *a, d *lambda_, d *b, d *c, d *tol, d *d, int *in_, int *info) noexcept nogil +cdef void dlagtm(char *trans, int *n, int *nrhs, d *alpha, d *dl, d *d, d *du, d *x, int *ldx, d *beta, d *b, int *ldb) noexcept nogil +cdef void dlagts(int *job, int *n, d *a, d *b, d *c, d *d, int *in_, d *y, d *tol, int *info) noexcept nogil +cdef void dlagv2(d *a, int *lda, d *b, int *ldb, d *alphar, d *alphai, d *beta, d *csl, d *snl, d *csr, d *snr) noexcept nogil +cdef void dlahqr(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *wr, d *wi, int *iloz, int *ihiz, d *z, int *ldz, int *info) noexcept nogil +cdef void dlahr2(int *n, int *k, int *nb, d *a, int *lda, d *tau, d *t, int *ldt, d *y, int *ldy) noexcept nogil +cdef void dlaic1(int *job, int *j, d *x, d *sest, d *w, d *gamma, d *sestpr, d *s, d *c) noexcept nogil +cdef void dlaln2(bint *ltrans, int *na, int *nw, d *smin, d *ca, d *a, int *lda, d *d1, d *d2, d *b, int *ldb, d *wr, d *wi, d *x, int *ldx, d *scale, d *xnorm, int *info) noexcept nogil +cdef void dlals0(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, d *b, int *ldb, d *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, d *givnum, int *ldgnum, d *poles, d *difl, d *difr, d *z, int *k, d *c, d *s, d *work, int *info) noexcept nogil +cdef void dlalsa(int *icompq, int *smlsiz, int *n, int *nrhs, d *b, int *ldb, d *bx, int *ldbx, d *u, int *ldu, d *vt, int *k, d *difl, d *difr, d *z, d *poles, int *givptr, int *givcol, int *ldgcol, int *perm, d *givnum, d *c, d *s, d *work, int *iwork, int *info) noexcept nogil +cdef void dlalsd(char *uplo, int *smlsiz, int *n, int *nrhs, d *d, d *e, d *b, int *ldb, d *rcond, int *rank, d *work, int *iwork, int *info) noexcept nogil +cdef d dlamch(char *cmach) noexcept nogil +cdef void dlamrg(int *n1, int *n2, d *a, int *dtrd1, int *dtrd2, int *index_bn) noexcept nogil +cdef int dlaneg(int *n, d *d, d *lld, d *sigma, d *pivmin, int *r) noexcept nogil +cdef d dlangb(char *norm, int *n, int *kl, int *ku, d *ab, int *ldab, d *work) noexcept nogil +cdef d dlange(char *norm, int *m, int *n, d *a, int *lda, d *work) noexcept nogil +cdef d dlangt(char *norm, int *n, d *dl, d *d_, d *du) noexcept nogil +cdef d dlanhs(char *norm, int *n, d *a, int *lda, d *work) noexcept nogil +cdef d dlansb(char *norm, char *uplo, int *n, int *k, d *ab, int *ldab, d *work) noexcept nogil +cdef d dlansf(char *norm, char *transr, char *uplo, int *n, d *a, d *work) noexcept nogil +cdef d dlansp(char *norm, char *uplo, int *n, d *ap, d *work) noexcept nogil +cdef d dlanst(char *norm, int *n, d *d_, d *e) noexcept nogil +cdef d dlansy(char *norm, char *uplo, int *n, d *a, int *lda, d *work) noexcept nogil +cdef d dlantb(char *norm, char *uplo, char *diag, int *n, int *k, d *ab, int *ldab, d *work) noexcept nogil +cdef d dlantp(char *norm, char *uplo, char *diag, int *n, d *ap, d *work) noexcept nogil +cdef d dlantr(char *norm, char *uplo, char *diag, int *m, int *n, d *a, int *lda, d *work) noexcept nogil +cdef void dlanv2(d *a, d *b, d *c, d *d, d *rt1r, d *rt1i, d *rt2r, d *rt2i, d *cs, d *sn) noexcept nogil +cdef void dlapll(int *n, d *x, int *incx, d *y, int *incy, d *ssmin) noexcept nogil +cdef void dlapmr(bint *forwrd, int *m, int *n, d *x, int *ldx, int *k) noexcept nogil +cdef void dlapmt(bint *forwrd, int *m, int *n, d *x, int *ldx, int *k) noexcept nogil +cdef d dlapy2(d *x, d *y) noexcept nogil +cdef d dlapy3(d *x, d *y, d *z) noexcept nogil +cdef void dlaqgb(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, char *equed) noexcept nogil +cdef void dlaqge(int *m, int *n, d *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, char *equed) noexcept nogil +cdef void dlaqp2(int *m, int *n, int *offset, d *a, int *lda, int *jpvt, d *tau, d *vn1, d *vn2, d *work) noexcept nogil +cdef void dlaqps(int *m, int *n, int *offset, int *nb, int *kb, d *a, int *lda, int *jpvt, d *tau, d *vn1, d *vn2, d *auxv, d *f, int *ldf) noexcept nogil +cdef void dlaqr0(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *wr, d *wi, int *iloz, int *ihiz, d *z, int *ldz, d *work, int *lwork, int *info) noexcept nogil +cdef void dlaqr1(int *n, d *h, int *ldh, d *sr1, d *si1, d *sr2, d *si2, d *v) noexcept nogil +cdef void dlaqr2(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, d *h, int *ldh, int *iloz, int *ihiz, d *z, int *ldz, int *ns, int *nd, d *sr, d *si, d *v, int *ldv, int *nh, d *t, int *ldt, int *nv, d *wv, int *ldwv, d *work, int *lwork) noexcept nogil +cdef void dlaqr3(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, d *h, int *ldh, int *iloz, int *ihiz, d *z, int *ldz, int *ns, int *nd, d *sr, d *si, d *v, int *ldv, int *nh, d *t, int *ldt, int *nv, d *wv, int *ldwv, d *work, int *lwork) noexcept nogil +cdef void dlaqr4(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *wr, d *wi, int *iloz, int *ihiz, d *z, int *ldz, d *work, int *lwork, int *info) noexcept nogil +cdef void dlaqr5(bint *wantt, bint *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, d *sr, d *si, d *h, int *ldh, int *iloz, int *ihiz, d *z, int *ldz, d *v, int *ldv, d *u, int *ldu, int *nv, d *wv, int *ldwv, int *nh, d *wh, int *ldwh) noexcept nogil +cdef void dlaqsb(char *uplo, int *n, int *kd, d *ab, int *ldab, d *s, d *scond, d *amax, char *equed) noexcept nogil +cdef void dlaqsp(char *uplo, int *n, d *ap, d *s, d *scond, d *amax, char *equed) noexcept nogil +cdef void dlaqsy(char *uplo, int *n, d *a, int *lda, d *s, d *scond, d *amax, char *equed) noexcept nogil +cdef void dlaqtr(bint *ltran, bint *lreal, int *n, d *t, int *ldt, d *b, d *w, d *scale, d *x, d *work, int *info) noexcept nogil +cdef void dlar1v(int *n, int *b1, int *bn, d *lambda_, d *d, d *l, d *ld, d *lld, d *pivmin, d *gaptol, d *z, bint *wantnc, int *negcnt, d *ztz, d *mingma, int *r, int *isuppz, d *nrminv, d *resid, d *rqcorr, d *work) noexcept nogil +cdef void dlar2v(int *n, d *x, d *y, d *z, int *incx, d *c, d *s, int *incc) noexcept nogil +cdef void dlarf(char *side, int *m, int *n, d *v, int *incv, d *tau, d *c, int *ldc, d *work) noexcept nogil +cdef void dlarfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, d *v, int *ldv, d *t, int *ldt, d *c, int *ldc, d *work, int *ldwork) noexcept nogil +cdef void dlarfg(int *n, d *alpha, d *x, int *incx, d *tau) noexcept nogil +cdef void dlarfgp(int *n, d *alpha, d *x, int *incx, d *tau) noexcept nogil +cdef void dlarft(char *direct, char *storev, int *n, int *k, d *v, int *ldv, d *tau, d *t, int *ldt) noexcept nogil +cdef void dlarfx(char *side, int *m, int *n, d *v, d *tau, d *c, int *ldc, d *work) noexcept nogil +cdef void dlargv(int *n, d *x, int *incx, d *y, int *incy, d *c, int *incc) noexcept nogil +cdef void dlarnv(int *idist, int *iseed, int *n, d *x) noexcept nogil +cdef void dlarra(int *n, d *d, d *e, d *e2, d *spltol, d *tnrm, int *nsplit, int *isplit, int *info) noexcept nogil +cdef void dlarrb(int *n, d *d, d *lld, int *ifirst, int *ilast, d *rtol1, d *rtol2, int *offset, d *w, d *wgap, d *werr, d *work, int *iwork, d *pivmin, d *spdiam, int *twist, int *info) noexcept nogil +cdef void dlarrc(char *jobt, int *n, d *vl, d *vu, d *d, d *e, d *pivmin, int *eigcnt, int *lcnt, int *rcnt, int *info) noexcept nogil +cdef void dlarrd(char *range, char *order, int *n, d *vl, d *vu, int *il, int *iu, d *gers, d *reltol, d *d, d *e, d *e2, d *pivmin, int *nsplit, int *isplit, int *m, d *w, d *werr, d *wl, d *wu, int *iblock, int *indexw, d *work, int *iwork, int *info) noexcept nogil +cdef void dlarre(char *range, int *n, d *vl, d *vu, int *il, int *iu, d *d, d *e, d *e2, d *rtol1, d *rtol2, d *spltol, int *nsplit, int *isplit, int *m, d *w, d *werr, d *wgap, int *iblock, int *indexw, d *gers, d *pivmin, d *work, int *iwork, int *info) noexcept nogil +cdef void dlarrf(int *n, d *d, d *l, d *ld, int *clstrt, int *clend, d *w, d *wgap, d *werr, d *spdiam, d *clgapl, d *clgapr, d *pivmin, d *sigma, d *dplus, d *lplus, d *work, int *info) noexcept nogil +cdef void dlarrj(int *n, d *d, d *e2, int *ifirst, int *ilast, d *rtol, int *offset, d *w, d *werr, d *work, int *iwork, d *pivmin, d *spdiam, int *info) noexcept nogil +cdef void dlarrk(int *n, int *iw, d *gl, d *gu, d *d, d *e2, d *pivmin, d *reltol, d *w, d *werr, int *info) noexcept nogil +cdef void dlarrr(int *n, d *d, d *e, int *info) noexcept nogil +cdef void dlarrv(int *n, d *vl, d *vu, d *d, d *l, d *pivmin, int *isplit, int *m, int *dol, int *dou, d *minrgp, d *rtol1, d *rtol2, d *w, d *werr, d *wgap, int *iblock, int *indexw, d *gers, d *z, int *ldz, int *isuppz, d *work, int *iwork, int *info) noexcept nogil +cdef void dlartg(d *f, d *g, d *cs, d *sn, d *r) noexcept nogil +cdef void dlartgp(d *f, d *g, d *cs, d *sn, d *r) noexcept nogil +cdef void dlartgs(d *x, d *y, d *sigma, d *cs, d *sn) noexcept nogil +cdef void dlartv(int *n, d *x, int *incx, d *y, int *incy, d *c, d *s, int *incc) noexcept nogil +cdef void dlaruv(int *iseed, int *n, d *x) noexcept nogil +cdef void dlarz(char *side, int *m, int *n, int *l, d *v, int *incv, d *tau, d *c, int *ldc, d *work) noexcept nogil +cdef void dlarzb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, d *v, int *ldv, d *t, int *ldt, d *c, int *ldc, d *work, int *ldwork) noexcept nogil +cdef void dlarzt(char *direct, char *storev, int *n, int *k, d *v, int *ldv, d *tau, d *t, int *ldt) noexcept nogil +cdef void dlas2(d *f, d *g, d *h, d *ssmin, d *ssmax) noexcept nogil +cdef void dlascl(char *type_bn, int *kl, int *ku, d *cfrom, d *cto, int *m, int *n, d *a, int *lda, int *info) noexcept nogil +cdef void dlasd0(int *n, int *sqre, d *d, d *e, d *u, int *ldu, d *vt, int *ldvt, int *smlsiz, int *iwork, d *work, int *info) noexcept nogil +cdef void dlasd1(int *nl, int *nr, int *sqre, d *d, d *alpha, d *beta, d *u, int *ldu, d *vt, int *ldvt, int *idxq, int *iwork, d *work, int *info) noexcept nogil +cdef void dlasd2(int *nl, int *nr, int *sqre, int *k, d *d, d *z, d *alpha, d *beta, d *u, int *ldu, d *vt, int *ldvt, d *dsigma, d *u2, int *ldu2, d *vt2, int *ldvt2, int *idxp, int *idx, int *idxc, int *idxq, int *coltyp, int *info) noexcept nogil +cdef void dlasd3(int *nl, int *nr, int *sqre, int *k, d *d, d *q, int *ldq, d *dsigma, d *u, int *ldu, d *u2, int *ldu2, d *vt, int *ldvt, d *vt2, int *ldvt2, int *idxc, int *ctot, d *z, int *info) noexcept nogil +cdef void dlasd4(int *n, int *i, d *d, d *z, d *delta, d *rho, d *sigma, d *work, int *info) noexcept nogil +cdef void dlasd5(int *i, d *d, d *z, d *delta, d *rho, d *dsigma, d *work) noexcept nogil +cdef void dlasd6(int *icompq, int *nl, int *nr, int *sqre, d *d, d *vf, d *vl, d *alpha, d *beta, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, d *givnum, int *ldgnum, d *poles, d *difl, d *difr, d *z, int *k, d *c, d *s, d *work, int *iwork, int *info) noexcept nogil +cdef void dlasd7(int *icompq, int *nl, int *nr, int *sqre, int *k, d *d, d *z, d *zw, d *vf, d *vfw, d *vl, d *vlw, d *alpha, d *beta, d *dsigma, int *idx, int *idxp, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, d *givnum, int *ldgnum, d *c, d *s, int *info) noexcept nogil +cdef void dlasd8(int *icompq, int *k, d *d, d *z, d *vf, d *vl, d *difl, d *difr, int *lddifr, d *dsigma, d *work, int *info) noexcept nogil +cdef void dlasda(int *icompq, int *smlsiz, int *n, int *sqre, d *d, d *e, d *u, int *ldu, d *vt, int *k, d *difl, d *difr, d *z, d *poles, int *givptr, int *givcol, int *ldgcol, int *perm, d *givnum, d *c, d *s, d *work, int *iwork, int *info) noexcept nogil +cdef void dlasdq(char *uplo, int *sqre, int *n, int *ncvt, int *nru, int *ncc, d *d, d *e, d *vt, int *ldvt, d *u, int *ldu, d *c, int *ldc, d *work, int *info) noexcept nogil +cdef void dlasdt(int *n, int *lvl, int *nd, int *inode, int *ndiml, int *ndimr, int *msub) noexcept nogil +cdef void dlaset(char *uplo, int *m, int *n, d *alpha, d *beta, d *a, int *lda) noexcept nogil +cdef void dlasq1(int *n, d *d, d *e, d *work, int *info) noexcept nogil +cdef void dlasq2(int *n, d *z, int *info) noexcept nogil +cdef void dlasq3(int *i0, int *n0, d *z, int *pp, d *dmin, d *sigma, d *desig, d *qmax, int *nfail, int *iter, int *ndiv, bint *ieee, int *ttype, d *dmin1, d *dmin2, d *dn, d *dn1, d *dn2, d *g, d *tau) noexcept nogil +cdef void dlasq4(int *i0, int *n0, d *z, int *pp, int *n0in, d *dmin, d *dmin1, d *dmin2, d *dn, d *dn1, d *dn2, d *tau, int *ttype, d *g) noexcept nogil +cdef void dlasq6(int *i0, int *n0, d *z, int *pp, d *dmin, d *dmin1, d *dmin2, d *dn, d *dnm1, d *dnm2) noexcept nogil +cdef void dlasr(char *side, char *pivot, char *direct, int *m, int *n, d *c, d *s, d *a, int *lda) noexcept nogil +cdef void dlasrt(char *id, int *n, d *d, int *info) noexcept nogil +cdef void dlassq(int *n, d *x, int *incx, d *scale, d *sumsq) noexcept nogil +cdef void dlasv2(d *f, d *g, d *h, d *ssmin, d *ssmax, d *snr, d *csr, d *snl, d *csl) noexcept nogil +cdef void dlaswp(int *n, d *a, int *lda, int *k1, int *k2, int *ipiv, int *incx) noexcept nogil +cdef void dlasy2(bint *ltranl, bint *ltranr, int *isgn, int *n1, int *n2, d *tl, int *ldtl, d *tr, int *ldtr, d *b, int *ldb, d *scale, d *x, int *ldx, d *xnorm, int *info) noexcept nogil +cdef void dlasyf(char *uplo, int *n, int *nb, int *kb, d *a, int *lda, int *ipiv, d *w, int *ldw, int *info) noexcept nogil +cdef void dlat2s(char *uplo, int *n, d *a, int *lda, s *sa, int *ldsa, int *info) noexcept nogil +cdef void dlatbs(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, d *ab, int *ldab, d *x, d *scale, d *cnorm, int *info) noexcept nogil +cdef void dlatdf(int *ijob, int *n, d *z, int *ldz, d *rhs, d *rdsum, d *rdscal, int *ipiv, int *jpiv) noexcept nogil +cdef void dlatps(char *uplo, char *trans, char *diag, char *normin, int *n, d *ap, d *x, d *scale, d *cnorm, int *info) noexcept nogil +cdef void dlatrd(char *uplo, int *n, int *nb, d *a, int *lda, d *e, d *tau, d *w, int *ldw) noexcept nogil +cdef void dlatrs(char *uplo, char *trans, char *diag, char *normin, int *n, d *a, int *lda, d *x, d *scale, d *cnorm, int *info) noexcept nogil +cdef void dlatrz(int *m, int *n, int *l, d *a, int *lda, d *tau, d *work) noexcept nogil +cdef void dlauu2(char *uplo, int *n, d *a, int *lda, int *info) noexcept nogil +cdef void dlauum(char *uplo, int *n, d *a, int *lda, int *info) noexcept nogil +cdef void dopgtr(char *uplo, int *n, d *ap, d *tau, d *q, int *ldq, d *work, int *info) noexcept nogil +cdef void dopmtr(char *side, char *uplo, char *trans, int *m, int *n, d *ap, d *tau, d *c, int *ldc, d *work, int *info) noexcept nogil +cdef void dorbdb(char *trans, char *signs, int *m, int *p, int *q, d *x11, int *ldx11, d *x12, int *ldx12, d *x21, int *ldx21, d *x22, int *ldx22, d *theta, d *phi, d *taup1, d *taup2, d *tauq1, d *tauq2, d *work, int *lwork, int *info) noexcept nogil +cdef void dorcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, d *x11, int *ldx11, d *x12, int *ldx12, d *x21, int *ldx21, d *x22, int *ldx22, d *theta, d *u1, int *ldu1, d *u2, int *ldu2, d *v1t, int *ldv1t, d *v2t, int *ldv2t, d *work, int *lwork, int *iwork, int *info) noexcept nogil +cdef void dorg2l(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil +cdef void dorg2r(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil +cdef void dorgbr(char *vect, int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil +cdef void dorghr(int *n, int *ilo, int *ihi, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil +cdef void dorgl2(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil +cdef void dorglq(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil +cdef void dorgql(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil +cdef void dorgqr(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil +cdef void dorgr2(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil +cdef void dorgrq(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil +cdef void dorgtr(char *uplo, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil +cdef void dorm2l(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) noexcept nogil +cdef void dorm2r(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) noexcept nogil +cdef void dormbr(char *vect, char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil +cdef void dormhr(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil +cdef void dorml2(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) noexcept nogil +cdef void dormlq(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil +cdef void dormql(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil +cdef void dormqr(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil +cdef void dormr2(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) noexcept nogil +cdef void dormr3(char *side, char *trans, int *m, int *n, int *k, int *l, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) noexcept nogil +cdef void dormrq(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil +cdef void dormrz(char *side, char *trans, int *m, int *n, int *k, int *l, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil +cdef void dormtr(char *side, char *uplo, char *trans, int *m, int *n, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil +cdef void dpbcon(char *uplo, int *n, int *kd, d *ab, int *ldab, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil +cdef void dpbequ(char *uplo, int *n, int *kd, d *ab, int *ldab, d *s, d *scond, d *amax, int *info) noexcept nogil +cdef void dpbrfs(char *uplo, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *afb, int *ldafb, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil +cdef void dpbstf(char *uplo, int *n, int *kd, d *ab, int *ldab, int *info) noexcept nogil +cdef void dpbsv(char *uplo, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *b, int *ldb, int *info) noexcept nogil +cdef void dpbsvx(char *fact, char *uplo, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *afb, int *ldafb, char *equed, d *s, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil +cdef void dpbtf2(char *uplo, int *n, int *kd, d *ab, int *ldab, int *info) noexcept nogil +cdef void dpbtrf(char *uplo, int *n, int *kd, d *ab, int *ldab, int *info) noexcept nogil +cdef void dpbtrs(char *uplo, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *b, int *ldb, int *info) noexcept nogil +cdef void dpftrf(char *transr, char *uplo, int *n, d *a, int *info) noexcept nogil +cdef void dpftri(char *transr, char *uplo, int *n, d *a, int *info) noexcept nogil +cdef void dpftrs(char *transr, char *uplo, int *n, int *nrhs, d *a, d *b, int *ldb, int *info) noexcept nogil +cdef void dpocon(char *uplo, int *n, d *a, int *lda, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil +cdef void dpoequ(int *n, d *a, int *lda, d *s, d *scond, d *amax, int *info) noexcept nogil +cdef void dpoequb(int *n, d *a, int *lda, d *s, d *scond, d *amax, int *info) noexcept nogil +cdef void dporfs(char *uplo, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil +cdef void dposv(char *uplo, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, int *info) noexcept nogil +cdef void dposvx(char *fact, char *uplo, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, char *equed, d *s, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil +cdef void dpotf2(char *uplo, int *n, d *a, int *lda, int *info) noexcept nogil +cdef void dpotrf(char *uplo, int *n, d *a, int *lda, int *info) noexcept nogil +cdef void dpotri(char *uplo, int *n, d *a, int *lda, int *info) noexcept nogil +cdef void dpotrs(char *uplo, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, int *info) noexcept nogil +cdef void dppcon(char *uplo, int *n, d *ap, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil +cdef void dppequ(char *uplo, int *n, d *ap, d *s, d *scond, d *amax, int *info) noexcept nogil +cdef void dpprfs(char *uplo, int *n, int *nrhs, d *ap, d *afp, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil +cdef void dppsv(char *uplo, int *n, int *nrhs, d *ap, d *b, int *ldb, int *info) noexcept nogil +cdef void dppsvx(char *fact, char *uplo, int *n, int *nrhs, d *ap, d *afp, char *equed, d *s, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil +cdef void dpptrf(char *uplo, int *n, d *ap, int *info) noexcept nogil +cdef void dpptri(char *uplo, int *n, d *ap, int *info) noexcept nogil +cdef void dpptrs(char *uplo, int *n, int *nrhs, d *ap, d *b, int *ldb, int *info) noexcept nogil +cdef void dpstf2(char *uplo, int *n, d *a, int *lda, int *piv, int *rank, d *tol, d *work, int *info) noexcept nogil +cdef void dpstrf(char *uplo, int *n, d *a, int *lda, int *piv, int *rank, d *tol, d *work, int *info) noexcept nogil +cdef void dptcon(int *n, d *d, d *e, d *anorm, d *rcond, d *work, int *info) noexcept nogil +cdef void dpteqr(char *compz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *info) noexcept nogil +cdef void dptrfs(int *n, int *nrhs, d *d, d *e, d *df, d *ef, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *info) noexcept nogil +cdef void dptsv(int *n, int *nrhs, d *d, d *e, d *b, int *ldb, int *info) noexcept nogil +cdef void dptsvx(char *fact, int *n, int *nrhs, d *d, d *e, d *df, d *ef, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *info) noexcept nogil +cdef void dpttrf(int *n, d *d, d *e, int *info) noexcept nogil +cdef void dpttrs(int *n, int *nrhs, d *d, d *e, d *b, int *ldb, int *info) noexcept nogil +cdef void dptts2(int *n, int *nrhs, d *d, d *e, d *b, int *ldb) noexcept nogil +cdef void drscl(int *n, d *sa, d *sx, int *incx) noexcept nogil +cdef void dsbev(char *jobz, char *uplo, int *n, int *kd, d *ab, int *ldab, d *w, d *z, int *ldz, d *work, int *info) noexcept nogil +cdef void dsbevd(char *jobz, char *uplo, int *n, int *kd, d *ab, int *ldab, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void dsbevx(char *jobz, char *range, char *uplo, int *n, int *kd, d *ab, int *ldab, d *q, int *ldq, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil +cdef void dsbgst(char *vect, char *uplo, int *n, int *ka, int *kb, d *ab, int *ldab, d *bb, int *ldbb, d *x, int *ldx, d *work, int *info) noexcept nogil +cdef void dsbgv(char *jobz, char *uplo, int *n, int *ka, int *kb, d *ab, int *ldab, d *bb, int *ldbb, d *w, d *z, int *ldz, d *work, int *info) noexcept nogil +cdef void dsbgvd(char *jobz, char *uplo, int *n, int *ka, int *kb, d *ab, int *ldab, d *bb, int *ldbb, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void dsbgvx(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, d *ab, int *ldab, d *bb, int *ldbb, d *q, int *ldq, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil +cdef void dsbtrd(char *vect, char *uplo, int *n, int *kd, d *ab, int *ldab, d *d, d *e, d *q, int *ldq, d *work, int *info) noexcept nogil +cdef void dsfrk(char *transr, char *uplo, char *trans, int *n, int *k, d *alpha, d *a, int *lda, d *beta, d *c) noexcept nogil +cdef void dsgesv(int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *work, s *swork, int *iter, int *info) noexcept nogil +cdef void dspcon(char *uplo, int *n, d *ap, int *ipiv, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil +cdef void dspev(char *jobz, char *uplo, int *n, d *ap, d *w, d *z, int *ldz, d *work, int *info) noexcept nogil +cdef void dspevd(char *jobz, char *uplo, int *n, d *ap, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void dspevx(char *jobz, char *range, char *uplo, int *n, d *ap, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil +cdef void dspgst(int *itype, char *uplo, int *n, d *ap, d *bp, int *info) noexcept nogil +cdef void dspgv(int *itype, char *jobz, char *uplo, int *n, d *ap, d *bp, d *w, d *z, int *ldz, d *work, int *info) noexcept nogil +cdef void dspgvd(int *itype, char *jobz, char *uplo, int *n, d *ap, d *bp, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void dspgvx(int *itype, char *jobz, char *range, char *uplo, int *n, d *ap, d *bp, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil +cdef void dsposv(char *uplo, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *x, int *ldx, d *work, s *swork, int *iter, int *info) noexcept nogil +cdef void dsprfs(char *uplo, int *n, int *nrhs, d *ap, d *afp, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil +cdef void dspsv(char *uplo, int *n, int *nrhs, d *ap, int *ipiv, d *b, int *ldb, int *info) noexcept nogil +cdef void dspsvx(char *fact, char *uplo, int *n, int *nrhs, d *ap, d *afp, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil +cdef void dsptrd(char *uplo, int *n, d *ap, d *d, d *e, d *tau, int *info) noexcept nogil +cdef void dsptrf(char *uplo, int *n, d *ap, int *ipiv, int *info) noexcept nogil +cdef void dsptri(char *uplo, int *n, d *ap, int *ipiv, d *work, int *info) noexcept nogil +cdef void dsptrs(char *uplo, int *n, int *nrhs, d *ap, int *ipiv, d *b, int *ldb, int *info) noexcept nogil +cdef void dstebz(char *range, char *order, int *n, d *vl, d *vu, int *il, int *iu, d *abstol, d *d, d *e, int *m, int *nsplit, d *w, int *iblock, int *isplit, d *work, int *iwork, int *info) noexcept nogil +cdef void dstedc(char *compz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void dstegr(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, int *isuppz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void dstein(int *n, d *d, d *e, int *m, d *w, int *iblock, int *isplit, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil +cdef void dstemr(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, int *m, d *w, d *z, int *ldz, int *nzc, int *isuppz, bint *tryrac, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void dsteqr(char *compz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *info) noexcept nogil +cdef void dsterf(int *n, d *d, d *e, int *info) noexcept nogil +cdef void dstev(char *jobz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *info) noexcept nogil +cdef void dstevd(char *jobz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void dstevr(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, int *isuppz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void dstevx(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil +cdef void dsycon(char *uplo, int *n, d *a, int *lda, int *ipiv, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil +cdef void dsyconv(char *uplo, char *way, int *n, d *a, int *lda, int *ipiv, d *work, int *info) noexcept nogil +cdef void dsyequb(char *uplo, int *n, d *a, int *lda, d *s, d *scond, d *amax, d *work, int *info) noexcept nogil +cdef void dsyev(char *jobz, char *uplo, int *n, d *a, int *lda, d *w, d *work, int *lwork, int *info) noexcept nogil +cdef void dsyevd(char *jobz, char *uplo, int *n, d *a, int *lda, d *w, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void dsyevr(char *jobz, char *range, char *uplo, int *n, d *a, int *lda, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, int *isuppz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void dsyevx(char *jobz, char *range, char *uplo, int *n, d *a, int *lda, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *ifail, int *info) noexcept nogil +cdef void dsygs2(int *itype, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, int *info) noexcept nogil +cdef void dsygst(int *itype, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, int *info) noexcept nogil +cdef void dsygv(int *itype, char *jobz, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, d *w, d *work, int *lwork, int *info) noexcept nogil +cdef void dsygvd(int *itype, char *jobz, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, d *w, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void dsygvx(int *itype, char *jobz, char *range, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *ifail, int *info) noexcept nogil +cdef void dsyrfs(char *uplo, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil +cdef void dsysv(char *uplo, int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, d *work, int *lwork, int *info) noexcept nogil +cdef void dsysvx(char *fact, char *uplo, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *lwork, int *iwork, int *info) noexcept nogil +cdef void dsyswapr(char *uplo, int *n, d *a, int *lda, int *i1, int *i2) noexcept nogil +cdef void dsytd2(char *uplo, int *n, d *a, int *lda, d *d, d *e, d *tau, int *info) noexcept nogil +cdef void dsytf2(char *uplo, int *n, d *a, int *lda, int *ipiv, int *info) noexcept nogil +cdef void dsytrd(char *uplo, int *n, d *a, int *lda, d *d, d *e, d *tau, d *work, int *lwork, int *info) noexcept nogil +cdef void dsytrf(char *uplo, int *n, d *a, int *lda, int *ipiv, d *work, int *lwork, int *info) noexcept nogil +cdef void dsytri(char *uplo, int *n, d *a, int *lda, int *ipiv, d *work, int *info) noexcept nogil +cdef void dsytri2(char *uplo, int *n, d *a, int *lda, int *ipiv, d *work, int *lwork, int *info) noexcept nogil +cdef void dsytri2x(char *uplo, int *n, d *a, int *lda, int *ipiv, d *work, int *nb, int *info) noexcept nogil +cdef void dsytrs(char *uplo, int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, int *info) noexcept nogil +cdef void dsytrs2(char *uplo, int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, d *work, int *info) noexcept nogil +cdef void dtbcon(char *norm, char *uplo, char *diag, int *n, int *kd, d *ab, int *ldab, d *rcond, d *work, int *iwork, int *info) noexcept nogil +cdef void dtbrfs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil +cdef void dtbtrs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *b, int *ldb, int *info) noexcept nogil +cdef void dtfsm(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, d *alpha, d *a, d *b, int *ldb) noexcept nogil +cdef void dtftri(char *transr, char *uplo, char *diag, int *n, d *a, int *info) noexcept nogil +cdef void dtfttp(char *transr, char *uplo, int *n, d *arf, d *ap, int *info) noexcept nogil +cdef void dtfttr(char *transr, char *uplo, int *n, d *arf, d *a, int *lda, int *info) noexcept nogil +cdef void dtgevc(char *side, char *howmny, bint *select, int *n, d *s, int *lds, d *p, int *ldp, d *vl, int *ldvl, d *vr, int *ldvr, int *mm, int *m, d *work, int *info) noexcept nogil +cdef void dtgex2(bint *wantq, bint *wantz, int *n, d *a, int *lda, d *b, int *ldb, d *q, int *ldq, d *z, int *ldz, int *j1, int *n1, int *n2, d *work, int *lwork, int *info) noexcept nogil +cdef void dtgexc(bint *wantq, bint *wantz, int *n, d *a, int *lda, d *b, int *ldb, d *q, int *ldq, d *z, int *ldz, int *ifst, int *ilst, d *work, int *lwork, int *info) noexcept nogil +cdef void dtgsen(int *ijob, bint *wantq, bint *wantz, bint *select, int *n, d *a, int *lda, d *b, int *ldb, d *alphar, d *alphai, d *beta, d *q, int *ldq, d *z, int *ldz, int *m, d *pl, d *pr, d *dif, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void dtgsja(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, d *a, int *lda, d *b, int *ldb, d *tola, d *tolb, d *alpha, d *beta, d *u, int *ldu, d *v, int *ldv, d *q, int *ldq, d *work, int *ncycle, int *info) noexcept nogil +cdef void dtgsna(char *job, char *howmny, bint *select, int *n, d *a, int *lda, d *b, int *ldb, d *vl, int *ldvl, d *vr, int *ldvr, d *s, d *dif, int *mm, int *m, d *work, int *lwork, int *iwork, int *info) noexcept nogil +cdef void dtgsy2(char *trans, int *ijob, int *m, int *n, d *a, int *lda, d *b, int *ldb, d *c, int *ldc, d *d, int *ldd, d *e, int *lde, d *f, int *ldf, d *scale, d *rdsum, d *rdscal, int *iwork, int *pq, int *info) noexcept nogil +cdef void dtgsyl(char *trans, int *ijob, int *m, int *n, d *a, int *lda, d *b, int *ldb, d *c, int *ldc, d *d, int *ldd, d *e, int *lde, d *f, int *ldf, d *scale, d *dif, d *work, int *lwork, int *iwork, int *info) noexcept nogil +cdef void dtpcon(char *norm, char *uplo, char *diag, int *n, d *ap, d *rcond, d *work, int *iwork, int *info) noexcept nogil +cdef void dtpmqrt(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, d *v, int *ldv, d *t, int *ldt, d *a, int *lda, d *b, int *ldb, d *work, int *info) noexcept nogil +cdef void dtpqrt(int *m, int *n, int *l, int *nb, d *a, int *lda, d *b, int *ldb, d *t, int *ldt, d *work, int *info) noexcept nogil +cdef void dtpqrt2(int *m, int *n, int *l, d *a, int *lda, d *b, int *ldb, d *t, int *ldt, int *info) noexcept nogil +cdef void dtprfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, d *v, int *ldv, d *t, int *ldt, d *a, int *lda, d *b, int *ldb, d *work, int *ldwork) noexcept nogil +cdef void dtprfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, d *ap, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil +cdef void dtptri(char *uplo, char *diag, int *n, d *ap, int *info) noexcept nogil +cdef void dtptrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, d *ap, d *b, int *ldb, int *info) noexcept nogil +cdef void dtpttf(char *transr, char *uplo, int *n, d *ap, d *arf, int *info) noexcept nogil +cdef void dtpttr(char *uplo, int *n, d *ap, d *a, int *lda, int *info) noexcept nogil +cdef void dtrcon(char *norm, char *uplo, char *diag, int *n, d *a, int *lda, d *rcond, d *work, int *iwork, int *info) noexcept nogil +cdef void dtrevc(char *side, char *howmny, bint *select, int *n, d *t, int *ldt, d *vl, int *ldvl, d *vr, int *ldvr, int *mm, int *m, d *work, int *info) noexcept nogil +cdef void dtrexc(char *compq, int *n, d *t, int *ldt, d *q, int *ldq, int *ifst, int *ilst, d *work, int *info) noexcept nogil +cdef void dtrrfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil +cdef void dtrsen(char *job, char *compq, bint *select, int *n, d *t, int *ldt, d *q, int *ldq, d *wr, d *wi, int *m, d *s, d *sep, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void dtrsna(char *job, char *howmny, bint *select, int *n, d *t, int *ldt, d *vl, int *ldvl, d *vr, int *ldvr, d *s, d *sep, int *mm, int *m, d *work, int *ldwork, int *iwork, int *info) noexcept nogil +cdef void dtrsyl(char *trana, char *tranb, int *isgn, int *m, int *n, d *a, int *lda, d *b, int *ldb, d *c, int *ldc, d *scale, int *info) noexcept nogil +cdef void dtrti2(char *uplo, char *diag, int *n, d *a, int *lda, int *info) noexcept nogil +cdef void dtrtri(char *uplo, char *diag, int *n, d *a, int *lda, int *info) noexcept nogil +cdef void dtrtrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, int *info) noexcept nogil +cdef void dtrttf(char *transr, char *uplo, int *n, d *a, int *lda, d *arf, int *info) noexcept nogil +cdef void dtrttp(char *uplo, int *n, d *a, int *lda, d *ap, int *info) noexcept nogil +cdef void dtzrzf(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil +cdef d dzsum1(int *n, z *cx, int *incx) noexcept nogil +cdef int icmax1(int *n, c *cx, int *incx) noexcept nogil +cdef int ieeeck(int *ispec, s *zero, s *one) noexcept nogil +cdef int ilaclc(int *m, int *n, c *a, int *lda) noexcept nogil +cdef int ilaclr(int *m, int *n, c *a, int *lda) noexcept nogil +cdef int iladiag(char *diag) noexcept nogil +cdef int iladlc(int *m, int *n, d *a, int *lda) noexcept nogil +cdef int iladlr(int *m, int *n, d *a, int *lda) noexcept nogil +cdef int ilaprec(char *prec) noexcept nogil +cdef int ilaslc(int *m, int *n, s *a, int *lda) noexcept nogil +cdef int ilaslr(int *m, int *n, s *a, int *lda) noexcept nogil +cdef int ilatrans(char *trans) noexcept nogil +cdef int ilauplo(char *uplo) noexcept nogil +cdef void ilaver(int *vers_major, int *vers_minor, int *vers_patch) noexcept nogil +cdef int ilazlc(int *m, int *n, z *a, int *lda) noexcept nogil +cdef int ilazlr(int *m, int *n, z *a, int *lda) noexcept nogil +cdef int izmax1(int *n, z *cx, int *incx) noexcept nogil +cdef void sbbcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, s *theta, s *phi, s *u1, int *ldu1, s *u2, int *ldu2, s *v1t, int *ldv1t, s *v2t, int *ldv2t, s *b11d, s *b11e, s *b12d, s *b12e, s *b21d, s *b21e, s *b22d, s *b22e, s *work, int *lwork, int *info) noexcept nogil +cdef void sbdsdc(char *uplo, char *compq, int *n, s *d, s *e, s *u, int *ldu, s *vt, int *ldvt, s *q, int *iq, s *work, int *iwork, int *info) noexcept nogil +cdef void sbdsqr(char *uplo, int *n, int *ncvt, int *nru, int *ncc, s *d, s *e, s *vt, int *ldvt, s *u, int *ldu, s *c, int *ldc, s *work, int *info) noexcept nogil +cdef s scsum1(int *n, c *cx, int *incx) noexcept nogil +cdef void sdisna(char *job, int *m, int *n, s *d, s *sep, int *info) noexcept nogil +cdef void sgbbrd(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, s *ab, int *ldab, s *d, s *e, s *q, int *ldq, s *pt, int *ldpt, s *c, int *ldc, s *work, int *info) noexcept nogil +cdef void sgbcon(char *norm, int *n, int *kl, int *ku, s *ab, int *ldab, int *ipiv, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil +cdef void sgbequ(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil +cdef void sgbequb(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil +cdef void sgbrfs(char *trans, int *n, int *kl, int *ku, int *nrhs, s *ab, int *ldab, s *afb, int *ldafb, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil +cdef void sgbsv(int *n, int *kl, int *ku, int *nrhs, s *ab, int *ldab, int *ipiv, s *b, int *ldb, int *info) noexcept nogil +cdef void sgbsvx(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, s *ab, int *ldab, s *afb, int *ldafb, int *ipiv, char *equed, s *r, s *c, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil +cdef void sgbtf2(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, int *ipiv, int *info) noexcept nogil +cdef void sgbtrf(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, int *ipiv, int *info) noexcept nogil +cdef void sgbtrs(char *trans, int *n, int *kl, int *ku, int *nrhs, s *ab, int *ldab, int *ipiv, s *b, int *ldb, int *info) noexcept nogil +cdef void sgebak(char *job, char *side, int *n, int *ilo, int *ihi, s *scale, int *m, s *v, int *ldv, int *info) noexcept nogil +cdef void sgebal(char *job, int *n, s *a, int *lda, int *ilo, int *ihi, s *scale, int *info) noexcept nogil +cdef void sgebd2(int *m, int *n, s *a, int *lda, s *d, s *e, s *tauq, s *taup, s *work, int *info) noexcept nogil +cdef void sgebrd(int *m, int *n, s *a, int *lda, s *d, s *e, s *tauq, s *taup, s *work, int *lwork, int *info) noexcept nogil +cdef void sgecon(char *norm, int *n, s *a, int *lda, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil +cdef void sgeequ(int *m, int *n, s *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil +cdef void sgeequb(int *m, int *n, s *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil +cdef void sgees(char *jobvs, char *sort, sselect2 *select, int *n, s *a, int *lda, int *sdim, s *wr, s *wi, s *vs, int *ldvs, s *work, int *lwork, bint *bwork, int *info) noexcept nogil +cdef void sgeesx(char *jobvs, char *sort, sselect2 *select, char *sense, int *n, s *a, int *lda, int *sdim, s *wr, s *wi, s *vs, int *ldvs, s *rconde, s *rcondv, s *work, int *lwork, int *iwork, int *liwork, bint *bwork, int *info) noexcept nogil +cdef void sgeev(char *jobvl, char *jobvr, int *n, s *a, int *lda, s *wr, s *wi, s *vl, int *ldvl, s *vr, int *ldvr, s *work, int *lwork, int *info) noexcept nogil +cdef void sgeevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, s *a, int *lda, s *wr, s *wi, s *vl, int *ldvl, s *vr, int *ldvr, int *ilo, int *ihi, s *scale, s *abnrm, s *rconde, s *rcondv, s *work, int *lwork, int *iwork, int *info) noexcept nogil +cdef void sgehd2(int *n, int *ilo, int *ihi, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil +cdef void sgehrd(int *n, int *ilo, int *ihi, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil +cdef void sgejsv(char *joba, char *jobu, char *jobv, char *jobr, char *jobt, char *jobp, int *m, int *n, s *a, int *lda, s *sva, s *u, int *ldu, s *v, int *ldv, s *work, int *lwork, int *iwork, int *info) noexcept nogil +cdef void sgelq2(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil +cdef void sgelqf(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil +cdef void sgels(char *trans, int *m, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, s *work, int *lwork, int *info) noexcept nogil +cdef void sgelsd(int *m, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, s *s, s *rcond, int *rank, s *work, int *lwork, int *iwork, int *info) noexcept nogil +cdef void sgelss(int *m, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, s *s, s *rcond, int *rank, s *work, int *lwork, int *info) noexcept nogil +cdef void sgelsy(int *m, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, int *jpvt, s *rcond, int *rank, s *work, int *lwork, int *info) noexcept nogil +cdef void sgemqrt(char *side, char *trans, int *m, int *n, int *k, int *nb, s *v, int *ldv, s *t, int *ldt, s *c, int *ldc, s *work, int *info) noexcept nogil +cdef void sgeql2(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil +cdef void sgeqlf(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil +cdef void sgeqp3(int *m, int *n, s *a, int *lda, int *jpvt, s *tau, s *work, int *lwork, int *info) noexcept nogil +cdef void sgeqr2(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil +cdef void sgeqr2p(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil +cdef void sgeqrf(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil +cdef void sgeqrfp(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil +cdef void sgeqrt(int *m, int *n, int *nb, s *a, int *lda, s *t, int *ldt, s *work, int *info) noexcept nogil +cdef void sgeqrt2(int *m, int *n, s *a, int *lda, s *t, int *ldt, int *info) noexcept nogil +cdef void sgeqrt3(int *m, int *n, s *a, int *lda, s *t, int *ldt, int *info) noexcept nogil +cdef void sgerfs(char *trans, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil +cdef void sgerq2(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil +cdef void sgerqf(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil +cdef void sgesc2(int *n, s *a, int *lda, s *rhs, int *ipiv, int *jpiv, s *scale) noexcept nogil +cdef void sgesdd(char *jobz, int *m, int *n, s *a, int *lda, s *s, s *u, int *ldu, s *vt, int *ldvt, s *work, int *lwork, int *iwork, int *info) noexcept nogil +cdef void sgesv(int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, int *info) noexcept nogil +cdef void sgesvd(char *jobu, char *jobvt, int *m, int *n, s *a, int *lda, s *s, s *u, int *ldu, s *vt, int *ldvt, s *work, int *lwork, int *info) noexcept nogil +cdef void sgesvj(char *joba, char *jobu, char *jobv, int *m, int *n, s *a, int *lda, s *sva, int *mv, s *v, int *ldv, s *work, int *lwork, int *info) noexcept nogil +cdef void sgesvx(char *fact, char *trans, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, int *ipiv, char *equed, s *r, s *c, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil +cdef void sgetc2(int *n, s *a, int *lda, int *ipiv, int *jpiv, int *info) noexcept nogil +cdef void sgetf2(int *m, int *n, s *a, int *lda, int *ipiv, int *info) noexcept nogil +cdef void sgetrf(int *m, int *n, s *a, int *lda, int *ipiv, int *info) noexcept nogil +cdef void sgetri(int *n, s *a, int *lda, int *ipiv, s *work, int *lwork, int *info) noexcept nogil +cdef void sgetrs(char *trans, int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, int *info) noexcept nogil +cdef void sggbak(char *job, char *side, int *n, int *ilo, int *ihi, s *lscale, s *rscale, int *m, s *v, int *ldv, int *info) noexcept nogil +cdef void sggbal(char *job, int *n, s *a, int *lda, s *b, int *ldb, int *ilo, int *ihi, s *lscale, s *rscale, s *work, int *info) noexcept nogil +cdef void sgges(char *jobvsl, char *jobvsr, char *sort, sselect3 *selctg, int *n, s *a, int *lda, s *b, int *ldb, int *sdim, s *alphar, s *alphai, s *beta, s *vsl, int *ldvsl, s *vsr, int *ldvsr, s *work, int *lwork, bint *bwork, int *info) noexcept nogil +cdef void sggesx(char *jobvsl, char *jobvsr, char *sort, sselect3 *selctg, char *sense, int *n, s *a, int *lda, s *b, int *ldb, int *sdim, s *alphar, s *alphai, s *beta, s *vsl, int *ldvsl, s *vsr, int *ldvsr, s *rconde, s *rcondv, s *work, int *lwork, int *iwork, int *liwork, bint *bwork, int *info) noexcept nogil +cdef void sggev(char *jobvl, char *jobvr, int *n, s *a, int *lda, s *b, int *ldb, s *alphar, s *alphai, s *beta, s *vl, int *ldvl, s *vr, int *ldvr, s *work, int *lwork, int *info) noexcept nogil +cdef void sggevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, s *a, int *lda, s *b, int *ldb, s *alphar, s *alphai, s *beta, s *vl, int *ldvl, s *vr, int *ldvr, int *ilo, int *ihi, s *lscale, s *rscale, s *abnrm, s *bbnrm, s *rconde, s *rcondv, s *work, int *lwork, int *iwork, bint *bwork, int *info) noexcept nogil +cdef void sggglm(int *n, int *m, int *p, s *a, int *lda, s *b, int *ldb, s *d, s *x, s *y, s *work, int *lwork, int *info) noexcept nogil +cdef void sgghrd(char *compq, char *compz, int *n, int *ilo, int *ihi, s *a, int *lda, s *b, int *ldb, s *q, int *ldq, s *z, int *ldz, int *info) noexcept nogil +cdef void sgglse(int *m, int *n, int *p, s *a, int *lda, s *b, int *ldb, s *c, s *d, s *x, s *work, int *lwork, int *info) noexcept nogil +cdef void sggqrf(int *n, int *m, int *p, s *a, int *lda, s *taua, s *b, int *ldb, s *taub, s *work, int *lwork, int *info) noexcept nogil +cdef void sggrqf(int *m, int *p, int *n, s *a, int *lda, s *taua, s *b, int *ldb, s *taub, s *work, int *lwork, int *info) noexcept nogil +cdef void sgsvj0(char *jobv, int *m, int *n, s *a, int *lda, s *d, s *sva, int *mv, s *v, int *ldv, s *eps, s *sfmin, s *tol, int *nsweep, s *work, int *lwork, int *info) noexcept nogil +cdef void sgsvj1(char *jobv, int *m, int *n, int *n1, s *a, int *lda, s *d, s *sva, int *mv, s *v, int *ldv, s *eps, s *sfmin, s *tol, int *nsweep, s *work, int *lwork, int *info) noexcept nogil +cdef void sgtcon(char *norm, int *n, s *dl, s *d, s *du, s *du2, int *ipiv, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil +cdef void sgtrfs(char *trans, int *n, int *nrhs, s *dl, s *d, s *du, s *dlf, s *df, s *duf, s *du2, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil +cdef void sgtsv(int *n, int *nrhs, s *dl, s *d, s *du, s *b, int *ldb, int *info) noexcept nogil +cdef void sgtsvx(char *fact, char *trans, int *n, int *nrhs, s *dl, s *d, s *du, s *dlf, s *df, s *duf, s *du2, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil +cdef void sgttrf(int *n, s *dl, s *d, s *du, s *du2, int *ipiv, int *info) noexcept nogil +cdef void sgttrs(char *trans, int *n, int *nrhs, s *dl, s *d, s *du, s *du2, int *ipiv, s *b, int *ldb, int *info) noexcept nogil +cdef void sgtts2(int *itrans, int *n, int *nrhs, s *dl, s *d, s *du, s *du2, int *ipiv, s *b, int *ldb) noexcept nogil +cdef void shgeqz(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *t, int *ldt, s *alphar, s *alphai, s *beta, s *q, int *ldq, s *z, int *ldz, s *work, int *lwork, int *info) noexcept nogil +cdef void shsein(char *side, char *eigsrc, char *initv, bint *select, int *n, s *h, int *ldh, s *wr, s *wi, s *vl, int *ldvl, s *vr, int *ldvr, int *mm, int *m, s *work, int *ifaill, int *ifailr, int *info) noexcept nogil +cdef void shseqr(char *job, char *compz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *wr, s *wi, s *z, int *ldz, s *work, int *lwork, int *info) noexcept nogil +cdef void slabad(s *small, s *large) noexcept nogil +cdef void slabrd(int *m, int *n, int *nb, s *a, int *lda, s *d, s *e, s *tauq, s *taup, s *x, int *ldx, s *y, int *ldy) noexcept nogil +cdef void slacn2(int *n, s *v, s *x, int *isgn, s *est, int *kase, int *isave) noexcept nogil +cdef void slacon(int *n, s *v, s *x, int *isgn, s *est, int *kase) noexcept nogil +cdef void slacpy(char *uplo, int *m, int *n, s *a, int *lda, s *b, int *ldb) noexcept nogil +cdef void sladiv(s *a, s *b, s *c, s *d, s *p, s *q) noexcept nogil +cdef void slae2(s *a, s *b, s *c, s *rt1, s *rt2) noexcept nogil +cdef void slaebz(int *ijob, int *nitmax, int *n, int *mmax, int *minp, int *nbmin, s *abstol, s *reltol, s *pivmin, s *d, s *e, s *e2, int *nval, s *ab, s *c, int *mout, int *nab, s *work, int *iwork, int *info) noexcept nogil +cdef void slaed0(int *icompq, int *qsiz, int *n, s *d, s *e, s *q, int *ldq, s *qstore, int *ldqs, s *work, int *iwork, int *info) noexcept nogil +cdef void slaed1(int *n, s *d, s *q, int *ldq, int *indxq, s *rho, int *cutpnt, s *work, int *iwork, int *info) noexcept nogil +cdef void slaed2(int *k, int *n, int *n1, s *d, s *q, int *ldq, int *indxq, s *rho, s *z, s *dlamda, s *w, s *q2, int *indx, int *indxc, int *indxp, int *coltyp, int *info) noexcept nogil +cdef void slaed3(int *k, int *n, int *n1, s *d, s *q, int *ldq, s *rho, s *dlamda, s *q2, int *indx, int *ctot, s *w, s *s, int *info) noexcept nogil +cdef void slaed4(int *n, int *i, s *d, s *z, s *delta, s *rho, s *dlam, int *info) noexcept nogil +cdef void slaed5(int *i, s *d, s *z, s *delta, s *rho, s *dlam) noexcept nogil +cdef void slaed6(int *kniter, bint *orgati, s *rho, s *d, s *z, s *finit, s *tau, int *info) noexcept nogil +cdef void slaed7(int *icompq, int *n, int *qsiz, int *tlvls, int *curlvl, int *curpbm, s *d, s *q, int *ldq, int *indxq, s *rho, int *cutpnt, s *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, s *givnum, s *work, int *iwork, int *info) noexcept nogil +cdef void slaed8(int *icompq, int *k, int *n, int *qsiz, s *d, s *q, int *ldq, int *indxq, s *rho, int *cutpnt, s *z, s *dlamda, s *q2, int *ldq2, s *w, int *perm, int *givptr, int *givcol, s *givnum, int *indxp, int *indx, int *info) noexcept nogil +cdef void slaed9(int *k, int *kstart, int *kstop, int *n, s *d, s *q, int *ldq, s *rho, s *dlamda, s *w, s *s, int *lds, int *info) noexcept nogil +cdef void slaeda(int *n, int *tlvls, int *curlvl, int *curpbm, int *prmptr, int *perm, int *givptr, int *givcol, s *givnum, s *q, int *qptr, s *z, s *ztemp, int *info) noexcept nogil +cdef void slaein(bint *rightv, bint *noinit, int *n, s *h, int *ldh, s *wr, s *wi, s *vr, s *vi, s *b, int *ldb, s *work, s *eps3, s *smlnum, s *bignum, int *info) noexcept nogil +cdef void slaev2(s *a, s *b, s *c, s *rt1, s *rt2, s *cs1, s *sn1) noexcept nogil +cdef void slaexc(bint *wantq, int *n, s *t, int *ldt, s *q, int *ldq, int *j1, int *n1, int *n2, s *work, int *info) noexcept nogil +cdef void slag2(s *a, int *lda, s *b, int *ldb, s *safmin, s *scale1, s *scale2, s *wr1, s *wr2, s *wi) noexcept nogil +cdef void slag2d(int *m, int *n, s *sa, int *ldsa, d *a, int *lda, int *info) noexcept nogil +cdef void slags2(bint *upper, s *a1, s *a2, s *a3, s *b1, s *b2, s *b3, s *csu, s *snu, s *csv, s *snv, s *csq, s *snq) noexcept nogil +cdef void slagtf(int *n, s *a, s *lambda_, s *b, s *c, s *tol, s *d, int *in_, int *info) noexcept nogil +cdef void slagtm(char *trans, int *n, int *nrhs, s *alpha, s *dl, s *d, s *du, s *x, int *ldx, s *beta, s *b, int *ldb) noexcept nogil +cdef void slagts(int *job, int *n, s *a, s *b, s *c, s *d, int *in_, s *y, s *tol, int *info) noexcept nogil +cdef void slagv2(s *a, int *lda, s *b, int *ldb, s *alphar, s *alphai, s *beta, s *csl, s *snl, s *csr, s *snr) noexcept nogil +cdef void slahqr(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *wr, s *wi, int *iloz, int *ihiz, s *z, int *ldz, int *info) noexcept nogil +cdef void slahr2(int *n, int *k, int *nb, s *a, int *lda, s *tau, s *t, int *ldt, s *y, int *ldy) noexcept nogil +cdef void slaic1(int *job, int *j, s *x, s *sest, s *w, s *gamma, s *sestpr, s *s, s *c) noexcept nogil +cdef void slaln2(bint *ltrans, int *na, int *nw, s *smin, s *ca, s *a, int *lda, s *d1, s *d2, s *b, int *ldb, s *wr, s *wi, s *x, int *ldx, s *scale, s *xnorm, int *info) noexcept nogil +cdef void slals0(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, s *b, int *ldb, s *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, s *givnum, int *ldgnum, s *poles, s *difl, s *difr, s *z, int *k, s *c, s *s, s *work, int *info) noexcept nogil +cdef void slalsa(int *icompq, int *smlsiz, int *n, int *nrhs, s *b, int *ldb, s *bx, int *ldbx, s *u, int *ldu, s *vt, int *k, s *difl, s *difr, s *z, s *poles, int *givptr, int *givcol, int *ldgcol, int *perm, s *givnum, s *c, s *s, s *work, int *iwork, int *info) noexcept nogil +cdef void slalsd(char *uplo, int *smlsiz, int *n, int *nrhs, s *d, s *e, s *b, int *ldb, s *rcond, int *rank, s *work, int *iwork, int *info) noexcept nogil +cdef s slamch(char *cmach) noexcept nogil +cdef void slamrg(int *n1, int *n2, s *a, int *strd1, int *strd2, int *index_bn) noexcept nogil +cdef s slangb(char *norm, int *n, int *kl, int *ku, s *ab, int *ldab, s *work) noexcept nogil +cdef s slange(char *norm, int *m, int *n, s *a, int *lda, s *work) noexcept nogil +cdef s slangt(char *norm, int *n, s *dl, s *d, s *du) noexcept nogil +cdef s slanhs(char *norm, int *n, s *a, int *lda, s *work) noexcept nogil +cdef s slansb(char *norm, char *uplo, int *n, int *k, s *ab, int *ldab, s *work) noexcept nogil +cdef s slansf(char *norm, char *transr, char *uplo, int *n, s *a, s *work) noexcept nogil +cdef s slansp(char *norm, char *uplo, int *n, s *ap, s *work) noexcept nogil +cdef s slanst(char *norm, int *n, s *d, s *e) noexcept nogil +cdef s slansy(char *norm, char *uplo, int *n, s *a, int *lda, s *work) noexcept nogil +cdef s slantb(char *norm, char *uplo, char *diag, int *n, int *k, s *ab, int *ldab, s *work) noexcept nogil +cdef s slantp(char *norm, char *uplo, char *diag, int *n, s *ap, s *work) noexcept nogil +cdef s slantr(char *norm, char *uplo, char *diag, int *m, int *n, s *a, int *lda, s *work) noexcept nogil +cdef void slanv2(s *a, s *b, s *c, s *d, s *rt1r, s *rt1i, s *rt2r, s *rt2i, s *cs, s *sn) noexcept nogil +cdef void slapll(int *n, s *x, int *incx, s *y, int *incy, s *ssmin) noexcept nogil +cdef void slapmr(bint *forwrd, int *m, int *n, s *x, int *ldx, int *k) noexcept nogil +cdef void slapmt(bint *forwrd, int *m, int *n, s *x, int *ldx, int *k) noexcept nogil +cdef s slapy2(s *x, s *y) noexcept nogil +cdef s slapy3(s *x, s *y, s *z) noexcept nogil +cdef void slaqgb(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, char *equed) noexcept nogil +cdef void slaqge(int *m, int *n, s *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, char *equed) noexcept nogil +cdef void slaqp2(int *m, int *n, int *offset, s *a, int *lda, int *jpvt, s *tau, s *vn1, s *vn2, s *work) noexcept nogil +cdef void slaqps(int *m, int *n, int *offset, int *nb, int *kb, s *a, int *lda, int *jpvt, s *tau, s *vn1, s *vn2, s *auxv, s *f, int *ldf) noexcept nogil +cdef void slaqr0(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *wr, s *wi, int *iloz, int *ihiz, s *z, int *ldz, s *work, int *lwork, int *info) noexcept nogil +cdef void slaqr1(int *n, s *h, int *ldh, s *sr1, s *si1, s *sr2, s *si2, s *v) noexcept nogil +cdef void slaqr2(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, s *h, int *ldh, int *iloz, int *ihiz, s *z, int *ldz, int *ns, int *nd, s *sr, s *si, s *v, int *ldv, int *nh, s *t, int *ldt, int *nv, s *wv, int *ldwv, s *work, int *lwork) noexcept nogil +cdef void slaqr3(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, s *h, int *ldh, int *iloz, int *ihiz, s *z, int *ldz, int *ns, int *nd, s *sr, s *si, s *v, int *ldv, int *nh, s *t, int *ldt, int *nv, s *wv, int *ldwv, s *work, int *lwork) noexcept nogil +cdef void slaqr4(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *wr, s *wi, int *iloz, int *ihiz, s *z, int *ldz, s *work, int *lwork, int *info) noexcept nogil +cdef void slaqr5(bint *wantt, bint *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, s *sr, s *si, s *h, int *ldh, int *iloz, int *ihiz, s *z, int *ldz, s *v, int *ldv, s *u, int *ldu, int *nv, s *wv, int *ldwv, int *nh, s *wh, int *ldwh) noexcept nogil +cdef void slaqsb(char *uplo, int *n, int *kd, s *ab, int *ldab, s *s, s *scond, s *amax, char *equed) noexcept nogil +cdef void slaqsp(char *uplo, int *n, s *ap, s *s, s *scond, s *amax, char *equed) noexcept nogil +cdef void slaqsy(char *uplo, int *n, s *a, int *lda, s *s, s *scond, s *amax, char *equed) noexcept nogil +cdef void slaqtr(bint *ltran, bint *lreal, int *n, s *t, int *ldt, s *b, s *w, s *scale, s *x, s *work, int *info) noexcept nogil +cdef void slar1v(int *n, int *b1, int *bn, s *lambda_, s *d, s *l, s *ld, s *lld, s *pivmin, s *gaptol, s *z, bint *wantnc, int *negcnt, s *ztz, s *mingma, int *r, int *isuppz, s *nrminv, s *resid, s *rqcorr, s *work) noexcept nogil +cdef void slar2v(int *n, s *x, s *y, s *z, int *incx, s *c, s *s, int *incc) noexcept nogil +cdef void slarf(char *side, int *m, int *n, s *v, int *incv, s *tau, s *c, int *ldc, s *work) noexcept nogil +cdef void slarfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, s *v, int *ldv, s *t, int *ldt, s *c, int *ldc, s *work, int *ldwork) noexcept nogil +cdef void slarfg(int *n, s *alpha, s *x, int *incx, s *tau) noexcept nogil +cdef void slarfgp(int *n, s *alpha, s *x, int *incx, s *tau) noexcept nogil +cdef void slarft(char *direct, char *storev, int *n, int *k, s *v, int *ldv, s *tau, s *t, int *ldt) noexcept nogil +cdef void slarfx(char *side, int *m, int *n, s *v, s *tau, s *c, int *ldc, s *work) noexcept nogil +cdef void slargv(int *n, s *x, int *incx, s *y, int *incy, s *c, int *incc) noexcept nogil +cdef void slarnv(int *idist, int *iseed, int *n, s *x) noexcept nogil +cdef void slarra(int *n, s *d, s *e, s *e2, s *spltol, s *tnrm, int *nsplit, int *isplit, int *info) noexcept nogil +cdef void slarrb(int *n, s *d, s *lld, int *ifirst, int *ilast, s *rtol1, s *rtol2, int *offset, s *w, s *wgap, s *werr, s *work, int *iwork, s *pivmin, s *spdiam, int *twist, int *info) noexcept nogil +cdef void slarrc(char *jobt, int *n, s *vl, s *vu, s *d, s *e, s *pivmin, int *eigcnt, int *lcnt, int *rcnt, int *info) noexcept nogil +cdef void slarrd(char *range, char *order, int *n, s *vl, s *vu, int *il, int *iu, s *gers, s *reltol, s *d, s *e, s *e2, s *pivmin, int *nsplit, int *isplit, int *m, s *w, s *werr, s *wl, s *wu, int *iblock, int *indexw, s *work, int *iwork, int *info) noexcept nogil +cdef void slarre(char *range, int *n, s *vl, s *vu, int *il, int *iu, s *d, s *e, s *e2, s *rtol1, s *rtol2, s *spltol, int *nsplit, int *isplit, int *m, s *w, s *werr, s *wgap, int *iblock, int *indexw, s *gers, s *pivmin, s *work, int *iwork, int *info) noexcept nogil +cdef void slarrf(int *n, s *d, s *l, s *ld, int *clstrt, int *clend, s *w, s *wgap, s *werr, s *spdiam, s *clgapl, s *clgapr, s *pivmin, s *sigma, s *dplus, s *lplus, s *work, int *info) noexcept nogil +cdef void slarrj(int *n, s *d, s *e2, int *ifirst, int *ilast, s *rtol, int *offset, s *w, s *werr, s *work, int *iwork, s *pivmin, s *spdiam, int *info) noexcept nogil +cdef void slarrk(int *n, int *iw, s *gl, s *gu, s *d, s *e2, s *pivmin, s *reltol, s *w, s *werr, int *info) noexcept nogil +cdef void slarrr(int *n, s *d, s *e, int *info) noexcept nogil +cdef void slarrv(int *n, s *vl, s *vu, s *d, s *l, s *pivmin, int *isplit, int *m, int *dol, int *dou, s *minrgp, s *rtol1, s *rtol2, s *w, s *werr, s *wgap, int *iblock, int *indexw, s *gers, s *z, int *ldz, int *isuppz, s *work, int *iwork, int *info) noexcept nogil +cdef void slartg(s *f, s *g, s *cs, s *sn, s *r) noexcept nogil +cdef void slartgp(s *f, s *g, s *cs, s *sn, s *r) noexcept nogil +cdef void slartgs(s *x, s *y, s *sigma, s *cs, s *sn) noexcept nogil +cdef void slartv(int *n, s *x, int *incx, s *y, int *incy, s *c, s *s, int *incc) noexcept nogil +cdef void slaruv(int *iseed, int *n, s *x) noexcept nogil +cdef void slarz(char *side, int *m, int *n, int *l, s *v, int *incv, s *tau, s *c, int *ldc, s *work) noexcept nogil +cdef void slarzb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, s *v, int *ldv, s *t, int *ldt, s *c, int *ldc, s *work, int *ldwork) noexcept nogil +cdef void slarzt(char *direct, char *storev, int *n, int *k, s *v, int *ldv, s *tau, s *t, int *ldt) noexcept nogil +cdef void slas2(s *f, s *g, s *h, s *ssmin, s *ssmax) noexcept nogil +cdef void slascl(char *type_bn, int *kl, int *ku, s *cfrom, s *cto, int *m, int *n, s *a, int *lda, int *info) noexcept nogil +cdef void slasd0(int *n, int *sqre, s *d, s *e, s *u, int *ldu, s *vt, int *ldvt, int *smlsiz, int *iwork, s *work, int *info) noexcept nogil +cdef void slasd1(int *nl, int *nr, int *sqre, s *d, s *alpha, s *beta, s *u, int *ldu, s *vt, int *ldvt, int *idxq, int *iwork, s *work, int *info) noexcept nogil +cdef void slasd2(int *nl, int *nr, int *sqre, int *k, s *d, s *z, s *alpha, s *beta, s *u, int *ldu, s *vt, int *ldvt, s *dsigma, s *u2, int *ldu2, s *vt2, int *ldvt2, int *idxp, int *idx, int *idxc, int *idxq, int *coltyp, int *info) noexcept nogil +cdef void slasd3(int *nl, int *nr, int *sqre, int *k, s *d, s *q, int *ldq, s *dsigma, s *u, int *ldu, s *u2, int *ldu2, s *vt, int *ldvt, s *vt2, int *ldvt2, int *idxc, int *ctot, s *z, int *info) noexcept nogil +cdef void slasd4(int *n, int *i, s *d, s *z, s *delta, s *rho, s *sigma, s *work, int *info) noexcept nogil +cdef void slasd5(int *i, s *d, s *z, s *delta, s *rho, s *dsigma, s *work) noexcept nogil +cdef void slasd6(int *icompq, int *nl, int *nr, int *sqre, s *d, s *vf, s *vl, s *alpha, s *beta, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, s *givnum, int *ldgnum, s *poles, s *difl, s *difr, s *z, int *k, s *c, s *s, s *work, int *iwork, int *info) noexcept nogil +cdef void slasd7(int *icompq, int *nl, int *nr, int *sqre, int *k, s *d, s *z, s *zw, s *vf, s *vfw, s *vl, s *vlw, s *alpha, s *beta, s *dsigma, int *idx, int *idxp, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, s *givnum, int *ldgnum, s *c, s *s, int *info) noexcept nogil +cdef void slasd8(int *icompq, int *k, s *d, s *z, s *vf, s *vl, s *difl, s *difr, int *lddifr, s *dsigma, s *work, int *info) noexcept nogil +cdef void slasda(int *icompq, int *smlsiz, int *n, int *sqre, s *d, s *e, s *u, int *ldu, s *vt, int *k, s *difl, s *difr, s *z, s *poles, int *givptr, int *givcol, int *ldgcol, int *perm, s *givnum, s *c, s *s, s *work, int *iwork, int *info) noexcept nogil +cdef void slasdq(char *uplo, int *sqre, int *n, int *ncvt, int *nru, int *ncc, s *d, s *e, s *vt, int *ldvt, s *u, int *ldu, s *c, int *ldc, s *work, int *info) noexcept nogil +cdef void slasdt(int *n, int *lvl, int *nd, int *inode, int *ndiml, int *ndimr, int *msub) noexcept nogil +cdef void slaset(char *uplo, int *m, int *n, s *alpha, s *beta, s *a, int *lda) noexcept nogil +cdef void slasq1(int *n, s *d, s *e, s *work, int *info) noexcept nogil +cdef void slasq2(int *n, s *z, int *info) noexcept nogil +cdef void slasq3(int *i0, int *n0, s *z, int *pp, s *dmin, s *sigma, s *desig, s *qmax, int *nfail, int *iter, int *ndiv, bint *ieee, int *ttype, s *dmin1, s *dmin2, s *dn, s *dn1, s *dn2, s *g, s *tau) noexcept nogil +cdef void slasq4(int *i0, int *n0, s *z, int *pp, int *n0in, s *dmin, s *dmin1, s *dmin2, s *dn, s *dn1, s *dn2, s *tau, int *ttype, s *g) noexcept nogil +cdef void slasq6(int *i0, int *n0, s *z, int *pp, s *dmin, s *dmin1, s *dmin2, s *dn, s *dnm1, s *dnm2) noexcept nogil +cdef void slasr(char *side, char *pivot, char *direct, int *m, int *n, s *c, s *s, s *a, int *lda) noexcept nogil +cdef void slasrt(char *id, int *n, s *d, int *info) noexcept nogil +cdef void slassq(int *n, s *x, int *incx, s *scale, s *sumsq) noexcept nogil +cdef void slasv2(s *f, s *g, s *h, s *ssmin, s *ssmax, s *snr, s *csr, s *snl, s *csl) noexcept nogil +cdef void slaswp(int *n, s *a, int *lda, int *k1, int *k2, int *ipiv, int *incx) noexcept nogil +cdef void slasy2(bint *ltranl, bint *ltranr, int *isgn, int *n1, int *n2, s *tl, int *ldtl, s *tr, int *ldtr, s *b, int *ldb, s *scale, s *x, int *ldx, s *xnorm, int *info) noexcept nogil +cdef void slasyf(char *uplo, int *n, int *nb, int *kb, s *a, int *lda, int *ipiv, s *w, int *ldw, int *info) noexcept nogil +cdef void slatbs(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, s *ab, int *ldab, s *x, s *scale, s *cnorm, int *info) noexcept nogil +cdef void slatdf(int *ijob, int *n, s *z, int *ldz, s *rhs, s *rdsum, s *rdscal, int *ipiv, int *jpiv) noexcept nogil +cdef void slatps(char *uplo, char *trans, char *diag, char *normin, int *n, s *ap, s *x, s *scale, s *cnorm, int *info) noexcept nogil +cdef void slatrd(char *uplo, int *n, int *nb, s *a, int *lda, s *e, s *tau, s *w, int *ldw) noexcept nogil +cdef void slatrs(char *uplo, char *trans, char *diag, char *normin, int *n, s *a, int *lda, s *x, s *scale, s *cnorm, int *info) noexcept nogil +cdef void slatrz(int *m, int *n, int *l, s *a, int *lda, s *tau, s *work) noexcept nogil +cdef void slauu2(char *uplo, int *n, s *a, int *lda, int *info) noexcept nogil +cdef void slauum(char *uplo, int *n, s *a, int *lda, int *info) noexcept nogil +cdef void sopgtr(char *uplo, int *n, s *ap, s *tau, s *q, int *ldq, s *work, int *info) noexcept nogil +cdef void sopmtr(char *side, char *uplo, char *trans, int *m, int *n, s *ap, s *tau, s *c, int *ldc, s *work, int *info) noexcept nogil +cdef void sorbdb(char *trans, char *signs, int *m, int *p, int *q, s *x11, int *ldx11, s *x12, int *ldx12, s *x21, int *ldx21, s *x22, int *ldx22, s *theta, s *phi, s *taup1, s *taup2, s *tauq1, s *tauq2, s *work, int *lwork, int *info) noexcept nogil +cdef void sorcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, s *x11, int *ldx11, s *x12, int *ldx12, s *x21, int *ldx21, s *x22, int *ldx22, s *theta, s *u1, int *ldu1, s *u2, int *ldu2, s *v1t, int *ldv1t, s *v2t, int *ldv2t, s *work, int *lwork, int *iwork, int *info) noexcept nogil +cdef void sorg2l(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil +cdef void sorg2r(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil +cdef void sorgbr(char *vect, int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil +cdef void sorghr(int *n, int *ilo, int *ihi, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil +cdef void sorgl2(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil +cdef void sorglq(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil +cdef void sorgql(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil +cdef void sorgqr(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil +cdef void sorgr2(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil +cdef void sorgrq(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil +cdef void sorgtr(char *uplo, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil +cdef void sorm2l(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) noexcept nogil +cdef void sorm2r(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) noexcept nogil +cdef void sormbr(char *vect, char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil +cdef void sormhr(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil +cdef void sorml2(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) noexcept nogil +cdef void sormlq(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil +cdef void sormql(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil +cdef void sormqr(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil +cdef void sormr2(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) noexcept nogil +cdef void sormr3(char *side, char *trans, int *m, int *n, int *k, int *l, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) noexcept nogil +cdef void sormrq(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil +cdef void sormrz(char *side, char *trans, int *m, int *n, int *k, int *l, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil +cdef void sormtr(char *side, char *uplo, char *trans, int *m, int *n, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil +cdef void spbcon(char *uplo, int *n, int *kd, s *ab, int *ldab, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil +cdef void spbequ(char *uplo, int *n, int *kd, s *ab, int *ldab, s *s, s *scond, s *amax, int *info) noexcept nogil +cdef void spbrfs(char *uplo, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *afb, int *ldafb, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil +cdef void spbstf(char *uplo, int *n, int *kd, s *ab, int *ldab, int *info) noexcept nogil +cdef void spbsv(char *uplo, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *b, int *ldb, int *info) noexcept nogil +cdef void spbsvx(char *fact, char *uplo, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *afb, int *ldafb, char *equed, s *s, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil +cdef void spbtf2(char *uplo, int *n, int *kd, s *ab, int *ldab, int *info) noexcept nogil +cdef void spbtrf(char *uplo, int *n, int *kd, s *ab, int *ldab, int *info) noexcept nogil +cdef void spbtrs(char *uplo, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *b, int *ldb, int *info) noexcept nogil +cdef void spftrf(char *transr, char *uplo, int *n, s *a, int *info) noexcept nogil +cdef void spftri(char *transr, char *uplo, int *n, s *a, int *info) noexcept nogil +cdef void spftrs(char *transr, char *uplo, int *n, int *nrhs, s *a, s *b, int *ldb, int *info) noexcept nogil +cdef void spocon(char *uplo, int *n, s *a, int *lda, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil +cdef void spoequ(int *n, s *a, int *lda, s *s, s *scond, s *amax, int *info) noexcept nogil +cdef void spoequb(int *n, s *a, int *lda, s *s, s *scond, s *amax, int *info) noexcept nogil +cdef void sporfs(char *uplo, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil +cdef void sposv(char *uplo, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, int *info) noexcept nogil +cdef void sposvx(char *fact, char *uplo, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, char *equed, s *s, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil +cdef void spotf2(char *uplo, int *n, s *a, int *lda, int *info) noexcept nogil +cdef void spotrf(char *uplo, int *n, s *a, int *lda, int *info) noexcept nogil +cdef void spotri(char *uplo, int *n, s *a, int *lda, int *info) noexcept nogil +cdef void spotrs(char *uplo, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, int *info) noexcept nogil +cdef void sppcon(char *uplo, int *n, s *ap, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil +cdef void sppequ(char *uplo, int *n, s *ap, s *s, s *scond, s *amax, int *info) noexcept nogil +cdef void spprfs(char *uplo, int *n, int *nrhs, s *ap, s *afp, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil +cdef void sppsv(char *uplo, int *n, int *nrhs, s *ap, s *b, int *ldb, int *info) noexcept nogil +cdef void sppsvx(char *fact, char *uplo, int *n, int *nrhs, s *ap, s *afp, char *equed, s *s, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil +cdef void spptrf(char *uplo, int *n, s *ap, int *info) noexcept nogil +cdef void spptri(char *uplo, int *n, s *ap, int *info) noexcept nogil +cdef void spptrs(char *uplo, int *n, int *nrhs, s *ap, s *b, int *ldb, int *info) noexcept nogil +cdef void spstf2(char *uplo, int *n, s *a, int *lda, int *piv, int *rank, s *tol, s *work, int *info) noexcept nogil +cdef void spstrf(char *uplo, int *n, s *a, int *lda, int *piv, int *rank, s *tol, s *work, int *info) noexcept nogil +cdef void sptcon(int *n, s *d, s *e, s *anorm, s *rcond, s *work, int *info) noexcept nogil +cdef void spteqr(char *compz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *info) noexcept nogil +cdef void sptrfs(int *n, int *nrhs, s *d, s *e, s *df, s *ef, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *info) noexcept nogil +cdef void sptsv(int *n, int *nrhs, s *d, s *e, s *b, int *ldb, int *info) noexcept nogil +cdef void sptsvx(char *fact, int *n, int *nrhs, s *d, s *e, s *df, s *ef, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *info) noexcept nogil +cdef void spttrf(int *n, s *d, s *e, int *info) noexcept nogil +cdef void spttrs(int *n, int *nrhs, s *d, s *e, s *b, int *ldb, int *info) noexcept nogil +cdef void sptts2(int *n, int *nrhs, s *d, s *e, s *b, int *ldb) noexcept nogil +cdef void srscl(int *n, s *sa, s *sx, int *incx) noexcept nogil +cdef void ssbev(char *jobz, char *uplo, int *n, int *kd, s *ab, int *ldab, s *w, s *z, int *ldz, s *work, int *info) noexcept nogil +cdef void ssbevd(char *jobz, char *uplo, int *n, int *kd, s *ab, int *ldab, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void ssbevx(char *jobz, char *range, char *uplo, int *n, int *kd, s *ab, int *ldab, s *q, int *ldq, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil +cdef void ssbgst(char *vect, char *uplo, int *n, int *ka, int *kb, s *ab, int *ldab, s *bb, int *ldbb, s *x, int *ldx, s *work, int *info) noexcept nogil +cdef void ssbgv(char *jobz, char *uplo, int *n, int *ka, int *kb, s *ab, int *ldab, s *bb, int *ldbb, s *w, s *z, int *ldz, s *work, int *info) noexcept nogil +cdef void ssbgvd(char *jobz, char *uplo, int *n, int *ka, int *kb, s *ab, int *ldab, s *bb, int *ldbb, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void ssbgvx(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, s *ab, int *ldab, s *bb, int *ldbb, s *q, int *ldq, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil +cdef void ssbtrd(char *vect, char *uplo, int *n, int *kd, s *ab, int *ldab, s *d, s *e, s *q, int *ldq, s *work, int *info) noexcept nogil +cdef void ssfrk(char *transr, char *uplo, char *trans, int *n, int *k, s *alpha, s *a, int *lda, s *beta, s *c) noexcept nogil +cdef void sspcon(char *uplo, int *n, s *ap, int *ipiv, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil +cdef void sspev(char *jobz, char *uplo, int *n, s *ap, s *w, s *z, int *ldz, s *work, int *info) noexcept nogil +cdef void sspevd(char *jobz, char *uplo, int *n, s *ap, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void sspevx(char *jobz, char *range, char *uplo, int *n, s *ap, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil +cdef void sspgst(int *itype, char *uplo, int *n, s *ap, s *bp, int *info) noexcept nogil +cdef void sspgv(int *itype, char *jobz, char *uplo, int *n, s *ap, s *bp, s *w, s *z, int *ldz, s *work, int *info) noexcept nogil +cdef void sspgvd(int *itype, char *jobz, char *uplo, int *n, s *ap, s *bp, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void sspgvx(int *itype, char *jobz, char *range, char *uplo, int *n, s *ap, s *bp, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil +cdef void ssprfs(char *uplo, int *n, int *nrhs, s *ap, s *afp, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil +cdef void sspsv(char *uplo, int *n, int *nrhs, s *ap, int *ipiv, s *b, int *ldb, int *info) noexcept nogil +cdef void sspsvx(char *fact, char *uplo, int *n, int *nrhs, s *ap, s *afp, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil +cdef void ssptrd(char *uplo, int *n, s *ap, s *d, s *e, s *tau, int *info) noexcept nogil +cdef void ssptrf(char *uplo, int *n, s *ap, int *ipiv, int *info) noexcept nogil +cdef void ssptri(char *uplo, int *n, s *ap, int *ipiv, s *work, int *info) noexcept nogil +cdef void ssptrs(char *uplo, int *n, int *nrhs, s *ap, int *ipiv, s *b, int *ldb, int *info) noexcept nogil +cdef void sstebz(char *range, char *order, int *n, s *vl, s *vu, int *il, int *iu, s *abstol, s *d, s *e, int *m, int *nsplit, s *w, int *iblock, int *isplit, s *work, int *iwork, int *info) noexcept nogil +cdef void sstedc(char *compz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void sstegr(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, int *isuppz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void sstein(int *n, s *d, s *e, int *m, s *w, int *iblock, int *isplit, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil +cdef void sstemr(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, int *m, s *w, s *z, int *ldz, int *nzc, int *isuppz, bint *tryrac, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void ssteqr(char *compz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *info) noexcept nogil +cdef void ssterf(int *n, s *d, s *e, int *info) noexcept nogil +cdef void sstev(char *jobz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *info) noexcept nogil +cdef void sstevd(char *jobz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void sstevr(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, int *isuppz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void sstevx(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil +cdef void ssycon(char *uplo, int *n, s *a, int *lda, int *ipiv, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil +cdef void ssyconv(char *uplo, char *way, int *n, s *a, int *lda, int *ipiv, s *work, int *info) noexcept nogil +cdef void ssyequb(char *uplo, int *n, s *a, int *lda, s *s, s *scond, s *amax, s *work, int *info) noexcept nogil +cdef void ssyev(char *jobz, char *uplo, int *n, s *a, int *lda, s *w, s *work, int *lwork, int *info) noexcept nogil +cdef void ssyevd(char *jobz, char *uplo, int *n, s *a, int *lda, s *w, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void ssyevr(char *jobz, char *range, char *uplo, int *n, s *a, int *lda, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, int *isuppz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void ssyevx(char *jobz, char *range, char *uplo, int *n, s *a, int *lda, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *ifail, int *info) noexcept nogil +cdef void ssygs2(int *itype, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, int *info) noexcept nogil +cdef void ssygst(int *itype, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, int *info) noexcept nogil +cdef void ssygv(int *itype, char *jobz, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, s *w, s *work, int *lwork, int *info) noexcept nogil +cdef void ssygvd(int *itype, char *jobz, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, s *w, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void ssygvx(int *itype, char *jobz, char *range, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *ifail, int *info) noexcept nogil +cdef void ssyrfs(char *uplo, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil +cdef void ssysv(char *uplo, int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, s *work, int *lwork, int *info) noexcept nogil +cdef void ssysvx(char *fact, char *uplo, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *lwork, int *iwork, int *info) noexcept nogil +cdef void ssyswapr(char *uplo, int *n, s *a, int *lda, int *i1, int *i2) noexcept nogil +cdef void ssytd2(char *uplo, int *n, s *a, int *lda, s *d, s *e, s *tau, int *info) noexcept nogil +cdef void ssytf2(char *uplo, int *n, s *a, int *lda, int *ipiv, int *info) noexcept nogil +cdef void ssytrd(char *uplo, int *n, s *a, int *lda, s *d, s *e, s *tau, s *work, int *lwork, int *info) noexcept nogil +cdef void ssytrf(char *uplo, int *n, s *a, int *lda, int *ipiv, s *work, int *lwork, int *info) noexcept nogil +cdef void ssytri(char *uplo, int *n, s *a, int *lda, int *ipiv, s *work, int *info) noexcept nogil +cdef void ssytri2(char *uplo, int *n, s *a, int *lda, int *ipiv, s *work, int *lwork, int *info) noexcept nogil +cdef void ssytri2x(char *uplo, int *n, s *a, int *lda, int *ipiv, s *work, int *nb, int *info) noexcept nogil +cdef void ssytrs(char *uplo, int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, int *info) noexcept nogil +cdef void ssytrs2(char *uplo, int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, s *work, int *info) noexcept nogil +cdef void stbcon(char *norm, char *uplo, char *diag, int *n, int *kd, s *ab, int *ldab, s *rcond, s *work, int *iwork, int *info) noexcept nogil +cdef void stbrfs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil +cdef void stbtrs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *b, int *ldb, int *info) noexcept nogil +cdef void stfsm(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, s *alpha, s *a, s *b, int *ldb) noexcept nogil +cdef void stftri(char *transr, char *uplo, char *diag, int *n, s *a, int *info) noexcept nogil +cdef void stfttp(char *transr, char *uplo, int *n, s *arf, s *ap, int *info) noexcept nogil +cdef void stfttr(char *transr, char *uplo, int *n, s *arf, s *a, int *lda, int *info) noexcept nogil +cdef void stgevc(char *side, char *howmny, bint *select, int *n, s *s, int *lds, s *p, int *ldp, s *vl, int *ldvl, s *vr, int *ldvr, int *mm, int *m, s *work, int *info) noexcept nogil +cdef void stgex2(bint *wantq, bint *wantz, int *n, s *a, int *lda, s *b, int *ldb, s *q, int *ldq, s *z, int *ldz, int *j1, int *n1, int *n2, s *work, int *lwork, int *info) noexcept nogil +cdef void stgexc(bint *wantq, bint *wantz, int *n, s *a, int *lda, s *b, int *ldb, s *q, int *ldq, s *z, int *ldz, int *ifst, int *ilst, s *work, int *lwork, int *info) noexcept nogil +cdef void stgsen(int *ijob, bint *wantq, bint *wantz, bint *select, int *n, s *a, int *lda, s *b, int *ldb, s *alphar, s *alphai, s *beta, s *q, int *ldq, s *z, int *ldz, int *m, s *pl, s *pr, s *dif, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void stgsja(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, s *a, int *lda, s *b, int *ldb, s *tola, s *tolb, s *alpha, s *beta, s *u, int *ldu, s *v, int *ldv, s *q, int *ldq, s *work, int *ncycle, int *info) noexcept nogil +cdef void stgsna(char *job, char *howmny, bint *select, int *n, s *a, int *lda, s *b, int *ldb, s *vl, int *ldvl, s *vr, int *ldvr, s *s, s *dif, int *mm, int *m, s *work, int *lwork, int *iwork, int *info) noexcept nogil +cdef void stgsy2(char *trans, int *ijob, int *m, int *n, s *a, int *lda, s *b, int *ldb, s *c, int *ldc, s *d, int *ldd, s *e, int *lde, s *f, int *ldf, s *scale, s *rdsum, s *rdscal, int *iwork, int *pq, int *info) noexcept nogil +cdef void stgsyl(char *trans, int *ijob, int *m, int *n, s *a, int *lda, s *b, int *ldb, s *c, int *ldc, s *d, int *ldd, s *e, int *lde, s *f, int *ldf, s *scale, s *dif, s *work, int *lwork, int *iwork, int *info) noexcept nogil +cdef void stpcon(char *norm, char *uplo, char *diag, int *n, s *ap, s *rcond, s *work, int *iwork, int *info) noexcept nogil +cdef void stpmqrt(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, s *v, int *ldv, s *t, int *ldt, s *a, int *lda, s *b, int *ldb, s *work, int *info) noexcept nogil +cdef void stpqrt(int *m, int *n, int *l, int *nb, s *a, int *lda, s *b, int *ldb, s *t, int *ldt, s *work, int *info) noexcept nogil +cdef void stpqrt2(int *m, int *n, int *l, s *a, int *lda, s *b, int *ldb, s *t, int *ldt, int *info) noexcept nogil +cdef void stprfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, s *v, int *ldv, s *t, int *ldt, s *a, int *lda, s *b, int *ldb, s *work, int *ldwork) noexcept nogil +cdef void stprfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, s *ap, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil +cdef void stptri(char *uplo, char *diag, int *n, s *ap, int *info) noexcept nogil +cdef void stptrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, s *ap, s *b, int *ldb, int *info) noexcept nogil +cdef void stpttf(char *transr, char *uplo, int *n, s *ap, s *arf, int *info) noexcept nogil +cdef void stpttr(char *uplo, int *n, s *ap, s *a, int *lda, int *info) noexcept nogil +cdef void strcon(char *norm, char *uplo, char *diag, int *n, s *a, int *lda, s *rcond, s *work, int *iwork, int *info) noexcept nogil +cdef void strevc(char *side, char *howmny, bint *select, int *n, s *t, int *ldt, s *vl, int *ldvl, s *vr, int *ldvr, int *mm, int *m, s *work, int *info) noexcept nogil +cdef void strexc(char *compq, int *n, s *t, int *ldt, s *q, int *ldq, int *ifst, int *ilst, s *work, int *info) noexcept nogil +cdef void strrfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil +cdef void strsen(char *job, char *compq, bint *select, int *n, s *t, int *ldt, s *q, int *ldq, s *wr, s *wi, int *m, s *s, s *sep, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void strsna(char *job, char *howmny, bint *select, int *n, s *t, int *ldt, s *vl, int *ldvl, s *vr, int *ldvr, s *s, s *sep, int *mm, int *m, s *work, int *ldwork, int *iwork, int *info) noexcept nogil +cdef void strsyl(char *trana, char *tranb, int *isgn, int *m, int *n, s *a, int *lda, s *b, int *ldb, s *c, int *ldc, s *scale, int *info) noexcept nogil +cdef void strti2(char *uplo, char *diag, int *n, s *a, int *lda, int *info) noexcept nogil +cdef void strtri(char *uplo, char *diag, int *n, s *a, int *lda, int *info) noexcept nogil +cdef void strtrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, int *info) noexcept nogil +cdef void strttf(char *transr, char *uplo, int *n, s *a, int *lda, s *arf, int *info) noexcept nogil +cdef void strttp(char *uplo, int *n, s *a, int *lda, s *ap, int *info) noexcept nogil +cdef void stzrzf(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil +cdef void xerbla_array(char *srname_array, int *srname_len, int *info) noexcept nogil +cdef void zbbcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, d *theta, d *phi, z *u1, int *ldu1, z *u2, int *ldu2, z *v1t, int *ldv1t, z *v2t, int *ldv2t, d *b11d, d *b11e, d *b12d, d *b12e, d *b21d, d *b21e, d *b22d, d *b22e, d *rwork, int *lrwork, int *info) noexcept nogil +cdef void zbdsqr(char *uplo, int *n, int *ncvt, int *nru, int *ncc, d *d, d *e, z *vt, int *ldvt, z *u, int *ldu, z *c, int *ldc, d *rwork, int *info) noexcept nogil +cdef void zcgesv(int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, z *x, int *ldx, z *work, c *swork, d *rwork, int *iter, int *info) noexcept nogil +cdef void zcposv(char *uplo, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, z *x, int *ldx, z *work, c *swork, d *rwork, int *iter, int *info) noexcept nogil +cdef void zdrscl(int *n, d *sa, z *sx, int *incx) noexcept nogil +cdef void zgbbrd(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, z *ab, int *ldab, d *d, d *e, z *q, int *ldq, z *pt, int *ldpt, z *c, int *ldc, z *work, d *rwork, int *info) noexcept nogil +cdef void zgbcon(char *norm, int *n, int *kl, int *ku, z *ab, int *ldab, int *ipiv, d *anorm, d *rcond, z *work, d *rwork, int *info) noexcept nogil +cdef void zgbequ(int *m, int *n, int *kl, int *ku, z *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil +cdef void zgbequb(int *m, int *n, int *kl, int *ku, z *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil +cdef void zgbrfs(char *trans, int *n, int *kl, int *ku, int *nrhs, z *ab, int *ldab, z *afb, int *ldafb, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil +cdef void zgbsv(int *n, int *kl, int *ku, int *nrhs, z *ab, int *ldab, int *ipiv, z *b, int *ldb, int *info) noexcept nogil +cdef void zgbsvx(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, z *ab, int *ldab, z *afb, int *ldafb, int *ipiv, char *equed, d *r, d *c, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil +cdef void zgbtf2(int *m, int *n, int *kl, int *ku, z *ab, int *ldab, int *ipiv, int *info) noexcept nogil +cdef void zgbtrf(int *m, int *n, int *kl, int *ku, z *ab, int *ldab, int *ipiv, int *info) noexcept nogil +cdef void zgbtrs(char *trans, int *n, int *kl, int *ku, int *nrhs, z *ab, int *ldab, int *ipiv, z *b, int *ldb, int *info) noexcept nogil +cdef void zgebak(char *job, char *side, int *n, int *ilo, int *ihi, d *scale, int *m, z *v, int *ldv, int *info) noexcept nogil +cdef void zgebal(char *job, int *n, z *a, int *lda, int *ilo, int *ihi, d *scale, int *info) noexcept nogil +cdef void zgebd2(int *m, int *n, z *a, int *lda, d *d, d *e, z *tauq, z *taup, z *work, int *info) noexcept nogil +cdef void zgebrd(int *m, int *n, z *a, int *lda, d *d, d *e, z *tauq, z *taup, z *work, int *lwork, int *info) noexcept nogil +cdef void zgecon(char *norm, int *n, z *a, int *lda, d *anorm, d *rcond, z *work, d *rwork, int *info) noexcept nogil +cdef void zgeequ(int *m, int *n, z *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil +cdef void zgeequb(int *m, int *n, z *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil +cdef void zgees(char *jobvs, char *sort, zselect1 *select, int *n, z *a, int *lda, int *sdim, z *w, z *vs, int *ldvs, z *work, int *lwork, d *rwork, bint *bwork, int *info) noexcept nogil +cdef void zgeesx(char *jobvs, char *sort, zselect1 *select, char *sense, int *n, z *a, int *lda, int *sdim, z *w, z *vs, int *ldvs, d *rconde, d *rcondv, z *work, int *lwork, d *rwork, bint *bwork, int *info) noexcept nogil +cdef void zgeev(char *jobvl, char *jobvr, int *n, z *a, int *lda, z *w, z *vl, int *ldvl, z *vr, int *ldvr, z *work, int *lwork, d *rwork, int *info) noexcept nogil +cdef void zgeevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, z *a, int *lda, z *w, z *vl, int *ldvl, z *vr, int *ldvr, int *ilo, int *ihi, d *scale, d *abnrm, d *rconde, d *rcondv, z *work, int *lwork, d *rwork, int *info) noexcept nogil +cdef void zgehd2(int *n, int *ilo, int *ihi, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil +cdef void zgehrd(int *n, int *ilo, int *ihi, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil +cdef void zgelq2(int *m, int *n, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil +cdef void zgelqf(int *m, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil +cdef void zgels(char *trans, int *m, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, z *work, int *lwork, int *info) noexcept nogil +cdef void zgelsd(int *m, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, d *s, d *rcond, int *rank, z *work, int *lwork, d *rwork, int *iwork, int *info) noexcept nogil +cdef void zgelss(int *m, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, d *s, d *rcond, int *rank, z *work, int *lwork, d *rwork, int *info) noexcept nogil +cdef void zgelsy(int *m, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, int *jpvt, d *rcond, int *rank, z *work, int *lwork, d *rwork, int *info) noexcept nogil +cdef void zgemqrt(char *side, char *trans, int *m, int *n, int *k, int *nb, z *v, int *ldv, z *t, int *ldt, z *c, int *ldc, z *work, int *info) noexcept nogil +cdef void zgeql2(int *m, int *n, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil +cdef void zgeqlf(int *m, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil +cdef void zgeqp3(int *m, int *n, z *a, int *lda, int *jpvt, z *tau, z *work, int *lwork, d *rwork, int *info) noexcept nogil +cdef void zgeqr2(int *m, int *n, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil +cdef void zgeqr2p(int *m, int *n, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil +cdef void zgeqrf(int *m, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil +cdef void zgeqrfp(int *m, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil +cdef void zgeqrt(int *m, int *n, int *nb, z *a, int *lda, z *t, int *ldt, z *work, int *info) noexcept nogil +cdef void zgeqrt2(int *m, int *n, z *a, int *lda, z *t, int *ldt, int *info) noexcept nogil +cdef void zgeqrt3(int *m, int *n, z *a, int *lda, z *t, int *ldt, int *info) noexcept nogil +cdef void zgerfs(char *trans, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil +cdef void zgerq2(int *m, int *n, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil +cdef void zgerqf(int *m, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil +cdef void zgesc2(int *n, z *a, int *lda, z *rhs, int *ipiv, int *jpiv, d *scale) noexcept nogil +cdef void zgesdd(char *jobz, int *m, int *n, z *a, int *lda, d *s, z *u, int *ldu, z *vt, int *ldvt, z *work, int *lwork, d *rwork, int *iwork, int *info) noexcept nogil +cdef void zgesv(int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, int *info) noexcept nogil +cdef void zgesvd(char *jobu, char *jobvt, int *m, int *n, z *a, int *lda, d *s, z *u, int *ldu, z *vt, int *ldvt, z *work, int *lwork, d *rwork, int *info) noexcept nogil +cdef void zgesvx(char *fact, char *trans, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, int *ipiv, char *equed, d *r, d *c, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil +cdef void zgetc2(int *n, z *a, int *lda, int *ipiv, int *jpiv, int *info) noexcept nogil +cdef void zgetf2(int *m, int *n, z *a, int *lda, int *ipiv, int *info) noexcept nogil +cdef void zgetrf(int *m, int *n, z *a, int *lda, int *ipiv, int *info) noexcept nogil +cdef void zgetri(int *n, z *a, int *lda, int *ipiv, z *work, int *lwork, int *info) noexcept nogil +cdef void zgetrs(char *trans, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, int *info) noexcept nogil +cdef void zggbak(char *job, char *side, int *n, int *ilo, int *ihi, d *lscale, d *rscale, int *m, z *v, int *ldv, int *info) noexcept nogil +cdef void zggbal(char *job, int *n, z *a, int *lda, z *b, int *ldb, int *ilo, int *ihi, d *lscale, d *rscale, d *work, int *info) noexcept nogil +cdef void zgges(char *jobvsl, char *jobvsr, char *sort, zselect2 *selctg, int *n, z *a, int *lda, z *b, int *ldb, int *sdim, z *alpha, z *beta, z *vsl, int *ldvsl, z *vsr, int *ldvsr, z *work, int *lwork, d *rwork, bint *bwork, int *info) noexcept nogil +cdef void zggesx(char *jobvsl, char *jobvsr, char *sort, zselect2 *selctg, char *sense, int *n, z *a, int *lda, z *b, int *ldb, int *sdim, z *alpha, z *beta, z *vsl, int *ldvsl, z *vsr, int *ldvsr, d *rconde, d *rcondv, z *work, int *lwork, d *rwork, int *iwork, int *liwork, bint *bwork, int *info) noexcept nogil +cdef void zggev(char *jobvl, char *jobvr, int *n, z *a, int *lda, z *b, int *ldb, z *alpha, z *beta, z *vl, int *ldvl, z *vr, int *ldvr, z *work, int *lwork, d *rwork, int *info) noexcept nogil +cdef void zggevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, z *a, int *lda, z *b, int *ldb, z *alpha, z *beta, z *vl, int *ldvl, z *vr, int *ldvr, int *ilo, int *ihi, d *lscale, d *rscale, d *abnrm, d *bbnrm, d *rconde, d *rcondv, z *work, int *lwork, d *rwork, int *iwork, bint *bwork, int *info) noexcept nogil +cdef void zggglm(int *n, int *m, int *p, z *a, int *lda, z *b, int *ldb, z *d, z *x, z *y, z *work, int *lwork, int *info) noexcept nogil +cdef void zgghrd(char *compq, char *compz, int *n, int *ilo, int *ihi, z *a, int *lda, z *b, int *ldb, z *q, int *ldq, z *z, int *ldz, int *info) noexcept nogil +cdef void zgglse(int *m, int *n, int *p, z *a, int *lda, z *b, int *ldb, z *c, z *d, z *x, z *work, int *lwork, int *info) noexcept nogil +cdef void zggqrf(int *n, int *m, int *p, z *a, int *lda, z *taua, z *b, int *ldb, z *taub, z *work, int *lwork, int *info) noexcept nogil +cdef void zggrqf(int *m, int *p, int *n, z *a, int *lda, z *taua, z *b, int *ldb, z *taub, z *work, int *lwork, int *info) noexcept nogil +cdef void zgtcon(char *norm, int *n, z *dl, z *d, z *du, z *du2, int *ipiv, d *anorm, d *rcond, z *work, int *info) noexcept nogil +cdef void zgtrfs(char *trans, int *n, int *nrhs, z *dl, z *d, z *du, z *dlf, z *df, z *duf, z *du2, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil +cdef void zgtsv(int *n, int *nrhs, z *dl, z *d, z *du, z *b, int *ldb, int *info) noexcept nogil +cdef void zgtsvx(char *fact, char *trans, int *n, int *nrhs, z *dl, z *d, z *du, z *dlf, z *df, z *duf, z *du2, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil +cdef void zgttrf(int *n, z *dl, z *d, z *du, z *du2, int *ipiv, int *info) noexcept nogil +cdef void zgttrs(char *trans, int *n, int *nrhs, z *dl, z *d, z *du, z *du2, int *ipiv, z *b, int *ldb, int *info) noexcept nogil +cdef void zgtts2(int *itrans, int *n, int *nrhs, z *dl, z *d, z *du, z *du2, int *ipiv, z *b, int *ldb) noexcept nogil +cdef void zhbev(char *jobz, char *uplo, int *n, int *kd, z *ab, int *ldab, d *w, z *z, int *ldz, z *work, d *rwork, int *info) noexcept nogil +cdef void zhbevd(char *jobz, char *uplo, int *n, int *kd, z *ab, int *ldab, d *w, z *z, int *ldz, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void zhbevx(char *jobz, char *range, char *uplo, int *n, int *kd, z *ab, int *ldab, z *q, int *ldq, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, z *work, d *rwork, int *iwork, int *ifail, int *info) noexcept nogil +cdef void zhbgst(char *vect, char *uplo, int *n, int *ka, int *kb, z *ab, int *ldab, z *bb, int *ldbb, z *x, int *ldx, z *work, d *rwork, int *info) noexcept nogil +cdef void zhbgv(char *jobz, char *uplo, int *n, int *ka, int *kb, z *ab, int *ldab, z *bb, int *ldbb, d *w, z *z, int *ldz, z *work, d *rwork, int *info) noexcept nogil +cdef void zhbgvd(char *jobz, char *uplo, int *n, int *ka, int *kb, z *ab, int *ldab, z *bb, int *ldbb, d *w, z *z, int *ldz, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void zhbgvx(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, z *ab, int *ldab, z *bb, int *ldbb, z *q, int *ldq, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, z *work, d *rwork, int *iwork, int *ifail, int *info) noexcept nogil +cdef void zhbtrd(char *vect, char *uplo, int *n, int *kd, z *ab, int *ldab, d *d, d *e, z *q, int *ldq, z *work, int *info) noexcept nogil +cdef void zhecon(char *uplo, int *n, z *a, int *lda, int *ipiv, d *anorm, d *rcond, z *work, int *info) noexcept nogil +cdef void zheequb(char *uplo, int *n, z *a, int *lda, d *s, d *scond, d *amax, z *work, int *info) noexcept nogil +cdef void zheev(char *jobz, char *uplo, int *n, z *a, int *lda, d *w, z *work, int *lwork, d *rwork, int *info) noexcept nogil +cdef void zheevd(char *jobz, char *uplo, int *n, z *a, int *lda, d *w, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void zheevr(char *jobz, char *range, char *uplo, int *n, z *a, int *lda, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, int *isuppz, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void zheevx(char *jobz, char *range, char *uplo, int *n, z *a, int *lda, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, z *work, int *lwork, d *rwork, int *iwork, int *ifail, int *info) noexcept nogil +cdef void zhegs2(int *itype, char *uplo, int *n, z *a, int *lda, z *b, int *ldb, int *info) noexcept nogil +cdef void zhegst(int *itype, char *uplo, int *n, z *a, int *lda, z *b, int *ldb, int *info) noexcept nogil +cdef void zhegv(int *itype, char *jobz, char *uplo, int *n, z *a, int *lda, z *b, int *ldb, d *w, z *work, int *lwork, d *rwork, int *info) noexcept nogil +cdef void zhegvd(int *itype, char *jobz, char *uplo, int *n, z *a, int *lda, z *b, int *ldb, d *w, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void zhegvx(int *itype, char *jobz, char *range, char *uplo, int *n, z *a, int *lda, z *b, int *ldb, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, z *work, int *lwork, d *rwork, int *iwork, int *ifail, int *info) noexcept nogil +cdef void zherfs(char *uplo, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil +cdef void zhesv(char *uplo, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, z *work, int *lwork, int *info) noexcept nogil +cdef void zhesvx(char *fact, char *uplo, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, int *lwork, d *rwork, int *info) noexcept nogil +cdef void zheswapr(char *uplo, int *n, z *a, int *lda, int *i1, int *i2) noexcept nogil +cdef void zhetd2(char *uplo, int *n, z *a, int *lda, d *d, d *e, z *tau, int *info) noexcept nogil +cdef void zhetf2(char *uplo, int *n, z *a, int *lda, int *ipiv, int *info) noexcept nogil +cdef void zhetrd(char *uplo, int *n, z *a, int *lda, d *d, d *e, z *tau, z *work, int *lwork, int *info) noexcept nogil +cdef void zhetrf(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *lwork, int *info) noexcept nogil +cdef void zhetri(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *info) noexcept nogil +cdef void zhetri2(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *lwork, int *info) noexcept nogil +cdef void zhetri2x(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *nb, int *info) noexcept nogil +cdef void zhetrs(char *uplo, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, int *info) noexcept nogil +cdef void zhetrs2(char *uplo, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, z *work, int *info) noexcept nogil +cdef void zhfrk(char *transr, char *uplo, char *trans, int *n, int *k, d *alpha, z *a, int *lda, d *beta, z *c) noexcept nogil +cdef void zhgeqz(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, z *h, int *ldh, z *t, int *ldt, z *alpha, z *beta, z *q, int *ldq, z *z, int *ldz, z *work, int *lwork, d *rwork, int *info) noexcept nogil +cdef void zhpcon(char *uplo, int *n, z *ap, int *ipiv, d *anorm, d *rcond, z *work, int *info) noexcept nogil +cdef void zhpev(char *jobz, char *uplo, int *n, z *ap, d *w, z *z, int *ldz, z *work, d *rwork, int *info) noexcept nogil +cdef void zhpevd(char *jobz, char *uplo, int *n, z *ap, d *w, z *z, int *ldz, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void zhpevx(char *jobz, char *range, char *uplo, int *n, z *ap, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, z *work, d *rwork, int *iwork, int *ifail, int *info) noexcept nogil +cdef void zhpgst(int *itype, char *uplo, int *n, z *ap, z *bp, int *info) noexcept nogil +cdef void zhpgv(int *itype, char *jobz, char *uplo, int *n, z *ap, z *bp, d *w, z *z, int *ldz, z *work, d *rwork, int *info) noexcept nogil +cdef void zhpgvd(int *itype, char *jobz, char *uplo, int *n, z *ap, z *bp, d *w, z *z, int *ldz, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void zhpgvx(int *itype, char *jobz, char *range, char *uplo, int *n, z *ap, z *bp, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, z *work, d *rwork, int *iwork, int *ifail, int *info) noexcept nogil +cdef void zhprfs(char *uplo, int *n, int *nrhs, z *ap, z *afp, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil +cdef void zhpsv(char *uplo, int *n, int *nrhs, z *ap, int *ipiv, z *b, int *ldb, int *info) noexcept nogil +cdef void zhpsvx(char *fact, char *uplo, int *n, int *nrhs, z *ap, z *afp, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil +cdef void zhptrd(char *uplo, int *n, z *ap, d *d, d *e, z *tau, int *info) noexcept nogil +cdef void zhptrf(char *uplo, int *n, z *ap, int *ipiv, int *info) noexcept nogil +cdef void zhptri(char *uplo, int *n, z *ap, int *ipiv, z *work, int *info) noexcept nogil +cdef void zhptrs(char *uplo, int *n, int *nrhs, z *ap, int *ipiv, z *b, int *ldb, int *info) noexcept nogil +cdef void zhsein(char *side, char *eigsrc, char *initv, bint *select, int *n, z *h, int *ldh, z *w, z *vl, int *ldvl, z *vr, int *ldvr, int *mm, int *m, z *work, d *rwork, int *ifaill, int *ifailr, int *info) noexcept nogil +cdef void zhseqr(char *job, char *compz, int *n, int *ilo, int *ihi, z *h, int *ldh, z *w, z *z, int *ldz, z *work, int *lwork, int *info) noexcept nogil +cdef void zlabrd(int *m, int *n, int *nb, z *a, int *lda, d *d, d *e, z *tauq, z *taup, z *x, int *ldx, z *y, int *ldy) noexcept nogil +cdef void zlacgv(int *n, z *x, int *incx) noexcept nogil +cdef void zlacn2(int *n, z *v, z *x, d *est, int *kase, int *isave) noexcept nogil +cdef void zlacon(int *n, z *v, z *x, d *est, int *kase) noexcept nogil +cdef void zlacp2(char *uplo, int *m, int *n, d *a, int *lda, z *b, int *ldb) noexcept nogil +cdef void zlacpy(char *uplo, int *m, int *n, z *a, int *lda, z *b, int *ldb) noexcept nogil +cdef void zlacrm(int *m, int *n, z *a, int *lda, d *b, int *ldb, z *c, int *ldc, d *rwork) noexcept nogil +cdef void zlacrt(int *n, z *cx, int *incx, z *cy, int *incy, z *c, z *s) noexcept nogil +cdef z zladiv(z *x, z *y) noexcept nogil +cdef void zlaed0(int *qsiz, int *n, d *d, d *e, z *q, int *ldq, z *qstore, int *ldqs, d *rwork, int *iwork, int *info) noexcept nogil +cdef void zlaed7(int *n, int *cutpnt, int *qsiz, int *tlvls, int *curlvl, int *curpbm, d *d, z *q, int *ldq, d *rho, int *indxq, d *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, d *givnum, z *work, d *rwork, int *iwork, int *info) noexcept nogil +cdef void zlaed8(int *k, int *n, int *qsiz, z *q, int *ldq, d *d, d *rho, int *cutpnt, d *z, d *dlamda, z *q2, int *ldq2, d *w, int *indxp, int *indx, int *indxq, int *perm, int *givptr, int *givcol, d *givnum, int *info) noexcept nogil +cdef void zlaein(bint *rightv, bint *noinit, int *n, z *h, int *ldh, z *w, z *v, z *b, int *ldb, d *rwork, d *eps3, d *smlnum, int *info) noexcept nogil +cdef void zlaesy(z *a, z *b, z *c, z *rt1, z *rt2, z *evscal, z *cs1, z *sn1) noexcept nogil +cdef void zlaev2(z *a, z *b, z *c, d *rt1, d *rt2, d *cs1, z *sn1) noexcept nogil +cdef void zlag2c(int *m, int *n, z *a, int *lda, c *sa, int *ldsa, int *info) noexcept nogil +cdef void zlags2(bint *upper, d *a1, z *a2, d *a3, d *b1, z *b2, d *b3, d *csu, z *snu, d *csv, z *snv, d *csq, z *snq) noexcept nogil +cdef void zlagtm(char *trans, int *n, int *nrhs, d *alpha, z *dl, z *d, z *du, z *x, int *ldx, d *beta, z *b, int *ldb) noexcept nogil +cdef void zlahef(char *uplo, int *n, int *nb, int *kb, z *a, int *lda, int *ipiv, z *w, int *ldw, int *info) noexcept nogil +cdef void zlahqr(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, z *h, int *ldh, z *w, int *iloz, int *ihiz, z *z, int *ldz, int *info) noexcept nogil +cdef void zlahr2(int *n, int *k, int *nb, z *a, int *lda, z *tau, z *t, int *ldt, z *y, int *ldy) noexcept nogil +cdef void zlaic1(int *job, int *j, z *x, d *sest, z *w, z *gamma, d *sestpr, z *s, z *c) noexcept nogil +cdef void zlals0(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, z *b, int *ldb, z *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, d *givnum, int *ldgnum, d *poles, d *difl, d *difr, d *z, int *k, d *c, d *s, d *rwork, int *info) noexcept nogil +cdef void zlalsa(int *icompq, int *smlsiz, int *n, int *nrhs, z *b, int *ldb, z *bx, int *ldbx, d *u, int *ldu, d *vt, int *k, d *difl, d *difr, d *z, d *poles, int *givptr, int *givcol, int *ldgcol, int *perm, d *givnum, d *c, d *s, d *rwork, int *iwork, int *info) noexcept nogil +cdef void zlalsd(char *uplo, int *smlsiz, int *n, int *nrhs, d *d, d *e, z *b, int *ldb, d *rcond, int *rank, z *work, d *rwork, int *iwork, int *info) noexcept nogil +cdef d zlangb(char *norm, int *n, int *kl, int *ku, z *ab, int *ldab, d *work) noexcept nogil +cdef d zlange(char *norm, int *m, int *n, z *a, int *lda, d *work) noexcept nogil +cdef d zlangt(char *norm, int *n, z *dl, z *d_, z *du) noexcept nogil +cdef d zlanhb(char *norm, char *uplo, int *n, int *k, z *ab, int *ldab, d *work) noexcept nogil +cdef d zlanhe(char *norm, char *uplo, int *n, z *a, int *lda, d *work) noexcept nogil +cdef d zlanhf(char *norm, char *transr, char *uplo, int *n, z *a, d *work) noexcept nogil +cdef d zlanhp(char *norm, char *uplo, int *n, z *ap, d *work) noexcept nogil +cdef d zlanhs(char *norm, int *n, z *a, int *lda, d *work) noexcept nogil +cdef d zlanht(char *norm, int *n, d *d_, z *e) noexcept nogil +cdef d zlansb(char *norm, char *uplo, int *n, int *k, z *ab, int *ldab, d *work) noexcept nogil +cdef d zlansp(char *norm, char *uplo, int *n, z *ap, d *work) noexcept nogil +cdef d zlansy(char *norm, char *uplo, int *n, z *a, int *lda, d *work) noexcept nogil +cdef d zlantb(char *norm, char *uplo, char *diag, int *n, int *k, z *ab, int *ldab, d *work) noexcept nogil +cdef d zlantp(char *norm, char *uplo, char *diag, int *n, z *ap, d *work) noexcept nogil +cdef d zlantr(char *norm, char *uplo, char *diag, int *m, int *n, z *a, int *lda, d *work) noexcept nogil +cdef void zlapll(int *n, z *x, int *incx, z *y, int *incy, d *ssmin) noexcept nogil +cdef void zlapmr(bint *forwrd, int *m, int *n, z *x, int *ldx, int *k) noexcept nogil +cdef void zlapmt(bint *forwrd, int *m, int *n, z *x, int *ldx, int *k) noexcept nogil +cdef void zlaqgb(int *m, int *n, int *kl, int *ku, z *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, char *equed) noexcept nogil +cdef void zlaqge(int *m, int *n, z *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, char *equed) noexcept nogil +cdef void zlaqhb(char *uplo, int *n, int *kd, z *ab, int *ldab, d *s, d *scond, d *amax, char *equed) noexcept nogil +cdef void zlaqhe(char *uplo, int *n, z *a, int *lda, d *s, d *scond, d *amax, char *equed) noexcept nogil +cdef void zlaqhp(char *uplo, int *n, z *ap, d *s, d *scond, d *amax, char *equed) noexcept nogil +cdef void zlaqp2(int *m, int *n, int *offset, z *a, int *lda, int *jpvt, z *tau, d *vn1, d *vn2, z *work) noexcept nogil +cdef void zlaqps(int *m, int *n, int *offset, int *nb, int *kb, z *a, int *lda, int *jpvt, z *tau, d *vn1, d *vn2, z *auxv, z *f, int *ldf) noexcept nogil +cdef void zlaqr0(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, z *h, int *ldh, z *w, int *iloz, int *ihiz, z *z, int *ldz, z *work, int *lwork, int *info) noexcept nogil +cdef void zlaqr1(int *n, z *h, int *ldh, z *s1, z *s2, z *v) noexcept nogil +cdef void zlaqr2(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, z *h, int *ldh, int *iloz, int *ihiz, z *z, int *ldz, int *ns, int *nd, z *sh, z *v, int *ldv, int *nh, z *t, int *ldt, int *nv, z *wv, int *ldwv, z *work, int *lwork) noexcept nogil +cdef void zlaqr3(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, z *h, int *ldh, int *iloz, int *ihiz, z *z, int *ldz, int *ns, int *nd, z *sh, z *v, int *ldv, int *nh, z *t, int *ldt, int *nv, z *wv, int *ldwv, z *work, int *lwork) noexcept nogil +cdef void zlaqr4(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, z *h, int *ldh, z *w, int *iloz, int *ihiz, z *z, int *ldz, z *work, int *lwork, int *info) noexcept nogil +cdef void zlaqr5(bint *wantt, bint *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, z *s, z *h, int *ldh, int *iloz, int *ihiz, z *z, int *ldz, z *v, int *ldv, z *u, int *ldu, int *nv, z *wv, int *ldwv, int *nh, z *wh, int *ldwh) noexcept nogil +cdef void zlaqsb(char *uplo, int *n, int *kd, z *ab, int *ldab, d *s, d *scond, d *amax, char *equed) noexcept nogil +cdef void zlaqsp(char *uplo, int *n, z *ap, d *s, d *scond, d *amax, char *equed) noexcept nogil +cdef void zlaqsy(char *uplo, int *n, z *a, int *lda, d *s, d *scond, d *amax, char *equed) noexcept nogil +cdef void zlar1v(int *n, int *b1, int *bn, d *lambda_, d *d, d *l, d *ld, d *lld, d *pivmin, d *gaptol, z *z, bint *wantnc, int *negcnt, d *ztz, d *mingma, int *r, int *isuppz, d *nrminv, d *resid, d *rqcorr, d *work) noexcept nogil +cdef void zlar2v(int *n, z *x, z *y, z *z, int *incx, d *c, z *s, int *incc) noexcept nogil +cdef void zlarcm(int *m, int *n, d *a, int *lda, z *b, int *ldb, z *c, int *ldc, d *rwork) noexcept nogil +cdef void zlarf(char *side, int *m, int *n, z *v, int *incv, z *tau, z *c, int *ldc, z *work) noexcept nogil +cdef void zlarfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, z *v, int *ldv, z *t, int *ldt, z *c, int *ldc, z *work, int *ldwork) noexcept nogil +cdef void zlarfg(int *n, z *alpha, z *x, int *incx, z *tau) noexcept nogil +cdef void zlarfgp(int *n, z *alpha, z *x, int *incx, z *tau) noexcept nogil +cdef void zlarft(char *direct, char *storev, int *n, int *k, z *v, int *ldv, z *tau, z *t, int *ldt) noexcept nogil +cdef void zlarfx(char *side, int *m, int *n, z *v, z *tau, z *c, int *ldc, z *work) noexcept nogil +cdef void zlargv(int *n, z *x, int *incx, z *y, int *incy, d *c, int *incc) noexcept nogil +cdef void zlarnv(int *idist, int *iseed, int *n, z *x) noexcept nogil +cdef void zlarrv(int *n, d *vl, d *vu, d *d, d *l, d *pivmin, int *isplit, int *m, int *dol, int *dou, d *minrgp, d *rtol1, d *rtol2, d *w, d *werr, d *wgap, int *iblock, int *indexw, d *gers, z *z, int *ldz, int *isuppz, d *work, int *iwork, int *info) noexcept nogil +cdef void zlartg(z *f, z *g, d *cs, z *sn, z *r) noexcept nogil +cdef void zlartv(int *n, z *x, int *incx, z *y, int *incy, d *c, z *s, int *incc) noexcept nogil +cdef void zlarz(char *side, int *m, int *n, int *l, z *v, int *incv, z *tau, z *c, int *ldc, z *work) noexcept nogil +cdef void zlarzb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, z *v, int *ldv, z *t, int *ldt, z *c, int *ldc, z *work, int *ldwork) noexcept nogil +cdef void zlarzt(char *direct, char *storev, int *n, int *k, z *v, int *ldv, z *tau, z *t, int *ldt) noexcept nogil +cdef void zlascl(char *type_bn, int *kl, int *ku, d *cfrom, d *cto, int *m, int *n, z *a, int *lda, int *info) noexcept nogil +cdef void zlaset(char *uplo, int *m, int *n, z *alpha, z *beta, z *a, int *lda) noexcept nogil +cdef void zlasr(char *side, char *pivot, char *direct, int *m, int *n, d *c, d *s, z *a, int *lda) noexcept nogil +cdef void zlassq(int *n, z *x, int *incx, d *scale, d *sumsq) noexcept nogil +cdef void zlaswp(int *n, z *a, int *lda, int *k1, int *k2, int *ipiv, int *incx) noexcept nogil +cdef void zlasyf(char *uplo, int *n, int *nb, int *kb, z *a, int *lda, int *ipiv, z *w, int *ldw, int *info) noexcept nogil +cdef void zlat2c(char *uplo, int *n, z *a, int *lda, c *sa, int *ldsa, int *info) noexcept nogil +cdef void zlatbs(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, z *ab, int *ldab, z *x, d *scale, d *cnorm, int *info) noexcept nogil +cdef void zlatdf(int *ijob, int *n, z *z, int *ldz, z *rhs, d *rdsum, d *rdscal, int *ipiv, int *jpiv) noexcept nogil +cdef void zlatps(char *uplo, char *trans, char *diag, char *normin, int *n, z *ap, z *x, d *scale, d *cnorm, int *info) noexcept nogil +cdef void zlatrd(char *uplo, int *n, int *nb, z *a, int *lda, d *e, z *tau, z *w, int *ldw) noexcept nogil +cdef void zlatrs(char *uplo, char *trans, char *diag, char *normin, int *n, z *a, int *lda, z *x, d *scale, d *cnorm, int *info) noexcept nogil +cdef void zlatrz(int *m, int *n, int *l, z *a, int *lda, z *tau, z *work) noexcept nogil +cdef void zlauu2(char *uplo, int *n, z *a, int *lda, int *info) noexcept nogil +cdef void zlauum(char *uplo, int *n, z *a, int *lda, int *info) noexcept nogil +cdef void zpbcon(char *uplo, int *n, int *kd, z *ab, int *ldab, d *anorm, d *rcond, z *work, d *rwork, int *info) noexcept nogil +cdef void zpbequ(char *uplo, int *n, int *kd, z *ab, int *ldab, d *s, d *scond, d *amax, int *info) noexcept nogil +cdef void zpbrfs(char *uplo, int *n, int *kd, int *nrhs, z *ab, int *ldab, z *afb, int *ldafb, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil +cdef void zpbstf(char *uplo, int *n, int *kd, z *ab, int *ldab, int *info) noexcept nogil +cdef void zpbsv(char *uplo, int *n, int *kd, int *nrhs, z *ab, int *ldab, z *b, int *ldb, int *info) noexcept nogil +cdef void zpbsvx(char *fact, char *uplo, int *n, int *kd, int *nrhs, z *ab, int *ldab, z *afb, int *ldafb, char *equed, d *s, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil +cdef void zpbtf2(char *uplo, int *n, int *kd, z *ab, int *ldab, int *info) noexcept nogil +cdef void zpbtrf(char *uplo, int *n, int *kd, z *ab, int *ldab, int *info) noexcept nogil +cdef void zpbtrs(char *uplo, int *n, int *kd, int *nrhs, z *ab, int *ldab, z *b, int *ldb, int *info) noexcept nogil +cdef void zpftrf(char *transr, char *uplo, int *n, z *a, int *info) noexcept nogil +cdef void zpftri(char *transr, char *uplo, int *n, z *a, int *info) noexcept nogil +cdef void zpftrs(char *transr, char *uplo, int *n, int *nrhs, z *a, z *b, int *ldb, int *info) noexcept nogil +cdef void zpocon(char *uplo, int *n, z *a, int *lda, d *anorm, d *rcond, z *work, d *rwork, int *info) noexcept nogil +cdef void zpoequ(int *n, z *a, int *lda, d *s, d *scond, d *amax, int *info) noexcept nogil +cdef void zpoequb(int *n, z *a, int *lda, d *s, d *scond, d *amax, int *info) noexcept nogil +cdef void zporfs(char *uplo, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil +cdef void zposv(char *uplo, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, int *info) noexcept nogil +cdef void zposvx(char *fact, char *uplo, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, char *equed, d *s, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil +cdef void zpotf2(char *uplo, int *n, z *a, int *lda, int *info) noexcept nogil +cdef void zpotrf(char *uplo, int *n, z *a, int *lda, int *info) noexcept nogil +cdef void zpotri(char *uplo, int *n, z *a, int *lda, int *info) noexcept nogil +cdef void zpotrs(char *uplo, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, int *info) noexcept nogil +cdef void zppcon(char *uplo, int *n, z *ap, d *anorm, d *rcond, z *work, d *rwork, int *info) noexcept nogil +cdef void zppequ(char *uplo, int *n, z *ap, d *s, d *scond, d *amax, int *info) noexcept nogil +cdef void zpprfs(char *uplo, int *n, int *nrhs, z *ap, z *afp, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil +cdef void zppsv(char *uplo, int *n, int *nrhs, z *ap, z *b, int *ldb, int *info) noexcept nogil +cdef void zppsvx(char *fact, char *uplo, int *n, int *nrhs, z *ap, z *afp, char *equed, d *s, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil +cdef void zpptrf(char *uplo, int *n, z *ap, int *info) noexcept nogil +cdef void zpptri(char *uplo, int *n, z *ap, int *info) noexcept nogil +cdef void zpptrs(char *uplo, int *n, int *nrhs, z *ap, z *b, int *ldb, int *info) noexcept nogil +cdef void zpstf2(char *uplo, int *n, z *a, int *lda, int *piv, int *rank, d *tol, d *work, int *info) noexcept nogil +cdef void zpstrf(char *uplo, int *n, z *a, int *lda, int *piv, int *rank, d *tol, d *work, int *info) noexcept nogil +cdef void zptcon(int *n, d *d, z *e, d *anorm, d *rcond, d *rwork, int *info) noexcept nogil +cdef void zpteqr(char *compz, int *n, d *d, d *e, z *z, int *ldz, d *work, int *info) noexcept nogil +cdef void zptrfs(char *uplo, int *n, int *nrhs, d *d, z *e, d *df, z *ef, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil +cdef void zptsv(int *n, int *nrhs, d *d, z *e, z *b, int *ldb, int *info) noexcept nogil +cdef void zptsvx(char *fact, int *n, int *nrhs, d *d, z *e, d *df, z *ef, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil +cdef void zpttrf(int *n, d *d, z *e, int *info) noexcept nogil +cdef void zpttrs(char *uplo, int *n, int *nrhs, d *d, z *e, z *b, int *ldb, int *info) noexcept nogil +cdef void zptts2(int *iuplo, int *n, int *nrhs, d *d, z *e, z *b, int *ldb) noexcept nogil +cdef void zrot(int *n, z *cx, int *incx, z *cy, int *incy, d *c, z *s) noexcept nogil +cdef void zspcon(char *uplo, int *n, z *ap, int *ipiv, d *anorm, d *rcond, z *work, int *info) noexcept nogil +cdef void zspmv(char *uplo, int *n, z *alpha, z *ap, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil +cdef void zspr(char *uplo, int *n, z *alpha, z *x, int *incx, z *ap) noexcept nogil +cdef void zsprfs(char *uplo, int *n, int *nrhs, z *ap, z *afp, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil +cdef void zspsv(char *uplo, int *n, int *nrhs, z *ap, int *ipiv, z *b, int *ldb, int *info) noexcept nogil +cdef void zspsvx(char *fact, char *uplo, int *n, int *nrhs, z *ap, z *afp, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil +cdef void zsptrf(char *uplo, int *n, z *ap, int *ipiv, int *info) noexcept nogil +cdef void zsptri(char *uplo, int *n, z *ap, int *ipiv, z *work, int *info) noexcept nogil +cdef void zsptrs(char *uplo, int *n, int *nrhs, z *ap, int *ipiv, z *b, int *ldb, int *info) noexcept nogil +cdef void zstedc(char *compz, int *n, d *d, d *e, z *z, int *ldz, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void zstegr(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, int *isuppz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void zstein(int *n, d *d, d *e, int *m, d *w, int *iblock, int *isplit, z *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil +cdef void zstemr(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, int *m, d *w, z *z, int *ldz, int *nzc, int *isuppz, bint *tryrac, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void zsteqr(char *compz, int *n, d *d, d *e, z *z, int *ldz, d *work, int *info) noexcept nogil +cdef void zsycon(char *uplo, int *n, z *a, int *lda, int *ipiv, d *anorm, d *rcond, z *work, int *info) noexcept nogil +cdef void zsyconv(char *uplo, char *way, int *n, z *a, int *lda, int *ipiv, z *work, int *info) noexcept nogil +cdef void zsyequb(char *uplo, int *n, z *a, int *lda, d *s, d *scond, d *amax, z *work, int *info) noexcept nogil +cdef void zsymv(char *uplo, int *n, z *alpha, z *a, int *lda, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil +cdef void zsyr(char *uplo, int *n, z *alpha, z *x, int *incx, z *a, int *lda) noexcept nogil +cdef void zsyrfs(char *uplo, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil +cdef void zsysv(char *uplo, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, z *work, int *lwork, int *info) noexcept nogil +cdef void zsysvx(char *fact, char *uplo, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, int *lwork, d *rwork, int *info) noexcept nogil +cdef void zsyswapr(char *uplo, int *n, z *a, int *lda, int *i1, int *i2) noexcept nogil +cdef void zsytf2(char *uplo, int *n, z *a, int *lda, int *ipiv, int *info) noexcept nogil +cdef void zsytrf(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *lwork, int *info) noexcept nogil +cdef void zsytri(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *info) noexcept nogil +cdef void zsytri2(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *lwork, int *info) noexcept nogil +cdef void zsytri2x(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *nb, int *info) noexcept nogil +cdef void zsytrs(char *uplo, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, int *info) noexcept nogil +cdef void zsytrs2(char *uplo, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, z *work, int *info) noexcept nogil +cdef void ztbcon(char *norm, char *uplo, char *diag, int *n, int *kd, z *ab, int *ldab, d *rcond, z *work, d *rwork, int *info) noexcept nogil +cdef void ztbrfs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, z *ab, int *ldab, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil +cdef void ztbtrs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, z *ab, int *ldab, z *b, int *ldb, int *info) noexcept nogil +cdef void ztfsm(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, z *alpha, z *a, z *b, int *ldb) noexcept nogil +cdef void ztftri(char *transr, char *uplo, char *diag, int *n, z *a, int *info) noexcept nogil +cdef void ztfttp(char *transr, char *uplo, int *n, z *arf, z *ap, int *info) noexcept nogil +cdef void ztfttr(char *transr, char *uplo, int *n, z *arf, z *a, int *lda, int *info) noexcept nogil +cdef void ztgevc(char *side, char *howmny, bint *select, int *n, z *s, int *lds, z *p, int *ldp, z *vl, int *ldvl, z *vr, int *ldvr, int *mm, int *m, z *work, d *rwork, int *info) noexcept nogil +cdef void ztgex2(bint *wantq, bint *wantz, int *n, z *a, int *lda, z *b, int *ldb, z *q, int *ldq, z *z, int *ldz, int *j1, int *info) noexcept nogil +cdef void ztgexc(bint *wantq, bint *wantz, int *n, z *a, int *lda, z *b, int *ldb, z *q, int *ldq, z *z, int *ldz, int *ifst, int *ilst, int *info) noexcept nogil +cdef void ztgsen(int *ijob, bint *wantq, bint *wantz, bint *select, int *n, z *a, int *lda, z *b, int *ldb, z *alpha, z *beta, z *q, int *ldq, z *z, int *ldz, int *m, d *pl, d *pr, d *dif, z *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil +cdef void ztgsja(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, z *a, int *lda, z *b, int *ldb, d *tola, d *tolb, d *alpha, d *beta, z *u, int *ldu, z *v, int *ldv, z *q, int *ldq, z *work, int *ncycle, int *info) noexcept nogil +cdef void ztgsna(char *job, char *howmny, bint *select, int *n, z *a, int *lda, z *b, int *ldb, z *vl, int *ldvl, z *vr, int *ldvr, d *s, d *dif, int *mm, int *m, z *work, int *lwork, int *iwork, int *info) noexcept nogil +cdef void ztgsy2(char *trans, int *ijob, int *m, int *n, z *a, int *lda, z *b, int *ldb, z *c, int *ldc, z *d, int *ldd, z *e, int *lde, z *f, int *ldf, d *scale, d *rdsum, d *rdscal, int *info) noexcept nogil +cdef void ztgsyl(char *trans, int *ijob, int *m, int *n, z *a, int *lda, z *b, int *ldb, z *c, int *ldc, z *d, int *ldd, z *e, int *lde, z *f, int *ldf, d *scale, d *dif, z *work, int *lwork, int *iwork, int *info) noexcept nogil +cdef void ztpcon(char *norm, char *uplo, char *diag, int *n, z *ap, d *rcond, z *work, d *rwork, int *info) noexcept nogil +cdef void ztpmqrt(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, z *v, int *ldv, z *t, int *ldt, z *a, int *lda, z *b, int *ldb, z *work, int *info) noexcept nogil +cdef void ztpqrt(int *m, int *n, int *l, int *nb, z *a, int *lda, z *b, int *ldb, z *t, int *ldt, z *work, int *info) noexcept nogil +cdef void ztpqrt2(int *m, int *n, int *l, z *a, int *lda, z *b, int *ldb, z *t, int *ldt, int *info) noexcept nogil +cdef void ztprfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, z *v, int *ldv, z *t, int *ldt, z *a, int *lda, z *b, int *ldb, z *work, int *ldwork) noexcept nogil +cdef void ztprfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, z *ap, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil +cdef void ztptri(char *uplo, char *diag, int *n, z *ap, int *info) noexcept nogil +cdef void ztptrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, z *ap, z *b, int *ldb, int *info) noexcept nogil +cdef void ztpttf(char *transr, char *uplo, int *n, z *ap, z *arf, int *info) noexcept nogil +cdef void ztpttr(char *uplo, int *n, z *ap, z *a, int *lda, int *info) noexcept nogil +cdef void ztrcon(char *norm, char *uplo, char *diag, int *n, z *a, int *lda, d *rcond, z *work, d *rwork, int *info) noexcept nogil +cdef void ztrevc(char *side, char *howmny, bint *select, int *n, z *t, int *ldt, z *vl, int *ldvl, z *vr, int *ldvr, int *mm, int *m, z *work, d *rwork, int *info) noexcept nogil +cdef void ztrexc(char *compq, int *n, z *t, int *ldt, z *q, int *ldq, int *ifst, int *ilst, int *info) noexcept nogil +cdef void ztrrfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil +cdef void ztrsen(char *job, char *compq, bint *select, int *n, z *t, int *ldt, z *q, int *ldq, z *w, int *m, d *s, d *sep, z *work, int *lwork, int *info) noexcept nogil +cdef void ztrsna(char *job, char *howmny, bint *select, int *n, z *t, int *ldt, z *vl, int *ldvl, z *vr, int *ldvr, d *s, d *sep, int *mm, int *m, z *work, int *ldwork, d *rwork, int *info) noexcept nogil +cdef void ztrsyl(char *trana, char *tranb, int *isgn, int *m, int *n, z *a, int *lda, z *b, int *ldb, z *c, int *ldc, d *scale, int *info) noexcept nogil +cdef void ztrti2(char *uplo, char *diag, int *n, z *a, int *lda, int *info) noexcept nogil +cdef void ztrtri(char *uplo, char *diag, int *n, z *a, int *lda, int *info) noexcept nogil +cdef void ztrtrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, int *info) noexcept nogil +cdef void ztrttf(char *transr, char *uplo, int *n, z *a, int *lda, z *arf, int *info) noexcept nogil +cdef void ztrttp(char *uplo, int *n, z *a, int *lda, z *ap, int *info) noexcept nogil +cdef void ztzrzf(int *m, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil +cdef void zunbdb(char *trans, char *signs, int *m, int *p, int *q, z *x11, int *ldx11, z *x12, int *ldx12, z *x21, int *ldx21, z *x22, int *ldx22, d *theta, d *phi, z *taup1, z *taup2, z *tauq1, z *tauq2, z *work, int *lwork, int *info) noexcept nogil +cdef void zuncsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, z *x11, int *ldx11, z *x12, int *ldx12, z *x21, int *ldx21, z *x22, int *ldx22, d *theta, z *u1, int *ldu1, z *u2, int *ldu2, z *v1t, int *ldv1t, z *v2t, int *ldv2t, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *info) noexcept nogil +cdef void zung2l(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil +cdef void zung2r(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil +cdef void zungbr(char *vect, int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil +cdef void zunghr(int *n, int *ilo, int *ihi, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil +cdef void zungl2(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil +cdef void zunglq(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil +cdef void zungql(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil +cdef void zungqr(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil +cdef void zungr2(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil +cdef void zungrq(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil +cdef void zungtr(char *uplo, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil +cdef void zunm2l(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *info) noexcept nogil +cdef void zunm2r(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *info) noexcept nogil +cdef void zunmbr(char *vect, char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil +cdef void zunmhr(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil +cdef void zunml2(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *info) noexcept nogil +cdef void zunmlq(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil +cdef void zunmql(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil +cdef void zunmqr(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil +cdef void zunmr2(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *info) noexcept nogil +cdef void zunmr3(char *side, char *trans, int *m, int *n, int *k, int *l, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *info) noexcept nogil +cdef void zunmrq(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil +cdef void zunmrz(char *side, char *trans, int *m, int *n, int *k, int *l, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil +cdef void zunmtr(char *side, char *uplo, char *trans, int *m, int *n, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil +cdef void zupgtr(char *uplo, int *n, z *ap, z *tau, z *q, int *ldq, z *work, int *info) noexcept nogil +cdef void zupmtr(char *side, char *uplo, char *trans, int *m, int *n, z *ap, z *tau, z *c, int *ldc, z *work, int *info) noexcept nogil diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/cython_lapack.pyx b/venv/lib/python3.10/site-packages/scipy/linalg/cython_lapack.pyx new file mode 100644 index 0000000000000000000000000000000000000000..2309699ac12513e19b735cf3af9c26fa8ed0e022 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/cython_lapack.pyx @@ -0,0 +1,12045 @@ +# This file was generated by _generate_pyx.py. +# Do not edit this file directly. +""" +LAPACK functions for Cython +=========================== + +Usable from Cython via:: + + cimport scipy.linalg.cython_lapack + +This module provides Cython-level wrappers for all primary routines included +in LAPACK 3.4.0 except for ``zcgesv`` since its interface is not consistent +from LAPACK 3.4.0 to 3.6.0. It also provides some of the +fixed-api auxiliary routines. + +These wrappers do not check for alignment of arrays. +Alignment should be checked before these wrappers are used. + +Raw function pointers (Fortran-style pointer arguments): + +- cbbcsd +- cbdsqr +- cgbbrd +- cgbcon +- cgbequ +- cgbequb +- cgbrfs +- cgbsv +- cgbsvx +- cgbtf2 +- cgbtrf +- cgbtrs +- cgebak +- cgebal +- cgebd2 +- cgebrd +- cgecon +- cgeequ +- cgeequb +- cgees +- cgeesx +- cgeev +- cgeevx +- cgehd2 +- cgehrd +- cgelq2 +- cgelqf +- cgels +- cgelsd +- cgelss +- cgelsy +- cgemqrt +- cgeql2 +- cgeqlf +- cgeqp3 +- cgeqr2 +- cgeqr2p +- cgeqrf +- cgeqrfp +- cgeqrt +- cgeqrt2 +- cgeqrt3 +- cgerfs +- cgerq2 +- cgerqf +- cgesc2 +- cgesdd +- cgesv +- cgesvd +- cgesvx +- cgetc2 +- cgetf2 +- cgetrf +- cgetri +- cgetrs +- cggbak +- cggbal +- cgges +- cggesx +- cggev +- cggevx +- cggglm +- cgghrd +- cgglse +- cggqrf +- cggrqf +- cgtcon +- cgtrfs +- cgtsv +- cgtsvx +- cgttrf +- cgttrs +- cgtts2 +- chbev +- chbevd +- chbevx +- chbgst +- chbgv +- chbgvd +- chbgvx +- chbtrd +- checon +- cheequb +- cheev +- cheevd +- cheevr +- cheevx +- chegs2 +- chegst +- chegv +- chegvd +- chegvx +- cherfs +- chesv +- chesvx +- cheswapr +- chetd2 +- chetf2 +- chetrd +- chetrf +- chetri +- chetri2 +- chetri2x +- chetrs +- chetrs2 +- chfrk +- chgeqz +- chla_transtype +- chpcon +- chpev +- chpevd +- chpevx +- chpgst +- chpgv +- chpgvd +- chpgvx +- chprfs +- chpsv +- chpsvx +- chptrd +- chptrf +- chptri +- chptrs +- chsein +- chseqr +- clabrd +- clacgv +- clacn2 +- clacon +- clacp2 +- clacpy +- clacrm +- clacrt +- cladiv +- claed0 +- claed7 +- claed8 +- claein +- claesy +- claev2 +- clag2z +- clags2 +- clagtm +- clahef +- clahqr +- clahr2 +- claic1 +- clals0 +- clalsa +- clalsd +- clangb +- clange +- clangt +- clanhb +- clanhe +- clanhf +- clanhp +- clanhs +- clanht +- clansb +- clansp +- clansy +- clantb +- clantp +- clantr +- clapll +- clapmr +- clapmt +- claqgb +- claqge +- claqhb +- claqhe +- claqhp +- claqp2 +- claqps +- claqr0 +- claqr1 +- claqr2 +- claqr3 +- claqr4 +- claqr5 +- claqsb +- claqsp +- claqsy +- clar1v +- clar2v +- clarcm +- clarf +- clarfb +- clarfg +- clarfgp +- clarft +- clarfx +- clargv +- clarnv +- clarrv +- clartg +- clartv +- clarz +- clarzb +- clarzt +- clascl +- claset +- clasr +- classq +- claswp +- clasyf +- clatbs +- clatdf +- clatps +- clatrd +- clatrs +- clatrz +- clauu2 +- clauum +- cpbcon +- cpbequ +- cpbrfs +- cpbstf +- cpbsv +- cpbsvx +- cpbtf2 +- cpbtrf +- cpbtrs +- cpftrf +- cpftri +- cpftrs +- cpocon +- cpoequ +- cpoequb +- cporfs +- cposv +- cposvx +- cpotf2 +- cpotrf +- cpotri +- cpotrs +- cppcon +- cppequ +- cpprfs +- cppsv +- cppsvx +- cpptrf +- cpptri +- cpptrs +- cpstf2 +- cpstrf +- cptcon +- cpteqr +- cptrfs +- cptsv +- cptsvx +- cpttrf +- cpttrs +- cptts2 +- crot +- cspcon +- cspmv +- cspr +- csprfs +- cspsv +- cspsvx +- csptrf +- csptri +- csptrs +- csrscl +- cstedc +- cstegr +- cstein +- cstemr +- csteqr +- csycon +- csyconv +- csyequb +- csymv +- csyr +- csyrfs +- csysv +- csysvx +- csyswapr +- csytf2 +- csytrf +- csytri +- csytri2 +- csytri2x +- csytrs +- csytrs2 +- ctbcon +- ctbrfs +- ctbtrs +- ctfsm +- ctftri +- ctfttp +- ctfttr +- ctgevc +- ctgex2 +- ctgexc +- ctgsen +- ctgsja +- ctgsna +- ctgsy2 +- ctgsyl +- ctpcon +- ctpmqrt +- ctpqrt +- ctpqrt2 +- ctprfb +- ctprfs +- ctptri +- ctptrs +- ctpttf +- ctpttr +- ctrcon +- ctrevc +- ctrexc +- ctrrfs +- ctrsen +- ctrsna +- ctrsyl +- ctrti2 +- ctrtri +- ctrtrs +- ctrttf +- ctrttp +- ctzrzf +- cunbdb +- cuncsd +- cung2l +- cung2r +- cungbr +- cunghr +- cungl2 +- cunglq +- cungql +- cungqr +- cungr2 +- cungrq +- cungtr +- cunm2l +- cunm2r +- cunmbr +- cunmhr +- cunml2 +- cunmlq +- cunmql +- cunmqr +- cunmr2 +- cunmr3 +- cunmrq +- cunmrz +- cunmtr +- cupgtr +- cupmtr +- dbbcsd +- dbdsdc +- dbdsqr +- ddisna +- dgbbrd +- dgbcon +- dgbequ +- dgbequb +- dgbrfs +- dgbsv +- dgbsvx +- dgbtf2 +- dgbtrf +- dgbtrs +- dgebak +- dgebal +- dgebd2 +- dgebrd +- dgecon +- dgeequ +- dgeequb +- dgees +- dgeesx +- dgeev +- dgeevx +- dgehd2 +- dgehrd +- dgejsv +- dgelq2 +- dgelqf +- dgels +- dgelsd +- dgelss +- dgelsy +- dgemqrt +- dgeql2 +- dgeqlf +- dgeqp3 +- dgeqr2 +- dgeqr2p +- dgeqrf +- dgeqrfp +- dgeqrt +- dgeqrt2 +- dgeqrt3 +- dgerfs +- dgerq2 +- dgerqf +- dgesc2 +- dgesdd +- dgesv +- dgesvd +- dgesvj +- dgesvx +- dgetc2 +- dgetf2 +- dgetrf +- dgetri +- dgetrs +- dggbak +- dggbal +- dgges +- dggesx +- dggev +- dggevx +- dggglm +- dgghrd +- dgglse +- dggqrf +- dggrqf +- dgsvj0 +- dgsvj1 +- dgtcon +- dgtrfs +- dgtsv +- dgtsvx +- dgttrf +- dgttrs +- dgtts2 +- dhgeqz +- dhsein +- dhseqr +- disnan +- dlabad +- dlabrd +- dlacn2 +- dlacon +- dlacpy +- dladiv +- dlae2 +- dlaebz +- dlaed0 +- dlaed1 +- dlaed2 +- dlaed3 +- dlaed4 +- dlaed5 +- dlaed6 +- dlaed7 +- dlaed8 +- dlaed9 +- dlaeda +- dlaein +- dlaev2 +- dlaexc +- dlag2 +- dlag2s +- dlags2 +- dlagtf +- dlagtm +- dlagts +- dlagv2 +- dlahqr +- dlahr2 +- dlaic1 +- dlaln2 +- dlals0 +- dlalsa +- dlalsd +- dlamch +- dlamrg +- dlaneg +- dlangb +- dlange +- dlangt +- dlanhs +- dlansb +- dlansf +- dlansp +- dlanst +- dlansy +- dlantb +- dlantp +- dlantr +- dlanv2 +- dlapll +- dlapmr +- dlapmt +- dlapy2 +- dlapy3 +- dlaqgb +- dlaqge +- dlaqp2 +- dlaqps +- dlaqr0 +- dlaqr1 +- dlaqr2 +- dlaqr3 +- dlaqr4 +- dlaqr5 +- dlaqsb +- dlaqsp +- dlaqsy +- dlaqtr +- dlar1v +- dlar2v +- dlarf +- dlarfb +- dlarfg +- dlarfgp +- dlarft +- dlarfx +- dlargv +- dlarnv +- dlarra +- dlarrb +- dlarrc +- dlarrd +- dlarre +- dlarrf +- dlarrj +- dlarrk +- dlarrr +- dlarrv +- dlartg +- dlartgp +- dlartgs +- dlartv +- dlaruv +- dlarz +- dlarzb +- dlarzt +- dlas2 +- dlascl +- dlasd0 +- dlasd1 +- dlasd2 +- dlasd3 +- dlasd4 +- dlasd5 +- dlasd6 +- dlasd7 +- dlasd8 +- dlasda +- dlasdq +- dlasdt +- dlaset +- dlasq1 +- dlasq2 +- dlasq3 +- dlasq4 +- dlasq6 +- dlasr +- dlasrt +- dlassq +- dlasv2 +- dlaswp +- dlasy2 +- dlasyf +- dlat2s +- dlatbs +- dlatdf +- dlatps +- dlatrd +- dlatrs +- dlatrz +- dlauu2 +- dlauum +- dopgtr +- dopmtr +- dorbdb +- dorcsd +- dorg2l +- dorg2r +- dorgbr +- dorghr +- dorgl2 +- dorglq +- dorgql +- dorgqr +- dorgr2 +- dorgrq +- dorgtr +- dorm2l +- dorm2r +- dormbr +- dormhr +- dorml2 +- dormlq +- dormql +- dormqr +- dormr2 +- dormr3 +- dormrq +- dormrz +- dormtr +- dpbcon +- dpbequ +- dpbrfs +- dpbstf +- dpbsv +- dpbsvx +- dpbtf2 +- dpbtrf +- dpbtrs +- dpftrf +- dpftri +- dpftrs +- dpocon +- dpoequ +- dpoequb +- dporfs +- dposv +- dposvx +- dpotf2 +- dpotrf +- dpotri +- dpotrs +- dppcon +- dppequ +- dpprfs +- dppsv +- dppsvx +- dpptrf +- dpptri +- dpptrs +- dpstf2 +- dpstrf +- dptcon +- dpteqr +- dptrfs +- dptsv +- dptsvx +- dpttrf +- dpttrs +- dptts2 +- drscl +- dsbev +- dsbevd +- dsbevx +- dsbgst +- dsbgv +- dsbgvd +- dsbgvx +- dsbtrd +- dsfrk +- dsgesv +- dspcon +- dspev +- dspevd +- dspevx +- dspgst +- dspgv +- dspgvd +- dspgvx +- dsposv +- dsprfs +- dspsv +- dspsvx +- dsptrd +- dsptrf +- dsptri +- dsptrs +- dstebz +- dstedc +- dstegr +- dstein +- dstemr +- dsteqr +- dsterf +- dstev +- dstevd +- dstevr +- dstevx +- dsycon +- dsyconv +- dsyequb +- dsyev +- dsyevd +- dsyevr +- dsyevx +- dsygs2 +- dsygst +- dsygv +- dsygvd +- dsygvx +- dsyrfs +- dsysv +- dsysvx +- dsyswapr +- dsytd2 +- dsytf2 +- dsytrd +- dsytrf +- dsytri +- dsytri2 +- dsytri2x +- dsytrs +- dsytrs2 +- dtbcon +- dtbrfs +- dtbtrs +- dtfsm +- dtftri +- dtfttp +- dtfttr +- dtgevc +- dtgex2 +- dtgexc +- dtgsen +- dtgsja +- dtgsna +- dtgsy2 +- dtgsyl +- dtpcon +- dtpmqrt +- dtpqrt +- dtpqrt2 +- dtprfb +- dtprfs +- dtptri +- dtptrs +- dtpttf +- dtpttr +- dtrcon +- dtrevc +- dtrexc +- dtrrfs +- dtrsen +- dtrsna +- dtrsyl +- dtrti2 +- dtrtri +- dtrtrs +- dtrttf +- dtrttp +- dtzrzf +- dzsum1 +- icmax1 +- ieeeck +- ilaclc +- ilaclr +- iladiag +- iladlc +- iladlr +- ilaprec +- ilaslc +- ilaslr +- ilatrans +- ilauplo +- ilaver +- ilazlc +- ilazlr +- izmax1 +- sbbcsd +- sbdsdc +- sbdsqr +- scsum1 +- sdisna +- sgbbrd +- sgbcon +- sgbequ +- sgbequb +- sgbrfs +- sgbsv +- sgbsvx +- sgbtf2 +- sgbtrf +- sgbtrs +- sgebak +- sgebal +- sgebd2 +- sgebrd +- sgecon +- sgeequ +- sgeequb +- sgees +- sgeesx +- sgeev +- sgeevx +- sgehd2 +- sgehrd +- sgejsv +- sgelq2 +- sgelqf +- sgels +- sgelsd +- sgelss +- sgelsy +- sgemqrt +- sgeql2 +- sgeqlf +- sgeqp3 +- sgeqr2 +- sgeqr2p +- sgeqrf +- sgeqrfp +- sgeqrt +- sgeqrt2 +- sgeqrt3 +- sgerfs +- sgerq2 +- sgerqf +- sgesc2 +- sgesdd +- sgesv +- sgesvd +- sgesvj +- sgesvx +- sgetc2 +- sgetf2 +- sgetrf +- sgetri +- sgetrs +- sggbak +- sggbal +- sgges +- sggesx +- sggev +- sggevx +- sggglm +- sgghrd +- sgglse +- sggqrf +- sggrqf +- sgsvj0 +- sgsvj1 +- sgtcon +- sgtrfs +- sgtsv +- sgtsvx +- sgttrf +- sgttrs +- sgtts2 +- shgeqz +- shsein +- shseqr +- slabad +- slabrd +- slacn2 +- slacon +- slacpy +- sladiv +- slae2 +- slaebz +- slaed0 +- slaed1 +- slaed2 +- slaed3 +- slaed4 +- slaed5 +- slaed6 +- slaed7 +- slaed8 +- slaed9 +- slaeda +- slaein +- slaev2 +- slaexc +- slag2 +- slag2d +- slags2 +- slagtf +- slagtm +- slagts +- slagv2 +- slahqr +- slahr2 +- slaic1 +- slaln2 +- slals0 +- slalsa +- slalsd +- slamch +- slamrg +- slangb +- slange +- slangt +- slanhs +- slansb +- slansf +- slansp +- slanst +- slansy +- slantb +- slantp +- slantr +- slanv2 +- slapll +- slapmr +- slapmt +- slapy2 +- slapy3 +- slaqgb +- slaqge +- slaqp2 +- slaqps +- slaqr0 +- slaqr1 +- slaqr2 +- slaqr3 +- slaqr4 +- slaqr5 +- slaqsb +- slaqsp +- slaqsy +- slaqtr +- slar1v +- slar2v +- slarf +- slarfb +- slarfg +- slarfgp +- slarft +- slarfx +- slargv +- slarnv +- slarra +- slarrb +- slarrc +- slarrd +- slarre +- slarrf +- slarrj +- slarrk +- slarrr +- slarrv +- slartg +- slartgp +- slartgs +- slartv +- slaruv +- slarz +- slarzb +- slarzt +- slas2 +- slascl +- slasd0 +- slasd1 +- slasd2 +- slasd3 +- slasd4 +- slasd5 +- slasd6 +- slasd7 +- slasd8 +- slasda +- slasdq +- slasdt +- slaset +- slasq1 +- slasq2 +- slasq3 +- slasq4 +- slasq6 +- slasr +- slasrt +- slassq +- slasv2 +- slaswp +- slasy2 +- slasyf +- slatbs +- slatdf +- slatps +- slatrd +- slatrs +- slatrz +- slauu2 +- slauum +- sopgtr +- sopmtr +- sorbdb +- sorcsd +- sorg2l +- sorg2r +- sorgbr +- sorghr +- sorgl2 +- sorglq +- sorgql +- sorgqr +- sorgr2 +- sorgrq +- sorgtr +- sorm2l +- sorm2r +- sormbr +- sormhr +- sorml2 +- sormlq +- sormql +- sormqr +- sormr2 +- sormr3 +- sormrq +- sormrz +- sormtr +- spbcon +- spbequ +- spbrfs +- spbstf +- spbsv +- spbsvx +- spbtf2 +- spbtrf +- spbtrs +- spftrf +- spftri +- spftrs +- spocon +- spoequ +- spoequb +- sporfs +- sposv +- sposvx +- spotf2 +- spotrf +- spotri +- spotrs +- sppcon +- sppequ +- spprfs +- sppsv +- sppsvx +- spptrf +- spptri +- spptrs +- spstf2 +- spstrf +- sptcon +- spteqr +- sptrfs +- sptsv +- sptsvx +- spttrf +- spttrs +- sptts2 +- srscl +- ssbev +- ssbevd +- ssbevx +- ssbgst +- ssbgv +- ssbgvd +- ssbgvx +- ssbtrd +- ssfrk +- sspcon +- sspev +- sspevd +- sspevx +- sspgst +- sspgv +- sspgvd +- sspgvx +- ssprfs +- sspsv +- sspsvx +- ssptrd +- ssptrf +- ssptri +- ssptrs +- sstebz +- sstedc +- sstegr +- sstein +- sstemr +- ssteqr +- ssterf +- sstev +- sstevd +- sstevr +- sstevx +- ssycon +- ssyconv +- ssyequb +- ssyev +- ssyevd +- ssyevr +- ssyevx +- ssygs2 +- ssygst +- ssygv +- ssygvd +- ssygvx +- ssyrfs +- ssysv +- ssysvx +- ssyswapr +- ssytd2 +- ssytf2 +- ssytrd +- ssytrf +- ssytri +- ssytri2 +- ssytri2x +- ssytrs +- ssytrs2 +- stbcon +- stbrfs +- stbtrs +- stfsm +- stftri +- stfttp +- stfttr +- stgevc +- stgex2 +- stgexc +- stgsen +- stgsja +- stgsna +- stgsy2 +- stgsyl +- stpcon +- stpmqrt +- stpqrt +- stpqrt2 +- stprfb +- stprfs +- stptri +- stptrs +- stpttf +- stpttr +- strcon +- strevc +- strexc +- strrfs +- strsen +- strsna +- strsyl +- strti2 +- strtri +- strtrs +- strttf +- strttp +- stzrzf +- xerbla_array +- zbbcsd +- zbdsqr +- zcgesv +- zcposv +- zdrscl +- zgbbrd +- zgbcon +- zgbequ +- zgbequb +- zgbrfs +- zgbsv +- zgbsvx +- zgbtf2 +- zgbtrf +- zgbtrs +- zgebak +- zgebal +- zgebd2 +- zgebrd +- zgecon +- zgeequ +- zgeequb +- zgees +- zgeesx +- zgeev +- zgeevx +- zgehd2 +- zgehrd +- zgelq2 +- zgelqf +- zgels +- zgelsd +- zgelss +- zgelsy +- zgemqrt +- zgeql2 +- zgeqlf +- zgeqp3 +- zgeqr2 +- zgeqr2p +- zgeqrf +- zgeqrfp +- zgeqrt +- zgeqrt2 +- zgeqrt3 +- zgerfs +- zgerq2 +- zgerqf +- zgesc2 +- zgesdd +- zgesv +- zgesvd +- zgesvx +- zgetc2 +- zgetf2 +- zgetrf +- zgetri +- zgetrs +- zggbak +- zggbal +- zgges +- zggesx +- zggev +- zggevx +- zggglm +- zgghrd +- zgglse +- zggqrf +- zggrqf +- zgtcon +- zgtrfs +- zgtsv +- zgtsvx +- zgttrf +- zgttrs +- zgtts2 +- zhbev +- zhbevd +- zhbevx +- zhbgst +- zhbgv +- zhbgvd +- zhbgvx +- zhbtrd +- zhecon +- zheequb +- zheev +- zheevd +- zheevr +- zheevx +- zhegs2 +- zhegst +- zhegv +- zhegvd +- zhegvx +- zherfs +- zhesv +- zhesvx +- zheswapr +- zhetd2 +- zhetf2 +- zhetrd +- zhetrf +- zhetri +- zhetri2 +- zhetri2x +- zhetrs +- zhetrs2 +- zhfrk +- zhgeqz +- zhpcon +- zhpev +- zhpevd +- zhpevx +- zhpgst +- zhpgv +- zhpgvd +- zhpgvx +- zhprfs +- zhpsv +- zhpsvx +- zhptrd +- zhptrf +- zhptri +- zhptrs +- zhsein +- zhseqr +- zlabrd +- zlacgv +- zlacn2 +- zlacon +- zlacp2 +- zlacpy +- zlacrm +- zlacrt +- zladiv +- zlaed0 +- zlaed7 +- zlaed8 +- zlaein +- zlaesy +- zlaev2 +- zlag2c +- zlags2 +- zlagtm +- zlahef +- zlahqr +- zlahr2 +- zlaic1 +- zlals0 +- zlalsa +- zlalsd +- zlangb +- zlange +- zlangt +- zlanhb +- zlanhe +- zlanhf +- zlanhp +- zlanhs +- zlanht +- zlansb +- zlansp +- zlansy +- zlantb +- zlantp +- zlantr +- zlapll +- zlapmr +- zlapmt +- zlaqgb +- zlaqge +- zlaqhb +- zlaqhe +- zlaqhp +- zlaqp2 +- zlaqps +- zlaqr0 +- zlaqr1 +- zlaqr2 +- zlaqr3 +- zlaqr4 +- zlaqr5 +- zlaqsb +- zlaqsp +- zlaqsy +- zlar1v +- zlar2v +- zlarcm +- zlarf +- zlarfb +- zlarfg +- zlarfgp +- zlarft +- zlarfx +- zlargv +- zlarnv +- zlarrv +- zlartg +- zlartv +- zlarz +- zlarzb +- zlarzt +- zlascl +- zlaset +- zlasr +- zlassq +- zlaswp +- zlasyf +- zlat2c +- zlatbs +- zlatdf +- zlatps +- zlatrd +- zlatrs +- zlatrz +- zlauu2 +- zlauum +- zpbcon +- zpbequ +- zpbrfs +- zpbstf +- zpbsv +- zpbsvx +- zpbtf2 +- zpbtrf +- zpbtrs +- zpftrf +- zpftri +- zpftrs +- zpocon +- zpoequ +- zpoequb +- zporfs +- zposv +- zposvx +- zpotf2 +- zpotrf +- zpotri +- zpotrs +- zppcon +- zppequ +- zpprfs +- zppsv +- zppsvx +- zpptrf +- zpptri +- zpptrs +- zpstf2 +- zpstrf +- zptcon +- zpteqr +- zptrfs +- zptsv +- zptsvx +- zpttrf +- zpttrs +- zptts2 +- zrot +- zspcon +- zspmv +- zspr +- zsprfs +- zspsv +- zspsvx +- zsptrf +- zsptri +- zsptrs +- zstedc +- zstegr +- zstein +- zstemr +- zsteqr +- zsycon +- zsyconv +- zsyequb +- zsymv +- zsyr +- zsyrfs +- zsysv +- zsysvx +- zsyswapr +- zsytf2 +- zsytrf +- zsytri +- zsytri2 +- zsytri2x +- zsytrs +- zsytrs2 +- ztbcon +- ztbrfs +- ztbtrs +- ztfsm +- ztftri +- ztfttp +- ztfttr +- ztgevc +- ztgex2 +- ztgexc +- ztgsen +- ztgsja +- ztgsna +- ztgsy2 +- ztgsyl +- ztpcon +- ztpmqrt +- ztpqrt +- ztpqrt2 +- ztprfb +- ztprfs +- ztptri +- ztptrs +- ztpttf +- ztpttr +- ztrcon +- ztrevc +- ztrexc +- ztrrfs +- ztrsen +- ztrsna +- ztrsyl +- ztrti2 +- ztrtri +- ztrtrs +- ztrttf +- ztrttp +- ztzrzf +- zunbdb +- zuncsd +- zung2l +- zung2r +- zungbr +- zunghr +- zungl2 +- zunglq +- zungql +- zungqr +- zungr2 +- zungrq +- zungtr +- zunm2l +- zunm2r +- zunmbr +- zunmhr +- zunml2 +- zunmlq +- zunmql +- zunmqr +- zunmr2 +- zunmr3 +- zunmrq +- zunmrz +- zunmtr +- zupgtr +- zupmtr + + +""" + +# Within SciPy, these wrappers can be used via relative or absolute cimport. +# Examples: +# from ..linalg cimport cython_lapack +# from scipy.linalg cimport cython_lapack +# cimport scipy.linalg.cython_lapack as cython_lapack +# cimport ..linalg.cython_lapack as cython_lapack + +# Within SciPy, if LAPACK functions are needed in C/C++/Fortran, +# these wrappers should not be used. +# The original libraries should be linked directly. + +cdef extern from "fortran_defs.h": + pass + +from numpy cimport npy_complex64, npy_complex128 + +cdef extern from "_lapack_subroutines.h": + # Function pointer type declarations for + # gees and gges families of functions. + ctypedef bint _cselect1(npy_complex64*) + ctypedef bint _cselect2(npy_complex64*, npy_complex64*) + ctypedef bint _dselect2(d*, d*) + ctypedef bint _dselect3(d*, d*, d*) + ctypedef bint _sselect2(s*, s*) + ctypedef bint _sselect3(s*, s*, s*) + ctypedef bint _zselect1(npy_complex128*) + ctypedef bint _zselect2(npy_complex128*, npy_complex128*) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cbbcsd "BLAS_FUNC(cbbcsd)"(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, s *theta, s *phi, npy_complex64 *u1, int *ldu1, npy_complex64 *u2, int *ldu2, npy_complex64 *v1t, int *ldv1t, npy_complex64 *v2t, int *ldv2t, s *b11d, s *b11e, s *b12d, s *b12e, s *b21d, s *b21e, s *b22d, s *b22e, s *rwork, int *lrwork, int *info) nogil +cdef void cbbcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, s *theta, s *phi, c *u1, int *ldu1, c *u2, int *ldu2, c *v1t, int *ldv1t, c *v2t, int *ldv2t, s *b11d, s *b11e, s *b12d, s *b12e, s *b21d, s *b21e, s *b22d, s *b22e, s *rwork, int *lrwork, int *info) noexcept nogil: + + _fortran_cbbcsd(jobu1, jobu2, jobv1t, jobv2t, trans, m, p, q, theta, phi, u1, ldu1, u2, ldu2, v1t, ldv1t, v2t, ldv2t, b11d, b11e, b12d, b12e, b21d, b21e, b22d, b22e, rwork, lrwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cbdsqr "BLAS_FUNC(cbdsqr)"(char *uplo, int *n, int *ncvt, int *nru, int *ncc, s *d, s *e, npy_complex64 *vt, int *ldvt, npy_complex64 *u, int *ldu, npy_complex64 *c, int *ldc, s *rwork, int *info) nogil +cdef void cbdsqr(char *uplo, int *n, int *ncvt, int *nru, int *ncc, s *d, s *e, c *vt, int *ldvt, c *u, int *ldu, c *c, int *ldc, s *rwork, int *info) noexcept nogil: + + _fortran_cbdsqr(uplo, n, ncvt, nru, ncc, d, e, vt, ldvt, u, ldu, c, ldc, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgbbrd "BLAS_FUNC(cgbbrd)"(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, npy_complex64 *ab, int *ldab, s *d, s *e, npy_complex64 *q, int *ldq, npy_complex64 *pt, int *ldpt, npy_complex64 *c, int *ldc, npy_complex64 *work, s *rwork, int *info) nogil +cdef void cgbbrd(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, c *ab, int *ldab, s *d, s *e, c *q, int *ldq, c *pt, int *ldpt, c *c, int *ldc, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_cgbbrd(vect, m, n, ncc, kl, ku, ab, ldab, d, e, q, ldq, pt, ldpt, c, ldc, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgbcon "BLAS_FUNC(cgbcon)"(char *norm, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, int *ipiv, s *anorm, s *rcond, npy_complex64 *work, s *rwork, int *info) nogil +cdef void cgbcon(char *norm, int *n, int *kl, int *ku, c *ab, int *ldab, int *ipiv, s *anorm, s *rcond, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_cgbcon(norm, n, kl, ku, ab, ldab, ipiv, anorm, rcond, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgbequ "BLAS_FUNC(cgbequ)"(int *m, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) nogil +cdef void cgbequ(int *m, int *n, int *kl, int *ku, c *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil: + + _fortran_cgbequ(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgbequb "BLAS_FUNC(cgbequb)"(int *m, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) nogil +cdef void cgbequb(int *m, int *n, int *kl, int *ku, c *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil: + + _fortran_cgbequb(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgbrfs "BLAS_FUNC(cgbrfs)"(char *trans, int *n, int *kl, int *ku, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *afb, int *ldafb, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil +cdef void cgbrfs(char *trans, int *n, int *kl, int *ku, int *nrhs, c *ab, int *ldab, c *afb, int *ldafb, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_cgbrfs(trans, n, kl, ku, nrhs, ab, ldab, afb, ldafb, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgbsv "BLAS_FUNC(cgbsv)"(int *n, int *kl, int *ku, int *nrhs, npy_complex64 *ab, int *ldab, int *ipiv, npy_complex64 *b, int *ldb, int *info) nogil +cdef void cgbsv(int *n, int *kl, int *ku, int *nrhs, c *ab, int *ldab, int *ipiv, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_cgbsv(n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgbsvx "BLAS_FUNC(cgbsvx)"(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *afb, int *ldafb, int *ipiv, char *equed, s *r, s *c, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *rcond, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil +cdef void cgbsvx(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, c *ab, int *ldab, c *afb, int *ldafb, int *ipiv, char *equed, s *r, s *c, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_cgbsvx(fact, trans, n, kl, ku, nrhs, ab, ldab, afb, ldafb, ipiv, equed, r, c, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgbtf2 "BLAS_FUNC(cgbtf2)"(int *m, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, int *ipiv, int *info) nogil +cdef void cgbtf2(int *m, int *n, int *kl, int *ku, c *ab, int *ldab, int *ipiv, int *info) noexcept nogil: + + _fortran_cgbtf2(m, n, kl, ku, ab, ldab, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgbtrf "BLAS_FUNC(cgbtrf)"(int *m, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, int *ipiv, int *info) nogil +cdef void cgbtrf(int *m, int *n, int *kl, int *ku, c *ab, int *ldab, int *ipiv, int *info) noexcept nogil: + + _fortran_cgbtrf(m, n, kl, ku, ab, ldab, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgbtrs "BLAS_FUNC(cgbtrs)"(char *trans, int *n, int *kl, int *ku, int *nrhs, npy_complex64 *ab, int *ldab, int *ipiv, npy_complex64 *b, int *ldb, int *info) nogil +cdef void cgbtrs(char *trans, int *n, int *kl, int *ku, int *nrhs, c *ab, int *ldab, int *ipiv, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_cgbtrs(trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgebak "BLAS_FUNC(cgebak)"(char *job, char *side, int *n, int *ilo, int *ihi, s *scale, int *m, npy_complex64 *v, int *ldv, int *info) nogil +cdef void cgebak(char *job, char *side, int *n, int *ilo, int *ihi, s *scale, int *m, c *v, int *ldv, int *info) noexcept nogil: + + _fortran_cgebak(job, side, n, ilo, ihi, scale, m, v, ldv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgebal "BLAS_FUNC(cgebal)"(char *job, int *n, npy_complex64 *a, int *lda, int *ilo, int *ihi, s *scale, int *info) nogil +cdef void cgebal(char *job, int *n, c *a, int *lda, int *ilo, int *ihi, s *scale, int *info) noexcept nogil: + + _fortran_cgebal(job, n, a, lda, ilo, ihi, scale, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgebd2 "BLAS_FUNC(cgebd2)"(int *m, int *n, npy_complex64 *a, int *lda, s *d, s *e, npy_complex64 *tauq, npy_complex64 *taup, npy_complex64 *work, int *info) nogil +cdef void cgebd2(int *m, int *n, c *a, int *lda, s *d, s *e, c *tauq, c *taup, c *work, int *info) noexcept nogil: + + _fortran_cgebd2(m, n, a, lda, d, e, tauq, taup, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgebrd "BLAS_FUNC(cgebrd)"(int *m, int *n, npy_complex64 *a, int *lda, s *d, s *e, npy_complex64 *tauq, npy_complex64 *taup, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cgebrd(int *m, int *n, c *a, int *lda, s *d, s *e, c *tauq, c *taup, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cgebrd(m, n, a, lda, d, e, tauq, taup, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgecon "BLAS_FUNC(cgecon)"(char *norm, int *n, npy_complex64 *a, int *lda, s *anorm, s *rcond, npy_complex64 *work, s *rwork, int *info) nogil +cdef void cgecon(char *norm, int *n, c *a, int *lda, s *anorm, s *rcond, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_cgecon(norm, n, a, lda, anorm, rcond, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgeequ "BLAS_FUNC(cgeequ)"(int *m, int *n, npy_complex64 *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) nogil +cdef void cgeequ(int *m, int *n, c *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil: + + _fortran_cgeequ(m, n, a, lda, r, c, rowcnd, colcnd, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgeequb "BLAS_FUNC(cgeequb)"(int *m, int *n, npy_complex64 *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) nogil +cdef void cgeequb(int *m, int *n, c *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil: + + _fortran_cgeequb(m, n, a, lda, r, c, rowcnd, colcnd, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgees "BLAS_FUNC(cgees)"(char *jobvs, char *sort, _cselect1 *select, int *n, npy_complex64 *a, int *lda, int *sdim, npy_complex64 *w, npy_complex64 *vs, int *ldvs, npy_complex64 *work, int *lwork, s *rwork, bint *bwork, int *info) nogil +cdef void cgees(char *jobvs, char *sort, cselect1 *select, int *n, c *a, int *lda, int *sdim, c *w, c *vs, int *ldvs, c *work, int *lwork, s *rwork, bint *bwork, int *info) noexcept nogil: + + _fortran_cgees(jobvs, sort, <_cselect1*>select, n, a, lda, sdim, w, vs, ldvs, work, lwork, rwork, bwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgeesx "BLAS_FUNC(cgeesx)"(char *jobvs, char *sort, _cselect1 *select, char *sense, int *n, npy_complex64 *a, int *lda, int *sdim, npy_complex64 *w, npy_complex64 *vs, int *ldvs, s *rconde, s *rcondv, npy_complex64 *work, int *lwork, s *rwork, bint *bwork, int *info) nogil +cdef void cgeesx(char *jobvs, char *sort, cselect1 *select, char *sense, int *n, c *a, int *lda, int *sdim, c *w, c *vs, int *ldvs, s *rconde, s *rcondv, c *work, int *lwork, s *rwork, bint *bwork, int *info) noexcept nogil: + + _fortran_cgeesx(jobvs, sort, <_cselect1*>select, sense, n, a, lda, sdim, w, vs, ldvs, rconde, rcondv, work, lwork, rwork, bwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgeev "BLAS_FUNC(cgeev)"(char *jobvl, char *jobvr, int *n, npy_complex64 *a, int *lda, npy_complex64 *w, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, npy_complex64 *work, int *lwork, s *rwork, int *info) nogil +cdef void cgeev(char *jobvl, char *jobvr, int *n, c *a, int *lda, c *w, c *vl, int *ldvl, c *vr, int *ldvr, c *work, int *lwork, s *rwork, int *info) noexcept nogil: + + _fortran_cgeev(jobvl, jobvr, n, a, lda, w, vl, ldvl, vr, ldvr, work, lwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgeevx "BLAS_FUNC(cgeevx)"(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, npy_complex64 *a, int *lda, npy_complex64 *w, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, int *ilo, int *ihi, s *scale, s *abnrm, s *rconde, s *rcondv, npy_complex64 *work, int *lwork, s *rwork, int *info) nogil +cdef void cgeevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, c *a, int *lda, c *w, c *vl, int *ldvl, c *vr, int *ldvr, int *ilo, int *ihi, s *scale, s *abnrm, s *rconde, s *rcondv, c *work, int *lwork, s *rwork, int *info) noexcept nogil: + + _fortran_cgeevx(balanc, jobvl, jobvr, sense, n, a, lda, w, vl, ldvl, vr, ldvr, ilo, ihi, scale, abnrm, rconde, rcondv, work, lwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgehd2 "BLAS_FUNC(cgehd2)"(int *n, int *ilo, int *ihi, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info) nogil +cdef void cgehd2(int *n, int *ilo, int *ihi, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil: + + _fortran_cgehd2(n, ilo, ihi, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgehrd "BLAS_FUNC(cgehrd)"(int *n, int *ilo, int *ihi, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cgehrd(int *n, int *ilo, int *ihi, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cgehrd(n, ilo, ihi, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgelq2 "BLAS_FUNC(cgelq2)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info) nogil +cdef void cgelq2(int *m, int *n, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil: + + _fortran_cgelq2(m, n, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgelqf "BLAS_FUNC(cgelqf)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cgelqf(int *m, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cgelqf(m, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgels "BLAS_FUNC(cgels)"(char *trans, int *m, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cgels(char *trans, int *m, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cgels(trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgelsd "BLAS_FUNC(cgelsd)"(int *m, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, s *s, s *rcond, int *rank, npy_complex64 *work, int *lwork, s *rwork, int *iwork, int *info) nogil +cdef void cgelsd(int *m, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, s *s, s *rcond, int *rank, c *work, int *lwork, s *rwork, int *iwork, int *info) noexcept nogil: + + _fortran_cgelsd(m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, rwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgelss "BLAS_FUNC(cgelss)"(int *m, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, s *s, s *rcond, int *rank, npy_complex64 *work, int *lwork, s *rwork, int *info) nogil +cdef void cgelss(int *m, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, s *s, s *rcond, int *rank, c *work, int *lwork, s *rwork, int *info) noexcept nogil: + + _fortran_cgelss(m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgelsy "BLAS_FUNC(cgelsy)"(int *m, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *jpvt, s *rcond, int *rank, npy_complex64 *work, int *lwork, s *rwork, int *info) nogil +cdef void cgelsy(int *m, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, int *jpvt, s *rcond, int *rank, c *work, int *lwork, s *rwork, int *info) noexcept nogil: + + _fortran_cgelsy(m, n, nrhs, a, lda, b, ldb, jpvt, rcond, rank, work, lwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgemqrt "BLAS_FUNC(cgemqrt)"(char *side, char *trans, int *m, int *n, int *k, int *nb, npy_complex64 *v, int *ldv, npy_complex64 *t, int *ldt, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info) nogil +cdef void cgemqrt(char *side, char *trans, int *m, int *n, int *k, int *nb, c *v, int *ldv, c *t, int *ldt, c *c, int *ldc, c *work, int *info) noexcept nogil: + + _fortran_cgemqrt(side, trans, m, n, k, nb, v, ldv, t, ldt, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgeql2 "BLAS_FUNC(cgeql2)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info) nogil +cdef void cgeql2(int *m, int *n, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil: + + _fortran_cgeql2(m, n, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgeqlf "BLAS_FUNC(cgeqlf)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cgeqlf(int *m, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cgeqlf(m, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgeqp3 "BLAS_FUNC(cgeqp3)"(int *m, int *n, npy_complex64 *a, int *lda, int *jpvt, npy_complex64 *tau, npy_complex64 *work, int *lwork, s *rwork, int *info) nogil +cdef void cgeqp3(int *m, int *n, c *a, int *lda, int *jpvt, c *tau, c *work, int *lwork, s *rwork, int *info) noexcept nogil: + + _fortran_cgeqp3(m, n, a, lda, jpvt, tau, work, lwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgeqr2 "BLAS_FUNC(cgeqr2)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info) nogil +cdef void cgeqr2(int *m, int *n, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil: + + _fortran_cgeqr2(m, n, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgeqr2p "BLAS_FUNC(cgeqr2p)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info) nogil +cdef void cgeqr2p(int *m, int *n, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil: + + _fortran_cgeqr2p(m, n, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgeqrf "BLAS_FUNC(cgeqrf)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cgeqrf(int *m, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cgeqrf(m, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgeqrfp "BLAS_FUNC(cgeqrfp)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cgeqrfp(int *m, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cgeqrfp(m, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgeqrt "BLAS_FUNC(cgeqrt)"(int *m, int *n, int *nb, npy_complex64 *a, int *lda, npy_complex64 *t, int *ldt, npy_complex64 *work, int *info) nogil +cdef void cgeqrt(int *m, int *n, int *nb, c *a, int *lda, c *t, int *ldt, c *work, int *info) noexcept nogil: + + _fortran_cgeqrt(m, n, nb, a, lda, t, ldt, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgeqrt2 "BLAS_FUNC(cgeqrt2)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *t, int *ldt, int *info) nogil +cdef void cgeqrt2(int *m, int *n, c *a, int *lda, c *t, int *ldt, int *info) noexcept nogil: + + _fortran_cgeqrt2(m, n, a, lda, t, ldt, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgeqrt3 "BLAS_FUNC(cgeqrt3)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *t, int *ldt, int *info) nogil +cdef void cgeqrt3(int *m, int *n, c *a, int *lda, c *t, int *ldt, int *info) noexcept nogil: + + _fortran_cgeqrt3(m, n, a, lda, t, ldt, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgerfs "BLAS_FUNC(cgerfs)"(char *trans, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil +cdef void cgerfs(char *trans, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_cgerfs(trans, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgerq2 "BLAS_FUNC(cgerq2)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info) nogil +cdef void cgerq2(int *m, int *n, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil: + + _fortran_cgerq2(m, n, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgerqf "BLAS_FUNC(cgerqf)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cgerqf(int *m, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cgerqf(m, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgesc2 "BLAS_FUNC(cgesc2)"(int *n, npy_complex64 *a, int *lda, npy_complex64 *rhs, int *ipiv, int *jpiv, s *scale) nogil +cdef void cgesc2(int *n, c *a, int *lda, c *rhs, int *ipiv, int *jpiv, s *scale) noexcept nogil: + + _fortran_cgesc2(n, a, lda, rhs, ipiv, jpiv, scale) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgesdd "BLAS_FUNC(cgesdd)"(char *jobz, int *m, int *n, npy_complex64 *a, int *lda, s *s, npy_complex64 *u, int *ldu, npy_complex64 *vt, int *ldvt, npy_complex64 *work, int *lwork, s *rwork, int *iwork, int *info) nogil +cdef void cgesdd(char *jobz, int *m, int *n, c *a, int *lda, s *s, c *u, int *ldu, c *vt, int *ldvt, c *work, int *lwork, s *rwork, int *iwork, int *info) noexcept nogil: + + _fortran_cgesdd(jobz, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, rwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgesv "BLAS_FUNC(cgesv)"(int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, int *info) nogil +cdef void cgesv(int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_cgesv(n, nrhs, a, lda, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgesvd "BLAS_FUNC(cgesvd)"(char *jobu, char *jobvt, int *m, int *n, npy_complex64 *a, int *lda, s *s, npy_complex64 *u, int *ldu, npy_complex64 *vt, int *ldvt, npy_complex64 *work, int *lwork, s *rwork, int *info) nogil +cdef void cgesvd(char *jobu, char *jobvt, int *m, int *n, c *a, int *lda, s *s, c *u, int *ldu, c *vt, int *ldvt, c *work, int *lwork, s *rwork, int *info) noexcept nogil: + + _fortran_cgesvd(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgesvx "BLAS_FUNC(cgesvx)"(char *fact, char *trans, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, int *ipiv, char *equed, s *r, s *c, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *rcond, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil +cdef void cgesvx(char *fact, char *trans, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, int *ipiv, char *equed, s *r, s *c, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_cgesvx(fact, trans, n, nrhs, a, lda, af, ldaf, ipiv, equed, r, c, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgetc2 "BLAS_FUNC(cgetc2)"(int *n, npy_complex64 *a, int *lda, int *ipiv, int *jpiv, int *info) nogil +cdef void cgetc2(int *n, c *a, int *lda, int *ipiv, int *jpiv, int *info) noexcept nogil: + + _fortran_cgetc2(n, a, lda, ipiv, jpiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgetf2 "BLAS_FUNC(cgetf2)"(int *m, int *n, npy_complex64 *a, int *lda, int *ipiv, int *info) nogil +cdef void cgetf2(int *m, int *n, c *a, int *lda, int *ipiv, int *info) noexcept nogil: + + _fortran_cgetf2(m, n, a, lda, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgetrf "BLAS_FUNC(cgetrf)"(int *m, int *n, npy_complex64 *a, int *lda, int *ipiv, int *info) nogil +cdef void cgetrf(int *m, int *n, c *a, int *lda, int *ipiv, int *info) noexcept nogil: + + _fortran_cgetrf(m, n, a, lda, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgetri "BLAS_FUNC(cgetri)"(int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cgetri(int *n, c *a, int *lda, int *ipiv, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cgetri(n, a, lda, ipiv, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgetrs "BLAS_FUNC(cgetrs)"(char *trans, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, int *info) nogil +cdef void cgetrs(char *trans, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_cgetrs(trans, n, nrhs, a, lda, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cggbak "BLAS_FUNC(cggbak)"(char *job, char *side, int *n, int *ilo, int *ihi, s *lscale, s *rscale, int *m, npy_complex64 *v, int *ldv, int *info) nogil +cdef void cggbak(char *job, char *side, int *n, int *ilo, int *ihi, s *lscale, s *rscale, int *m, c *v, int *ldv, int *info) noexcept nogil: + + _fortran_cggbak(job, side, n, ilo, ihi, lscale, rscale, m, v, ldv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cggbal "BLAS_FUNC(cggbal)"(char *job, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *ilo, int *ihi, s *lscale, s *rscale, s *work, int *info) nogil +cdef void cggbal(char *job, int *n, c *a, int *lda, c *b, int *ldb, int *ilo, int *ihi, s *lscale, s *rscale, s *work, int *info) noexcept nogil: + + _fortran_cggbal(job, n, a, lda, b, ldb, ilo, ihi, lscale, rscale, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgges "BLAS_FUNC(cgges)"(char *jobvsl, char *jobvsr, char *sort, _cselect2 *selctg, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *sdim, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *vsl, int *ldvsl, npy_complex64 *vsr, int *ldvsr, npy_complex64 *work, int *lwork, s *rwork, bint *bwork, int *info) nogil +cdef void cgges(char *jobvsl, char *jobvsr, char *sort, cselect2 *selctg, int *n, c *a, int *lda, c *b, int *ldb, int *sdim, c *alpha, c *beta, c *vsl, int *ldvsl, c *vsr, int *ldvsr, c *work, int *lwork, s *rwork, bint *bwork, int *info) noexcept nogil: + + _fortran_cgges(jobvsl, jobvsr, sort, <_cselect2*>selctg, n, a, lda, b, ldb, sdim, alpha, beta, vsl, ldvsl, vsr, ldvsr, work, lwork, rwork, bwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cggesx "BLAS_FUNC(cggesx)"(char *jobvsl, char *jobvsr, char *sort, _cselect2 *selctg, char *sense, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *sdim, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *vsl, int *ldvsl, npy_complex64 *vsr, int *ldvsr, s *rconde, s *rcondv, npy_complex64 *work, int *lwork, s *rwork, int *iwork, int *liwork, bint *bwork, int *info) nogil +cdef void cggesx(char *jobvsl, char *jobvsr, char *sort, cselect2 *selctg, char *sense, int *n, c *a, int *lda, c *b, int *ldb, int *sdim, c *alpha, c *beta, c *vsl, int *ldvsl, c *vsr, int *ldvsr, s *rconde, s *rcondv, c *work, int *lwork, s *rwork, int *iwork, int *liwork, bint *bwork, int *info) noexcept nogil: + + _fortran_cggesx(jobvsl, jobvsr, sort, <_cselect2*>selctg, sense, n, a, lda, b, ldb, sdim, alpha, beta, vsl, ldvsl, vsr, ldvsr, rconde, rcondv, work, lwork, rwork, iwork, liwork, bwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cggev "BLAS_FUNC(cggev)"(char *jobvl, char *jobvr, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, npy_complex64 *work, int *lwork, s *rwork, int *info) nogil +cdef void cggev(char *jobvl, char *jobvr, int *n, c *a, int *lda, c *b, int *ldb, c *alpha, c *beta, c *vl, int *ldvl, c *vr, int *ldvr, c *work, int *lwork, s *rwork, int *info) noexcept nogil: + + _fortran_cggev(jobvl, jobvr, n, a, lda, b, ldb, alpha, beta, vl, ldvl, vr, ldvr, work, lwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cggevx "BLAS_FUNC(cggevx)"(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, int *ilo, int *ihi, s *lscale, s *rscale, s *abnrm, s *bbnrm, s *rconde, s *rcondv, npy_complex64 *work, int *lwork, s *rwork, int *iwork, bint *bwork, int *info) nogil +cdef void cggevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, c *a, int *lda, c *b, int *ldb, c *alpha, c *beta, c *vl, int *ldvl, c *vr, int *ldvr, int *ilo, int *ihi, s *lscale, s *rscale, s *abnrm, s *bbnrm, s *rconde, s *rcondv, c *work, int *lwork, s *rwork, int *iwork, bint *bwork, int *info) noexcept nogil: + + _fortran_cggevx(balanc, jobvl, jobvr, sense, n, a, lda, b, ldb, alpha, beta, vl, ldvl, vr, ldvr, ilo, ihi, lscale, rscale, abnrm, bbnrm, rconde, rcondv, work, lwork, rwork, iwork, bwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cggglm "BLAS_FUNC(cggglm)"(int *n, int *m, int *p, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *d, npy_complex64 *x, npy_complex64 *y, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cggglm(int *n, int *m, int *p, c *a, int *lda, c *b, int *ldb, c *d, c *x, c *y, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cggglm(n, m, p, a, lda, b, ldb, d, x, y, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgghrd "BLAS_FUNC(cgghrd)"(char *compq, char *compz, int *n, int *ilo, int *ihi, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *q, int *ldq, npy_complex64 *z, int *ldz, int *info) nogil +cdef void cgghrd(char *compq, char *compz, int *n, int *ilo, int *ihi, c *a, int *lda, c *b, int *ldb, c *q, int *ldq, c *z, int *ldz, int *info) noexcept nogil: + + _fortran_cgghrd(compq, compz, n, ilo, ihi, a, lda, b, ldb, q, ldq, z, ldz, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgglse "BLAS_FUNC(cgglse)"(int *m, int *n, int *p, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *c, npy_complex64 *d, npy_complex64 *x, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cgglse(int *m, int *n, int *p, c *a, int *lda, c *b, int *ldb, c *c, c *d, c *x, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cgglse(m, n, p, a, lda, b, ldb, c, d, x, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cggqrf "BLAS_FUNC(cggqrf)"(int *n, int *m, int *p, npy_complex64 *a, int *lda, npy_complex64 *taua, npy_complex64 *b, int *ldb, npy_complex64 *taub, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cggqrf(int *n, int *m, int *p, c *a, int *lda, c *taua, c *b, int *ldb, c *taub, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cggqrf(n, m, p, a, lda, taua, b, ldb, taub, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cggrqf "BLAS_FUNC(cggrqf)"(int *m, int *p, int *n, npy_complex64 *a, int *lda, npy_complex64 *taua, npy_complex64 *b, int *ldb, npy_complex64 *taub, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cggrqf(int *m, int *p, int *n, c *a, int *lda, c *taua, c *b, int *ldb, c *taub, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cggrqf(m, p, n, a, lda, taua, b, ldb, taub, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgtcon "BLAS_FUNC(cgtcon)"(char *norm, int *n, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *du2, int *ipiv, s *anorm, s *rcond, npy_complex64 *work, int *info) nogil +cdef void cgtcon(char *norm, int *n, c *dl, c *d, c *du, c *du2, int *ipiv, s *anorm, s *rcond, c *work, int *info) noexcept nogil: + + _fortran_cgtcon(norm, n, dl, d, du, du2, ipiv, anorm, rcond, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgtrfs "BLAS_FUNC(cgtrfs)"(char *trans, int *n, int *nrhs, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *dlf, npy_complex64 *df, npy_complex64 *duf, npy_complex64 *du2, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil +cdef void cgtrfs(char *trans, int *n, int *nrhs, c *dl, c *d, c *du, c *dlf, c *df, c *duf, c *du2, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_cgtrfs(trans, n, nrhs, dl, d, du, dlf, df, duf, du2, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgtsv "BLAS_FUNC(cgtsv)"(int *n, int *nrhs, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *b, int *ldb, int *info) nogil +cdef void cgtsv(int *n, int *nrhs, c *dl, c *d, c *du, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_cgtsv(n, nrhs, dl, d, du, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgtsvx "BLAS_FUNC(cgtsvx)"(char *fact, char *trans, int *n, int *nrhs, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *dlf, npy_complex64 *df, npy_complex64 *duf, npy_complex64 *du2, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *rcond, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil +cdef void cgtsvx(char *fact, char *trans, int *n, int *nrhs, c *dl, c *d, c *du, c *dlf, c *df, c *duf, c *du2, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_cgtsvx(fact, trans, n, nrhs, dl, d, du, dlf, df, duf, du2, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgttrf "BLAS_FUNC(cgttrf)"(int *n, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *du2, int *ipiv, int *info) nogil +cdef void cgttrf(int *n, c *dl, c *d, c *du, c *du2, int *ipiv, int *info) noexcept nogil: + + _fortran_cgttrf(n, dl, d, du, du2, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgttrs "BLAS_FUNC(cgttrs)"(char *trans, int *n, int *nrhs, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *du2, int *ipiv, npy_complex64 *b, int *ldb, int *info) nogil +cdef void cgttrs(char *trans, int *n, int *nrhs, c *dl, c *d, c *du, c *du2, int *ipiv, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_cgttrs(trans, n, nrhs, dl, d, du, du2, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cgtts2 "BLAS_FUNC(cgtts2)"(int *itrans, int *n, int *nrhs, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *du2, int *ipiv, npy_complex64 *b, int *ldb) nogil +cdef void cgtts2(int *itrans, int *n, int *nrhs, c *dl, c *d, c *du, c *du2, int *ipiv, c *b, int *ldb) noexcept nogil: + + _fortran_cgtts2(itrans, n, nrhs, dl, d, du, du2, ipiv, b, ldb) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chbev "BLAS_FUNC(chbev)"(char *jobz, char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, s *rwork, int *info) nogil +cdef void chbev(char *jobz, char *uplo, int *n, int *kd, c *ab, int *ldab, s *w, c *z, int *ldz, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_chbev(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chbevd "BLAS_FUNC(chbevd)"(char *jobz, char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil +cdef void chbevd(char *jobz, char *uplo, int *n, int *kd, c *ab, int *ldab, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_chbevd(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chbevx "BLAS_FUNC(chbevx)"(char *jobz, char *range, char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, npy_complex64 *q, int *ldq, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, s *rwork, int *iwork, int *ifail, int *info) nogil +cdef void chbevx(char *jobz, char *range, char *uplo, int *n, int *kd, c *ab, int *ldab, c *q, int *ldq, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, c *work, s *rwork, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_chbevx(jobz, range, uplo, n, kd, ab, ldab, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chbgst "BLAS_FUNC(chbgst)"(char *vect, char *uplo, int *n, int *ka, int *kb, npy_complex64 *ab, int *ldab, npy_complex64 *bb, int *ldbb, npy_complex64 *x, int *ldx, npy_complex64 *work, s *rwork, int *info) nogil +cdef void chbgst(char *vect, char *uplo, int *n, int *ka, int *kb, c *ab, int *ldab, c *bb, int *ldbb, c *x, int *ldx, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_chbgst(vect, uplo, n, ka, kb, ab, ldab, bb, ldbb, x, ldx, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chbgv "BLAS_FUNC(chbgv)"(char *jobz, char *uplo, int *n, int *ka, int *kb, npy_complex64 *ab, int *ldab, npy_complex64 *bb, int *ldbb, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, s *rwork, int *info) nogil +cdef void chbgv(char *jobz, char *uplo, int *n, int *ka, int *kb, c *ab, int *ldab, c *bb, int *ldbb, s *w, c *z, int *ldz, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_chbgv(jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, w, z, ldz, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chbgvd "BLAS_FUNC(chbgvd)"(char *jobz, char *uplo, int *n, int *ka, int *kb, npy_complex64 *ab, int *ldab, npy_complex64 *bb, int *ldbb, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil +cdef void chbgvd(char *jobz, char *uplo, int *n, int *ka, int *kb, c *ab, int *ldab, c *bb, int *ldbb, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_chbgvd(jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, w, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chbgvx "BLAS_FUNC(chbgvx)"(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, npy_complex64 *ab, int *ldab, npy_complex64 *bb, int *ldbb, npy_complex64 *q, int *ldq, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, s *rwork, int *iwork, int *ifail, int *info) nogil +cdef void chbgvx(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, c *ab, int *ldab, c *bb, int *ldbb, c *q, int *ldq, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, c *work, s *rwork, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_chbgvx(jobz, range, uplo, n, ka, kb, ab, ldab, bb, ldbb, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chbtrd "BLAS_FUNC(chbtrd)"(char *vect, char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, s *d, s *e, npy_complex64 *q, int *ldq, npy_complex64 *work, int *info) nogil +cdef void chbtrd(char *vect, char *uplo, int *n, int *kd, c *ab, int *ldab, s *d, s *e, c *q, int *ldq, c *work, int *info) noexcept nogil: + + _fortran_chbtrd(vect, uplo, n, kd, ab, ldab, d, e, q, ldq, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_checon "BLAS_FUNC(checon)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, s *anorm, s *rcond, npy_complex64 *work, int *info) nogil +cdef void checon(char *uplo, int *n, c *a, int *lda, int *ipiv, s *anorm, s *rcond, c *work, int *info) noexcept nogil: + + _fortran_checon(uplo, n, a, lda, ipiv, anorm, rcond, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cheequb "BLAS_FUNC(cheequb)"(char *uplo, int *n, npy_complex64 *a, int *lda, s *s, s *scond, s *amax, npy_complex64 *work, int *info) nogil +cdef void cheequb(char *uplo, int *n, c *a, int *lda, s *s, s *scond, s *amax, c *work, int *info) noexcept nogil: + + _fortran_cheequb(uplo, n, a, lda, s, scond, amax, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cheev "BLAS_FUNC(cheev)"(char *jobz, char *uplo, int *n, npy_complex64 *a, int *lda, s *w, npy_complex64 *work, int *lwork, s *rwork, int *info) nogil +cdef void cheev(char *jobz, char *uplo, int *n, c *a, int *lda, s *w, c *work, int *lwork, s *rwork, int *info) noexcept nogil: + + _fortran_cheev(jobz, uplo, n, a, lda, w, work, lwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cheevd "BLAS_FUNC(cheevd)"(char *jobz, char *uplo, int *n, npy_complex64 *a, int *lda, s *w, npy_complex64 *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil +cdef void cheevd(char *jobz, char *uplo, int *n, c *a, int *lda, s *w, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_cheevd(jobz, uplo, n, a, lda, w, work, lwork, rwork, lrwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cheevr "BLAS_FUNC(cheevr)"(char *jobz, char *range, char *uplo, int *n, npy_complex64 *a, int *lda, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, npy_complex64 *z, int *ldz, int *isuppz, npy_complex64 *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil +cdef void cheevr(char *jobz, char *range, char *uplo, int *n, c *a, int *lda, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, int *isuppz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_cheevr(jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, rwork, lrwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cheevx "BLAS_FUNC(cheevx)"(char *jobz, char *range, char *uplo, int *n, npy_complex64 *a, int *lda, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, s *rwork, int *iwork, int *ifail, int *info) nogil +cdef void cheevx(char *jobz, char *range, char *uplo, int *n, c *a, int *lda, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_cheevx(jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol, m, w, z, ldz, work, lwork, rwork, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chegs2 "BLAS_FUNC(chegs2)"(int *itype, char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *info) nogil +cdef void chegs2(int *itype, char *uplo, int *n, c *a, int *lda, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_chegs2(itype, uplo, n, a, lda, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chegst "BLAS_FUNC(chegst)"(int *itype, char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *info) nogil +cdef void chegst(int *itype, char *uplo, int *n, c *a, int *lda, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_chegst(itype, uplo, n, a, lda, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chegv "BLAS_FUNC(chegv)"(int *itype, char *jobz, char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, s *w, npy_complex64 *work, int *lwork, s *rwork, int *info) nogil +cdef void chegv(int *itype, char *jobz, char *uplo, int *n, c *a, int *lda, c *b, int *ldb, s *w, c *work, int *lwork, s *rwork, int *info) noexcept nogil: + + _fortran_chegv(itype, jobz, uplo, n, a, lda, b, ldb, w, work, lwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chegvd "BLAS_FUNC(chegvd)"(int *itype, char *jobz, char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, s *w, npy_complex64 *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil +cdef void chegvd(int *itype, char *jobz, char *uplo, int *n, c *a, int *lda, c *b, int *ldb, s *w, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_chegvd(itype, jobz, uplo, n, a, lda, b, ldb, w, work, lwork, rwork, lrwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chegvx "BLAS_FUNC(chegvx)"(int *itype, char *jobz, char *range, char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, s *rwork, int *iwork, int *ifail, int *info) nogil +cdef void chegvx(int *itype, char *jobz, char *range, char *uplo, int *n, c *a, int *lda, c *b, int *ldb, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_chegvx(itype, jobz, range, uplo, n, a, lda, b, ldb, vl, vu, il, iu, abstol, m, w, z, ldz, work, lwork, rwork, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cherfs "BLAS_FUNC(cherfs)"(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil +cdef void cherfs(char *uplo, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_cherfs(uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chesv "BLAS_FUNC(chesv)"(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *work, int *lwork, int *info) nogil +cdef void chesv(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_chesv(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chesvx "BLAS_FUNC(chesvx)"(char *fact, char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *rcond, s *ferr, s *berr, npy_complex64 *work, int *lwork, s *rwork, int *info) nogil +cdef void chesvx(char *fact, char *uplo, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, int *lwork, s *rwork, int *info) noexcept nogil: + + _fortran_chesvx(fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, lwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cheswapr "BLAS_FUNC(cheswapr)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *i1, int *i2) nogil +cdef void cheswapr(char *uplo, int *n, c *a, int *lda, int *i1, int *i2) noexcept nogil: + + _fortran_cheswapr(uplo, n, a, lda, i1, i2) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chetd2 "BLAS_FUNC(chetd2)"(char *uplo, int *n, npy_complex64 *a, int *lda, s *d, s *e, npy_complex64 *tau, int *info) nogil +cdef void chetd2(char *uplo, int *n, c *a, int *lda, s *d, s *e, c *tau, int *info) noexcept nogil: + + _fortran_chetd2(uplo, n, a, lda, d, e, tau, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chetf2 "BLAS_FUNC(chetf2)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, int *info) nogil +cdef void chetf2(char *uplo, int *n, c *a, int *lda, int *ipiv, int *info) noexcept nogil: + + _fortran_chetf2(uplo, n, a, lda, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chetrd "BLAS_FUNC(chetrd)"(char *uplo, int *n, npy_complex64 *a, int *lda, s *d, s *e, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil +cdef void chetrd(char *uplo, int *n, c *a, int *lda, s *d, s *e, c *tau, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_chetrd(uplo, n, a, lda, d, e, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chetrf "BLAS_FUNC(chetrf)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *lwork, int *info) nogil +cdef void chetrf(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_chetrf(uplo, n, a, lda, ipiv, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chetri "BLAS_FUNC(chetri)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *info) nogil +cdef void chetri(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *info) noexcept nogil: + + _fortran_chetri(uplo, n, a, lda, ipiv, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chetri2 "BLAS_FUNC(chetri2)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *lwork, int *info) nogil +cdef void chetri2(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_chetri2(uplo, n, a, lda, ipiv, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chetri2x "BLAS_FUNC(chetri2x)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *nb, int *info) nogil +cdef void chetri2x(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *nb, int *info) noexcept nogil: + + _fortran_chetri2x(uplo, n, a, lda, ipiv, work, nb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chetrs "BLAS_FUNC(chetrs)"(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, int *info) nogil +cdef void chetrs(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_chetrs(uplo, n, nrhs, a, lda, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chetrs2 "BLAS_FUNC(chetrs2)"(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *work, int *info) nogil +cdef void chetrs2(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, c *work, int *info) noexcept nogil: + + _fortran_chetrs2(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chfrk "BLAS_FUNC(chfrk)"(char *transr, char *uplo, char *trans, int *n, int *k, s *alpha, npy_complex64 *a, int *lda, s *beta, npy_complex64 *c) nogil +cdef void chfrk(char *transr, char *uplo, char *trans, int *n, int *k, s *alpha, c *a, int *lda, s *beta, c *c) noexcept nogil: + + _fortran_chfrk(transr, uplo, trans, n, k, alpha, a, lda, beta, c) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chgeqz "BLAS_FUNC(chgeqz)"(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, npy_complex64 *h, int *ldh, npy_complex64 *t, int *ldt, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *q, int *ldq, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, s *rwork, int *info) nogil +cdef void chgeqz(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, c *h, int *ldh, c *t, int *ldt, c *alpha, c *beta, c *q, int *ldq, c *z, int *ldz, c *work, int *lwork, s *rwork, int *info) noexcept nogil: + + _fortran_chgeqz(job, compq, compz, n, ilo, ihi, h, ldh, t, ldt, alpha, beta, q, ldq, z, ldz, work, lwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + char _fortran_chla_transtype "BLAS_FUNC(chla_transtype)"(int *trans) nogil +cdef char chla_transtype(int *trans) noexcept nogil: + + return _fortran_chla_transtype(trans) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chpcon "BLAS_FUNC(chpcon)"(char *uplo, int *n, npy_complex64 *ap, int *ipiv, s *anorm, s *rcond, npy_complex64 *work, int *info) nogil +cdef void chpcon(char *uplo, int *n, c *ap, int *ipiv, s *anorm, s *rcond, c *work, int *info) noexcept nogil: + + _fortran_chpcon(uplo, n, ap, ipiv, anorm, rcond, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chpev "BLAS_FUNC(chpev)"(char *jobz, char *uplo, int *n, npy_complex64 *ap, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, s *rwork, int *info) nogil +cdef void chpev(char *jobz, char *uplo, int *n, c *ap, s *w, c *z, int *ldz, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_chpev(jobz, uplo, n, ap, w, z, ldz, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chpevd "BLAS_FUNC(chpevd)"(char *jobz, char *uplo, int *n, npy_complex64 *ap, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil +cdef void chpevd(char *jobz, char *uplo, int *n, c *ap, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_chpevd(jobz, uplo, n, ap, w, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chpevx "BLAS_FUNC(chpevx)"(char *jobz, char *range, char *uplo, int *n, npy_complex64 *ap, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, s *rwork, int *iwork, int *ifail, int *info) nogil +cdef void chpevx(char *jobz, char *range, char *uplo, int *n, c *ap, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, c *work, s *rwork, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_chpevx(jobz, range, uplo, n, ap, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chpgst "BLAS_FUNC(chpgst)"(int *itype, char *uplo, int *n, npy_complex64 *ap, npy_complex64 *bp, int *info) nogil +cdef void chpgst(int *itype, char *uplo, int *n, c *ap, c *bp, int *info) noexcept nogil: + + _fortran_chpgst(itype, uplo, n, ap, bp, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chpgv "BLAS_FUNC(chpgv)"(int *itype, char *jobz, char *uplo, int *n, npy_complex64 *ap, npy_complex64 *bp, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, s *rwork, int *info) nogil +cdef void chpgv(int *itype, char *jobz, char *uplo, int *n, c *ap, c *bp, s *w, c *z, int *ldz, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_chpgv(itype, jobz, uplo, n, ap, bp, w, z, ldz, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chpgvd "BLAS_FUNC(chpgvd)"(int *itype, char *jobz, char *uplo, int *n, npy_complex64 *ap, npy_complex64 *bp, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil +cdef void chpgvd(int *itype, char *jobz, char *uplo, int *n, c *ap, c *bp, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_chpgvd(itype, jobz, uplo, n, ap, bp, w, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chpgvx "BLAS_FUNC(chpgvx)"(int *itype, char *jobz, char *range, char *uplo, int *n, npy_complex64 *ap, npy_complex64 *bp, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, s *rwork, int *iwork, int *ifail, int *info) nogil +cdef void chpgvx(int *itype, char *jobz, char *range, char *uplo, int *n, c *ap, c *bp, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, c *work, s *rwork, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_chpgvx(itype, jobz, range, uplo, n, ap, bp, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chprfs "BLAS_FUNC(chprfs)"(char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *afp, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil +cdef void chprfs(char *uplo, int *n, int *nrhs, c *ap, c *afp, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_chprfs(uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chpsv "BLAS_FUNC(chpsv)"(char *uplo, int *n, int *nrhs, npy_complex64 *ap, int *ipiv, npy_complex64 *b, int *ldb, int *info) nogil +cdef void chpsv(char *uplo, int *n, int *nrhs, c *ap, int *ipiv, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_chpsv(uplo, n, nrhs, ap, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chpsvx "BLAS_FUNC(chpsvx)"(char *fact, char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *afp, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *rcond, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil +cdef void chpsvx(char *fact, char *uplo, int *n, int *nrhs, c *ap, c *afp, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_chpsvx(fact, uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chptrd "BLAS_FUNC(chptrd)"(char *uplo, int *n, npy_complex64 *ap, s *d, s *e, npy_complex64 *tau, int *info) nogil +cdef void chptrd(char *uplo, int *n, c *ap, s *d, s *e, c *tau, int *info) noexcept nogil: + + _fortran_chptrd(uplo, n, ap, d, e, tau, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chptrf "BLAS_FUNC(chptrf)"(char *uplo, int *n, npy_complex64 *ap, int *ipiv, int *info) nogil +cdef void chptrf(char *uplo, int *n, c *ap, int *ipiv, int *info) noexcept nogil: + + _fortran_chptrf(uplo, n, ap, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chptri "BLAS_FUNC(chptri)"(char *uplo, int *n, npy_complex64 *ap, int *ipiv, npy_complex64 *work, int *info) nogil +cdef void chptri(char *uplo, int *n, c *ap, int *ipiv, c *work, int *info) noexcept nogil: + + _fortran_chptri(uplo, n, ap, ipiv, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chptrs "BLAS_FUNC(chptrs)"(char *uplo, int *n, int *nrhs, npy_complex64 *ap, int *ipiv, npy_complex64 *b, int *ldb, int *info) nogil +cdef void chptrs(char *uplo, int *n, int *nrhs, c *ap, int *ipiv, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_chptrs(uplo, n, nrhs, ap, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chsein "BLAS_FUNC(chsein)"(char *side, char *eigsrc, char *initv, bint *select, int *n, npy_complex64 *h, int *ldh, npy_complex64 *w, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, int *mm, int *m, npy_complex64 *work, s *rwork, int *ifaill, int *ifailr, int *info) nogil +cdef void chsein(char *side, char *eigsrc, char *initv, bint *select, int *n, c *h, int *ldh, c *w, c *vl, int *ldvl, c *vr, int *ldvr, int *mm, int *m, c *work, s *rwork, int *ifaill, int *ifailr, int *info) noexcept nogil: + + _fortran_chsein(side, eigsrc, initv, select, n, h, ldh, w, vl, ldvl, vr, ldvr, mm, m, work, rwork, ifaill, ifailr, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_chseqr "BLAS_FUNC(chseqr)"(char *job, char *compz, int *n, int *ilo, int *ihi, npy_complex64 *h, int *ldh, npy_complex64 *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, int *info) nogil +cdef void chseqr(char *job, char *compz, int *n, int *ilo, int *ihi, c *h, int *ldh, c *w, c *z, int *ldz, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_chseqr(job, compz, n, ilo, ihi, h, ldh, w, z, ldz, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clabrd "BLAS_FUNC(clabrd)"(int *m, int *n, int *nb, npy_complex64 *a, int *lda, s *d, s *e, npy_complex64 *tauq, npy_complex64 *taup, npy_complex64 *x, int *ldx, npy_complex64 *y, int *ldy) nogil +cdef void clabrd(int *m, int *n, int *nb, c *a, int *lda, s *d, s *e, c *tauq, c *taup, c *x, int *ldx, c *y, int *ldy) noexcept nogil: + + _fortran_clabrd(m, n, nb, a, lda, d, e, tauq, taup, x, ldx, y, ldy) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clacgv "BLAS_FUNC(clacgv)"(int *n, npy_complex64 *x, int *incx) nogil +cdef void clacgv(int *n, c *x, int *incx) noexcept nogil: + + _fortran_clacgv(n, x, incx) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clacn2 "BLAS_FUNC(clacn2)"(int *n, npy_complex64 *v, npy_complex64 *x, s *est, int *kase, int *isave) nogil +cdef void clacn2(int *n, c *v, c *x, s *est, int *kase, int *isave) noexcept nogil: + + _fortran_clacn2(n, v, x, est, kase, isave) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clacon "BLAS_FUNC(clacon)"(int *n, npy_complex64 *v, npy_complex64 *x, s *est, int *kase) nogil +cdef void clacon(int *n, c *v, c *x, s *est, int *kase) noexcept nogil: + + _fortran_clacon(n, v, x, est, kase) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clacp2 "BLAS_FUNC(clacp2)"(char *uplo, int *m, int *n, s *a, int *lda, npy_complex64 *b, int *ldb) nogil +cdef void clacp2(char *uplo, int *m, int *n, s *a, int *lda, c *b, int *ldb) noexcept nogil: + + _fortran_clacp2(uplo, m, n, a, lda, b, ldb) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clacpy "BLAS_FUNC(clacpy)"(char *uplo, int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb) nogil +cdef void clacpy(char *uplo, int *m, int *n, c *a, int *lda, c *b, int *ldb) noexcept nogil: + + _fortran_clacpy(uplo, m, n, a, lda, b, ldb) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clacrm "BLAS_FUNC(clacrm)"(int *m, int *n, npy_complex64 *a, int *lda, s *b, int *ldb, npy_complex64 *c, int *ldc, s *rwork) nogil +cdef void clacrm(int *m, int *n, c *a, int *lda, s *b, int *ldb, c *c, int *ldc, s *rwork) noexcept nogil: + + _fortran_clacrm(m, n, a, lda, b, ldb, c, ldc, rwork) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clacrt "BLAS_FUNC(clacrt)"(int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy, npy_complex64 *c, npy_complex64 *s) nogil +cdef void clacrt(int *n, c *cx, int *incx, c *cy, int *incy, c *c, c *s) noexcept nogil: + + _fortran_clacrt(n, cx, incx, cy, incy, c, s) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cladiv "(cladivwrp_)"(npy_complex64 *out, npy_complex64 *x, npy_complex64 *y) nogil +cdef c cladiv(c *x, c *y) noexcept nogil: + cdef c out + _fortran_cladiv(&out, x, y) + return out + +cdef extern from "_lapack_subroutines.h": + void _fortran_claed0 "BLAS_FUNC(claed0)"(int *qsiz, int *n, s *d, s *e, npy_complex64 *q, int *ldq, npy_complex64 *qstore, int *ldqs, s *rwork, int *iwork, int *info) nogil +cdef void claed0(int *qsiz, int *n, s *d, s *e, c *q, int *ldq, c *qstore, int *ldqs, s *rwork, int *iwork, int *info) noexcept nogil: + + _fortran_claed0(qsiz, n, d, e, q, ldq, qstore, ldqs, rwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_claed7 "BLAS_FUNC(claed7)"(int *n, int *cutpnt, int *qsiz, int *tlvls, int *curlvl, int *curpbm, s *d, npy_complex64 *q, int *ldq, s *rho, int *indxq, s *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, s *givnum, npy_complex64 *work, s *rwork, int *iwork, int *info) nogil +cdef void claed7(int *n, int *cutpnt, int *qsiz, int *tlvls, int *curlvl, int *curpbm, s *d, c *q, int *ldq, s *rho, int *indxq, s *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, s *givnum, c *work, s *rwork, int *iwork, int *info) noexcept nogil: + + _fortran_claed7(n, cutpnt, qsiz, tlvls, curlvl, curpbm, d, q, ldq, rho, indxq, qstore, qptr, prmptr, perm, givptr, givcol, givnum, work, rwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_claed8 "BLAS_FUNC(claed8)"(int *k, int *n, int *qsiz, npy_complex64 *q, int *ldq, s *d, s *rho, int *cutpnt, s *z, s *dlamda, npy_complex64 *q2, int *ldq2, s *w, int *indxp, int *indx, int *indxq, int *perm, int *givptr, int *givcol, s *givnum, int *info) nogil +cdef void claed8(int *k, int *n, int *qsiz, c *q, int *ldq, s *d, s *rho, int *cutpnt, s *z, s *dlamda, c *q2, int *ldq2, s *w, int *indxp, int *indx, int *indxq, int *perm, int *givptr, int *givcol, s *givnum, int *info) noexcept nogil: + + _fortran_claed8(k, n, qsiz, q, ldq, d, rho, cutpnt, z, dlamda, q2, ldq2, w, indxp, indx, indxq, perm, givptr, givcol, givnum, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_claein "BLAS_FUNC(claein)"(bint *rightv, bint *noinit, int *n, npy_complex64 *h, int *ldh, npy_complex64 *w, npy_complex64 *v, npy_complex64 *b, int *ldb, s *rwork, s *eps3, s *smlnum, int *info) nogil +cdef void claein(bint *rightv, bint *noinit, int *n, c *h, int *ldh, c *w, c *v, c *b, int *ldb, s *rwork, s *eps3, s *smlnum, int *info) noexcept nogil: + + _fortran_claein(rightv, noinit, n, h, ldh, w, v, b, ldb, rwork, eps3, smlnum, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_claesy "BLAS_FUNC(claesy)"(npy_complex64 *a, npy_complex64 *b, npy_complex64 *c, npy_complex64 *rt1, npy_complex64 *rt2, npy_complex64 *evscal, npy_complex64 *cs1, npy_complex64 *sn1) nogil +cdef void claesy(c *a, c *b, c *c, c *rt1, c *rt2, c *evscal, c *cs1, c *sn1) noexcept nogil: + + _fortran_claesy(a, b, c, rt1, rt2, evscal, cs1, sn1) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_claev2 "BLAS_FUNC(claev2)"(npy_complex64 *a, npy_complex64 *b, npy_complex64 *c, s *rt1, s *rt2, s *cs1, npy_complex64 *sn1) nogil +cdef void claev2(c *a, c *b, c *c, s *rt1, s *rt2, s *cs1, c *sn1) noexcept nogil: + + _fortran_claev2(a, b, c, rt1, rt2, cs1, sn1) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clag2z "BLAS_FUNC(clag2z)"(int *m, int *n, npy_complex64 *sa, int *ldsa, npy_complex128 *a, int *lda, int *info) nogil +cdef void clag2z(int *m, int *n, c *sa, int *ldsa, z *a, int *lda, int *info) noexcept nogil: + + _fortran_clag2z(m, n, sa, ldsa, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clags2 "BLAS_FUNC(clags2)"(bint *upper, s *a1, npy_complex64 *a2, s *a3, s *b1, npy_complex64 *b2, s *b3, s *csu, npy_complex64 *snu, s *csv, npy_complex64 *snv, s *csq, npy_complex64 *snq) nogil +cdef void clags2(bint *upper, s *a1, c *a2, s *a3, s *b1, c *b2, s *b3, s *csu, c *snu, s *csv, c *snv, s *csq, c *snq) noexcept nogil: + + _fortran_clags2(upper, a1, a2, a3, b1, b2, b3, csu, snu, csv, snv, csq, snq) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clagtm "BLAS_FUNC(clagtm)"(char *trans, int *n, int *nrhs, s *alpha, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *x, int *ldx, s *beta, npy_complex64 *b, int *ldb) nogil +cdef void clagtm(char *trans, int *n, int *nrhs, s *alpha, c *dl, c *d, c *du, c *x, int *ldx, s *beta, c *b, int *ldb) noexcept nogil: + + _fortran_clagtm(trans, n, nrhs, alpha, dl, d, du, x, ldx, beta, b, ldb) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clahef "BLAS_FUNC(clahef)"(char *uplo, int *n, int *nb, int *kb, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *w, int *ldw, int *info) nogil +cdef void clahef(char *uplo, int *n, int *nb, int *kb, c *a, int *lda, int *ipiv, c *w, int *ldw, int *info) noexcept nogil: + + _fortran_clahef(uplo, n, nb, kb, a, lda, ipiv, w, ldw, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clahqr "BLAS_FUNC(clahqr)"(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, npy_complex64 *h, int *ldh, npy_complex64 *w, int *iloz, int *ihiz, npy_complex64 *z, int *ldz, int *info) nogil +cdef void clahqr(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, c *h, int *ldh, c *w, int *iloz, int *ihiz, c *z, int *ldz, int *info) noexcept nogil: + + _fortran_clahqr(wantt, wantz, n, ilo, ihi, h, ldh, w, iloz, ihiz, z, ldz, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clahr2 "BLAS_FUNC(clahr2)"(int *n, int *k, int *nb, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *t, int *ldt, npy_complex64 *y, int *ldy) nogil +cdef void clahr2(int *n, int *k, int *nb, c *a, int *lda, c *tau, c *t, int *ldt, c *y, int *ldy) noexcept nogil: + + _fortran_clahr2(n, k, nb, a, lda, tau, t, ldt, y, ldy) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_claic1 "BLAS_FUNC(claic1)"(int *job, int *j, npy_complex64 *x, s *sest, npy_complex64 *w, npy_complex64 *gamma, s *sestpr, npy_complex64 *s, npy_complex64 *c) nogil +cdef void claic1(int *job, int *j, c *x, s *sest, c *w, c *gamma, s *sestpr, c *s, c *c) noexcept nogil: + + _fortran_claic1(job, j, x, sest, w, gamma, sestpr, s, c) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clals0 "BLAS_FUNC(clals0)"(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, npy_complex64 *b, int *ldb, npy_complex64 *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, s *givnum, int *ldgnum, s *poles, s *difl, s *difr, s *z, int *k, s *c, s *s, s *rwork, int *info) nogil +cdef void clals0(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, c *b, int *ldb, c *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, s *givnum, int *ldgnum, s *poles, s *difl, s *difr, s *z, int *k, s *c, s *s, s *rwork, int *info) noexcept nogil: + + _fortran_clals0(icompq, nl, nr, sqre, nrhs, b, ldb, bx, ldbx, perm, givptr, givcol, ldgcol, givnum, ldgnum, poles, difl, difr, z, k, c, s, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clalsa "BLAS_FUNC(clalsa)"(int *icompq, int *smlsiz, int *n, int *nrhs, npy_complex64 *b, int *ldb, npy_complex64 *bx, int *ldbx, s *u, int *ldu, s *vt, int *k, s *difl, s *difr, s *z, s *poles, int *givptr, int *givcol, int *ldgcol, int *perm, s *givnum, s *c, s *s, s *rwork, int *iwork, int *info) nogil +cdef void clalsa(int *icompq, int *smlsiz, int *n, int *nrhs, c *b, int *ldb, c *bx, int *ldbx, s *u, int *ldu, s *vt, int *k, s *difl, s *difr, s *z, s *poles, int *givptr, int *givcol, int *ldgcol, int *perm, s *givnum, s *c, s *s, s *rwork, int *iwork, int *info) noexcept nogil: + + _fortran_clalsa(icompq, smlsiz, n, nrhs, b, ldb, bx, ldbx, u, ldu, vt, k, difl, difr, z, poles, givptr, givcol, ldgcol, perm, givnum, c, s, rwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clalsd "BLAS_FUNC(clalsd)"(char *uplo, int *smlsiz, int *n, int *nrhs, s *d, s *e, npy_complex64 *b, int *ldb, s *rcond, int *rank, npy_complex64 *work, s *rwork, int *iwork, int *info) nogil +cdef void clalsd(char *uplo, int *smlsiz, int *n, int *nrhs, s *d, s *e, c *b, int *ldb, s *rcond, int *rank, c *work, s *rwork, int *iwork, int *info) noexcept nogil: + + _fortran_clalsd(uplo, smlsiz, n, nrhs, d, e, b, ldb, rcond, rank, work, rwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_clangb "BLAS_FUNC(clangb)"(char *norm, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, s *work) nogil +cdef s clangb(char *norm, int *n, int *kl, int *ku, c *ab, int *ldab, s *work) noexcept nogil: + + return _fortran_clangb(norm, n, kl, ku, ab, ldab, work) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_clange "BLAS_FUNC(clange)"(char *norm, int *m, int *n, npy_complex64 *a, int *lda, s *work) nogil +cdef s clange(char *norm, int *m, int *n, c *a, int *lda, s *work) noexcept nogil: + + return _fortran_clange(norm, m, n, a, lda, work) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_clangt "BLAS_FUNC(clangt)"(char *norm, int *n, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du) nogil +cdef s clangt(char *norm, int *n, c *dl, c *d, c *du) noexcept nogil: + + return _fortran_clangt(norm, n, dl, d, du) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_clanhb "BLAS_FUNC(clanhb)"(char *norm, char *uplo, int *n, int *k, npy_complex64 *ab, int *ldab, s *work) nogil +cdef s clanhb(char *norm, char *uplo, int *n, int *k, c *ab, int *ldab, s *work) noexcept nogil: + + return _fortran_clanhb(norm, uplo, n, k, ab, ldab, work) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_clanhe "BLAS_FUNC(clanhe)"(char *norm, char *uplo, int *n, npy_complex64 *a, int *lda, s *work) nogil +cdef s clanhe(char *norm, char *uplo, int *n, c *a, int *lda, s *work) noexcept nogil: + + return _fortran_clanhe(norm, uplo, n, a, lda, work) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_clanhf "BLAS_FUNC(clanhf)"(char *norm, char *transr, char *uplo, int *n, npy_complex64 *a, s *work) nogil +cdef s clanhf(char *norm, char *transr, char *uplo, int *n, c *a, s *work) noexcept nogil: + + return _fortran_clanhf(norm, transr, uplo, n, a, work) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_clanhp "BLAS_FUNC(clanhp)"(char *norm, char *uplo, int *n, npy_complex64 *ap, s *work) nogil +cdef s clanhp(char *norm, char *uplo, int *n, c *ap, s *work) noexcept nogil: + + return _fortran_clanhp(norm, uplo, n, ap, work) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_clanhs "BLAS_FUNC(clanhs)"(char *norm, int *n, npy_complex64 *a, int *lda, s *work) nogil +cdef s clanhs(char *norm, int *n, c *a, int *lda, s *work) noexcept nogil: + + return _fortran_clanhs(norm, n, a, lda, work) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_clanht "BLAS_FUNC(clanht)"(char *norm, int *n, s *d, npy_complex64 *e) nogil +cdef s clanht(char *norm, int *n, s *d, c *e) noexcept nogil: + + return _fortran_clanht(norm, n, d, e) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_clansb "BLAS_FUNC(clansb)"(char *norm, char *uplo, int *n, int *k, npy_complex64 *ab, int *ldab, s *work) nogil +cdef s clansb(char *norm, char *uplo, int *n, int *k, c *ab, int *ldab, s *work) noexcept nogil: + + return _fortran_clansb(norm, uplo, n, k, ab, ldab, work) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_clansp "BLAS_FUNC(clansp)"(char *norm, char *uplo, int *n, npy_complex64 *ap, s *work) nogil +cdef s clansp(char *norm, char *uplo, int *n, c *ap, s *work) noexcept nogil: + + return _fortran_clansp(norm, uplo, n, ap, work) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_clansy "BLAS_FUNC(clansy)"(char *norm, char *uplo, int *n, npy_complex64 *a, int *lda, s *work) nogil +cdef s clansy(char *norm, char *uplo, int *n, c *a, int *lda, s *work) noexcept nogil: + + return _fortran_clansy(norm, uplo, n, a, lda, work) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_clantb "BLAS_FUNC(clantb)"(char *norm, char *uplo, char *diag, int *n, int *k, npy_complex64 *ab, int *ldab, s *work) nogil +cdef s clantb(char *norm, char *uplo, char *diag, int *n, int *k, c *ab, int *ldab, s *work) noexcept nogil: + + return _fortran_clantb(norm, uplo, diag, n, k, ab, ldab, work) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_clantp "BLAS_FUNC(clantp)"(char *norm, char *uplo, char *diag, int *n, npy_complex64 *ap, s *work) nogil +cdef s clantp(char *norm, char *uplo, char *diag, int *n, c *ap, s *work) noexcept nogil: + + return _fortran_clantp(norm, uplo, diag, n, ap, work) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_clantr "BLAS_FUNC(clantr)"(char *norm, char *uplo, char *diag, int *m, int *n, npy_complex64 *a, int *lda, s *work) nogil +cdef s clantr(char *norm, char *uplo, char *diag, int *m, int *n, c *a, int *lda, s *work) noexcept nogil: + + return _fortran_clantr(norm, uplo, diag, m, n, a, lda, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clapll "BLAS_FUNC(clapll)"(int *n, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, s *ssmin) nogil +cdef void clapll(int *n, c *x, int *incx, c *y, int *incy, s *ssmin) noexcept nogil: + + _fortran_clapll(n, x, incx, y, incy, ssmin) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clapmr "BLAS_FUNC(clapmr)"(bint *forwrd, int *m, int *n, npy_complex64 *x, int *ldx, int *k) nogil +cdef void clapmr(bint *forwrd, int *m, int *n, c *x, int *ldx, int *k) noexcept nogil: + + _fortran_clapmr(forwrd, m, n, x, ldx, k) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clapmt "BLAS_FUNC(clapmt)"(bint *forwrd, int *m, int *n, npy_complex64 *x, int *ldx, int *k) nogil +cdef void clapmt(bint *forwrd, int *m, int *n, c *x, int *ldx, int *k) noexcept nogil: + + _fortran_clapmt(forwrd, m, n, x, ldx, k) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_claqgb "BLAS_FUNC(claqgb)"(int *m, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, char *equed) nogil +cdef void claqgb(int *m, int *n, int *kl, int *ku, c *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, char *equed) noexcept nogil: + + _fortran_claqgb(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_claqge "BLAS_FUNC(claqge)"(int *m, int *n, npy_complex64 *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, char *equed) nogil +cdef void claqge(int *m, int *n, c *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, char *equed) noexcept nogil: + + _fortran_claqge(m, n, a, lda, r, c, rowcnd, colcnd, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_claqhb "BLAS_FUNC(claqhb)"(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, s *s, s *scond, s *amax, char *equed) nogil +cdef void claqhb(char *uplo, int *n, int *kd, c *ab, int *ldab, s *s, s *scond, s *amax, char *equed) noexcept nogil: + + _fortran_claqhb(uplo, n, kd, ab, ldab, s, scond, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_claqhe "BLAS_FUNC(claqhe)"(char *uplo, int *n, npy_complex64 *a, int *lda, s *s, s *scond, s *amax, char *equed) nogil +cdef void claqhe(char *uplo, int *n, c *a, int *lda, s *s, s *scond, s *amax, char *equed) noexcept nogil: + + _fortran_claqhe(uplo, n, a, lda, s, scond, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_claqhp "BLAS_FUNC(claqhp)"(char *uplo, int *n, npy_complex64 *ap, s *s, s *scond, s *amax, char *equed) nogil +cdef void claqhp(char *uplo, int *n, c *ap, s *s, s *scond, s *amax, char *equed) noexcept nogil: + + _fortran_claqhp(uplo, n, ap, s, scond, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_claqp2 "BLAS_FUNC(claqp2)"(int *m, int *n, int *offset, npy_complex64 *a, int *lda, int *jpvt, npy_complex64 *tau, s *vn1, s *vn2, npy_complex64 *work) nogil +cdef void claqp2(int *m, int *n, int *offset, c *a, int *lda, int *jpvt, c *tau, s *vn1, s *vn2, c *work) noexcept nogil: + + _fortran_claqp2(m, n, offset, a, lda, jpvt, tau, vn1, vn2, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_claqps "BLAS_FUNC(claqps)"(int *m, int *n, int *offset, int *nb, int *kb, npy_complex64 *a, int *lda, int *jpvt, npy_complex64 *tau, s *vn1, s *vn2, npy_complex64 *auxv, npy_complex64 *f, int *ldf) nogil +cdef void claqps(int *m, int *n, int *offset, int *nb, int *kb, c *a, int *lda, int *jpvt, c *tau, s *vn1, s *vn2, c *auxv, c *f, int *ldf) noexcept nogil: + + _fortran_claqps(m, n, offset, nb, kb, a, lda, jpvt, tau, vn1, vn2, auxv, f, ldf) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_claqr0 "BLAS_FUNC(claqr0)"(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, npy_complex64 *h, int *ldh, npy_complex64 *w, int *iloz, int *ihiz, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, int *info) nogil +cdef void claqr0(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, c *h, int *ldh, c *w, int *iloz, int *ihiz, c *z, int *ldz, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_claqr0(wantt, wantz, n, ilo, ihi, h, ldh, w, iloz, ihiz, z, ldz, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_claqr1 "BLAS_FUNC(claqr1)"(int *n, npy_complex64 *h, int *ldh, npy_complex64 *s1, npy_complex64 *s2, npy_complex64 *v) nogil +cdef void claqr1(int *n, c *h, int *ldh, c *s1, c *s2, c *v) noexcept nogil: + + _fortran_claqr1(n, h, ldh, s1, s2, v) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_claqr2 "BLAS_FUNC(claqr2)"(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, npy_complex64 *h, int *ldh, int *iloz, int *ihiz, npy_complex64 *z, int *ldz, int *ns, int *nd, npy_complex64 *sh, npy_complex64 *v, int *ldv, int *nh, npy_complex64 *t, int *ldt, int *nv, npy_complex64 *wv, int *ldwv, npy_complex64 *work, int *lwork) nogil +cdef void claqr2(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, c *h, int *ldh, int *iloz, int *ihiz, c *z, int *ldz, int *ns, int *nd, c *sh, c *v, int *ldv, int *nh, c *t, int *ldt, int *nv, c *wv, int *ldwv, c *work, int *lwork) noexcept nogil: + + _fortran_claqr2(wantt, wantz, n, ktop, kbot, nw, h, ldh, iloz, ihiz, z, ldz, ns, nd, sh, v, ldv, nh, t, ldt, nv, wv, ldwv, work, lwork) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_claqr3 "BLAS_FUNC(claqr3)"(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, npy_complex64 *h, int *ldh, int *iloz, int *ihiz, npy_complex64 *z, int *ldz, int *ns, int *nd, npy_complex64 *sh, npy_complex64 *v, int *ldv, int *nh, npy_complex64 *t, int *ldt, int *nv, npy_complex64 *wv, int *ldwv, npy_complex64 *work, int *lwork) nogil +cdef void claqr3(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, c *h, int *ldh, int *iloz, int *ihiz, c *z, int *ldz, int *ns, int *nd, c *sh, c *v, int *ldv, int *nh, c *t, int *ldt, int *nv, c *wv, int *ldwv, c *work, int *lwork) noexcept nogil: + + _fortran_claqr3(wantt, wantz, n, ktop, kbot, nw, h, ldh, iloz, ihiz, z, ldz, ns, nd, sh, v, ldv, nh, t, ldt, nv, wv, ldwv, work, lwork) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_claqr4 "BLAS_FUNC(claqr4)"(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, npy_complex64 *h, int *ldh, npy_complex64 *w, int *iloz, int *ihiz, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, int *info) nogil +cdef void claqr4(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, c *h, int *ldh, c *w, int *iloz, int *ihiz, c *z, int *ldz, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_claqr4(wantt, wantz, n, ilo, ihi, h, ldh, w, iloz, ihiz, z, ldz, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_claqr5 "BLAS_FUNC(claqr5)"(bint *wantt, bint *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, npy_complex64 *s, npy_complex64 *h, int *ldh, int *iloz, int *ihiz, npy_complex64 *z, int *ldz, npy_complex64 *v, int *ldv, npy_complex64 *u, int *ldu, int *nv, npy_complex64 *wv, int *ldwv, int *nh, npy_complex64 *wh, int *ldwh) nogil +cdef void claqr5(bint *wantt, bint *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, c *s, c *h, int *ldh, int *iloz, int *ihiz, c *z, int *ldz, c *v, int *ldv, c *u, int *ldu, int *nv, c *wv, int *ldwv, int *nh, c *wh, int *ldwh) noexcept nogil: + + _fortran_claqr5(wantt, wantz, kacc22, n, ktop, kbot, nshfts, s, h, ldh, iloz, ihiz, z, ldz, v, ldv, u, ldu, nv, wv, ldwv, nh, wh, ldwh) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_claqsb "BLAS_FUNC(claqsb)"(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, s *s, s *scond, s *amax, char *equed) nogil +cdef void claqsb(char *uplo, int *n, int *kd, c *ab, int *ldab, s *s, s *scond, s *amax, char *equed) noexcept nogil: + + _fortran_claqsb(uplo, n, kd, ab, ldab, s, scond, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_claqsp "BLAS_FUNC(claqsp)"(char *uplo, int *n, npy_complex64 *ap, s *s, s *scond, s *amax, char *equed) nogil +cdef void claqsp(char *uplo, int *n, c *ap, s *s, s *scond, s *amax, char *equed) noexcept nogil: + + _fortran_claqsp(uplo, n, ap, s, scond, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_claqsy "BLAS_FUNC(claqsy)"(char *uplo, int *n, npy_complex64 *a, int *lda, s *s, s *scond, s *amax, char *equed) nogil +cdef void claqsy(char *uplo, int *n, c *a, int *lda, s *s, s *scond, s *amax, char *equed) noexcept nogil: + + _fortran_claqsy(uplo, n, a, lda, s, scond, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clar1v "BLAS_FUNC(clar1v)"(int *n, int *b1, int *bn, s *lambda_, s *d, s *l, s *ld, s *lld, s *pivmin, s *gaptol, npy_complex64 *z, bint *wantnc, int *negcnt, s *ztz, s *mingma, int *r, int *isuppz, s *nrminv, s *resid, s *rqcorr, s *work) nogil +cdef void clar1v(int *n, int *b1, int *bn, s *lambda_, s *d, s *l, s *ld, s *lld, s *pivmin, s *gaptol, c *z, bint *wantnc, int *negcnt, s *ztz, s *mingma, int *r, int *isuppz, s *nrminv, s *resid, s *rqcorr, s *work) noexcept nogil: + + _fortran_clar1v(n, b1, bn, lambda_, d, l, ld, lld, pivmin, gaptol, z, wantnc, negcnt, ztz, mingma, r, isuppz, nrminv, resid, rqcorr, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clar2v "BLAS_FUNC(clar2v)"(int *n, npy_complex64 *x, npy_complex64 *y, npy_complex64 *z, int *incx, s *c, npy_complex64 *s, int *incc) nogil +cdef void clar2v(int *n, c *x, c *y, c *z, int *incx, s *c, c *s, int *incc) noexcept nogil: + + _fortran_clar2v(n, x, y, z, incx, c, s, incc) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clarcm "BLAS_FUNC(clarcm)"(int *m, int *n, s *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *c, int *ldc, s *rwork) nogil +cdef void clarcm(int *m, int *n, s *a, int *lda, c *b, int *ldb, c *c, int *ldc, s *rwork) noexcept nogil: + + _fortran_clarcm(m, n, a, lda, b, ldb, c, ldc, rwork) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clarf "BLAS_FUNC(clarf)"(char *side, int *m, int *n, npy_complex64 *v, int *incv, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work) nogil +cdef void clarf(char *side, int *m, int *n, c *v, int *incv, c *tau, c *c, int *ldc, c *work) noexcept nogil: + + _fortran_clarf(side, m, n, v, incv, tau, c, ldc, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clarfb "BLAS_FUNC(clarfb)"(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, npy_complex64 *v, int *ldv, npy_complex64 *t, int *ldt, npy_complex64 *c, int *ldc, npy_complex64 *work, int *ldwork) nogil +cdef void clarfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, c *v, int *ldv, c *t, int *ldt, c *c, int *ldc, c *work, int *ldwork) noexcept nogil: + + _fortran_clarfb(side, trans, direct, storev, m, n, k, v, ldv, t, ldt, c, ldc, work, ldwork) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clarfg "BLAS_FUNC(clarfg)"(int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *tau) nogil +cdef void clarfg(int *n, c *alpha, c *x, int *incx, c *tau) noexcept nogil: + + _fortran_clarfg(n, alpha, x, incx, tau) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clarfgp "BLAS_FUNC(clarfgp)"(int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *tau) nogil +cdef void clarfgp(int *n, c *alpha, c *x, int *incx, c *tau) noexcept nogil: + + _fortran_clarfgp(n, alpha, x, incx, tau) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clarft "BLAS_FUNC(clarft)"(char *direct, char *storev, int *n, int *k, npy_complex64 *v, int *ldv, npy_complex64 *tau, npy_complex64 *t, int *ldt) nogil +cdef void clarft(char *direct, char *storev, int *n, int *k, c *v, int *ldv, c *tau, c *t, int *ldt) noexcept nogil: + + _fortran_clarft(direct, storev, n, k, v, ldv, tau, t, ldt) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clarfx "BLAS_FUNC(clarfx)"(char *side, int *m, int *n, npy_complex64 *v, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work) nogil +cdef void clarfx(char *side, int *m, int *n, c *v, c *tau, c *c, int *ldc, c *work) noexcept nogil: + + _fortran_clarfx(side, m, n, v, tau, c, ldc, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clargv "BLAS_FUNC(clargv)"(int *n, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, s *c, int *incc) nogil +cdef void clargv(int *n, c *x, int *incx, c *y, int *incy, s *c, int *incc) noexcept nogil: + + _fortran_clargv(n, x, incx, y, incy, c, incc) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clarnv "BLAS_FUNC(clarnv)"(int *idist, int *iseed, int *n, npy_complex64 *x) nogil +cdef void clarnv(int *idist, int *iseed, int *n, c *x) noexcept nogil: + + _fortran_clarnv(idist, iseed, n, x) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clarrv "BLAS_FUNC(clarrv)"(int *n, s *vl, s *vu, s *d, s *l, s *pivmin, int *isplit, int *m, int *dol, int *dou, s *minrgp, s *rtol1, s *rtol2, s *w, s *werr, s *wgap, int *iblock, int *indexw, s *gers, npy_complex64 *z, int *ldz, int *isuppz, s *work, int *iwork, int *info) nogil +cdef void clarrv(int *n, s *vl, s *vu, s *d, s *l, s *pivmin, int *isplit, int *m, int *dol, int *dou, s *minrgp, s *rtol1, s *rtol2, s *w, s *werr, s *wgap, int *iblock, int *indexw, s *gers, c *z, int *ldz, int *isuppz, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_clarrv(n, vl, vu, d, l, pivmin, isplit, m, dol, dou, minrgp, rtol1, rtol2, w, werr, wgap, iblock, indexw, gers, z, ldz, isuppz, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clartg "BLAS_FUNC(clartg)"(npy_complex64 *f, npy_complex64 *g, s *cs, npy_complex64 *sn, npy_complex64 *r) nogil +cdef void clartg(c *f, c *g, s *cs, c *sn, c *r) noexcept nogil: + + _fortran_clartg(f, g, cs, sn, r) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clartv "BLAS_FUNC(clartv)"(int *n, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, s *c, npy_complex64 *s, int *incc) nogil +cdef void clartv(int *n, c *x, int *incx, c *y, int *incy, s *c, c *s, int *incc) noexcept nogil: + + _fortran_clartv(n, x, incx, y, incy, c, s, incc) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clarz "BLAS_FUNC(clarz)"(char *side, int *m, int *n, int *l, npy_complex64 *v, int *incv, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work) nogil +cdef void clarz(char *side, int *m, int *n, int *l, c *v, int *incv, c *tau, c *c, int *ldc, c *work) noexcept nogil: + + _fortran_clarz(side, m, n, l, v, incv, tau, c, ldc, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clarzb "BLAS_FUNC(clarzb)"(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, npy_complex64 *v, int *ldv, npy_complex64 *t, int *ldt, npy_complex64 *c, int *ldc, npy_complex64 *work, int *ldwork) nogil +cdef void clarzb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, c *v, int *ldv, c *t, int *ldt, c *c, int *ldc, c *work, int *ldwork) noexcept nogil: + + _fortran_clarzb(side, trans, direct, storev, m, n, k, l, v, ldv, t, ldt, c, ldc, work, ldwork) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clarzt "BLAS_FUNC(clarzt)"(char *direct, char *storev, int *n, int *k, npy_complex64 *v, int *ldv, npy_complex64 *tau, npy_complex64 *t, int *ldt) nogil +cdef void clarzt(char *direct, char *storev, int *n, int *k, c *v, int *ldv, c *tau, c *t, int *ldt) noexcept nogil: + + _fortran_clarzt(direct, storev, n, k, v, ldv, tau, t, ldt) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clascl "BLAS_FUNC(clascl)"(char *type_bn, int *kl, int *ku, s *cfrom, s *cto, int *m, int *n, npy_complex64 *a, int *lda, int *info) nogil +cdef void clascl(char *type_bn, int *kl, int *ku, s *cfrom, s *cto, int *m, int *n, c *a, int *lda, int *info) noexcept nogil: + + _fortran_clascl(type_bn, kl, ku, cfrom, cto, m, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_claset "BLAS_FUNC(claset)"(char *uplo, int *m, int *n, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *a, int *lda) nogil +cdef void claset(char *uplo, int *m, int *n, c *alpha, c *beta, c *a, int *lda) noexcept nogil: + + _fortran_claset(uplo, m, n, alpha, beta, a, lda) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clasr "BLAS_FUNC(clasr)"(char *side, char *pivot, char *direct, int *m, int *n, s *c, s *s, npy_complex64 *a, int *lda) nogil +cdef void clasr(char *side, char *pivot, char *direct, int *m, int *n, s *c, s *s, c *a, int *lda) noexcept nogil: + + _fortran_clasr(side, pivot, direct, m, n, c, s, a, lda) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_classq "BLAS_FUNC(classq)"(int *n, npy_complex64 *x, int *incx, s *scale, s *sumsq) nogil +cdef void classq(int *n, c *x, int *incx, s *scale, s *sumsq) noexcept nogil: + + _fortran_classq(n, x, incx, scale, sumsq) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_claswp "BLAS_FUNC(claswp)"(int *n, npy_complex64 *a, int *lda, int *k1, int *k2, int *ipiv, int *incx) nogil +cdef void claswp(int *n, c *a, int *lda, int *k1, int *k2, int *ipiv, int *incx) noexcept nogil: + + _fortran_claswp(n, a, lda, k1, k2, ipiv, incx) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clasyf "BLAS_FUNC(clasyf)"(char *uplo, int *n, int *nb, int *kb, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *w, int *ldw, int *info) nogil +cdef void clasyf(char *uplo, int *n, int *nb, int *kb, c *a, int *lda, int *ipiv, c *w, int *ldw, int *info) noexcept nogil: + + _fortran_clasyf(uplo, n, nb, kb, a, lda, ipiv, w, ldw, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clatbs "BLAS_FUNC(clatbs)"(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, npy_complex64 *ab, int *ldab, npy_complex64 *x, s *scale, s *cnorm, int *info) nogil +cdef void clatbs(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, c *ab, int *ldab, c *x, s *scale, s *cnorm, int *info) noexcept nogil: + + _fortran_clatbs(uplo, trans, diag, normin, n, kd, ab, ldab, x, scale, cnorm, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clatdf "BLAS_FUNC(clatdf)"(int *ijob, int *n, npy_complex64 *z, int *ldz, npy_complex64 *rhs, s *rdsum, s *rdscal, int *ipiv, int *jpiv) nogil +cdef void clatdf(int *ijob, int *n, c *z, int *ldz, c *rhs, s *rdsum, s *rdscal, int *ipiv, int *jpiv) noexcept nogil: + + _fortran_clatdf(ijob, n, z, ldz, rhs, rdsum, rdscal, ipiv, jpiv) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clatps "BLAS_FUNC(clatps)"(char *uplo, char *trans, char *diag, char *normin, int *n, npy_complex64 *ap, npy_complex64 *x, s *scale, s *cnorm, int *info) nogil +cdef void clatps(char *uplo, char *trans, char *diag, char *normin, int *n, c *ap, c *x, s *scale, s *cnorm, int *info) noexcept nogil: + + _fortran_clatps(uplo, trans, diag, normin, n, ap, x, scale, cnorm, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clatrd "BLAS_FUNC(clatrd)"(char *uplo, int *n, int *nb, npy_complex64 *a, int *lda, s *e, npy_complex64 *tau, npy_complex64 *w, int *ldw) nogil +cdef void clatrd(char *uplo, int *n, int *nb, c *a, int *lda, s *e, c *tau, c *w, int *ldw) noexcept nogil: + + _fortran_clatrd(uplo, n, nb, a, lda, e, tau, w, ldw) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clatrs "BLAS_FUNC(clatrs)"(char *uplo, char *trans, char *diag, char *normin, int *n, npy_complex64 *a, int *lda, npy_complex64 *x, s *scale, s *cnorm, int *info) nogil +cdef void clatrs(char *uplo, char *trans, char *diag, char *normin, int *n, c *a, int *lda, c *x, s *scale, s *cnorm, int *info) noexcept nogil: + + _fortran_clatrs(uplo, trans, diag, normin, n, a, lda, x, scale, cnorm, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clatrz "BLAS_FUNC(clatrz)"(int *m, int *n, int *l, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work) nogil +cdef void clatrz(int *m, int *n, int *l, c *a, int *lda, c *tau, c *work) noexcept nogil: + + _fortran_clatrz(m, n, l, a, lda, tau, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clauu2 "BLAS_FUNC(clauu2)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *info) nogil +cdef void clauu2(char *uplo, int *n, c *a, int *lda, int *info) noexcept nogil: + + _fortran_clauu2(uplo, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_clauum "BLAS_FUNC(clauum)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *info) nogil +cdef void clauum(char *uplo, int *n, c *a, int *lda, int *info) noexcept nogil: + + _fortran_clauum(uplo, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpbcon "BLAS_FUNC(cpbcon)"(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, s *anorm, s *rcond, npy_complex64 *work, s *rwork, int *info) nogil +cdef void cpbcon(char *uplo, int *n, int *kd, c *ab, int *ldab, s *anorm, s *rcond, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_cpbcon(uplo, n, kd, ab, ldab, anorm, rcond, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpbequ "BLAS_FUNC(cpbequ)"(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, s *s, s *scond, s *amax, int *info) nogil +cdef void cpbequ(char *uplo, int *n, int *kd, c *ab, int *ldab, s *s, s *scond, s *amax, int *info) noexcept nogil: + + _fortran_cpbequ(uplo, n, kd, ab, ldab, s, scond, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpbrfs "BLAS_FUNC(cpbrfs)"(char *uplo, int *n, int *kd, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *afb, int *ldafb, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil +cdef void cpbrfs(char *uplo, int *n, int *kd, int *nrhs, c *ab, int *ldab, c *afb, int *ldafb, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_cpbrfs(uplo, n, kd, nrhs, ab, ldab, afb, ldafb, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpbstf "BLAS_FUNC(cpbstf)"(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, int *info) nogil +cdef void cpbstf(char *uplo, int *n, int *kd, c *ab, int *ldab, int *info) noexcept nogil: + + _fortran_cpbstf(uplo, n, kd, ab, ldab, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpbsv "BLAS_FUNC(cpbsv)"(char *uplo, int *n, int *kd, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *b, int *ldb, int *info) nogil +cdef void cpbsv(char *uplo, int *n, int *kd, int *nrhs, c *ab, int *ldab, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_cpbsv(uplo, n, kd, nrhs, ab, ldab, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpbsvx "BLAS_FUNC(cpbsvx)"(char *fact, char *uplo, int *n, int *kd, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *afb, int *ldafb, char *equed, s *s, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *rcond, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil +cdef void cpbsvx(char *fact, char *uplo, int *n, int *kd, int *nrhs, c *ab, int *ldab, c *afb, int *ldafb, char *equed, s *s, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_cpbsvx(fact, uplo, n, kd, nrhs, ab, ldab, afb, ldafb, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpbtf2 "BLAS_FUNC(cpbtf2)"(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, int *info) nogil +cdef void cpbtf2(char *uplo, int *n, int *kd, c *ab, int *ldab, int *info) noexcept nogil: + + _fortran_cpbtf2(uplo, n, kd, ab, ldab, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpbtrf "BLAS_FUNC(cpbtrf)"(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, int *info) nogil +cdef void cpbtrf(char *uplo, int *n, int *kd, c *ab, int *ldab, int *info) noexcept nogil: + + _fortran_cpbtrf(uplo, n, kd, ab, ldab, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpbtrs "BLAS_FUNC(cpbtrs)"(char *uplo, int *n, int *kd, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *b, int *ldb, int *info) nogil +cdef void cpbtrs(char *uplo, int *n, int *kd, int *nrhs, c *ab, int *ldab, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_cpbtrs(uplo, n, kd, nrhs, ab, ldab, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpftrf "BLAS_FUNC(cpftrf)"(char *transr, char *uplo, int *n, npy_complex64 *a, int *info) nogil +cdef void cpftrf(char *transr, char *uplo, int *n, c *a, int *info) noexcept nogil: + + _fortran_cpftrf(transr, uplo, n, a, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpftri "BLAS_FUNC(cpftri)"(char *transr, char *uplo, int *n, npy_complex64 *a, int *info) nogil +cdef void cpftri(char *transr, char *uplo, int *n, c *a, int *info) noexcept nogil: + + _fortran_cpftri(transr, uplo, n, a, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpftrs "BLAS_FUNC(cpftrs)"(char *transr, char *uplo, int *n, int *nrhs, npy_complex64 *a, npy_complex64 *b, int *ldb, int *info) nogil +cdef void cpftrs(char *transr, char *uplo, int *n, int *nrhs, c *a, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_cpftrs(transr, uplo, n, nrhs, a, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpocon "BLAS_FUNC(cpocon)"(char *uplo, int *n, npy_complex64 *a, int *lda, s *anorm, s *rcond, npy_complex64 *work, s *rwork, int *info) nogil +cdef void cpocon(char *uplo, int *n, c *a, int *lda, s *anorm, s *rcond, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_cpocon(uplo, n, a, lda, anorm, rcond, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpoequ "BLAS_FUNC(cpoequ)"(int *n, npy_complex64 *a, int *lda, s *s, s *scond, s *amax, int *info) nogil +cdef void cpoequ(int *n, c *a, int *lda, s *s, s *scond, s *amax, int *info) noexcept nogil: + + _fortran_cpoequ(n, a, lda, s, scond, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpoequb "BLAS_FUNC(cpoequb)"(int *n, npy_complex64 *a, int *lda, s *s, s *scond, s *amax, int *info) nogil +cdef void cpoequb(int *n, c *a, int *lda, s *s, s *scond, s *amax, int *info) noexcept nogil: + + _fortran_cpoequb(n, a, lda, s, scond, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cporfs "BLAS_FUNC(cporfs)"(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil +cdef void cporfs(char *uplo, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_cporfs(uplo, n, nrhs, a, lda, af, ldaf, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cposv "BLAS_FUNC(cposv)"(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *info) nogil +cdef void cposv(char *uplo, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_cposv(uplo, n, nrhs, a, lda, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cposvx "BLAS_FUNC(cposvx)"(char *fact, char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, char *equed, s *s, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *rcond, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil +cdef void cposvx(char *fact, char *uplo, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, char *equed, s *s, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_cposvx(fact, uplo, n, nrhs, a, lda, af, ldaf, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpotf2 "BLAS_FUNC(cpotf2)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *info) nogil +cdef void cpotf2(char *uplo, int *n, c *a, int *lda, int *info) noexcept nogil: + + _fortran_cpotf2(uplo, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpotrf "BLAS_FUNC(cpotrf)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *info) nogil +cdef void cpotrf(char *uplo, int *n, c *a, int *lda, int *info) noexcept nogil: + + _fortran_cpotrf(uplo, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpotri "BLAS_FUNC(cpotri)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *info) nogil +cdef void cpotri(char *uplo, int *n, c *a, int *lda, int *info) noexcept nogil: + + _fortran_cpotri(uplo, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpotrs "BLAS_FUNC(cpotrs)"(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *info) nogil +cdef void cpotrs(char *uplo, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_cpotrs(uplo, n, nrhs, a, lda, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cppcon "BLAS_FUNC(cppcon)"(char *uplo, int *n, npy_complex64 *ap, s *anorm, s *rcond, npy_complex64 *work, s *rwork, int *info) nogil +cdef void cppcon(char *uplo, int *n, c *ap, s *anorm, s *rcond, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_cppcon(uplo, n, ap, anorm, rcond, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cppequ "BLAS_FUNC(cppequ)"(char *uplo, int *n, npy_complex64 *ap, s *s, s *scond, s *amax, int *info) nogil +cdef void cppequ(char *uplo, int *n, c *ap, s *s, s *scond, s *amax, int *info) noexcept nogil: + + _fortran_cppequ(uplo, n, ap, s, scond, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpprfs "BLAS_FUNC(cpprfs)"(char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *afp, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil +cdef void cpprfs(char *uplo, int *n, int *nrhs, c *ap, c *afp, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_cpprfs(uplo, n, nrhs, ap, afp, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cppsv "BLAS_FUNC(cppsv)"(char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *b, int *ldb, int *info) nogil +cdef void cppsv(char *uplo, int *n, int *nrhs, c *ap, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_cppsv(uplo, n, nrhs, ap, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cppsvx "BLAS_FUNC(cppsvx)"(char *fact, char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *afp, char *equed, s *s, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *rcond, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil +cdef void cppsvx(char *fact, char *uplo, int *n, int *nrhs, c *ap, c *afp, char *equed, s *s, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_cppsvx(fact, uplo, n, nrhs, ap, afp, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpptrf "BLAS_FUNC(cpptrf)"(char *uplo, int *n, npy_complex64 *ap, int *info) nogil +cdef void cpptrf(char *uplo, int *n, c *ap, int *info) noexcept nogil: + + _fortran_cpptrf(uplo, n, ap, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpptri "BLAS_FUNC(cpptri)"(char *uplo, int *n, npy_complex64 *ap, int *info) nogil +cdef void cpptri(char *uplo, int *n, c *ap, int *info) noexcept nogil: + + _fortran_cpptri(uplo, n, ap, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpptrs "BLAS_FUNC(cpptrs)"(char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *b, int *ldb, int *info) nogil +cdef void cpptrs(char *uplo, int *n, int *nrhs, c *ap, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_cpptrs(uplo, n, nrhs, ap, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpstf2 "BLAS_FUNC(cpstf2)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *piv, int *rank, s *tol, s *work, int *info) nogil +cdef void cpstf2(char *uplo, int *n, c *a, int *lda, int *piv, int *rank, s *tol, s *work, int *info) noexcept nogil: + + _fortran_cpstf2(uplo, n, a, lda, piv, rank, tol, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpstrf "BLAS_FUNC(cpstrf)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *piv, int *rank, s *tol, s *work, int *info) nogil +cdef void cpstrf(char *uplo, int *n, c *a, int *lda, int *piv, int *rank, s *tol, s *work, int *info) noexcept nogil: + + _fortran_cpstrf(uplo, n, a, lda, piv, rank, tol, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cptcon "BLAS_FUNC(cptcon)"(int *n, s *d, npy_complex64 *e, s *anorm, s *rcond, s *rwork, int *info) nogil +cdef void cptcon(int *n, s *d, c *e, s *anorm, s *rcond, s *rwork, int *info) noexcept nogil: + + _fortran_cptcon(n, d, e, anorm, rcond, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpteqr "BLAS_FUNC(cpteqr)"(char *compz, int *n, s *d, s *e, npy_complex64 *z, int *ldz, s *work, int *info) nogil +cdef void cpteqr(char *compz, int *n, s *d, s *e, c *z, int *ldz, s *work, int *info) noexcept nogil: + + _fortran_cpteqr(compz, n, d, e, z, ldz, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cptrfs "BLAS_FUNC(cptrfs)"(char *uplo, int *n, int *nrhs, s *d, npy_complex64 *e, s *df, npy_complex64 *ef, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil +cdef void cptrfs(char *uplo, int *n, int *nrhs, s *d, c *e, s *df, c *ef, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_cptrfs(uplo, n, nrhs, d, e, df, ef, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cptsv "BLAS_FUNC(cptsv)"(int *n, int *nrhs, s *d, npy_complex64 *e, npy_complex64 *b, int *ldb, int *info) nogil +cdef void cptsv(int *n, int *nrhs, s *d, c *e, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_cptsv(n, nrhs, d, e, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cptsvx "BLAS_FUNC(cptsvx)"(char *fact, int *n, int *nrhs, s *d, npy_complex64 *e, s *df, npy_complex64 *ef, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *rcond, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil +cdef void cptsvx(char *fact, int *n, int *nrhs, s *d, c *e, s *df, c *ef, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_cptsvx(fact, n, nrhs, d, e, df, ef, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpttrf "BLAS_FUNC(cpttrf)"(int *n, s *d, npy_complex64 *e, int *info) nogil +cdef void cpttrf(int *n, s *d, c *e, int *info) noexcept nogil: + + _fortran_cpttrf(n, d, e, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cpttrs "BLAS_FUNC(cpttrs)"(char *uplo, int *n, int *nrhs, s *d, npy_complex64 *e, npy_complex64 *b, int *ldb, int *info) nogil +cdef void cpttrs(char *uplo, int *n, int *nrhs, s *d, c *e, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_cpttrs(uplo, n, nrhs, d, e, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cptts2 "BLAS_FUNC(cptts2)"(int *iuplo, int *n, int *nrhs, s *d, npy_complex64 *e, npy_complex64 *b, int *ldb) nogil +cdef void cptts2(int *iuplo, int *n, int *nrhs, s *d, c *e, c *b, int *ldb) noexcept nogil: + + _fortran_cptts2(iuplo, n, nrhs, d, e, b, ldb) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_crot "BLAS_FUNC(crot)"(int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy, s *c, npy_complex64 *s) nogil +cdef void crot(int *n, c *cx, int *incx, c *cy, int *incy, s *c, c *s) noexcept nogil: + + _fortran_crot(n, cx, incx, cy, incy, c, s) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cspcon "BLAS_FUNC(cspcon)"(char *uplo, int *n, npy_complex64 *ap, int *ipiv, s *anorm, s *rcond, npy_complex64 *work, int *info) nogil +cdef void cspcon(char *uplo, int *n, c *ap, int *ipiv, s *anorm, s *rcond, c *work, int *info) noexcept nogil: + + _fortran_cspcon(uplo, n, ap, ipiv, anorm, rcond, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cspmv "BLAS_FUNC(cspmv)"(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *ap, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy) nogil +cdef void cspmv(char *uplo, int *n, c *alpha, c *ap, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil: + + _fortran_cspmv(uplo, n, alpha, ap, x, incx, beta, y, incy) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cspr "BLAS_FUNC(cspr)"(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *ap) nogil +cdef void cspr(char *uplo, int *n, c *alpha, c *x, int *incx, c *ap) noexcept nogil: + + _fortran_cspr(uplo, n, alpha, x, incx, ap) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_csprfs "BLAS_FUNC(csprfs)"(char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *afp, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil +cdef void csprfs(char *uplo, int *n, int *nrhs, c *ap, c *afp, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_csprfs(uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cspsv "BLAS_FUNC(cspsv)"(char *uplo, int *n, int *nrhs, npy_complex64 *ap, int *ipiv, npy_complex64 *b, int *ldb, int *info) nogil +cdef void cspsv(char *uplo, int *n, int *nrhs, c *ap, int *ipiv, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_cspsv(uplo, n, nrhs, ap, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cspsvx "BLAS_FUNC(cspsvx)"(char *fact, char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *afp, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *rcond, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil +cdef void cspsvx(char *fact, char *uplo, int *n, int *nrhs, c *ap, c *afp, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_cspsvx(fact, uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_csptrf "BLAS_FUNC(csptrf)"(char *uplo, int *n, npy_complex64 *ap, int *ipiv, int *info) nogil +cdef void csptrf(char *uplo, int *n, c *ap, int *ipiv, int *info) noexcept nogil: + + _fortran_csptrf(uplo, n, ap, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_csptri "BLAS_FUNC(csptri)"(char *uplo, int *n, npy_complex64 *ap, int *ipiv, npy_complex64 *work, int *info) nogil +cdef void csptri(char *uplo, int *n, c *ap, int *ipiv, c *work, int *info) noexcept nogil: + + _fortran_csptri(uplo, n, ap, ipiv, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_csptrs "BLAS_FUNC(csptrs)"(char *uplo, int *n, int *nrhs, npy_complex64 *ap, int *ipiv, npy_complex64 *b, int *ldb, int *info) nogil +cdef void csptrs(char *uplo, int *n, int *nrhs, c *ap, int *ipiv, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_csptrs(uplo, n, nrhs, ap, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_csrscl "BLAS_FUNC(csrscl)"(int *n, s *sa, npy_complex64 *sx, int *incx) nogil +cdef void csrscl(int *n, s *sa, c *sx, int *incx) noexcept nogil: + + _fortran_csrscl(n, sa, sx, incx) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cstedc "BLAS_FUNC(cstedc)"(char *compz, int *n, s *d, s *e, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil +cdef void cstedc(char *compz, int *n, s *d, s *e, c *z, int *ldz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_cstedc(compz, n, d, e, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cstegr "BLAS_FUNC(cstegr)"(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, npy_complex64 *z, int *ldz, int *isuppz, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void cstegr(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, int *isuppz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_cstegr(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cstein "BLAS_FUNC(cstein)"(int *n, s *d, s *e, int *m, s *w, int *iblock, int *isplit, npy_complex64 *z, int *ldz, s *work, int *iwork, int *ifail, int *info) nogil +cdef void cstein(int *n, s *d, s *e, int *m, s *w, int *iblock, int *isplit, c *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_cstein(n, d, e, m, w, iblock, isplit, z, ldz, work, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cstemr "BLAS_FUNC(cstemr)"(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, int *m, s *w, npy_complex64 *z, int *ldz, int *nzc, int *isuppz, bint *tryrac, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void cstemr(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, int *m, s *w, c *z, int *ldz, int *nzc, int *isuppz, bint *tryrac, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_cstemr(jobz, range, n, d, e, vl, vu, il, iu, m, w, z, ldz, nzc, isuppz, tryrac, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_csteqr "BLAS_FUNC(csteqr)"(char *compz, int *n, s *d, s *e, npy_complex64 *z, int *ldz, s *work, int *info) nogil +cdef void csteqr(char *compz, int *n, s *d, s *e, c *z, int *ldz, s *work, int *info) noexcept nogil: + + _fortran_csteqr(compz, n, d, e, z, ldz, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_csycon "BLAS_FUNC(csycon)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, s *anorm, s *rcond, npy_complex64 *work, int *info) nogil +cdef void csycon(char *uplo, int *n, c *a, int *lda, int *ipiv, s *anorm, s *rcond, c *work, int *info) noexcept nogil: + + _fortran_csycon(uplo, n, a, lda, ipiv, anorm, rcond, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_csyconv "BLAS_FUNC(csyconv)"(char *uplo, char *way, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *info) nogil +cdef void csyconv(char *uplo, char *way, int *n, c *a, int *lda, int *ipiv, c *work, int *info) noexcept nogil: + + _fortran_csyconv(uplo, way, n, a, lda, ipiv, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_csyequb "BLAS_FUNC(csyequb)"(char *uplo, int *n, npy_complex64 *a, int *lda, s *s, s *scond, s *amax, npy_complex64 *work, int *info) nogil +cdef void csyequb(char *uplo, int *n, c *a, int *lda, s *s, s *scond, s *amax, c *work, int *info) noexcept nogil: + + _fortran_csyequb(uplo, n, a, lda, s, scond, amax, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_csymv "BLAS_FUNC(csymv)"(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy) nogil +cdef void csymv(char *uplo, int *n, c *alpha, c *a, int *lda, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil: + + _fortran_csymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_csyr "BLAS_FUNC(csyr)"(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *a, int *lda) nogil +cdef void csyr(char *uplo, int *n, c *alpha, c *x, int *incx, c *a, int *lda) noexcept nogil: + + _fortran_csyr(uplo, n, alpha, x, incx, a, lda) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_csyrfs "BLAS_FUNC(csyrfs)"(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil +cdef void csyrfs(char *uplo, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_csyrfs(uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_csysv "BLAS_FUNC(csysv)"(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *work, int *lwork, int *info) nogil +cdef void csysv(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_csysv(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_csysvx "BLAS_FUNC(csysvx)"(char *fact, char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *rcond, s *ferr, s *berr, npy_complex64 *work, int *lwork, s *rwork, int *info) nogil +cdef void csysvx(char *fact, char *uplo, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, int *lwork, s *rwork, int *info) noexcept nogil: + + _fortran_csysvx(fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, lwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_csyswapr "BLAS_FUNC(csyswapr)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *i1, int *i2) nogil +cdef void csyswapr(char *uplo, int *n, c *a, int *lda, int *i1, int *i2) noexcept nogil: + + _fortran_csyswapr(uplo, n, a, lda, i1, i2) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_csytf2 "BLAS_FUNC(csytf2)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, int *info) nogil +cdef void csytf2(char *uplo, int *n, c *a, int *lda, int *ipiv, int *info) noexcept nogil: + + _fortran_csytf2(uplo, n, a, lda, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_csytrf "BLAS_FUNC(csytrf)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *lwork, int *info) nogil +cdef void csytrf(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_csytrf(uplo, n, a, lda, ipiv, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_csytri "BLAS_FUNC(csytri)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *info) nogil +cdef void csytri(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *info) noexcept nogil: + + _fortran_csytri(uplo, n, a, lda, ipiv, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_csytri2 "BLAS_FUNC(csytri2)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *lwork, int *info) nogil +cdef void csytri2(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_csytri2(uplo, n, a, lda, ipiv, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_csytri2x "BLAS_FUNC(csytri2x)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *nb, int *info) nogil +cdef void csytri2x(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *nb, int *info) noexcept nogil: + + _fortran_csytri2x(uplo, n, a, lda, ipiv, work, nb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_csytrs "BLAS_FUNC(csytrs)"(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, int *info) nogil +cdef void csytrs(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_csytrs(uplo, n, nrhs, a, lda, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_csytrs2 "BLAS_FUNC(csytrs2)"(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *work, int *info) nogil +cdef void csytrs2(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, c *work, int *info) noexcept nogil: + + _fortran_csytrs2(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctbcon "BLAS_FUNC(ctbcon)"(char *norm, char *uplo, char *diag, int *n, int *kd, npy_complex64 *ab, int *ldab, s *rcond, npy_complex64 *work, s *rwork, int *info) nogil +cdef void ctbcon(char *norm, char *uplo, char *diag, int *n, int *kd, c *ab, int *ldab, s *rcond, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_ctbcon(norm, uplo, diag, n, kd, ab, ldab, rcond, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctbrfs "BLAS_FUNC(ctbrfs)"(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil +cdef void ctbrfs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, c *ab, int *ldab, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_ctbrfs(uplo, trans, diag, n, kd, nrhs, ab, ldab, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctbtrs "BLAS_FUNC(ctbtrs)"(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *b, int *ldb, int *info) nogil +cdef void ctbtrs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, c *ab, int *ldab, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_ctbtrs(uplo, trans, diag, n, kd, nrhs, ab, ldab, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctfsm "BLAS_FUNC(ctfsm)"(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, npy_complex64 *b, int *ldb) nogil +cdef void ctfsm(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, c *alpha, c *a, c *b, int *ldb) noexcept nogil: + + _fortran_ctfsm(transr, side, uplo, trans, diag, m, n, alpha, a, b, ldb) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctftri "BLAS_FUNC(ctftri)"(char *transr, char *uplo, char *diag, int *n, npy_complex64 *a, int *info) nogil +cdef void ctftri(char *transr, char *uplo, char *diag, int *n, c *a, int *info) noexcept nogil: + + _fortran_ctftri(transr, uplo, diag, n, a, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctfttp "BLAS_FUNC(ctfttp)"(char *transr, char *uplo, int *n, npy_complex64 *arf, npy_complex64 *ap, int *info) nogil +cdef void ctfttp(char *transr, char *uplo, int *n, c *arf, c *ap, int *info) noexcept nogil: + + _fortran_ctfttp(transr, uplo, n, arf, ap, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctfttr "BLAS_FUNC(ctfttr)"(char *transr, char *uplo, int *n, npy_complex64 *arf, npy_complex64 *a, int *lda, int *info) nogil +cdef void ctfttr(char *transr, char *uplo, int *n, c *arf, c *a, int *lda, int *info) noexcept nogil: + + _fortran_ctfttr(transr, uplo, n, arf, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctgevc "BLAS_FUNC(ctgevc)"(char *side, char *howmny, bint *select, int *n, npy_complex64 *s, int *lds, npy_complex64 *p, int *ldp, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, int *mm, int *m, npy_complex64 *work, s *rwork, int *info) nogil +cdef void ctgevc(char *side, char *howmny, bint *select, int *n, c *s, int *lds, c *p, int *ldp, c *vl, int *ldvl, c *vr, int *ldvr, int *mm, int *m, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_ctgevc(side, howmny, select, n, s, lds, p, ldp, vl, ldvl, vr, ldvr, mm, m, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctgex2 "BLAS_FUNC(ctgex2)"(bint *wantq, bint *wantz, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *q, int *ldq, npy_complex64 *z, int *ldz, int *j1, int *info) nogil +cdef void ctgex2(bint *wantq, bint *wantz, int *n, c *a, int *lda, c *b, int *ldb, c *q, int *ldq, c *z, int *ldz, int *j1, int *info) noexcept nogil: + + _fortran_ctgex2(wantq, wantz, n, a, lda, b, ldb, q, ldq, z, ldz, j1, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctgexc "BLAS_FUNC(ctgexc)"(bint *wantq, bint *wantz, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *q, int *ldq, npy_complex64 *z, int *ldz, int *ifst, int *ilst, int *info) nogil +cdef void ctgexc(bint *wantq, bint *wantz, int *n, c *a, int *lda, c *b, int *ldb, c *q, int *ldq, c *z, int *ldz, int *ifst, int *ilst, int *info) noexcept nogil: + + _fortran_ctgexc(wantq, wantz, n, a, lda, b, ldb, q, ldq, z, ldz, ifst, ilst, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctgsen "BLAS_FUNC(ctgsen)"(int *ijob, bint *wantq, bint *wantz, bint *select, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *q, int *ldq, npy_complex64 *z, int *ldz, int *m, s *pl, s *pr, s *dif, npy_complex64 *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void ctgsen(int *ijob, bint *wantq, bint *wantz, bint *select, int *n, c *a, int *lda, c *b, int *ldb, c *alpha, c *beta, c *q, int *ldq, c *z, int *ldz, int *m, s *pl, s *pr, s *dif, c *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_ctgsen(ijob, wantq, wantz, select, n, a, lda, b, ldb, alpha, beta, q, ldq, z, ldz, m, pl, pr, dif, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctgsja "BLAS_FUNC(ctgsja)"(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, s *tola, s *tolb, s *alpha, s *beta, npy_complex64 *u, int *ldu, npy_complex64 *v, int *ldv, npy_complex64 *q, int *ldq, npy_complex64 *work, int *ncycle, int *info) nogil +cdef void ctgsja(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, c *a, int *lda, c *b, int *ldb, s *tola, s *tolb, s *alpha, s *beta, c *u, int *ldu, c *v, int *ldv, c *q, int *ldq, c *work, int *ncycle, int *info) noexcept nogil: + + _fortran_ctgsja(jobu, jobv, jobq, m, p, n, k, l, a, lda, b, ldb, tola, tolb, alpha, beta, u, ldu, v, ldv, q, ldq, work, ncycle, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctgsna "BLAS_FUNC(ctgsna)"(char *job, char *howmny, bint *select, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, s *s, s *dif, int *mm, int *m, npy_complex64 *work, int *lwork, int *iwork, int *info) nogil +cdef void ctgsna(char *job, char *howmny, bint *select, int *n, c *a, int *lda, c *b, int *ldb, c *vl, int *ldvl, c *vr, int *ldvr, s *s, s *dif, int *mm, int *m, c *work, int *lwork, int *iwork, int *info) noexcept nogil: + + _fortran_ctgsna(job, howmny, select, n, a, lda, b, ldb, vl, ldvl, vr, ldvr, s, dif, mm, m, work, lwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctgsy2 "BLAS_FUNC(ctgsy2)"(char *trans, int *ijob, int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *c, int *ldc, npy_complex64 *d, int *ldd, npy_complex64 *e, int *lde, npy_complex64 *f, int *ldf, s *scale, s *rdsum, s *rdscal, int *info) nogil +cdef void ctgsy2(char *trans, int *ijob, int *m, int *n, c *a, int *lda, c *b, int *ldb, c *c, int *ldc, c *d, int *ldd, c *e, int *lde, c *f, int *ldf, s *scale, s *rdsum, s *rdscal, int *info) noexcept nogil: + + _fortran_ctgsy2(trans, ijob, m, n, a, lda, b, ldb, c, ldc, d, ldd, e, lde, f, ldf, scale, rdsum, rdscal, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctgsyl "BLAS_FUNC(ctgsyl)"(char *trans, int *ijob, int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *c, int *ldc, npy_complex64 *d, int *ldd, npy_complex64 *e, int *lde, npy_complex64 *f, int *ldf, s *scale, s *dif, npy_complex64 *work, int *lwork, int *iwork, int *info) nogil +cdef void ctgsyl(char *trans, int *ijob, int *m, int *n, c *a, int *lda, c *b, int *ldb, c *c, int *ldc, c *d, int *ldd, c *e, int *lde, c *f, int *ldf, s *scale, s *dif, c *work, int *lwork, int *iwork, int *info) noexcept nogil: + + _fortran_ctgsyl(trans, ijob, m, n, a, lda, b, ldb, c, ldc, d, ldd, e, lde, f, ldf, scale, dif, work, lwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctpcon "BLAS_FUNC(ctpcon)"(char *norm, char *uplo, char *diag, int *n, npy_complex64 *ap, s *rcond, npy_complex64 *work, s *rwork, int *info) nogil +cdef void ctpcon(char *norm, char *uplo, char *diag, int *n, c *ap, s *rcond, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_ctpcon(norm, uplo, diag, n, ap, rcond, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctpmqrt "BLAS_FUNC(ctpmqrt)"(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, npy_complex64 *v, int *ldv, npy_complex64 *t, int *ldt, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *work, int *info) nogil +cdef void ctpmqrt(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, c *v, int *ldv, c *t, int *ldt, c *a, int *lda, c *b, int *ldb, c *work, int *info) noexcept nogil: + + _fortran_ctpmqrt(side, trans, m, n, k, l, nb, v, ldv, t, ldt, a, lda, b, ldb, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctpqrt "BLAS_FUNC(ctpqrt)"(int *m, int *n, int *l, int *nb, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *t, int *ldt, npy_complex64 *work, int *info) nogil +cdef void ctpqrt(int *m, int *n, int *l, int *nb, c *a, int *lda, c *b, int *ldb, c *t, int *ldt, c *work, int *info) noexcept nogil: + + _fortran_ctpqrt(m, n, l, nb, a, lda, b, ldb, t, ldt, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctpqrt2 "BLAS_FUNC(ctpqrt2)"(int *m, int *n, int *l, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *t, int *ldt, int *info) nogil +cdef void ctpqrt2(int *m, int *n, int *l, c *a, int *lda, c *b, int *ldb, c *t, int *ldt, int *info) noexcept nogil: + + _fortran_ctpqrt2(m, n, l, a, lda, b, ldb, t, ldt, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctprfb "BLAS_FUNC(ctprfb)"(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, npy_complex64 *v, int *ldv, npy_complex64 *t, int *ldt, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *work, int *ldwork) nogil +cdef void ctprfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, c *v, int *ldv, c *t, int *ldt, c *a, int *lda, c *b, int *ldb, c *work, int *ldwork) noexcept nogil: + + _fortran_ctprfb(side, trans, direct, storev, m, n, k, l, v, ldv, t, ldt, a, lda, b, ldb, work, ldwork) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctprfs "BLAS_FUNC(ctprfs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil +cdef void ctprfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, c *ap, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_ctprfs(uplo, trans, diag, n, nrhs, ap, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctptri "BLAS_FUNC(ctptri)"(char *uplo, char *diag, int *n, npy_complex64 *ap, int *info) nogil +cdef void ctptri(char *uplo, char *diag, int *n, c *ap, int *info) noexcept nogil: + + _fortran_ctptri(uplo, diag, n, ap, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctptrs "BLAS_FUNC(ctptrs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *b, int *ldb, int *info) nogil +cdef void ctptrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, c *ap, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_ctptrs(uplo, trans, diag, n, nrhs, ap, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctpttf "BLAS_FUNC(ctpttf)"(char *transr, char *uplo, int *n, npy_complex64 *ap, npy_complex64 *arf, int *info) nogil +cdef void ctpttf(char *transr, char *uplo, int *n, c *ap, c *arf, int *info) noexcept nogil: + + _fortran_ctpttf(transr, uplo, n, ap, arf, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctpttr "BLAS_FUNC(ctpttr)"(char *uplo, int *n, npy_complex64 *ap, npy_complex64 *a, int *lda, int *info) nogil +cdef void ctpttr(char *uplo, int *n, c *ap, c *a, int *lda, int *info) noexcept nogil: + + _fortran_ctpttr(uplo, n, ap, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctrcon "BLAS_FUNC(ctrcon)"(char *norm, char *uplo, char *diag, int *n, npy_complex64 *a, int *lda, s *rcond, npy_complex64 *work, s *rwork, int *info) nogil +cdef void ctrcon(char *norm, char *uplo, char *diag, int *n, c *a, int *lda, s *rcond, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_ctrcon(norm, uplo, diag, n, a, lda, rcond, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctrevc "BLAS_FUNC(ctrevc)"(char *side, char *howmny, bint *select, int *n, npy_complex64 *t, int *ldt, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, int *mm, int *m, npy_complex64 *work, s *rwork, int *info) nogil +cdef void ctrevc(char *side, char *howmny, bint *select, int *n, c *t, int *ldt, c *vl, int *ldvl, c *vr, int *ldvr, int *mm, int *m, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_ctrevc(side, howmny, select, n, t, ldt, vl, ldvl, vr, ldvr, mm, m, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctrexc "BLAS_FUNC(ctrexc)"(char *compq, int *n, npy_complex64 *t, int *ldt, npy_complex64 *q, int *ldq, int *ifst, int *ilst, int *info) nogil +cdef void ctrexc(char *compq, int *n, c *t, int *ldt, c *q, int *ldq, int *ifst, int *ilst, int *info) noexcept nogil: + + _fortran_ctrexc(compq, n, t, ldt, q, ldq, ifst, ilst, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctrrfs "BLAS_FUNC(ctrrfs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil +cdef void ctrrfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil: + + _fortran_ctrrfs(uplo, trans, diag, n, nrhs, a, lda, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctrsen "BLAS_FUNC(ctrsen)"(char *job, char *compq, bint *select, int *n, npy_complex64 *t, int *ldt, npy_complex64 *q, int *ldq, npy_complex64 *w, int *m, s *s, s *sep, npy_complex64 *work, int *lwork, int *info) nogil +cdef void ctrsen(char *job, char *compq, bint *select, int *n, c *t, int *ldt, c *q, int *ldq, c *w, int *m, s *s, s *sep, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_ctrsen(job, compq, select, n, t, ldt, q, ldq, w, m, s, sep, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctrsna "BLAS_FUNC(ctrsna)"(char *job, char *howmny, bint *select, int *n, npy_complex64 *t, int *ldt, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, s *s, s *sep, int *mm, int *m, npy_complex64 *work, int *ldwork, s *rwork, int *info) nogil +cdef void ctrsna(char *job, char *howmny, bint *select, int *n, c *t, int *ldt, c *vl, int *ldvl, c *vr, int *ldvr, s *s, s *sep, int *mm, int *m, c *work, int *ldwork, s *rwork, int *info) noexcept nogil: + + _fortran_ctrsna(job, howmny, select, n, t, ldt, vl, ldvl, vr, ldvr, s, sep, mm, m, work, ldwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctrsyl "BLAS_FUNC(ctrsyl)"(char *trana, char *tranb, int *isgn, int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *c, int *ldc, s *scale, int *info) nogil +cdef void ctrsyl(char *trana, char *tranb, int *isgn, int *m, int *n, c *a, int *lda, c *b, int *ldb, c *c, int *ldc, s *scale, int *info) noexcept nogil: + + _fortran_ctrsyl(trana, tranb, isgn, m, n, a, lda, b, ldb, c, ldc, scale, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctrti2 "BLAS_FUNC(ctrti2)"(char *uplo, char *diag, int *n, npy_complex64 *a, int *lda, int *info) nogil +cdef void ctrti2(char *uplo, char *diag, int *n, c *a, int *lda, int *info) noexcept nogil: + + _fortran_ctrti2(uplo, diag, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctrtri "BLAS_FUNC(ctrtri)"(char *uplo, char *diag, int *n, npy_complex64 *a, int *lda, int *info) nogil +cdef void ctrtri(char *uplo, char *diag, int *n, c *a, int *lda, int *info) noexcept nogil: + + _fortran_ctrtri(uplo, diag, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctrtrs "BLAS_FUNC(ctrtrs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *info) nogil +cdef void ctrtrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, int *info) noexcept nogil: + + _fortran_ctrtrs(uplo, trans, diag, n, nrhs, a, lda, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctrttf "BLAS_FUNC(ctrttf)"(char *transr, char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *arf, int *info) nogil +cdef void ctrttf(char *transr, char *uplo, int *n, c *a, int *lda, c *arf, int *info) noexcept nogil: + + _fortran_ctrttf(transr, uplo, n, a, lda, arf, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctrttp "BLAS_FUNC(ctrttp)"(char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *ap, int *info) nogil +cdef void ctrttp(char *uplo, int *n, c *a, int *lda, c *ap, int *info) noexcept nogil: + + _fortran_ctrttp(uplo, n, a, lda, ap, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ctzrzf "BLAS_FUNC(ctzrzf)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil +cdef void ctzrzf(int *m, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_ctzrzf(m, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cunbdb "BLAS_FUNC(cunbdb)"(char *trans, char *signs, int *m, int *p, int *q, npy_complex64 *x11, int *ldx11, npy_complex64 *x12, int *ldx12, npy_complex64 *x21, int *ldx21, npy_complex64 *x22, int *ldx22, s *theta, s *phi, npy_complex64 *taup1, npy_complex64 *taup2, npy_complex64 *tauq1, npy_complex64 *tauq2, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cunbdb(char *trans, char *signs, int *m, int *p, int *q, c *x11, int *ldx11, c *x12, int *ldx12, c *x21, int *ldx21, c *x22, int *ldx22, s *theta, s *phi, c *taup1, c *taup2, c *tauq1, c *tauq2, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cunbdb(trans, signs, m, p, q, x11, ldx11, x12, ldx12, x21, ldx21, x22, ldx22, theta, phi, taup1, taup2, tauq1, tauq2, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cuncsd "BLAS_FUNC(cuncsd)"(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, npy_complex64 *x11, int *ldx11, npy_complex64 *x12, int *ldx12, npy_complex64 *x21, int *ldx21, npy_complex64 *x22, int *ldx22, s *theta, npy_complex64 *u1, int *ldu1, npy_complex64 *u2, int *ldu2, npy_complex64 *v1t, int *ldv1t, npy_complex64 *v2t, int *ldv2t, npy_complex64 *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *info) nogil +cdef void cuncsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, c *x11, int *ldx11, c *x12, int *ldx12, c *x21, int *ldx21, c *x22, int *ldx22, s *theta, c *u1, int *ldu1, c *u2, int *ldu2, c *v1t, int *ldv1t, c *v2t, int *ldv2t, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *info) noexcept nogil: + + _fortran_cuncsd(jobu1, jobu2, jobv1t, jobv2t, trans, signs, m, p, q, x11, ldx11, x12, ldx12, x21, ldx21, x22, ldx22, theta, u1, ldu1, u2, ldu2, v1t, ldv1t, v2t, ldv2t, work, lwork, rwork, lrwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cung2l "BLAS_FUNC(cung2l)"(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info) nogil +cdef void cung2l(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil: + + _fortran_cung2l(m, n, k, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cung2r "BLAS_FUNC(cung2r)"(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info) nogil +cdef void cung2r(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil: + + _fortran_cung2r(m, n, k, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cungbr "BLAS_FUNC(cungbr)"(char *vect, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cungbr(char *vect, int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cungbr(vect, m, n, k, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cunghr "BLAS_FUNC(cunghr)"(int *n, int *ilo, int *ihi, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cunghr(int *n, int *ilo, int *ihi, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cunghr(n, ilo, ihi, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cungl2 "BLAS_FUNC(cungl2)"(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info) nogil +cdef void cungl2(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil: + + _fortran_cungl2(m, n, k, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cunglq "BLAS_FUNC(cunglq)"(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cunglq(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cunglq(m, n, k, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cungql "BLAS_FUNC(cungql)"(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cungql(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cungql(m, n, k, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cungqr "BLAS_FUNC(cungqr)"(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cungqr(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cungqr(m, n, k, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cungr2 "BLAS_FUNC(cungr2)"(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info) nogil +cdef void cungr2(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil: + + _fortran_cungr2(m, n, k, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cungrq "BLAS_FUNC(cungrq)"(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cungrq(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cungrq(m, n, k, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cungtr "BLAS_FUNC(cungtr)"(char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cungtr(char *uplo, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cungtr(uplo, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cunm2l "BLAS_FUNC(cunm2l)"(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info) nogil +cdef void cunm2l(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *info) noexcept nogil: + + _fortran_cunm2l(side, trans, m, n, k, a, lda, tau, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cunm2r "BLAS_FUNC(cunm2r)"(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info) nogil +cdef void cunm2r(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *info) noexcept nogil: + + _fortran_cunm2r(side, trans, m, n, k, a, lda, tau, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cunmbr "BLAS_FUNC(cunmbr)"(char *vect, char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cunmbr(char *vect, char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cunmbr(vect, side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cunmhr "BLAS_FUNC(cunmhr)"(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cunmhr(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cunmhr(side, trans, m, n, ilo, ihi, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cunml2 "BLAS_FUNC(cunml2)"(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info) nogil +cdef void cunml2(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *info) noexcept nogil: + + _fortran_cunml2(side, trans, m, n, k, a, lda, tau, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cunmlq "BLAS_FUNC(cunmlq)"(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cunmlq(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cunmlq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cunmql "BLAS_FUNC(cunmql)"(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cunmql(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cunmql(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cunmqr "BLAS_FUNC(cunmqr)"(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cunmqr(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cunmqr(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cunmr2 "BLAS_FUNC(cunmr2)"(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info) nogil +cdef void cunmr2(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *info) noexcept nogil: + + _fortran_cunmr2(side, trans, m, n, k, a, lda, tau, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cunmr3 "BLAS_FUNC(cunmr3)"(char *side, char *trans, int *m, int *n, int *k, int *l, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info) nogil +cdef void cunmr3(char *side, char *trans, int *m, int *n, int *k, int *l, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *info) noexcept nogil: + + _fortran_cunmr3(side, trans, m, n, k, l, a, lda, tau, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cunmrq "BLAS_FUNC(cunmrq)"(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cunmrq(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cunmrq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cunmrz "BLAS_FUNC(cunmrz)"(char *side, char *trans, int *m, int *n, int *k, int *l, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cunmrz(char *side, char *trans, int *m, int *n, int *k, int *l, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cunmrz(side, trans, m, n, k, l, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cunmtr "BLAS_FUNC(cunmtr)"(char *side, char *uplo, char *trans, int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info) nogil +cdef void cunmtr(char *side, char *uplo, char *trans, int *m, int *n, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil: + + _fortran_cunmtr(side, uplo, trans, m, n, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cupgtr "BLAS_FUNC(cupgtr)"(char *uplo, int *n, npy_complex64 *ap, npy_complex64 *tau, npy_complex64 *q, int *ldq, npy_complex64 *work, int *info) nogil +cdef void cupgtr(char *uplo, int *n, c *ap, c *tau, c *q, int *ldq, c *work, int *info) noexcept nogil: + + _fortran_cupgtr(uplo, n, ap, tau, q, ldq, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_cupmtr "BLAS_FUNC(cupmtr)"(char *side, char *uplo, char *trans, int *m, int *n, npy_complex64 *ap, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info) nogil +cdef void cupmtr(char *side, char *uplo, char *trans, int *m, int *n, c *ap, c *tau, c *c, int *ldc, c *work, int *info) noexcept nogil: + + _fortran_cupmtr(side, uplo, trans, m, n, ap, tau, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dbbcsd "BLAS_FUNC(dbbcsd)"(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, d *theta, d *phi, d *u1, int *ldu1, d *u2, int *ldu2, d *v1t, int *ldv1t, d *v2t, int *ldv2t, d *b11d, d *b11e, d *b12d, d *b12e, d *b21d, d *b21e, d *b22d, d *b22e, d *work, int *lwork, int *info) nogil +cdef void dbbcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, d *theta, d *phi, d *u1, int *ldu1, d *u2, int *ldu2, d *v1t, int *ldv1t, d *v2t, int *ldv2t, d *b11d, d *b11e, d *b12d, d *b12e, d *b21d, d *b21e, d *b22d, d *b22e, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dbbcsd(jobu1, jobu2, jobv1t, jobv2t, trans, m, p, q, theta, phi, u1, ldu1, u2, ldu2, v1t, ldv1t, v2t, ldv2t, b11d, b11e, b12d, b12e, b21d, b21e, b22d, b22e, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dbdsdc "BLAS_FUNC(dbdsdc)"(char *uplo, char *compq, int *n, d *d, d *e, d *u, int *ldu, d *vt, int *ldvt, d *q, int *iq, d *work, int *iwork, int *info) nogil +cdef void dbdsdc(char *uplo, char *compq, int *n, d *d, d *e, d *u, int *ldu, d *vt, int *ldvt, d *q, int *iq, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dbdsdc(uplo, compq, n, d, e, u, ldu, vt, ldvt, q, iq, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dbdsqr "BLAS_FUNC(dbdsqr)"(char *uplo, int *n, int *ncvt, int *nru, int *ncc, d *d, d *e, d *vt, int *ldvt, d *u, int *ldu, d *c, int *ldc, d *work, int *info) nogil +cdef void dbdsqr(char *uplo, int *n, int *ncvt, int *nru, int *ncc, d *d, d *e, d *vt, int *ldvt, d *u, int *ldu, d *c, int *ldc, d *work, int *info) noexcept nogil: + + _fortran_dbdsqr(uplo, n, ncvt, nru, ncc, d, e, vt, ldvt, u, ldu, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ddisna "BLAS_FUNC(ddisna)"(char *job, int *m, int *n, d *d, d *sep, int *info) nogil +cdef void ddisna(char *job, int *m, int *n, d *d, d *sep, int *info) noexcept nogil: + + _fortran_ddisna(job, m, n, d, sep, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgbbrd "BLAS_FUNC(dgbbrd)"(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, d *ab, int *ldab, d *d, d *e, d *q, int *ldq, d *pt, int *ldpt, d *c, int *ldc, d *work, int *info) nogil +cdef void dgbbrd(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, d *ab, int *ldab, d *d, d *e, d *q, int *ldq, d *pt, int *ldpt, d *c, int *ldc, d *work, int *info) noexcept nogil: + + _fortran_dgbbrd(vect, m, n, ncc, kl, ku, ab, ldab, d, e, q, ldq, pt, ldpt, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgbcon "BLAS_FUNC(dgbcon)"(char *norm, int *n, int *kl, int *ku, d *ab, int *ldab, int *ipiv, d *anorm, d *rcond, d *work, int *iwork, int *info) nogil +cdef void dgbcon(char *norm, int *n, int *kl, int *ku, d *ab, int *ldab, int *ipiv, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dgbcon(norm, n, kl, ku, ab, ldab, ipiv, anorm, rcond, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgbequ "BLAS_FUNC(dgbequ)"(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) nogil +cdef void dgbequ(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil: + + _fortran_dgbequ(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgbequb "BLAS_FUNC(dgbequb)"(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) nogil +cdef void dgbequb(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil: + + _fortran_dgbequb(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgbrfs "BLAS_FUNC(dgbrfs)"(char *trans, int *n, int *kl, int *ku, int *nrhs, d *ab, int *ldab, d *afb, int *ldafb, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) nogil +cdef void dgbrfs(char *trans, int *n, int *kl, int *ku, int *nrhs, d *ab, int *ldab, d *afb, int *ldafb, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dgbrfs(trans, n, kl, ku, nrhs, ab, ldab, afb, ldafb, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgbsv "BLAS_FUNC(dgbsv)"(int *n, int *kl, int *ku, int *nrhs, d *ab, int *ldab, int *ipiv, d *b, int *ldb, int *info) nogil +cdef void dgbsv(int *n, int *kl, int *ku, int *nrhs, d *ab, int *ldab, int *ipiv, d *b, int *ldb, int *info) noexcept nogil: + + _fortran_dgbsv(n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgbsvx "BLAS_FUNC(dgbsvx)"(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, d *ab, int *ldab, d *afb, int *ldafb, int *ipiv, char *equed, d *r, d *c, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) nogil +cdef void dgbsvx(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, d *ab, int *ldab, d *afb, int *ldafb, int *ipiv, char *equed, d *r, d *c, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dgbsvx(fact, trans, n, kl, ku, nrhs, ab, ldab, afb, ldafb, ipiv, equed, r, c, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgbtf2 "BLAS_FUNC(dgbtf2)"(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, int *ipiv, int *info) nogil +cdef void dgbtf2(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, int *ipiv, int *info) noexcept nogil: + + _fortran_dgbtf2(m, n, kl, ku, ab, ldab, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgbtrf "BLAS_FUNC(dgbtrf)"(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, int *ipiv, int *info) nogil +cdef void dgbtrf(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, int *ipiv, int *info) noexcept nogil: + + _fortran_dgbtrf(m, n, kl, ku, ab, ldab, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgbtrs "BLAS_FUNC(dgbtrs)"(char *trans, int *n, int *kl, int *ku, int *nrhs, d *ab, int *ldab, int *ipiv, d *b, int *ldb, int *info) nogil +cdef void dgbtrs(char *trans, int *n, int *kl, int *ku, int *nrhs, d *ab, int *ldab, int *ipiv, d *b, int *ldb, int *info) noexcept nogil: + + _fortran_dgbtrs(trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgebak "BLAS_FUNC(dgebak)"(char *job, char *side, int *n, int *ilo, int *ihi, d *scale, int *m, d *v, int *ldv, int *info) nogil +cdef void dgebak(char *job, char *side, int *n, int *ilo, int *ihi, d *scale, int *m, d *v, int *ldv, int *info) noexcept nogil: + + _fortran_dgebak(job, side, n, ilo, ihi, scale, m, v, ldv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgebal "BLAS_FUNC(dgebal)"(char *job, int *n, d *a, int *lda, int *ilo, int *ihi, d *scale, int *info) nogil +cdef void dgebal(char *job, int *n, d *a, int *lda, int *ilo, int *ihi, d *scale, int *info) noexcept nogil: + + _fortran_dgebal(job, n, a, lda, ilo, ihi, scale, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgebd2 "BLAS_FUNC(dgebd2)"(int *m, int *n, d *a, int *lda, d *d, d *e, d *tauq, d *taup, d *work, int *info) nogil +cdef void dgebd2(int *m, int *n, d *a, int *lda, d *d, d *e, d *tauq, d *taup, d *work, int *info) noexcept nogil: + + _fortran_dgebd2(m, n, a, lda, d, e, tauq, taup, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgebrd "BLAS_FUNC(dgebrd)"(int *m, int *n, d *a, int *lda, d *d, d *e, d *tauq, d *taup, d *work, int *lwork, int *info) nogil +cdef void dgebrd(int *m, int *n, d *a, int *lda, d *d, d *e, d *tauq, d *taup, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dgebrd(m, n, a, lda, d, e, tauq, taup, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgecon "BLAS_FUNC(dgecon)"(char *norm, int *n, d *a, int *lda, d *anorm, d *rcond, d *work, int *iwork, int *info) nogil +cdef void dgecon(char *norm, int *n, d *a, int *lda, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dgecon(norm, n, a, lda, anorm, rcond, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgeequ "BLAS_FUNC(dgeequ)"(int *m, int *n, d *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) nogil +cdef void dgeequ(int *m, int *n, d *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil: + + _fortran_dgeequ(m, n, a, lda, r, c, rowcnd, colcnd, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgeequb "BLAS_FUNC(dgeequb)"(int *m, int *n, d *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) nogil +cdef void dgeequb(int *m, int *n, d *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil: + + _fortran_dgeequb(m, n, a, lda, r, c, rowcnd, colcnd, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgees "BLAS_FUNC(dgees)"(char *jobvs, char *sort, _dselect2 *select, int *n, d *a, int *lda, int *sdim, d *wr, d *wi, d *vs, int *ldvs, d *work, int *lwork, bint *bwork, int *info) nogil +cdef void dgees(char *jobvs, char *sort, dselect2 *select, int *n, d *a, int *lda, int *sdim, d *wr, d *wi, d *vs, int *ldvs, d *work, int *lwork, bint *bwork, int *info) noexcept nogil: + + _fortran_dgees(jobvs, sort, <_dselect2*>select, n, a, lda, sdim, wr, wi, vs, ldvs, work, lwork, bwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgeesx "BLAS_FUNC(dgeesx)"(char *jobvs, char *sort, _dselect2 *select, char *sense, int *n, d *a, int *lda, int *sdim, d *wr, d *wi, d *vs, int *ldvs, d *rconde, d *rcondv, d *work, int *lwork, int *iwork, int *liwork, bint *bwork, int *info) nogil +cdef void dgeesx(char *jobvs, char *sort, dselect2 *select, char *sense, int *n, d *a, int *lda, int *sdim, d *wr, d *wi, d *vs, int *ldvs, d *rconde, d *rcondv, d *work, int *lwork, int *iwork, int *liwork, bint *bwork, int *info) noexcept nogil: + + _fortran_dgeesx(jobvs, sort, <_dselect2*>select, sense, n, a, lda, sdim, wr, wi, vs, ldvs, rconde, rcondv, work, lwork, iwork, liwork, bwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgeev "BLAS_FUNC(dgeev)"(char *jobvl, char *jobvr, int *n, d *a, int *lda, d *wr, d *wi, d *vl, int *ldvl, d *vr, int *ldvr, d *work, int *lwork, int *info) nogil +cdef void dgeev(char *jobvl, char *jobvr, int *n, d *a, int *lda, d *wr, d *wi, d *vl, int *ldvl, d *vr, int *ldvr, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dgeev(jobvl, jobvr, n, a, lda, wr, wi, vl, ldvl, vr, ldvr, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgeevx "BLAS_FUNC(dgeevx)"(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, d *a, int *lda, d *wr, d *wi, d *vl, int *ldvl, d *vr, int *ldvr, int *ilo, int *ihi, d *scale, d *abnrm, d *rconde, d *rcondv, d *work, int *lwork, int *iwork, int *info) nogil +cdef void dgeevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, d *a, int *lda, d *wr, d *wi, d *vl, int *ldvl, d *vr, int *ldvr, int *ilo, int *ihi, d *scale, d *abnrm, d *rconde, d *rcondv, d *work, int *lwork, int *iwork, int *info) noexcept nogil: + + _fortran_dgeevx(balanc, jobvl, jobvr, sense, n, a, lda, wr, wi, vl, ldvl, vr, ldvr, ilo, ihi, scale, abnrm, rconde, rcondv, work, lwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgehd2 "BLAS_FUNC(dgehd2)"(int *n, int *ilo, int *ihi, d *a, int *lda, d *tau, d *work, int *info) nogil +cdef void dgehd2(int *n, int *ilo, int *ihi, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil: + + _fortran_dgehd2(n, ilo, ihi, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgehrd "BLAS_FUNC(dgehrd)"(int *n, int *ilo, int *ihi, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil +cdef void dgehrd(int *n, int *ilo, int *ihi, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dgehrd(n, ilo, ihi, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgejsv "BLAS_FUNC(dgejsv)"(char *joba, char *jobu, char *jobv, char *jobr, char *jobt, char *jobp, int *m, int *n, d *a, int *lda, d *sva, d *u, int *ldu, d *v, int *ldv, d *work, int *lwork, int *iwork, int *info) nogil +cdef void dgejsv(char *joba, char *jobu, char *jobv, char *jobr, char *jobt, char *jobp, int *m, int *n, d *a, int *lda, d *sva, d *u, int *ldu, d *v, int *ldv, d *work, int *lwork, int *iwork, int *info) noexcept nogil: + + _fortran_dgejsv(joba, jobu, jobv, jobr, jobt, jobp, m, n, a, lda, sva, u, ldu, v, ldv, work, lwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgelq2 "BLAS_FUNC(dgelq2)"(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) nogil +cdef void dgelq2(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil: + + _fortran_dgelq2(m, n, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgelqf "BLAS_FUNC(dgelqf)"(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil +cdef void dgelqf(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dgelqf(m, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgels "BLAS_FUNC(dgels)"(char *trans, int *m, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *work, int *lwork, int *info) nogil +cdef void dgels(char *trans, int *m, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dgels(trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgelsd "BLAS_FUNC(dgelsd)"(int *m, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *s, d *rcond, int *rank, d *work, int *lwork, int *iwork, int *info) nogil +cdef void dgelsd(int *m, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *s, d *rcond, int *rank, d *work, int *lwork, int *iwork, int *info) noexcept nogil: + + _fortran_dgelsd(m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgelss "BLAS_FUNC(dgelss)"(int *m, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *s, d *rcond, int *rank, d *work, int *lwork, int *info) nogil +cdef void dgelss(int *m, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *s, d *rcond, int *rank, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dgelss(m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgelsy "BLAS_FUNC(dgelsy)"(int *m, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, int *jpvt, d *rcond, int *rank, d *work, int *lwork, int *info) nogil +cdef void dgelsy(int *m, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, int *jpvt, d *rcond, int *rank, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dgelsy(m, n, nrhs, a, lda, b, ldb, jpvt, rcond, rank, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgemqrt "BLAS_FUNC(dgemqrt)"(char *side, char *trans, int *m, int *n, int *k, int *nb, d *v, int *ldv, d *t, int *ldt, d *c, int *ldc, d *work, int *info) nogil +cdef void dgemqrt(char *side, char *trans, int *m, int *n, int *k, int *nb, d *v, int *ldv, d *t, int *ldt, d *c, int *ldc, d *work, int *info) noexcept nogil: + + _fortran_dgemqrt(side, trans, m, n, k, nb, v, ldv, t, ldt, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgeql2 "BLAS_FUNC(dgeql2)"(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) nogil +cdef void dgeql2(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil: + + _fortran_dgeql2(m, n, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgeqlf "BLAS_FUNC(dgeqlf)"(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil +cdef void dgeqlf(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dgeqlf(m, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgeqp3 "BLAS_FUNC(dgeqp3)"(int *m, int *n, d *a, int *lda, int *jpvt, d *tau, d *work, int *lwork, int *info) nogil +cdef void dgeqp3(int *m, int *n, d *a, int *lda, int *jpvt, d *tau, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dgeqp3(m, n, a, lda, jpvt, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgeqr2 "BLAS_FUNC(dgeqr2)"(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) nogil +cdef void dgeqr2(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil: + + _fortran_dgeqr2(m, n, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgeqr2p "BLAS_FUNC(dgeqr2p)"(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) nogil +cdef void dgeqr2p(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil: + + _fortran_dgeqr2p(m, n, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgeqrf "BLAS_FUNC(dgeqrf)"(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil +cdef void dgeqrf(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dgeqrf(m, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgeqrfp "BLAS_FUNC(dgeqrfp)"(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil +cdef void dgeqrfp(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dgeqrfp(m, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgeqrt "BLAS_FUNC(dgeqrt)"(int *m, int *n, int *nb, d *a, int *lda, d *t, int *ldt, d *work, int *info) nogil +cdef void dgeqrt(int *m, int *n, int *nb, d *a, int *lda, d *t, int *ldt, d *work, int *info) noexcept nogil: + + _fortran_dgeqrt(m, n, nb, a, lda, t, ldt, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgeqrt2 "BLAS_FUNC(dgeqrt2)"(int *m, int *n, d *a, int *lda, d *t, int *ldt, int *info) nogil +cdef void dgeqrt2(int *m, int *n, d *a, int *lda, d *t, int *ldt, int *info) noexcept nogil: + + _fortran_dgeqrt2(m, n, a, lda, t, ldt, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgeqrt3 "BLAS_FUNC(dgeqrt3)"(int *m, int *n, d *a, int *lda, d *t, int *ldt, int *info) nogil +cdef void dgeqrt3(int *m, int *n, d *a, int *lda, d *t, int *ldt, int *info) noexcept nogil: + + _fortran_dgeqrt3(m, n, a, lda, t, ldt, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgerfs "BLAS_FUNC(dgerfs)"(char *trans, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) nogil +cdef void dgerfs(char *trans, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dgerfs(trans, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgerq2 "BLAS_FUNC(dgerq2)"(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) nogil +cdef void dgerq2(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil: + + _fortran_dgerq2(m, n, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgerqf "BLAS_FUNC(dgerqf)"(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil +cdef void dgerqf(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dgerqf(m, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgesc2 "BLAS_FUNC(dgesc2)"(int *n, d *a, int *lda, d *rhs, int *ipiv, int *jpiv, d *scale) nogil +cdef void dgesc2(int *n, d *a, int *lda, d *rhs, int *ipiv, int *jpiv, d *scale) noexcept nogil: + + _fortran_dgesc2(n, a, lda, rhs, ipiv, jpiv, scale) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgesdd "BLAS_FUNC(dgesdd)"(char *jobz, int *m, int *n, d *a, int *lda, d *s, d *u, int *ldu, d *vt, int *ldvt, d *work, int *lwork, int *iwork, int *info) nogil +cdef void dgesdd(char *jobz, int *m, int *n, d *a, int *lda, d *s, d *u, int *ldu, d *vt, int *ldvt, d *work, int *lwork, int *iwork, int *info) noexcept nogil: + + _fortran_dgesdd(jobz, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgesv "BLAS_FUNC(dgesv)"(int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, int *info) nogil +cdef void dgesv(int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, int *info) noexcept nogil: + + _fortran_dgesv(n, nrhs, a, lda, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgesvd "BLAS_FUNC(dgesvd)"(char *jobu, char *jobvt, int *m, int *n, d *a, int *lda, d *s, d *u, int *ldu, d *vt, int *ldvt, d *work, int *lwork, int *info) nogil +cdef void dgesvd(char *jobu, char *jobvt, int *m, int *n, d *a, int *lda, d *s, d *u, int *ldu, d *vt, int *ldvt, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dgesvd(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgesvj "BLAS_FUNC(dgesvj)"(char *joba, char *jobu, char *jobv, int *m, int *n, d *a, int *lda, d *sva, int *mv, d *v, int *ldv, d *work, int *lwork, int *info) nogil +cdef void dgesvj(char *joba, char *jobu, char *jobv, int *m, int *n, d *a, int *lda, d *sva, int *mv, d *v, int *ldv, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dgesvj(joba, jobu, jobv, m, n, a, lda, sva, mv, v, ldv, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgesvx "BLAS_FUNC(dgesvx)"(char *fact, char *trans, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, int *ipiv, char *equed, d *r, d *c, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) nogil +cdef void dgesvx(char *fact, char *trans, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, int *ipiv, char *equed, d *r, d *c, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dgesvx(fact, trans, n, nrhs, a, lda, af, ldaf, ipiv, equed, r, c, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgetc2 "BLAS_FUNC(dgetc2)"(int *n, d *a, int *lda, int *ipiv, int *jpiv, int *info) nogil +cdef void dgetc2(int *n, d *a, int *lda, int *ipiv, int *jpiv, int *info) noexcept nogil: + + _fortran_dgetc2(n, a, lda, ipiv, jpiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgetf2 "BLAS_FUNC(dgetf2)"(int *m, int *n, d *a, int *lda, int *ipiv, int *info) nogil +cdef void dgetf2(int *m, int *n, d *a, int *lda, int *ipiv, int *info) noexcept nogil: + + _fortran_dgetf2(m, n, a, lda, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgetrf "BLAS_FUNC(dgetrf)"(int *m, int *n, d *a, int *lda, int *ipiv, int *info) nogil +cdef void dgetrf(int *m, int *n, d *a, int *lda, int *ipiv, int *info) noexcept nogil: + + _fortran_dgetrf(m, n, a, lda, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgetri "BLAS_FUNC(dgetri)"(int *n, d *a, int *lda, int *ipiv, d *work, int *lwork, int *info) nogil +cdef void dgetri(int *n, d *a, int *lda, int *ipiv, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dgetri(n, a, lda, ipiv, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgetrs "BLAS_FUNC(dgetrs)"(char *trans, int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, int *info) nogil +cdef void dgetrs(char *trans, int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, int *info) noexcept nogil: + + _fortran_dgetrs(trans, n, nrhs, a, lda, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dggbak "BLAS_FUNC(dggbak)"(char *job, char *side, int *n, int *ilo, int *ihi, d *lscale, d *rscale, int *m, d *v, int *ldv, int *info) nogil +cdef void dggbak(char *job, char *side, int *n, int *ilo, int *ihi, d *lscale, d *rscale, int *m, d *v, int *ldv, int *info) noexcept nogil: + + _fortran_dggbak(job, side, n, ilo, ihi, lscale, rscale, m, v, ldv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dggbal "BLAS_FUNC(dggbal)"(char *job, int *n, d *a, int *lda, d *b, int *ldb, int *ilo, int *ihi, d *lscale, d *rscale, d *work, int *info) nogil +cdef void dggbal(char *job, int *n, d *a, int *lda, d *b, int *ldb, int *ilo, int *ihi, d *lscale, d *rscale, d *work, int *info) noexcept nogil: + + _fortran_dggbal(job, n, a, lda, b, ldb, ilo, ihi, lscale, rscale, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgges "BLAS_FUNC(dgges)"(char *jobvsl, char *jobvsr, char *sort, _dselect3 *selctg, int *n, d *a, int *lda, d *b, int *ldb, int *sdim, d *alphar, d *alphai, d *beta, d *vsl, int *ldvsl, d *vsr, int *ldvsr, d *work, int *lwork, bint *bwork, int *info) nogil +cdef void dgges(char *jobvsl, char *jobvsr, char *sort, dselect3 *selctg, int *n, d *a, int *lda, d *b, int *ldb, int *sdim, d *alphar, d *alphai, d *beta, d *vsl, int *ldvsl, d *vsr, int *ldvsr, d *work, int *lwork, bint *bwork, int *info) noexcept nogil: + + _fortran_dgges(jobvsl, jobvsr, sort, <_dselect3*>selctg, n, a, lda, b, ldb, sdim, alphar, alphai, beta, vsl, ldvsl, vsr, ldvsr, work, lwork, bwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dggesx "BLAS_FUNC(dggesx)"(char *jobvsl, char *jobvsr, char *sort, _dselect3 *selctg, char *sense, int *n, d *a, int *lda, d *b, int *ldb, int *sdim, d *alphar, d *alphai, d *beta, d *vsl, int *ldvsl, d *vsr, int *ldvsr, d *rconde, d *rcondv, d *work, int *lwork, int *iwork, int *liwork, bint *bwork, int *info) nogil +cdef void dggesx(char *jobvsl, char *jobvsr, char *sort, dselect3 *selctg, char *sense, int *n, d *a, int *lda, d *b, int *ldb, int *sdim, d *alphar, d *alphai, d *beta, d *vsl, int *ldvsl, d *vsr, int *ldvsr, d *rconde, d *rcondv, d *work, int *lwork, int *iwork, int *liwork, bint *bwork, int *info) noexcept nogil: + + _fortran_dggesx(jobvsl, jobvsr, sort, <_dselect3*>selctg, sense, n, a, lda, b, ldb, sdim, alphar, alphai, beta, vsl, ldvsl, vsr, ldvsr, rconde, rcondv, work, lwork, iwork, liwork, bwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dggev "BLAS_FUNC(dggev)"(char *jobvl, char *jobvr, int *n, d *a, int *lda, d *b, int *ldb, d *alphar, d *alphai, d *beta, d *vl, int *ldvl, d *vr, int *ldvr, d *work, int *lwork, int *info) nogil +cdef void dggev(char *jobvl, char *jobvr, int *n, d *a, int *lda, d *b, int *ldb, d *alphar, d *alphai, d *beta, d *vl, int *ldvl, d *vr, int *ldvr, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dggev(jobvl, jobvr, n, a, lda, b, ldb, alphar, alphai, beta, vl, ldvl, vr, ldvr, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dggevx "BLAS_FUNC(dggevx)"(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, d *a, int *lda, d *b, int *ldb, d *alphar, d *alphai, d *beta, d *vl, int *ldvl, d *vr, int *ldvr, int *ilo, int *ihi, d *lscale, d *rscale, d *abnrm, d *bbnrm, d *rconde, d *rcondv, d *work, int *lwork, int *iwork, bint *bwork, int *info) nogil +cdef void dggevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, d *a, int *lda, d *b, int *ldb, d *alphar, d *alphai, d *beta, d *vl, int *ldvl, d *vr, int *ldvr, int *ilo, int *ihi, d *lscale, d *rscale, d *abnrm, d *bbnrm, d *rconde, d *rcondv, d *work, int *lwork, int *iwork, bint *bwork, int *info) noexcept nogil: + + _fortran_dggevx(balanc, jobvl, jobvr, sense, n, a, lda, b, ldb, alphar, alphai, beta, vl, ldvl, vr, ldvr, ilo, ihi, lscale, rscale, abnrm, bbnrm, rconde, rcondv, work, lwork, iwork, bwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dggglm "BLAS_FUNC(dggglm)"(int *n, int *m, int *p, d *a, int *lda, d *b, int *ldb, d *d, d *x, d *y, d *work, int *lwork, int *info) nogil +cdef void dggglm(int *n, int *m, int *p, d *a, int *lda, d *b, int *ldb, d *d, d *x, d *y, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dggglm(n, m, p, a, lda, b, ldb, d, x, y, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgghrd "BLAS_FUNC(dgghrd)"(char *compq, char *compz, int *n, int *ilo, int *ihi, d *a, int *lda, d *b, int *ldb, d *q, int *ldq, d *z, int *ldz, int *info) nogil +cdef void dgghrd(char *compq, char *compz, int *n, int *ilo, int *ihi, d *a, int *lda, d *b, int *ldb, d *q, int *ldq, d *z, int *ldz, int *info) noexcept nogil: + + _fortran_dgghrd(compq, compz, n, ilo, ihi, a, lda, b, ldb, q, ldq, z, ldz, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgglse "BLAS_FUNC(dgglse)"(int *m, int *n, int *p, d *a, int *lda, d *b, int *ldb, d *c, d *d, d *x, d *work, int *lwork, int *info) nogil +cdef void dgglse(int *m, int *n, int *p, d *a, int *lda, d *b, int *ldb, d *c, d *d, d *x, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dgglse(m, n, p, a, lda, b, ldb, c, d, x, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dggqrf "BLAS_FUNC(dggqrf)"(int *n, int *m, int *p, d *a, int *lda, d *taua, d *b, int *ldb, d *taub, d *work, int *lwork, int *info) nogil +cdef void dggqrf(int *n, int *m, int *p, d *a, int *lda, d *taua, d *b, int *ldb, d *taub, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dggqrf(n, m, p, a, lda, taua, b, ldb, taub, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dggrqf "BLAS_FUNC(dggrqf)"(int *m, int *p, int *n, d *a, int *lda, d *taua, d *b, int *ldb, d *taub, d *work, int *lwork, int *info) nogil +cdef void dggrqf(int *m, int *p, int *n, d *a, int *lda, d *taua, d *b, int *ldb, d *taub, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dggrqf(m, p, n, a, lda, taua, b, ldb, taub, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgsvj0 "BLAS_FUNC(dgsvj0)"(char *jobv, int *m, int *n, d *a, int *lda, d *d, d *sva, int *mv, d *v, int *ldv, d *eps, d *sfmin, d *tol, int *nsweep, d *work, int *lwork, int *info) nogil +cdef void dgsvj0(char *jobv, int *m, int *n, d *a, int *lda, d *d, d *sva, int *mv, d *v, int *ldv, d *eps, d *sfmin, d *tol, int *nsweep, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dgsvj0(jobv, m, n, a, lda, d, sva, mv, v, ldv, eps, sfmin, tol, nsweep, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgsvj1 "BLAS_FUNC(dgsvj1)"(char *jobv, int *m, int *n, int *n1, d *a, int *lda, d *d, d *sva, int *mv, d *v, int *ldv, d *eps, d *sfmin, d *tol, int *nsweep, d *work, int *lwork, int *info) nogil +cdef void dgsvj1(char *jobv, int *m, int *n, int *n1, d *a, int *lda, d *d, d *sva, int *mv, d *v, int *ldv, d *eps, d *sfmin, d *tol, int *nsweep, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dgsvj1(jobv, m, n, n1, a, lda, d, sva, mv, v, ldv, eps, sfmin, tol, nsweep, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgtcon "BLAS_FUNC(dgtcon)"(char *norm, int *n, d *dl, d *d, d *du, d *du2, int *ipiv, d *anorm, d *rcond, d *work, int *iwork, int *info) nogil +cdef void dgtcon(char *norm, int *n, d *dl, d *d, d *du, d *du2, int *ipiv, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dgtcon(norm, n, dl, d, du, du2, ipiv, anorm, rcond, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgtrfs "BLAS_FUNC(dgtrfs)"(char *trans, int *n, int *nrhs, d *dl, d *d, d *du, d *dlf, d *df, d *duf, d *du2, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) nogil +cdef void dgtrfs(char *trans, int *n, int *nrhs, d *dl, d *d, d *du, d *dlf, d *df, d *duf, d *du2, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dgtrfs(trans, n, nrhs, dl, d, du, dlf, df, duf, du2, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgtsv "BLAS_FUNC(dgtsv)"(int *n, int *nrhs, d *dl, d *d, d *du, d *b, int *ldb, int *info) nogil +cdef void dgtsv(int *n, int *nrhs, d *dl, d *d, d *du, d *b, int *ldb, int *info) noexcept nogil: + + _fortran_dgtsv(n, nrhs, dl, d, du, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgtsvx "BLAS_FUNC(dgtsvx)"(char *fact, char *trans, int *n, int *nrhs, d *dl, d *d, d *du, d *dlf, d *df, d *duf, d *du2, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) nogil +cdef void dgtsvx(char *fact, char *trans, int *n, int *nrhs, d *dl, d *d, d *du, d *dlf, d *df, d *duf, d *du2, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dgtsvx(fact, trans, n, nrhs, dl, d, du, dlf, df, duf, du2, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgttrf "BLAS_FUNC(dgttrf)"(int *n, d *dl, d *d, d *du, d *du2, int *ipiv, int *info) nogil +cdef void dgttrf(int *n, d *dl, d *d, d *du, d *du2, int *ipiv, int *info) noexcept nogil: + + _fortran_dgttrf(n, dl, d, du, du2, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgttrs "BLAS_FUNC(dgttrs)"(char *trans, int *n, int *nrhs, d *dl, d *d, d *du, d *du2, int *ipiv, d *b, int *ldb, int *info) nogil +cdef void dgttrs(char *trans, int *n, int *nrhs, d *dl, d *d, d *du, d *du2, int *ipiv, d *b, int *ldb, int *info) noexcept nogil: + + _fortran_dgttrs(trans, n, nrhs, dl, d, du, du2, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dgtts2 "BLAS_FUNC(dgtts2)"(int *itrans, int *n, int *nrhs, d *dl, d *d, d *du, d *du2, int *ipiv, d *b, int *ldb) nogil +cdef void dgtts2(int *itrans, int *n, int *nrhs, d *dl, d *d, d *du, d *du2, int *ipiv, d *b, int *ldb) noexcept nogil: + + _fortran_dgtts2(itrans, n, nrhs, dl, d, du, du2, ipiv, b, ldb) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dhgeqz "BLAS_FUNC(dhgeqz)"(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *t, int *ldt, d *alphar, d *alphai, d *beta, d *q, int *ldq, d *z, int *ldz, d *work, int *lwork, int *info) nogil +cdef void dhgeqz(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *t, int *ldt, d *alphar, d *alphai, d *beta, d *q, int *ldq, d *z, int *ldz, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dhgeqz(job, compq, compz, n, ilo, ihi, h, ldh, t, ldt, alphar, alphai, beta, q, ldq, z, ldz, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dhsein "BLAS_FUNC(dhsein)"(char *side, char *eigsrc, char *initv, bint *select, int *n, d *h, int *ldh, d *wr, d *wi, d *vl, int *ldvl, d *vr, int *ldvr, int *mm, int *m, d *work, int *ifaill, int *ifailr, int *info) nogil +cdef void dhsein(char *side, char *eigsrc, char *initv, bint *select, int *n, d *h, int *ldh, d *wr, d *wi, d *vl, int *ldvl, d *vr, int *ldvr, int *mm, int *m, d *work, int *ifaill, int *ifailr, int *info) noexcept nogil: + + _fortran_dhsein(side, eigsrc, initv, select, n, h, ldh, wr, wi, vl, ldvl, vr, ldvr, mm, m, work, ifaill, ifailr, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dhseqr "BLAS_FUNC(dhseqr)"(char *job, char *compz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *wr, d *wi, d *z, int *ldz, d *work, int *lwork, int *info) nogil +cdef void dhseqr(char *job, char *compz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *wr, d *wi, d *z, int *ldz, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dhseqr(job, compz, n, ilo, ihi, h, ldh, wr, wi, z, ldz, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + bint _fortran_disnan "BLAS_FUNC(disnan)"(d *din) nogil +cdef bint disnan(d *din) noexcept nogil: + + return _fortran_disnan(din) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlabad "BLAS_FUNC(dlabad)"(d *small, d *large) nogil +cdef void dlabad(d *small, d *large) noexcept nogil: + + _fortran_dlabad(small, large) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlabrd "BLAS_FUNC(dlabrd)"(int *m, int *n, int *nb, d *a, int *lda, d *d, d *e, d *tauq, d *taup, d *x, int *ldx, d *y, int *ldy) nogil +cdef void dlabrd(int *m, int *n, int *nb, d *a, int *lda, d *d, d *e, d *tauq, d *taup, d *x, int *ldx, d *y, int *ldy) noexcept nogil: + + _fortran_dlabrd(m, n, nb, a, lda, d, e, tauq, taup, x, ldx, y, ldy) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlacn2 "BLAS_FUNC(dlacn2)"(int *n, d *v, d *x, int *isgn, d *est, int *kase, int *isave) nogil +cdef void dlacn2(int *n, d *v, d *x, int *isgn, d *est, int *kase, int *isave) noexcept nogil: + + _fortran_dlacn2(n, v, x, isgn, est, kase, isave) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlacon "BLAS_FUNC(dlacon)"(int *n, d *v, d *x, int *isgn, d *est, int *kase) nogil +cdef void dlacon(int *n, d *v, d *x, int *isgn, d *est, int *kase) noexcept nogil: + + _fortran_dlacon(n, v, x, isgn, est, kase) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlacpy "BLAS_FUNC(dlacpy)"(char *uplo, int *m, int *n, d *a, int *lda, d *b, int *ldb) nogil +cdef void dlacpy(char *uplo, int *m, int *n, d *a, int *lda, d *b, int *ldb) noexcept nogil: + + _fortran_dlacpy(uplo, m, n, a, lda, b, ldb) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dladiv "BLAS_FUNC(dladiv)"(d *a, d *b, d *c, d *d, d *p, d *q) nogil +cdef void dladiv(d *a, d *b, d *c, d *d, d *p, d *q) noexcept nogil: + + _fortran_dladiv(a, b, c, d, p, q) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlae2 "BLAS_FUNC(dlae2)"(d *a, d *b, d *c, d *rt1, d *rt2) nogil +cdef void dlae2(d *a, d *b, d *c, d *rt1, d *rt2) noexcept nogil: + + _fortran_dlae2(a, b, c, rt1, rt2) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaebz "BLAS_FUNC(dlaebz)"(int *ijob, int *nitmax, int *n, int *mmax, int *minp, int *nbmin, d *abstol, d *reltol, d *pivmin, d *d, d *e, d *e2, int *nval, d *ab, d *c, int *mout, int *nab, d *work, int *iwork, int *info) nogil +cdef void dlaebz(int *ijob, int *nitmax, int *n, int *mmax, int *minp, int *nbmin, d *abstol, d *reltol, d *pivmin, d *d, d *e, d *e2, int *nval, d *ab, d *c, int *mout, int *nab, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dlaebz(ijob, nitmax, n, mmax, minp, nbmin, abstol, reltol, pivmin, d, e, e2, nval, ab, c, mout, nab, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaed0 "BLAS_FUNC(dlaed0)"(int *icompq, int *qsiz, int *n, d *d, d *e, d *q, int *ldq, d *qstore, int *ldqs, d *work, int *iwork, int *info) nogil +cdef void dlaed0(int *icompq, int *qsiz, int *n, d *d, d *e, d *q, int *ldq, d *qstore, int *ldqs, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dlaed0(icompq, qsiz, n, d, e, q, ldq, qstore, ldqs, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaed1 "BLAS_FUNC(dlaed1)"(int *n, d *d, d *q, int *ldq, int *indxq, d *rho, int *cutpnt, d *work, int *iwork, int *info) nogil +cdef void dlaed1(int *n, d *d, d *q, int *ldq, int *indxq, d *rho, int *cutpnt, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dlaed1(n, d, q, ldq, indxq, rho, cutpnt, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaed2 "BLAS_FUNC(dlaed2)"(int *k, int *n, int *n1, d *d, d *q, int *ldq, int *indxq, d *rho, d *z, d *dlamda, d *w, d *q2, int *indx, int *indxc, int *indxp, int *coltyp, int *info) nogil +cdef void dlaed2(int *k, int *n, int *n1, d *d, d *q, int *ldq, int *indxq, d *rho, d *z, d *dlamda, d *w, d *q2, int *indx, int *indxc, int *indxp, int *coltyp, int *info) noexcept nogil: + + _fortran_dlaed2(k, n, n1, d, q, ldq, indxq, rho, z, dlamda, w, q2, indx, indxc, indxp, coltyp, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaed3 "BLAS_FUNC(dlaed3)"(int *k, int *n, int *n1, d *d, d *q, int *ldq, d *rho, d *dlamda, d *q2, int *indx, int *ctot, d *w, d *s, int *info) nogil +cdef void dlaed3(int *k, int *n, int *n1, d *d, d *q, int *ldq, d *rho, d *dlamda, d *q2, int *indx, int *ctot, d *w, d *s, int *info) noexcept nogil: + + _fortran_dlaed3(k, n, n1, d, q, ldq, rho, dlamda, q2, indx, ctot, w, s, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaed4 "BLAS_FUNC(dlaed4)"(int *n, int *i, d *d, d *z, d *delta, d *rho, d *dlam, int *info) nogil +cdef void dlaed4(int *n, int *i, d *d, d *z, d *delta, d *rho, d *dlam, int *info) noexcept nogil: + + _fortran_dlaed4(n, i, d, z, delta, rho, dlam, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaed5 "BLAS_FUNC(dlaed5)"(int *i, d *d, d *z, d *delta, d *rho, d *dlam) nogil +cdef void dlaed5(int *i, d *d, d *z, d *delta, d *rho, d *dlam) noexcept nogil: + + _fortran_dlaed5(i, d, z, delta, rho, dlam) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaed6 "BLAS_FUNC(dlaed6)"(int *kniter, bint *orgati, d *rho, d *d, d *z, d *finit, d *tau, int *info) nogil +cdef void dlaed6(int *kniter, bint *orgati, d *rho, d *d, d *z, d *finit, d *tau, int *info) noexcept nogil: + + _fortran_dlaed6(kniter, orgati, rho, d, z, finit, tau, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaed7 "BLAS_FUNC(dlaed7)"(int *icompq, int *n, int *qsiz, int *tlvls, int *curlvl, int *curpbm, d *d, d *q, int *ldq, int *indxq, d *rho, int *cutpnt, d *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, d *givnum, d *work, int *iwork, int *info) nogil +cdef void dlaed7(int *icompq, int *n, int *qsiz, int *tlvls, int *curlvl, int *curpbm, d *d, d *q, int *ldq, int *indxq, d *rho, int *cutpnt, d *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, d *givnum, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dlaed7(icompq, n, qsiz, tlvls, curlvl, curpbm, d, q, ldq, indxq, rho, cutpnt, qstore, qptr, prmptr, perm, givptr, givcol, givnum, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaed8 "BLAS_FUNC(dlaed8)"(int *icompq, int *k, int *n, int *qsiz, d *d, d *q, int *ldq, int *indxq, d *rho, int *cutpnt, d *z, d *dlamda, d *q2, int *ldq2, d *w, int *perm, int *givptr, int *givcol, d *givnum, int *indxp, int *indx, int *info) nogil +cdef void dlaed8(int *icompq, int *k, int *n, int *qsiz, d *d, d *q, int *ldq, int *indxq, d *rho, int *cutpnt, d *z, d *dlamda, d *q2, int *ldq2, d *w, int *perm, int *givptr, int *givcol, d *givnum, int *indxp, int *indx, int *info) noexcept nogil: + + _fortran_dlaed8(icompq, k, n, qsiz, d, q, ldq, indxq, rho, cutpnt, z, dlamda, q2, ldq2, w, perm, givptr, givcol, givnum, indxp, indx, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaed9 "BLAS_FUNC(dlaed9)"(int *k, int *kstart, int *kstop, int *n, d *d, d *q, int *ldq, d *rho, d *dlamda, d *w, d *s, int *lds, int *info) nogil +cdef void dlaed9(int *k, int *kstart, int *kstop, int *n, d *d, d *q, int *ldq, d *rho, d *dlamda, d *w, d *s, int *lds, int *info) noexcept nogil: + + _fortran_dlaed9(k, kstart, kstop, n, d, q, ldq, rho, dlamda, w, s, lds, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaeda "BLAS_FUNC(dlaeda)"(int *n, int *tlvls, int *curlvl, int *curpbm, int *prmptr, int *perm, int *givptr, int *givcol, d *givnum, d *q, int *qptr, d *z, d *ztemp, int *info) nogil +cdef void dlaeda(int *n, int *tlvls, int *curlvl, int *curpbm, int *prmptr, int *perm, int *givptr, int *givcol, d *givnum, d *q, int *qptr, d *z, d *ztemp, int *info) noexcept nogil: + + _fortran_dlaeda(n, tlvls, curlvl, curpbm, prmptr, perm, givptr, givcol, givnum, q, qptr, z, ztemp, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaein "BLAS_FUNC(dlaein)"(bint *rightv, bint *noinit, int *n, d *h, int *ldh, d *wr, d *wi, d *vr, d *vi, d *b, int *ldb, d *work, d *eps3, d *smlnum, d *bignum, int *info) nogil +cdef void dlaein(bint *rightv, bint *noinit, int *n, d *h, int *ldh, d *wr, d *wi, d *vr, d *vi, d *b, int *ldb, d *work, d *eps3, d *smlnum, d *bignum, int *info) noexcept nogil: + + _fortran_dlaein(rightv, noinit, n, h, ldh, wr, wi, vr, vi, b, ldb, work, eps3, smlnum, bignum, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaev2 "BLAS_FUNC(dlaev2)"(d *a, d *b, d *c, d *rt1, d *rt2, d *cs1, d *sn1) nogil +cdef void dlaev2(d *a, d *b, d *c, d *rt1, d *rt2, d *cs1, d *sn1) noexcept nogil: + + _fortran_dlaev2(a, b, c, rt1, rt2, cs1, sn1) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaexc "BLAS_FUNC(dlaexc)"(bint *wantq, int *n, d *t, int *ldt, d *q, int *ldq, int *j1, int *n1, int *n2, d *work, int *info) nogil +cdef void dlaexc(bint *wantq, int *n, d *t, int *ldt, d *q, int *ldq, int *j1, int *n1, int *n2, d *work, int *info) noexcept nogil: + + _fortran_dlaexc(wantq, n, t, ldt, q, ldq, j1, n1, n2, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlag2 "BLAS_FUNC(dlag2)"(d *a, int *lda, d *b, int *ldb, d *safmin, d *scale1, d *scale2, d *wr1, d *wr2, d *wi) nogil +cdef void dlag2(d *a, int *lda, d *b, int *ldb, d *safmin, d *scale1, d *scale2, d *wr1, d *wr2, d *wi) noexcept nogil: + + _fortran_dlag2(a, lda, b, ldb, safmin, scale1, scale2, wr1, wr2, wi) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlag2s "BLAS_FUNC(dlag2s)"(int *m, int *n, d *a, int *lda, s *sa, int *ldsa, int *info) nogil +cdef void dlag2s(int *m, int *n, d *a, int *lda, s *sa, int *ldsa, int *info) noexcept nogil: + + _fortran_dlag2s(m, n, a, lda, sa, ldsa, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlags2 "BLAS_FUNC(dlags2)"(bint *upper, d *a1, d *a2, d *a3, d *b1, d *b2, d *b3, d *csu, d *snu, d *csv, d *snv, d *csq, d *snq) nogil +cdef void dlags2(bint *upper, d *a1, d *a2, d *a3, d *b1, d *b2, d *b3, d *csu, d *snu, d *csv, d *snv, d *csq, d *snq) noexcept nogil: + + _fortran_dlags2(upper, a1, a2, a3, b1, b2, b3, csu, snu, csv, snv, csq, snq) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlagtf "BLAS_FUNC(dlagtf)"(int *n, d *a, d *lambda_, d *b, d *c, d *tol, d *d, int *in_, int *info) nogil +cdef void dlagtf(int *n, d *a, d *lambda_, d *b, d *c, d *tol, d *d, int *in_, int *info) noexcept nogil: + + _fortran_dlagtf(n, a, lambda_, b, c, tol, d, in_, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlagtm "BLAS_FUNC(dlagtm)"(char *trans, int *n, int *nrhs, d *alpha, d *dl, d *d, d *du, d *x, int *ldx, d *beta, d *b, int *ldb) nogil +cdef void dlagtm(char *trans, int *n, int *nrhs, d *alpha, d *dl, d *d, d *du, d *x, int *ldx, d *beta, d *b, int *ldb) noexcept nogil: + + _fortran_dlagtm(trans, n, nrhs, alpha, dl, d, du, x, ldx, beta, b, ldb) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlagts "BLAS_FUNC(dlagts)"(int *job, int *n, d *a, d *b, d *c, d *d, int *in_, d *y, d *tol, int *info) nogil +cdef void dlagts(int *job, int *n, d *a, d *b, d *c, d *d, int *in_, d *y, d *tol, int *info) noexcept nogil: + + _fortran_dlagts(job, n, a, b, c, d, in_, y, tol, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlagv2 "BLAS_FUNC(dlagv2)"(d *a, int *lda, d *b, int *ldb, d *alphar, d *alphai, d *beta, d *csl, d *snl, d *csr, d *snr) nogil +cdef void dlagv2(d *a, int *lda, d *b, int *ldb, d *alphar, d *alphai, d *beta, d *csl, d *snl, d *csr, d *snr) noexcept nogil: + + _fortran_dlagv2(a, lda, b, ldb, alphar, alphai, beta, csl, snl, csr, snr) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlahqr "BLAS_FUNC(dlahqr)"(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *wr, d *wi, int *iloz, int *ihiz, d *z, int *ldz, int *info) nogil +cdef void dlahqr(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *wr, d *wi, int *iloz, int *ihiz, d *z, int *ldz, int *info) noexcept nogil: + + _fortran_dlahqr(wantt, wantz, n, ilo, ihi, h, ldh, wr, wi, iloz, ihiz, z, ldz, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlahr2 "BLAS_FUNC(dlahr2)"(int *n, int *k, int *nb, d *a, int *lda, d *tau, d *t, int *ldt, d *y, int *ldy) nogil +cdef void dlahr2(int *n, int *k, int *nb, d *a, int *lda, d *tau, d *t, int *ldt, d *y, int *ldy) noexcept nogil: + + _fortran_dlahr2(n, k, nb, a, lda, tau, t, ldt, y, ldy) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaic1 "BLAS_FUNC(dlaic1)"(int *job, int *j, d *x, d *sest, d *w, d *gamma, d *sestpr, d *s, d *c) nogil +cdef void dlaic1(int *job, int *j, d *x, d *sest, d *w, d *gamma, d *sestpr, d *s, d *c) noexcept nogil: + + _fortran_dlaic1(job, j, x, sest, w, gamma, sestpr, s, c) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaln2 "BLAS_FUNC(dlaln2)"(bint *ltrans, int *na, int *nw, d *smin, d *ca, d *a, int *lda, d *d1, d *d2, d *b, int *ldb, d *wr, d *wi, d *x, int *ldx, d *scale, d *xnorm, int *info) nogil +cdef void dlaln2(bint *ltrans, int *na, int *nw, d *smin, d *ca, d *a, int *lda, d *d1, d *d2, d *b, int *ldb, d *wr, d *wi, d *x, int *ldx, d *scale, d *xnorm, int *info) noexcept nogil: + + _fortran_dlaln2(ltrans, na, nw, smin, ca, a, lda, d1, d2, b, ldb, wr, wi, x, ldx, scale, xnorm, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlals0 "BLAS_FUNC(dlals0)"(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, d *b, int *ldb, d *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, d *givnum, int *ldgnum, d *poles, d *difl, d *difr, d *z, int *k, d *c, d *s, d *work, int *info) nogil +cdef void dlals0(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, d *b, int *ldb, d *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, d *givnum, int *ldgnum, d *poles, d *difl, d *difr, d *z, int *k, d *c, d *s, d *work, int *info) noexcept nogil: + + _fortran_dlals0(icompq, nl, nr, sqre, nrhs, b, ldb, bx, ldbx, perm, givptr, givcol, ldgcol, givnum, ldgnum, poles, difl, difr, z, k, c, s, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlalsa "BLAS_FUNC(dlalsa)"(int *icompq, int *smlsiz, int *n, int *nrhs, d *b, int *ldb, d *bx, int *ldbx, d *u, int *ldu, d *vt, int *k, d *difl, d *difr, d *z, d *poles, int *givptr, int *givcol, int *ldgcol, int *perm, d *givnum, d *c, d *s, d *work, int *iwork, int *info) nogil +cdef void dlalsa(int *icompq, int *smlsiz, int *n, int *nrhs, d *b, int *ldb, d *bx, int *ldbx, d *u, int *ldu, d *vt, int *k, d *difl, d *difr, d *z, d *poles, int *givptr, int *givcol, int *ldgcol, int *perm, d *givnum, d *c, d *s, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dlalsa(icompq, smlsiz, n, nrhs, b, ldb, bx, ldbx, u, ldu, vt, k, difl, difr, z, poles, givptr, givcol, ldgcol, perm, givnum, c, s, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlalsd "BLAS_FUNC(dlalsd)"(char *uplo, int *smlsiz, int *n, int *nrhs, d *d, d *e, d *b, int *ldb, d *rcond, int *rank, d *work, int *iwork, int *info) nogil +cdef void dlalsd(char *uplo, int *smlsiz, int *n, int *nrhs, d *d, d *e, d *b, int *ldb, d *rcond, int *rank, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dlalsd(uplo, smlsiz, n, nrhs, d, e, b, ldb, rcond, rank, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_dlamch "BLAS_FUNC(dlamch)"(char *cmach) nogil +cdef d dlamch(char *cmach) noexcept nogil: + + return _fortran_dlamch(cmach) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlamrg "BLAS_FUNC(dlamrg)"(int *n1, int *n2, d *a, int *dtrd1, int *dtrd2, int *index_bn) nogil +cdef void dlamrg(int *n1, int *n2, d *a, int *dtrd1, int *dtrd2, int *index_bn) noexcept nogil: + + _fortran_dlamrg(n1, n2, a, dtrd1, dtrd2, index_bn) + + +cdef extern from "_lapack_subroutines.h": + int _fortran_dlaneg "BLAS_FUNC(dlaneg)"(int *n, d *d, d *lld, d *sigma, d *pivmin, int *r) nogil +cdef int dlaneg(int *n, d *d, d *lld, d *sigma, d *pivmin, int *r) noexcept nogil: + + return _fortran_dlaneg(n, d, lld, sigma, pivmin, r) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_dlangb "BLAS_FUNC(dlangb)"(char *norm, int *n, int *kl, int *ku, d *ab, int *ldab, d *work) nogil +cdef d dlangb(char *norm, int *n, int *kl, int *ku, d *ab, int *ldab, d *work) noexcept nogil: + + return _fortran_dlangb(norm, n, kl, ku, ab, ldab, work) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_dlange "BLAS_FUNC(dlange)"(char *norm, int *m, int *n, d *a, int *lda, d *work) nogil +cdef d dlange(char *norm, int *m, int *n, d *a, int *lda, d *work) noexcept nogil: + + return _fortran_dlange(norm, m, n, a, lda, work) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_dlangt "BLAS_FUNC(dlangt)"(char *norm, int *n, d *dl, d *d_, d *du) nogil +cdef d dlangt(char *norm, int *n, d *dl, d *d_, d *du) noexcept nogil: + + return _fortran_dlangt(norm, n, dl, d_, du) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_dlanhs "BLAS_FUNC(dlanhs)"(char *norm, int *n, d *a, int *lda, d *work) nogil +cdef d dlanhs(char *norm, int *n, d *a, int *lda, d *work) noexcept nogil: + + return _fortran_dlanhs(norm, n, a, lda, work) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_dlansb "BLAS_FUNC(dlansb)"(char *norm, char *uplo, int *n, int *k, d *ab, int *ldab, d *work) nogil +cdef d dlansb(char *norm, char *uplo, int *n, int *k, d *ab, int *ldab, d *work) noexcept nogil: + + return _fortran_dlansb(norm, uplo, n, k, ab, ldab, work) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_dlansf "BLAS_FUNC(dlansf)"(char *norm, char *transr, char *uplo, int *n, d *a, d *work) nogil +cdef d dlansf(char *norm, char *transr, char *uplo, int *n, d *a, d *work) noexcept nogil: + + return _fortran_dlansf(norm, transr, uplo, n, a, work) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_dlansp "BLAS_FUNC(dlansp)"(char *norm, char *uplo, int *n, d *ap, d *work) nogil +cdef d dlansp(char *norm, char *uplo, int *n, d *ap, d *work) noexcept nogil: + + return _fortran_dlansp(norm, uplo, n, ap, work) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_dlanst "BLAS_FUNC(dlanst)"(char *norm, int *n, d *d_, d *e) nogil +cdef d dlanst(char *norm, int *n, d *d_, d *e) noexcept nogil: + + return _fortran_dlanst(norm, n, d_, e) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_dlansy "BLAS_FUNC(dlansy)"(char *norm, char *uplo, int *n, d *a, int *lda, d *work) nogil +cdef d dlansy(char *norm, char *uplo, int *n, d *a, int *lda, d *work) noexcept nogil: + + return _fortran_dlansy(norm, uplo, n, a, lda, work) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_dlantb "BLAS_FUNC(dlantb)"(char *norm, char *uplo, char *diag, int *n, int *k, d *ab, int *ldab, d *work) nogil +cdef d dlantb(char *norm, char *uplo, char *diag, int *n, int *k, d *ab, int *ldab, d *work) noexcept nogil: + + return _fortran_dlantb(norm, uplo, diag, n, k, ab, ldab, work) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_dlantp "BLAS_FUNC(dlantp)"(char *norm, char *uplo, char *diag, int *n, d *ap, d *work) nogil +cdef d dlantp(char *norm, char *uplo, char *diag, int *n, d *ap, d *work) noexcept nogil: + + return _fortran_dlantp(norm, uplo, diag, n, ap, work) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_dlantr "BLAS_FUNC(dlantr)"(char *norm, char *uplo, char *diag, int *m, int *n, d *a, int *lda, d *work) nogil +cdef d dlantr(char *norm, char *uplo, char *diag, int *m, int *n, d *a, int *lda, d *work) noexcept nogil: + + return _fortran_dlantr(norm, uplo, diag, m, n, a, lda, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlanv2 "BLAS_FUNC(dlanv2)"(d *a, d *b, d *c, d *d, d *rt1r, d *rt1i, d *rt2r, d *rt2i, d *cs, d *sn) nogil +cdef void dlanv2(d *a, d *b, d *c, d *d, d *rt1r, d *rt1i, d *rt2r, d *rt2i, d *cs, d *sn) noexcept nogil: + + _fortran_dlanv2(a, b, c, d, rt1r, rt1i, rt2r, rt2i, cs, sn) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlapll "BLAS_FUNC(dlapll)"(int *n, d *x, int *incx, d *y, int *incy, d *ssmin) nogil +cdef void dlapll(int *n, d *x, int *incx, d *y, int *incy, d *ssmin) noexcept nogil: + + _fortran_dlapll(n, x, incx, y, incy, ssmin) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlapmr "BLAS_FUNC(dlapmr)"(bint *forwrd, int *m, int *n, d *x, int *ldx, int *k) nogil +cdef void dlapmr(bint *forwrd, int *m, int *n, d *x, int *ldx, int *k) noexcept nogil: + + _fortran_dlapmr(forwrd, m, n, x, ldx, k) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlapmt "BLAS_FUNC(dlapmt)"(bint *forwrd, int *m, int *n, d *x, int *ldx, int *k) nogil +cdef void dlapmt(bint *forwrd, int *m, int *n, d *x, int *ldx, int *k) noexcept nogil: + + _fortran_dlapmt(forwrd, m, n, x, ldx, k) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_dlapy2 "BLAS_FUNC(dlapy2)"(d *x, d *y) nogil +cdef d dlapy2(d *x, d *y) noexcept nogil: + + return _fortran_dlapy2(x, y) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_dlapy3 "BLAS_FUNC(dlapy3)"(d *x, d *y, d *z) nogil +cdef d dlapy3(d *x, d *y, d *z) noexcept nogil: + + return _fortran_dlapy3(x, y, z) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaqgb "BLAS_FUNC(dlaqgb)"(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, char *equed) nogil +cdef void dlaqgb(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, char *equed) noexcept nogil: + + _fortran_dlaqgb(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaqge "BLAS_FUNC(dlaqge)"(int *m, int *n, d *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, char *equed) nogil +cdef void dlaqge(int *m, int *n, d *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, char *equed) noexcept nogil: + + _fortran_dlaqge(m, n, a, lda, r, c, rowcnd, colcnd, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaqp2 "BLAS_FUNC(dlaqp2)"(int *m, int *n, int *offset, d *a, int *lda, int *jpvt, d *tau, d *vn1, d *vn2, d *work) nogil +cdef void dlaqp2(int *m, int *n, int *offset, d *a, int *lda, int *jpvt, d *tau, d *vn1, d *vn2, d *work) noexcept nogil: + + _fortran_dlaqp2(m, n, offset, a, lda, jpvt, tau, vn1, vn2, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaqps "BLAS_FUNC(dlaqps)"(int *m, int *n, int *offset, int *nb, int *kb, d *a, int *lda, int *jpvt, d *tau, d *vn1, d *vn2, d *auxv, d *f, int *ldf) nogil +cdef void dlaqps(int *m, int *n, int *offset, int *nb, int *kb, d *a, int *lda, int *jpvt, d *tau, d *vn1, d *vn2, d *auxv, d *f, int *ldf) noexcept nogil: + + _fortran_dlaqps(m, n, offset, nb, kb, a, lda, jpvt, tau, vn1, vn2, auxv, f, ldf) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaqr0 "BLAS_FUNC(dlaqr0)"(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *wr, d *wi, int *iloz, int *ihiz, d *z, int *ldz, d *work, int *lwork, int *info) nogil +cdef void dlaqr0(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *wr, d *wi, int *iloz, int *ihiz, d *z, int *ldz, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dlaqr0(wantt, wantz, n, ilo, ihi, h, ldh, wr, wi, iloz, ihiz, z, ldz, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaqr1 "BLAS_FUNC(dlaqr1)"(int *n, d *h, int *ldh, d *sr1, d *si1, d *sr2, d *si2, d *v) nogil +cdef void dlaqr1(int *n, d *h, int *ldh, d *sr1, d *si1, d *sr2, d *si2, d *v) noexcept nogil: + + _fortran_dlaqr1(n, h, ldh, sr1, si1, sr2, si2, v) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaqr2 "BLAS_FUNC(dlaqr2)"(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, d *h, int *ldh, int *iloz, int *ihiz, d *z, int *ldz, int *ns, int *nd, d *sr, d *si, d *v, int *ldv, int *nh, d *t, int *ldt, int *nv, d *wv, int *ldwv, d *work, int *lwork) nogil +cdef void dlaqr2(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, d *h, int *ldh, int *iloz, int *ihiz, d *z, int *ldz, int *ns, int *nd, d *sr, d *si, d *v, int *ldv, int *nh, d *t, int *ldt, int *nv, d *wv, int *ldwv, d *work, int *lwork) noexcept nogil: + + _fortran_dlaqr2(wantt, wantz, n, ktop, kbot, nw, h, ldh, iloz, ihiz, z, ldz, ns, nd, sr, si, v, ldv, nh, t, ldt, nv, wv, ldwv, work, lwork) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaqr3 "BLAS_FUNC(dlaqr3)"(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, d *h, int *ldh, int *iloz, int *ihiz, d *z, int *ldz, int *ns, int *nd, d *sr, d *si, d *v, int *ldv, int *nh, d *t, int *ldt, int *nv, d *wv, int *ldwv, d *work, int *lwork) nogil +cdef void dlaqr3(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, d *h, int *ldh, int *iloz, int *ihiz, d *z, int *ldz, int *ns, int *nd, d *sr, d *si, d *v, int *ldv, int *nh, d *t, int *ldt, int *nv, d *wv, int *ldwv, d *work, int *lwork) noexcept nogil: + + _fortran_dlaqr3(wantt, wantz, n, ktop, kbot, nw, h, ldh, iloz, ihiz, z, ldz, ns, nd, sr, si, v, ldv, nh, t, ldt, nv, wv, ldwv, work, lwork) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaqr4 "BLAS_FUNC(dlaqr4)"(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *wr, d *wi, int *iloz, int *ihiz, d *z, int *ldz, d *work, int *lwork, int *info) nogil +cdef void dlaqr4(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *wr, d *wi, int *iloz, int *ihiz, d *z, int *ldz, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dlaqr4(wantt, wantz, n, ilo, ihi, h, ldh, wr, wi, iloz, ihiz, z, ldz, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaqr5 "BLAS_FUNC(dlaqr5)"(bint *wantt, bint *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, d *sr, d *si, d *h, int *ldh, int *iloz, int *ihiz, d *z, int *ldz, d *v, int *ldv, d *u, int *ldu, int *nv, d *wv, int *ldwv, int *nh, d *wh, int *ldwh) nogil +cdef void dlaqr5(bint *wantt, bint *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, d *sr, d *si, d *h, int *ldh, int *iloz, int *ihiz, d *z, int *ldz, d *v, int *ldv, d *u, int *ldu, int *nv, d *wv, int *ldwv, int *nh, d *wh, int *ldwh) noexcept nogil: + + _fortran_dlaqr5(wantt, wantz, kacc22, n, ktop, kbot, nshfts, sr, si, h, ldh, iloz, ihiz, z, ldz, v, ldv, u, ldu, nv, wv, ldwv, nh, wh, ldwh) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaqsb "BLAS_FUNC(dlaqsb)"(char *uplo, int *n, int *kd, d *ab, int *ldab, d *s, d *scond, d *amax, char *equed) nogil +cdef void dlaqsb(char *uplo, int *n, int *kd, d *ab, int *ldab, d *s, d *scond, d *amax, char *equed) noexcept nogil: + + _fortran_dlaqsb(uplo, n, kd, ab, ldab, s, scond, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaqsp "BLAS_FUNC(dlaqsp)"(char *uplo, int *n, d *ap, d *s, d *scond, d *amax, char *equed) nogil +cdef void dlaqsp(char *uplo, int *n, d *ap, d *s, d *scond, d *amax, char *equed) noexcept nogil: + + _fortran_dlaqsp(uplo, n, ap, s, scond, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaqsy "BLAS_FUNC(dlaqsy)"(char *uplo, int *n, d *a, int *lda, d *s, d *scond, d *amax, char *equed) nogil +cdef void dlaqsy(char *uplo, int *n, d *a, int *lda, d *s, d *scond, d *amax, char *equed) noexcept nogil: + + _fortran_dlaqsy(uplo, n, a, lda, s, scond, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaqtr "BLAS_FUNC(dlaqtr)"(bint *ltran, bint *lreal, int *n, d *t, int *ldt, d *b, d *w, d *scale, d *x, d *work, int *info) nogil +cdef void dlaqtr(bint *ltran, bint *lreal, int *n, d *t, int *ldt, d *b, d *w, d *scale, d *x, d *work, int *info) noexcept nogil: + + _fortran_dlaqtr(ltran, lreal, n, t, ldt, b, w, scale, x, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlar1v "BLAS_FUNC(dlar1v)"(int *n, int *b1, int *bn, d *lambda_, d *d, d *l, d *ld, d *lld, d *pivmin, d *gaptol, d *z, bint *wantnc, int *negcnt, d *ztz, d *mingma, int *r, int *isuppz, d *nrminv, d *resid, d *rqcorr, d *work) nogil +cdef void dlar1v(int *n, int *b1, int *bn, d *lambda_, d *d, d *l, d *ld, d *lld, d *pivmin, d *gaptol, d *z, bint *wantnc, int *negcnt, d *ztz, d *mingma, int *r, int *isuppz, d *nrminv, d *resid, d *rqcorr, d *work) noexcept nogil: + + _fortran_dlar1v(n, b1, bn, lambda_, d, l, ld, lld, pivmin, gaptol, z, wantnc, negcnt, ztz, mingma, r, isuppz, nrminv, resid, rqcorr, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlar2v "BLAS_FUNC(dlar2v)"(int *n, d *x, d *y, d *z, int *incx, d *c, d *s, int *incc) nogil +cdef void dlar2v(int *n, d *x, d *y, d *z, int *incx, d *c, d *s, int *incc) noexcept nogil: + + _fortran_dlar2v(n, x, y, z, incx, c, s, incc) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlarf "BLAS_FUNC(dlarf)"(char *side, int *m, int *n, d *v, int *incv, d *tau, d *c, int *ldc, d *work) nogil +cdef void dlarf(char *side, int *m, int *n, d *v, int *incv, d *tau, d *c, int *ldc, d *work) noexcept nogil: + + _fortran_dlarf(side, m, n, v, incv, tau, c, ldc, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlarfb "BLAS_FUNC(dlarfb)"(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, d *v, int *ldv, d *t, int *ldt, d *c, int *ldc, d *work, int *ldwork) nogil +cdef void dlarfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, d *v, int *ldv, d *t, int *ldt, d *c, int *ldc, d *work, int *ldwork) noexcept nogil: + + _fortran_dlarfb(side, trans, direct, storev, m, n, k, v, ldv, t, ldt, c, ldc, work, ldwork) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlarfg "BLAS_FUNC(dlarfg)"(int *n, d *alpha, d *x, int *incx, d *tau) nogil +cdef void dlarfg(int *n, d *alpha, d *x, int *incx, d *tau) noexcept nogil: + + _fortran_dlarfg(n, alpha, x, incx, tau) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlarfgp "BLAS_FUNC(dlarfgp)"(int *n, d *alpha, d *x, int *incx, d *tau) nogil +cdef void dlarfgp(int *n, d *alpha, d *x, int *incx, d *tau) noexcept nogil: + + _fortran_dlarfgp(n, alpha, x, incx, tau) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlarft "BLAS_FUNC(dlarft)"(char *direct, char *storev, int *n, int *k, d *v, int *ldv, d *tau, d *t, int *ldt) nogil +cdef void dlarft(char *direct, char *storev, int *n, int *k, d *v, int *ldv, d *tau, d *t, int *ldt) noexcept nogil: + + _fortran_dlarft(direct, storev, n, k, v, ldv, tau, t, ldt) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlarfx "BLAS_FUNC(dlarfx)"(char *side, int *m, int *n, d *v, d *tau, d *c, int *ldc, d *work) nogil +cdef void dlarfx(char *side, int *m, int *n, d *v, d *tau, d *c, int *ldc, d *work) noexcept nogil: + + _fortran_dlarfx(side, m, n, v, tau, c, ldc, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlargv "BLAS_FUNC(dlargv)"(int *n, d *x, int *incx, d *y, int *incy, d *c, int *incc) nogil +cdef void dlargv(int *n, d *x, int *incx, d *y, int *incy, d *c, int *incc) noexcept nogil: + + _fortran_dlargv(n, x, incx, y, incy, c, incc) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlarnv "BLAS_FUNC(dlarnv)"(int *idist, int *iseed, int *n, d *x) nogil +cdef void dlarnv(int *idist, int *iseed, int *n, d *x) noexcept nogil: + + _fortran_dlarnv(idist, iseed, n, x) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlarra "BLAS_FUNC(dlarra)"(int *n, d *d, d *e, d *e2, d *spltol, d *tnrm, int *nsplit, int *isplit, int *info) nogil +cdef void dlarra(int *n, d *d, d *e, d *e2, d *spltol, d *tnrm, int *nsplit, int *isplit, int *info) noexcept nogil: + + _fortran_dlarra(n, d, e, e2, spltol, tnrm, nsplit, isplit, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlarrb "BLAS_FUNC(dlarrb)"(int *n, d *d, d *lld, int *ifirst, int *ilast, d *rtol1, d *rtol2, int *offset, d *w, d *wgap, d *werr, d *work, int *iwork, d *pivmin, d *spdiam, int *twist, int *info) nogil +cdef void dlarrb(int *n, d *d, d *lld, int *ifirst, int *ilast, d *rtol1, d *rtol2, int *offset, d *w, d *wgap, d *werr, d *work, int *iwork, d *pivmin, d *spdiam, int *twist, int *info) noexcept nogil: + + _fortran_dlarrb(n, d, lld, ifirst, ilast, rtol1, rtol2, offset, w, wgap, werr, work, iwork, pivmin, spdiam, twist, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlarrc "BLAS_FUNC(dlarrc)"(char *jobt, int *n, d *vl, d *vu, d *d, d *e, d *pivmin, int *eigcnt, int *lcnt, int *rcnt, int *info) nogil +cdef void dlarrc(char *jobt, int *n, d *vl, d *vu, d *d, d *e, d *pivmin, int *eigcnt, int *lcnt, int *rcnt, int *info) noexcept nogil: + + _fortran_dlarrc(jobt, n, vl, vu, d, e, pivmin, eigcnt, lcnt, rcnt, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlarrd "BLAS_FUNC(dlarrd)"(char *range, char *order, int *n, d *vl, d *vu, int *il, int *iu, d *gers, d *reltol, d *d, d *e, d *e2, d *pivmin, int *nsplit, int *isplit, int *m, d *w, d *werr, d *wl, d *wu, int *iblock, int *indexw, d *work, int *iwork, int *info) nogil +cdef void dlarrd(char *range, char *order, int *n, d *vl, d *vu, int *il, int *iu, d *gers, d *reltol, d *d, d *e, d *e2, d *pivmin, int *nsplit, int *isplit, int *m, d *w, d *werr, d *wl, d *wu, int *iblock, int *indexw, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dlarrd(range, order, n, vl, vu, il, iu, gers, reltol, d, e, e2, pivmin, nsplit, isplit, m, w, werr, wl, wu, iblock, indexw, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlarre "BLAS_FUNC(dlarre)"(char *range, int *n, d *vl, d *vu, int *il, int *iu, d *d, d *e, d *e2, d *rtol1, d *rtol2, d *spltol, int *nsplit, int *isplit, int *m, d *w, d *werr, d *wgap, int *iblock, int *indexw, d *gers, d *pivmin, d *work, int *iwork, int *info) nogil +cdef void dlarre(char *range, int *n, d *vl, d *vu, int *il, int *iu, d *d, d *e, d *e2, d *rtol1, d *rtol2, d *spltol, int *nsplit, int *isplit, int *m, d *w, d *werr, d *wgap, int *iblock, int *indexw, d *gers, d *pivmin, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dlarre(range, n, vl, vu, il, iu, d, e, e2, rtol1, rtol2, spltol, nsplit, isplit, m, w, werr, wgap, iblock, indexw, gers, pivmin, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlarrf "BLAS_FUNC(dlarrf)"(int *n, d *d, d *l, d *ld, int *clstrt, int *clend, d *w, d *wgap, d *werr, d *spdiam, d *clgapl, d *clgapr, d *pivmin, d *sigma, d *dplus, d *lplus, d *work, int *info) nogil +cdef void dlarrf(int *n, d *d, d *l, d *ld, int *clstrt, int *clend, d *w, d *wgap, d *werr, d *spdiam, d *clgapl, d *clgapr, d *pivmin, d *sigma, d *dplus, d *lplus, d *work, int *info) noexcept nogil: + + _fortran_dlarrf(n, d, l, ld, clstrt, clend, w, wgap, werr, spdiam, clgapl, clgapr, pivmin, sigma, dplus, lplus, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlarrj "BLAS_FUNC(dlarrj)"(int *n, d *d, d *e2, int *ifirst, int *ilast, d *rtol, int *offset, d *w, d *werr, d *work, int *iwork, d *pivmin, d *spdiam, int *info) nogil +cdef void dlarrj(int *n, d *d, d *e2, int *ifirst, int *ilast, d *rtol, int *offset, d *w, d *werr, d *work, int *iwork, d *pivmin, d *spdiam, int *info) noexcept nogil: + + _fortran_dlarrj(n, d, e2, ifirst, ilast, rtol, offset, w, werr, work, iwork, pivmin, spdiam, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlarrk "BLAS_FUNC(dlarrk)"(int *n, int *iw, d *gl, d *gu, d *d, d *e2, d *pivmin, d *reltol, d *w, d *werr, int *info) nogil +cdef void dlarrk(int *n, int *iw, d *gl, d *gu, d *d, d *e2, d *pivmin, d *reltol, d *w, d *werr, int *info) noexcept nogil: + + _fortran_dlarrk(n, iw, gl, gu, d, e2, pivmin, reltol, w, werr, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlarrr "BLAS_FUNC(dlarrr)"(int *n, d *d, d *e, int *info) nogil +cdef void dlarrr(int *n, d *d, d *e, int *info) noexcept nogil: + + _fortran_dlarrr(n, d, e, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlarrv "BLAS_FUNC(dlarrv)"(int *n, d *vl, d *vu, d *d, d *l, d *pivmin, int *isplit, int *m, int *dol, int *dou, d *minrgp, d *rtol1, d *rtol2, d *w, d *werr, d *wgap, int *iblock, int *indexw, d *gers, d *z, int *ldz, int *isuppz, d *work, int *iwork, int *info) nogil +cdef void dlarrv(int *n, d *vl, d *vu, d *d, d *l, d *pivmin, int *isplit, int *m, int *dol, int *dou, d *minrgp, d *rtol1, d *rtol2, d *w, d *werr, d *wgap, int *iblock, int *indexw, d *gers, d *z, int *ldz, int *isuppz, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dlarrv(n, vl, vu, d, l, pivmin, isplit, m, dol, dou, minrgp, rtol1, rtol2, w, werr, wgap, iblock, indexw, gers, z, ldz, isuppz, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlartg "BLAS_FUNC(dlartg)"(d *f, d *g, d *cs, d *sn, d *r) nogil +cdef void dlartg(d *f, d *g, d *cs, d *sn, d *r) noexcept nogil: + + _fortran_dlartg(f, g, cs, sn, r) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlartgp "BLAS_FUNC(dlartgp)"(d *f, d *g, d *cs, d *sn, d *r) nogil +cdef void dlartgp(d *f, d *g, d *cs, d *sn, d *r) noexcept nogil: + + _fortran_dlartgp(f, g, cs, sn, r) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlartgs "BLAS_FUNC(dlartgs)"(d *x, d *y, d *sigma, d *cs, d *sn) nogil +cdef void dlartgs(d *x, d *y, d *sigma, d *cs, d *sn) noexcept nogil: + + _fortran_dlartgs(x, y, sigma, cs, sn) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlartv "BLAS_FUNC(dlartv)"(int *n, d *x, int *incx, d *y, int *incy, d *c, d *s, int *incc) nogil +cdef void dlartv(int *n, d *x, int *incx, d *y, int *incy, d *c, d *s, int *incc) noexcept nogil: + + _fortran_dlartv(n, x, incx, y, incy, c, s, incc) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaruv "BLAS_FUNC(dlaruv)"(int *iseed, int *n, d *x) nogil +cdef void dlaruv(int *iseed, int *n, d *x) noexcept nogil: + + _fortran_dlaruv(iseed, n, x) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlarz "BLAS_FUNC(dlarz)"(char *side, int *m, int *n, int *l, d *v, int *incv, d *tau, d *c, int *ldc, d *work) nogil +cdef void dlarz(char *side, int *m, int *n, int *l, d *v, int *incv, d *tau, d *c, int *ldc, d *work) noexcept nogil: + + _fortran_dlarz(side, m, n, l, v, incv, tau, c, ldc, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlarzb "BLAS_FUNC(dlarzb)"(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, d *v, int *ldv, d *t, int *ldt, d *c, int *ldc, d *work, int *ldwork) nogil +cdef void dlarzb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, d *v, int *ldv, d *t, int *ldt, d *c, int *ldc, d *work, int *ldwork) noexcept nogil: + + _fortran_dlarzb(side, trans, direct, storev, m, n, k, l, v, ldv, t, ldt, c, ldc, work, ldwork) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlarzt "BLAS_FUNC(dlarzt)"(char *direct, char *storev, int *n, int *k, d *v, int *ldv, d *tau, d *t, int *ldt) nogil +cdef void dlarzt(char *direct, char *storev, int *n, int *k, d *v, int *ldv, d *tau, d *t, int *ldt) noexcept nogil: + + _fortran_dlarzt(direct, storev, n, k, v, ldv, tau, t, ldt) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlas2 "BLAS_FUNC(dlas2)"(d *f, d *g, d *h, d *ssmin, d *ssmax) nogil +cdef void dlas2(d *f, d *g, d *h, d *ssmin, d *ssmax) noexcept nogil: + + _fortran_dlas2(f, g, h, ssmin, ssmax) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlascl "BLAS_FUNC(dlascl)"(char *type_bn, int *kl, int *ku, d *cfrom, d *cto, int *m, int *n, d *a, int *lda, int *info) nogil +cdef void dlascl(char *type_bn, int *kl, int *ku, d *cfrom, d *cto, int *m, int *n, d *a, int *lda, int *info) noexcept nogil: + + _fortran_dlascl(type_bn, kl, ku, cfrom, cto, m, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlasd0 "BLAS_FUNC(dlasd0)"(int *n, int *sqre, d *d, d *e, d *u, int *ldu, d *vt, int *ldvt, int *smlsiz, int *iwork, d *work, int *info) nogil +cdef void dlasd0(int *n, int *sqre, d *d, d *e, d *u, int *ldu, d *vt, int *ldvt, int *smlsiz, int *iwork, d *work, int *info) noexcept nogil: + + _fortran_dlasd0(n, sqre, d, e, u, ldu, vt, ldvt, smlsiz, iwork, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlasd1 "BLAS_FUNC(dlasd1)"(int *nl, int *nr, int *sqre, d *d, d *alpha, d *beta, d *u, int *ldu, d *vt, int *ldvt, int *idxq, int *iwork, d *work, int *info) nogil +cdef void dlasd1(int *nl, int *nr, int *sqre, d *d, d *alpha, d *beta, d *u, int *ldu, d *vt, int *ldvt, int *idxq, int *iwork, d *work, int *info) noexcept nogil: + + _fortran_dlasd1(nl, nr, sqre, d, alpha, beta, u, ldu, vt, ldvt, idxq, iwork, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlasd2 "BLAS_FUNC(dlasd2)"(int *nl, int *nr, int *sqre, int *k, d *d, d *z, d *alpha, d *beta, d *u, int *ldu, d *vt, int *ldvt, d *dsigma, d *u2, int *ldu2, d *vt2, int *ldvt2, int *idxp, int *idx, int *idxc, int *idxq, int *coltyp, int *info) nogil +cdef void dlasd2(int *nl, int *nr, int *sqre, int *k, d *d, d *z, d *alpha, d *beta, d *u, int *ldu, d *vt, int *ldvt, d *dsigma, d *u2, int *ldu2, d *vt2, int *ldvt2, int *idxp, int *idx, int *idxc, int *idxq, int *coltyp, int *info) noexcept nogil: + + _fortran_dlasd2(nl, nr, sqre, k, d, z, alpha, beta, u, ldu, vt, ldvt, dsigma, u2, ldu2, vt2, ldvt2, idxp, idx, idxc, idxq, coltyp, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlasd3 "BLAS_FUNC(dlasd3)"(int *nl, int *nr, int *sqre, int *k, d *d, d *q, int *ldq, d *dsigma, d *u, int *ldu, d *u2, int *ldu2, d *vt, int *ldvt, d *vt2, int *ldvt2, int *idxc, int *ctot, d *z, int *info) nogil +cdef void dlasd3(int *nl, int *nr, int *sqre, int *k, d *d, d *q, int *ldq, d *dsigma, d *u, int *ldu, d *u2, int *ldu2, d *vt, int *ldvt, d *vt2, int *ldvt2, int *idxc, int *ctot, d *z, int *info) noexcept nogil: + + _fortran_dlasd3(nl, nr, sqre, k, d, q, ldq, dsigma, u, ldu, u2, ldu2, vt, ldvt, vt2, ldvt2, idxc, ctot, z, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlasd4 "BLAS_FUNC(dlasd4)"(int *n, int *i, d *d, d *z, d *delta, d *rho, d *sigma, d *work, int *info) nogil +cdef void dlasd4(int *n, int *i, d *d, d *z, d *delta, d *rho, d *sigma, d *work, int *info) noexcept nogil: + + _fortran_dlasd4(n, i, d, z, delta, rho, sigma, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlasd5 "BLAS_FUNC(dlasd5)"(int *i, d *d, d *z, d *delta, d *rho, d *dsigma, d *work) nogil +cdef void dlasd5(int *i, d *d, d *z, d *delta, d *rho, d *dsigma, d *work) noexcept nogil: + + _fortran_dlasd5(i, d, z, delta, rho, dsigma, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlasd6 "BLAS_FUNC(dlasd6)"(int *icompq, int *nl, int *nr, int *sqre, d *d, d *vf, d *vl, d *alpha, d *beta, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, d *givnum, int *ldgnum, d *poles, d *difl, d *difr, d *z, int *k, d *c, d *s, d *work, int *iwork, int *info) nogil +cdef void dlasd6(int *icompq, int *nl, int *nr, int *sqre, d *d, d *vf, d *vl, d *alpha, d *beta, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, d *givnum, int *ldgnum, d *poles, d *difl, d *difr, d *z, int *k, d *c, d *s, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dlasd6(icompq, nl, nr, sqre, d, vf, vl, alpha, beta, idxq, perm, givptr, givcol, ldgcol, givnum, ldgnum, poles, difl, difr, z, k, c, s, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlasd7 "BLAS_FUNC(dlasd7)"(int *icompq, int *nl, int *nr, int *sqre, int *k, d *d, d *z, d *zw, d *vf, d *vfw, d *vl, d *vlw, d *alpha, d *beta, d *dsigma, int *idx, int *idxp, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, d *givnum, int *ldgnum, d *c, d *s, int *info) nogil +cdef void dlasd7(int *icompq, int *nl, int *nr, int *sqre, int *k, d *d, d *z, d *zw, d *vf, d *vfw, d *vl, d *vlw, d *alpha, d *beta, d *dsigma, int *idx, int *idxp, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, d *givnum, int *ldgnum, d *c, d *s, int *info) noexcept nogil: + + _fortran_dlasd7(icompq, nl, nr, sqre, k, d, z, zw, vf, vfw, vl, vlw, alpha, beta, dsigma, idx, idxp, idxq, perm, givptr, givcol, ldgcol, givnum, ldgnum, c, s, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlasd8 "BLAS_FUNC(dlasd8)"(int *icompq, int *k, d *d, d *z, d *vf, d *vl, d *difl, d *difr, int *lddifr, d *dsigma, d *work, int *info) nogil +cdef void dlasd8(int *icompq, int *k, d *d, d *z, d *vf, d *vl, d *difl, d *difr, int *lddifr, d *dsigma, d *work, int *info) noexcept nogil: + + _fortran_dlasd8(icompq, k, d, z, vf, vl, difl, difr, lddifr, dsigma, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlasda "BLAS_FUNC(dlasda)"(int *icompq, int *smlsiz, int *n, int *sqre, d *d, d *e, d *u, int *ldu, d *vt, int *k, d *difl, d *difr, d *z, d *poles, int *givptr, int *givcol, int *ldgcol, int *perm, d *givnum, d *c, d *s, d *work, int *iwork, int *info) nogil +cdef void dlasda(int *icompq, int *smlsiz, int *n, int *sqre, d *d, d *e, d *u, int *ldu, d *vt, int *k, d *difl, d *difr, d *z, d *poles, int *givptr, int *givcol, int *ldgcol, int *perm, d *givnum, d *c, d *s, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dlasda(icompq, smlsiz, n, sqre, d, e, u, ldu, vt, k, difl, difr, z, poles, givptr, givcol, ldgcol, perm, givnum, c, s, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlasdq "BLAS_FUNC(dlasdq)"(char *uplo, int *sqre, int *n, int *ncvt, int *nru, int *ncc, d *d, d *e, d *vt, int *ldvt, d *u, int *ldu, d *c, int *ldc, d *work, int *info) nogil +cdef void dlasdq(char *uplo, int *sqre, int *n, int *ncvt, int *nru, int *ncc, d *d, d *e, d *vt, int *ldvt, d *u, int *ldu, d *c, int *ldc, d *work, int *info) noexcept nogil: + + _fortran_dlasdq(uplo, sqre, n, ncvt, nru, ncc, d, e, vt, ldvt, u, ldu, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlasdt "BLAS_FUNC(dlasdt)"(int *n, int *lvl, int *nd, int *inode, int *ndiml, int *ndimr, int *msub) nogil +cdef void dlasdt(int *n, int *lvl, int *nd, int *inode, int *ndiml, int *ndimr, int *msub) noexcept nogil: + + _fortran_dlasdt(n, lvl, nd, inode, ndiml, ndimr, msub) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaset "BLAS_FUNC(dlaset)"(char *uplo, int *m, int *n, d *alpha, d *beta, d *a, int *lda) nogil +cdef void dlaset(char *uplo, int *m, int *n, d *alpha, d *beta, d *a, int *lda) noexcept nogil: + + _fortran_dlaset(uplo, m, n, alpha, beta, a, lda) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlasq1 "BLAS_FUNC(dlasq1)"(int *n, d *d, d *e, d *work, int *info) nogil +cdef void dlasq1(int *n, d *d, d *e, d *work, int *info) noexcept nogil: + + _fortran_dlasq1(n, d, e, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlasq2 "BLAS_FUNC(dlasq2)"(int *n, d *z, int *info) nogil +cdef void dlasq2(int *n, d *z, int *info) noexcept nogil: + + _fortran_dlasq2(n, z, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlasq3 "BLAS_FUNC(dlasq3)"(int *i0, int *n0, d *z, int *pp, d *dmin, d *sigma, d *desig, d *qmax, int *nfail, int *iter, int *ndiv, bint *ieee, int *ttype, d *dmin1, d *dmin2, d *dn, d *dn1, d *dn2, d *g, d *tau) nogil +cdef void dlasq3(int *i0, int *n0, d *z, int *pp, d *dmin, d *sigma, d *desig, d *qmax, int *nfail, int *iter, int *ndiv, bint *ieee, int *ttype, d *dmin1, d *dmin2, d *dn, d *dn1, d *dn2, d *g, d *tau) noexcept nogil: + + _fortran_dlasq3(i0, n0, z, pp, dmin, sigma, desig, qmax, nfail, iter, ndiv, ieee, ttype, dmin1, dmin2, dn, dn1, dn2, g, tau) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlasq4 "BLAS_FUNC(dlasq4)"(int *i0, int *n0, d *z, int *pp, int *n0in, d *dmin, d *dmin1, d *dmin2, d *dn, d *dn1, d *dn2, d *tau, int *ttype, d *g) nogil +cdef void dlasq4(int *i0, int *n0, d *z, int *pp, int *n0in, d *dmin, d *dmin1, d *dmin2, d *dn, d *dn1, d *dn2, d *tau, int *ttype, d *g) noexcept nogil: + + _fortran_dlasq4(i0, n0, z, pp, n0in, dmin, dmin1, dmin2, dn, dn1, dn2, tau, ttype, g) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlasq6 "BLAS_FUNC(dlasq6)"(int *i0, int *n0, d *z, int *pp, d *dmin, d *dmin1, d *dmin2, d *dn, d *dnm1, d *dnm2) nogil +cdef void dlasq6(int *i0, int *n0, d *z, int *pp, d *dmin, d *dmin1, d *dmin2, d *dn, d *dnm1, d *dnm2) noexcept nogil: + + _fortran_dlasq6(i0, n0, z, pp, dmin, dmin1, dmin2, dn, dnm1, dnm2) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlasr "BLAS_FUNC(dlasr)"(char *side, char *pivot, char *direct, int *m, int *n, d *c, d *s, d *a, int *lda) nogil +cdef void dlasr(char *side, char *pivot, char *direct, int *m, int *n, d *c, d *s, d *a, int *lda) noexcept nogil: + + _fortran_dlasr(side, pivot, direct, m, n, c, s, a, lda) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlasrt "BLAS_FUNC(dlasrt)"(char *id, int *n, d *d, int *info) nogil +cdef void dlasrt(char *id, int *n, d *d, int *info) noexcept nogil: + + _fortran_dlasrt(id, n, d, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlassq "BLAS_FUNC(dlassq)"(int *n, d *x, int *incx, d *scale, d *sumsq) nogil +cdef void dlassq(int *n, d *x, int *incx, d *scale, d *sumsq) noexcept nogil: + + _fortran_dlassq(n, x, incx, scale, sumsq) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlasv2 "BLAS_FUNC(dlasv2)"(d *f, d *g, d *h, d *ssmin, d *ssmax, d *snr, d *csr, d *snl, d *csl) nogil +cdef void dlasv2(d *f, d *g, d *h, d *ssmin, d *ssmax, d *snr, d *csr, d *snl, d *csl) noexcept nogil: + + _fortran_dlasv2(f, g, h, ssmin, ssmax, snr, csr, snl, csl) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlaswp "BLAS_FUNC(dlaswp)"(int *n, d *a, int *lda, int *k1, int *k2, int *ipiv, int *incx) nogil +cdef void dlaswp(int *n, d *a, int *lda, int *k1, int *k2, int *ipiv, int *incx) noexcept nogil: + + _fortran_dlaswp(n, a, lda, k1, k2, ipiv, incx) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlasy2 "BLAS_FUNC(dlasy2)"(bint *ltranl, bint *ltranr, int *isgn, int *n1, int *n2, d *tl, int *ldtl, d *tr, int *ldtr, d *b, int *ldb, d *scale, d *x, int *ldx, d *xnorm, int *info) nogil +cdef void dlasy2(bint *ltranl, bint *ltranr, int *isgn, int *n1, int *n2, d *tl, int *ldtl, d *tr, int *ldtr, d *b, int *ldb, d *scale, d *x, int *ldx, d *xnorm, int *info) noexcept nogil: + + _fortran_dlasy2(ltranl, ltranr, isgn, n1, n2, tl, ldtl, tr, ldtr, b, ldb, scale, x, ldx, xnorm, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlasyf "BLAS_FUNC(dlasyf)"(char *uplo, int *n, int *nb, int *kb, d *a, int *lda, int *ipiv, d *w, int *ldw, int *info) nogil +cdef void dlasyf(char *uplo, int *n, int *nb, int *kb, d *a, int *lda, int *ipiv, d *w, int *ldw, int *info) noexcept nogil: + + _fortran_dlasyf(uplo, n, nb, kb, a, lda, ipiv, w, ldw, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlat2s "BLAS_FUNC(dlat2s)"(char *uplo, int *n, d *a, int *lda, s *sa, int *ldsa, int *info) nogil +cdef void dlat2s(char *uplo, int *n, d *a, int *lda, s *sa, int *ldsa, int *info) noexcept nogil: + + _fortran_dlat2s(uplo, n, a, lda, sa, ldsa, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlatbs "BLAS_FUNC(dlatbs)"(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, d *ab, int *ldab, d *x, d *scale, d *cnorm, int *info) nogil +cdef void dlatbs(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, d *ab, int *ldab, d *x, d *scale, d *cnorm, int *info) noexcept nogil: + + _fortran_dlatbs(uplo, trans, diag, normin, n, kd, ab, ldab, x, scale, cnorm, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlatdf "BLAS_FUNC(dlatdf)"(int *ijob, int *n, d *z, int *ldz, d *rhs, d *rdsum, d *rdscal, int *ipiv, int *jpiv) nogil +cdef void dlatdf(int *ijob, int *n, d *z, int *ldz, d *rhs, d *rdsum, d *rdscal, int *ipiv, int *jpiv) noexcept nogil: + + _fortran_dlatdf(ijob, n, z, ldz, rhs, rdsum, rdscal, ipiv, jpiv) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlatps "BLAS_FUNC(dlatps)"(char *uplo, char *trans, char *diag, char *normin, int *n, d *ap, d *x, d *scale, d *cnorm, int *info) nogil +cdef void dlatps(char *uplo, char *trans, char *diag, char *normin, int *n, d *ap, d *x, d *scale, d *cnorm, int *info) noexcept nogil: + + _fortran_dlatps(uplo, trans, diag, normin, n, ap, x, scale, cnorm, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlatrd "BLAS_FUNC(dlatrd)"(char *uplo, int *n, int *nb, d *a, int *lda, d *e, d *tau, d *w, int *ldw) nogil +cdef void dlatrd(char *uplo, int *n, int *nb, d *a, int *lda, d *e, d *tau, d *w, int *ldw) noexcept nogil: + + _fortran_dlatrd(uplo, n, nb, a, lda, e, tau, w, ldw) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlatrs "BLAS_FUNC(dlatrs)"(char *uplo, char *trans, char *diag, char *normin, int *n, d *a, int *lda, d *x, d *scale, d *cnorm, int *info) nogil +cdef void dlatrs(char *uplo, char *trans, char *diag, char *normin, int *n, d *a, int *lda, d *x, d *scale, d *cnorm, int *info) noexcept nogil: + + _fortran_dlatrs(uplo, trans, diag, normin, n, a, lda, x, scale, cnorm, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlatrz "BLAS_FUNC(dlatrz)"(int *m, int *n, int *l, d *a, int *lda, d *tau, d *work) nogil +cdef void dlatrz(int *m, int *n, int *l, d *a, int *lda, d *tau, d *work) noexcept nogil: + + _fortran_dlatrz(m, n, l, a, lda, tau, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlauu2 "BLAS_FUNC(dlauu2)"(char *uplo, int *n, d *a, int *lda, int *info) nogil +cdef void dlauu2(char *uplo, int *n, d *a, int *lda, int *info) noexcept nogil: + + _fortran_dlauu2(uplo, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dlauum "BLAS_FUNC(dlauum)"(char *uplo, int *n, d *a, int *lda, int *info) nogil +cdef void dlauum(char *uplo, int *n, d *a, int *lda, int *info) noexcept nogil: + + _fortran_dlauum(uplo, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dopgtr "BLAS_FUNC(dopgtr)"(char *uplo, int *n, d *ap, d *tau, d *q, int *ldq, d *work, int *info) nogil +cdef void dopgtr(char *uplo, int *n, d *ap, d *tau, d *q, int *ldq, d *work, int *info) noexcept nogil: + + _fortran_dopgtr(uplo, n, ap, tau, q, ldq, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dopmtr "BLAS_FUNC(dopmtr)"(char *side, char *uplo, char *trans, int *m, int *n, d *ap, d *tau, d *c, int *ldc, d *work, int *info) nogil +cdef void dopmtr(char *side, char *uplo, char *trans, int *m, int *n, d *ap, d *tau, d *c, int *ldc, d *work, int *info) noexcept nogil: + + _fortran_dopmtr(side, uplo, trans, m, n, ap, tau, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dorbdb "BLAS_FUNC(dorbdb)"(char *trans, char *signs, int *m, int *p, int *q, d *x11, int *ldx11, d *x12, int *ldx12, d *x21, int *ldx21, d *x22, int *ldx22, d *theta, d *phi, d *taup1, d *taup2, d *tauq1, d *tauq2, d *work, int *lwork, int *info) nogil +cdef void dorbdb(char *trans, char *signs, int *m, int *p, int *q, d *x11, int *ldx11, d *x12, int *ldx12, d *x21, int *ldx21, d *x22, int *ldx22, d *theta, d *phi, d *taup1, d *taup2, d *tauq1, d *tauq2, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dorbdb(trans, signs, m, p, q, x11, ldx11, x12, ldx12, x21, ldx21, x22, ldx22, theta, phi, taup1, taup2, tauq1, tauq2, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dorcsd "BLAS_FUNC(dorcsd)"(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, d *x11, int *ldx11, d *x12, int *ldx12, d *x21, int *ldx21, d *x22, int *ldx22, d *theta, d *u1, int *ldu1, d *u2, int *ldu2, d *v1t, int *ldv1t, d *v2t, int *ldv2t, d *work, int *lwork, int *iwork, int *info) nogil +cdef void dorcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, d *x11, int *ldx11, d *x12, int *ldx12, d *x21, int *ldx21, d *x22, int *ldx22, d *theta, d *u1, int *ldu1, d *u2, int *ldu2, d *v1t, int *ldv1t, d *v2t, int *ldv2t, d *work, int *lwork, int *iwork, int *info) noexcept nogil: + + _fortran_dorcsd(jobu1, jobu2, jobv1t, jobv2t, trans, signs, m, p, q, x11, ldx11, x12, ldx12, x21, ldx21, x22, ldx22, theta, u1, ldu1, u2, ldu2, v1t, ldv1t, v2t, ldv2t, work, lwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dorg2l "BLAS_FUNC(dorg2l)"(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *info) nogil +cdef void dorg2l(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil: + + _fortran_dorg2l(m, n, k, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dorg2r "BLAS_FUNC(dorg2r)"(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *info) nogil +cdef void dorg2r(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil: + + _fortran_dorg2r(m, n, k, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dorgbr "BLAS_FUNC(dorgbr)"(char *vect, int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil +cdef void dorgbr(char *vect, int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dorgbr(vect, m, n, k, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dorghr "BLAS_FUNC(dorghr)"(int *n, int *ilo, int *ihi, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil +cdef void dorghr(int *n, int *ilo, int *ihi, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dorghr(n, ilo, ihi, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dorgl2 "BLAS_FUNC(dorgl2)"(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *info) nogil +cdef void dorgl2(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil: + + _fortran_dorgl2(m, n, k, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dorglq "BLAS_FUNC(dorglq)"(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil +cdef void dorglq(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dorglq(m, n, k, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dorgql "BLAS_FUNC(dorgql)"(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil +cdef void dorgql(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dorgql(m, n, k, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dorgqr "BLAS_FUNC(dorgqr)"(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil +cdef void dorgqr(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dorgqr(m, n, k, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dorgr2 "BLAS_FUNC(dorgr2)"(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *info) nogil +cdef void dorgr2(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil: + + _fortran_dorgr2(m, n, k, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dorgrq "BLAS_FUNC(dorgrq)"(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil +cdef void dorgrq(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dorgrq(m, n, k, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dorgtr "BLAS_FUNC(dorgtr)"(char *uplo, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil +cdef void dorgtr(char *uplo, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dorgtr(uplo, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dorm2l "BLAS_FUNC(dorm2l)"(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) nogil +cdef void dorm2l(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) noexcept nogil: + + _fortran_dorm2l(side, trans, m, n, k, a, lda, tau, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dorm2r "BLAS_FUNC(dorm2r)"(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) nogil +cdef void dorm2r(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) noexcept nogil: + + _fortran_dorm2r(side, trans, m, n, k, a, lda, tau, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dormbr "BLAS_FUNC(dormbr)"(char *vect, char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) nogil +cdef void dormbr(char *vect, char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dormbr(vect, side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dormhr "BLAS_FUNC(dormhr)"(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) nogil +cdef void dormhr(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dormhr(side, trans, m, n, ilo, ihi, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dorml2 "BLAS_FUNC(dorml2)"(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) nogil +cdef void dorml2(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) noexcept nogil: + + _fortran_dorml2(side, trans, m, n, k, a, lda, tau, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dormlq "BLAS_FUNC(dormlq)"(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) nogil +cdef void dormlq(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dormlq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dormql "BLAS_FUNC(dormql)"(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) nogil +cdef void dormql(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dormql(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dormqr "BLAS_FUNC(dormqr)"(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) nogil +cdef void dormqr(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dormqr(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dormr2 "BLAS_FUNC(dormr2)"(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) nogil +cdef void dormr2(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) noexcept nogil: + + _fortran_dormr2(side, trans, m, n, k, a, lda, tau, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dormr3 "BLAS_FUNC(dormr3)"(char *side, char *trans, int *m, int *n, int *k, int *l, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) nogil +cdef void dormr3(char *side, char *trans, int *m, int *n, int *k, int *l, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) noexcept nogil: + + _fortran_dormr3(side, trans, m, n, k, l, a, lda, tau, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dormrq "BLAS_FUNC(dormrq)"(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) nogil +cdef void dormrq(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dormrq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dormrz "BLAS_FUNC(dormrz)"(char *side, char *trans, int *m, int *n, int *k, int *l, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) nogil +cdef void dormrz(char *side, char *trans, int *m, int *n, int *k, int *l, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dormrz(side, trans, m, n, k, l, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dormtr "BLAS_FUNC(dormtr)"(char *side, char *uplo, char *trans, int *m, int *n, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) nogil +cdef void dormtr(char *side, char *uplo, char *trans, int *m, int *n, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dormtr(side, uplo, trans, m, n, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpbcon "BLAS_FUNC(dpbcon)"(char *uplo, int *n, int *kd, d *ab, int *ldab, d *anorm, d *rcond, d *work, int *iwork, int *info) nogil +cdef void dpbcon(char *uplo, int *n, int *kd, d *ab, int *ldab, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dpbcon(uplo, n, kd, ab, ldab, anorm, rcond, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpbequ "BLAS_FUNC(dpbequ)"(char *uplo, int *n, int *kd, d *ab, int *ldab, d *s, d *scond, d *amax, int *info) nogil +cdef void dpbequ(char *uplo, int *n, int *kd, d *ab, int *ldab, d *s, d *scond, d *amax, int *info) noexcept nogil: + + _fortran_dpbequ(uplo, n, kd, ab, ldab, s, scond, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpbrfs "BLAS_FUNC(dpbrfs)"(char *uplo, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *afb, int *ldafb, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) nogil +cdef void dpbrfs(char *uplo, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *afb, int *ldafb, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dpbrfs(uplo, n, kd, nrhs, ab, ldab, afb, ldafb, b, ldb, x, ldx, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpbstf "BLAS_FUNC(dpbstf)"(char *uplo, int *n, int *kd, d *ab, int *ldab, int *info) nogil +cdef void dpbstf(char *uplo, int *n, int *kd, d *ab, int *ldab, int *info) noexcept nogil: + + _fortran_dpbstf(uplo, n, kd, ab, ldab, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpbsv "BLAS_FUNC(dpbsv)"(char *uplo, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *b, int *ldb, int *info) nogil +cdef void dpbsv(char *uplo, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *b, int *ldb, int *info) noexcept nogil: + + _fortran_dpbsv(uplo, n, kd, nrhs, ab, ldab, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpbsvx "BLAS_FUNC(dpbsvx)"(char *fact, char *uplo, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *afb, int *ldafb, char *equed, d *s, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) nogil +cdef void dpbsvx(char *fact, char *uplo, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *afb, int *ldafb, char *equed, d *s, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dpbsvx(fact, uplo, n, kd, nrhs, ab, ldab, afb, ldafb, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpbtf2 "BLAS_FUNC(dpbtf2)"(char *uplo, int *n, int *kd, d *ab, int *ldab, int *info) nogil +cdef void dpbtf2(char *uplo, int *n, int *kd, d *ab, int *ldab, int *info) noexcept nogil: + + _fortran_dpbtf2(uplo, n, kd, ab, ldab, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpbtrf "BLAS_FUNC(dpbtrf)"(char *uplo, int *n, int *kd, d *ab, int *ldab, int *info) nogil +cdef void dpbtrf(char *uplo, int *n, int *kd, d *ab, int *ldab, int *info) noexcept nogil: + + _fortran_dpbtrf(uplo, n, kd, ab, ldab, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpbtrs "BLAS_FUNC(dpbtrs)"(char *uplo, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *b, int *ldb, int *info) nogil +cdef void dpbtrs(char *uplo, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *b, int *ldb, int *info) noexcept nogil: + + _fortran_dpbtrs(uplo, n, kd, nrhs, ab, ldab, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpftrf "BLAS_FUNC(dpftrf)"(char *transr, char *uplo, int *n, d *a, int *info) nogil +cdef void dpftrf(char *transr, char *uplo, int *n, d *a, int *info) noexcept nogil: + + _fortran_dpftrf(transr, uplo, n, a, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpftri "BLAS_FUNC(dpftri)"(char *transr, char *uplo, int *n, d *a, int *info) nogil +cdef void dpftri(char *transr, char *uplo, int *n, d *a, int *info) noexcept nogil: + + _fortran_dpftri(transr, uplo, n, a, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpftrs "BLAS_FUNC(dpftrs)"(char *transr, char *uplo, int *n, int *nrhs, d *a, d *b, int *ldb, int *info) nogil +cdef void dpftrs(char *transr, char *uplo, int *n, int *nrhs, d *a, d *b, int *ldb, int *info) noexcept nogil: + + _fortran_dpftrs(transr, uplo, n, nrhs, a, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpocon "BLAS_FUNC(dpocon)"(char *uplo, int *n, d *a, int *lda, d *anorm, d *rcond, d *work, int *iwork, int *info) nogil +cdef void dpocon(char *uplo, int *n, d *a, int *lda, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dpocon(uplo, n, a, lda, anorm, rcond, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpoequ "BLAS_FUNC(dpoequ)"(int *n, d *a, int *lda, d *s, d *scond, d *amax, int *info) nogil +cdef void dpoequ(int *n, d *a, int *lda, d *s, d *scond, d *amax, int *info) noexcept nogil: + + _fortran_dpoequ(n, a, lda, s, scond, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpoequb "BLAS_FUNC(dpoequb)"(int *n, d *a, int *lda, d *s, d *scond, d *amax, int *info) nogil +cdef void dpoequb(int *n, d *a, int *lda, d *s, d *scond, d *amax, int *info) noexcept nogil: + + _fortran_dpoequb(n, a, lda, s, scond, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dporfs "BLAS_FUNC(dporfs)"(char *uplo, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) nogil +cdef void dporfs(char *uplo, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dporfs(uplo, n, nrhs, a, lda, af, ldaf, b, ldb, x, ldx, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dposv "BLAS_FUNC(dposv)"(char *uplo, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, int *info) nogil +cdef void dposv(char *uplo, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, int *info) noexcept nogil: + + _fortran_dposv(uplo, n, nrhs, a, lda, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dposvx "BLAS_FUNC(dposvx)"(char *fact, char *uplo, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, char *equed, d *s, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) nogil +cdef void dposvx(char *fact, char *uplo, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, char *equed, d *s, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dposvx(fact, uplo, n, nrhs, a, lda, af, ldaf, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpotf2 "BLAS_FUNC(dpotf2)"(char *uplo, int *n, d *a, int *lda, int *info) nogil +cdef void dpotf2(char *uplo, int *n, d *a, int *lda, int *info) noexcept nogil: + + _fortran_dpotf2(uplo, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpotrf "BLAS_FUNC(dpotrf)"(char *uplo, int *n, d *a, int *lda, int *info) nogil +cdef void dpotrf(char *uplo, int *n, d *a, int *lda, int *info) noexcept nogil: + + _fortran_dpotrf(uplo, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpotri "BLAS_FUNC(dpotri)"(char *uplo, int *n, d *a, int *lda, int *info) nogil +cdef void dpotri(char *uplo, int *n, d *a, int *lda, int *info) noexcept nogil: + + _fortran_dpotri(uplo, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpotrs "BLAS_FUNC(dpotrs)"(char *uplo, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, int *info) nogil +cdef void dpotrs(char *uplo, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, int *info) noexcept nogil: + + _fortran_dpotrs(uplo, n, nrhs, a, lda, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dppcon "BLAS_FUNC(dppcon)"(char *uplo, int *n, d *ap, d *anorm, d *rcond, d *work, int *iwork, int *info) nogil +cdef void dppcon(char *uplo, int *n, d *ap, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dppcon(uplo, n, ap, anorm, rcond, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dppequ "BLAS_FUNC(dppequ)"(char *uplo, int *n, d *ap, d *s, d *scond, d *amax, int *info) nogil +cdef void dppequ(char *uplo, int *n, d *ap, d *s, d *scond, d *amax, int *info) noexcept nogil: + + _fortran_dppequ(uplo, n, ap, s, scond, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpprfs "BLAS_FUNC(dpprfs)"(char *uplo, int *n, int *nrhs, d *ap, d *afp, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) nogil +cdef void dpprfs(char *uplo, int *n, int *nrhs, d *ap, d *afp, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dpprfs(uplo, n, nrhs, ap, afp, b, ldb, x, ldx, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dppsv "BLAS_FUNC(dppsv)"(char *uplo, int *n, int *nrhs, d *ap, d *b, int *ldb, int *info) nogil +cdef void dppsv(char *uplo, int *n, int *nrhs, d *ap, d *b, int *ldb, int *info) noexcept nogil: + + _fortran_dppsv(uplo, n, nrhs, ap, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dppsvx "BLAS_FUNC(dppsvx)"(char *fact, char *uplo, int *n, int *nrhs, d *ap, d *afp, char *equed, d *s, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) nogil +cdef void dppsvx(char *fact, char *uplo, int *n, int *nrhs, d *ap, d *afp, char *equed, d *s, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dppsvx(fact, uplo, n, nrhs, ap, afp, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpptrf "BLAS_FUNC(dpptrf)"(char *uplo, int *n, d *ap, int *info) nogil +cdef void dpptrf(char *uplo, int *n, d *ap, int *info) noexcept nogil: + + _fortran_dpptrf(uplo, n, ap, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpptri "BLAS_FUNC(dpptri)"(char *uplo, int *n, d *ap, int *info) nogil +cdef void dpptri(char *uplo, int *n, d *ap, int *info) noexcept nogil: + + _fortran_dpptri(uplo, n, ap, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpptrs "BLAS_FUNC(dpptrs)"(char *uplo, int *n, int *nrhs, d *ap, d *b, int *ldb, int *info) nogil +cdef void dpptrs(char *uplo, int *n, int *nrhs, d *ap, d *b, int *ldb, int *info) noexcept nogil: + + _fortran_dpptrs(uplo, n, nrhs, ap, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpstf2 "BLAS_FUNC(dpstf2)"(char *uplo, int *n, d *a, int *lda, int *piv, int *rank, d *tol, d *work, int *info) nogil +cdef void dpstf2(char *uplo, int *n, d *a, int *lda, int *piv, int *rank, d *tol, d *work, int *info) noexcept nogil: + + _fortran_dpstf2(uplo, n, a, lda, piv, rank, tol, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpstrf "BLAS_FUNC(dpstrf)"(char *uplo, int *n, d *a, int *lda, int *piv, int *rank, d *tol, d *work, int *info) nogil +cdef void dpstrf(char *uplo, int *n, d *a, int *lda, int *piv, int *rank, d *tol, d *work, int *info) noexcept nogil: + + _fortran_dpstrf(uplo, n, a, lda, piv, rank, tol, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dptcon "BLAS_FUNC(dptcon)"(int *n, d *d, d *e, d *anorm, d *rcond, d *work, int *info) nogil +cdef void dptcon(int *n, d *d, d *e, d *anorm, d *rcond, d *work, int *info) noexcept nogil: + + _fortran_dptcon(n, d, e, anorm, rcond, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpteqr "BLAS_FUNC(dpteqr)"(char *compz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *info) nogil +cdef void dpteqr(char *compz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *info) noexcept nogil: + + _fortran_dpteqr(compz, n, d, e, z, ldz, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dptrfs "BLAS_FUNC(dptrfs)"(int *n, int *nrhs, d *d, d *e, d *df, d *ef, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *info) nogil +cdef void dptrfs(int *n, int *nrhs, d *d, d *e, d *df, d *ef, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *info) noexcept nogil: + + _fortran_dptrfs(n, nrhs, d, e, df, ef, b, ldb, x, ldx, ferr, berr, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dptsv "BLAS_FUNC(dptsv)"(int *n, int *nrhs, d *d, d *e, d *b, int *ldb, int *info) nogil +cdef void dptsv(int *n, int *nrhs, d *d, d *e, d *b, int *ldb, int *info) noexcept nogil: + + _fortran_dptsv(n, nrhs, d, e, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dptsvx "BLAS_FUNC(dptsvx)"(char *fact, int *n, int *nrhs, d *d, d *e, d *df, d *ef, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *info) nogil +cdef void dptsvx(char *fact, int *n, int *nrhs, d *d, d *e, d *df, d *ef, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *info) noexcept nogil: + + _fortran_dptsvx(fact, n, nrhs, d, e, df, ef, b, ldb, x, ldx, rcond, ferr, berr, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpttrf "BLAS_FUNC(dpttrf)"(int *n, d *d, d *e, int *info) nogil +cdef void dpttrf(int *n, d *d, d *e, int *info) noexcept nogil: + + _fortran_dpttrf(n, d, e, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dpttrs "BLAS_FUNC(dpttrs)"(int *n, int *nrhs, d *d, d *e, d *b, int *ldb, int *info) nogil +cdef void dpttrs(int *n, int *nrhs, d *d, d *e, d *b, int *ldb, int *info) noexcept nogil: + + _fortran_dpttrs(n, nrhs, d, e, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dptts2 "BLAS_FUNC(dptts2)"(int *n, int *nrhs, d *d, d *e, d *b, int *ldb) nogil +cdef void dptts2(int *n, int *nrhs, d *d, d *e, d *b, int *ldb) noexcept nogil: + + _fortran_dptts2(n, nrhs, d, e, b, ldb) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_drscl "BLAS_FUNC(drscl)"(int *n, d *sa, d *sx, int *incx) nogil +cdef void drscl(int *n, d *sa, d *sx, int *incx) noexcept nogil: + + _fortran_drscl(n, sa, sx, incx) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsbev "BLAS_FUNC(dsbev)"(char *jobz, char *uplo, int *n, int *kd, d *ab, int *ldab, d *w, d *z, int *ldz, d *work, int *info) nogil +cdef void dsbev(char *jobz, char *uplo, int *n, int *kd, d *ab, int *ldab, d *w, d *z, int *ldz, d *work, int *info) noexcept nogil: + + _fortran_dsbev(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsbevd "BLAS_FUNC(dsbevd)"(char *jobz, char *uplo, int *n, int *kd, d *ab, int *ldab, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void dsbevd(char *jobz, char *uplo, int *n, int *kd, d *ab, int *ldab, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_dsbevd(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsbevx "BLAS_FUNC(dsbevx)"(char *jobz, char *range, char *uplo, int *n, int *kd, d *ab, int *ldab, d *q, int *ldq, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) nogil +cdef void dsbevx(char *jobz, char *range, char *uplo, int *n, int *kd, d *ab, int *ldab, d *q, int *ldq, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_dsbevx(jobz, range, uplo, n, kd, ab, ldab, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsbgst "BLAS_FUNC(dsbgst)"(char *vect, char *uplo, int *n, int *ka, int *kb, d *ab, int *ldab, d *bb, int *ldbb, d *x, int *ldx, d *work, int *info) nogil +cdef void dsbgst(char *vect, char *uplo, int *n, int *ka, int *kb, d *ab, int *ldab, d *bb, int *ldbb, d *x, int *ldx, d *work, int *info) noexcept nogil: + + _fortran_dsbgst(vect, uplo, n, ka, kb, ab, ldab, bb, ldbb, x, ldx, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsbgv "BLAS_FUNC(dsbgv)"(char *jobz, char *uplo, int *n, int *ka, int *kb, d *ab, int *ldab, d *bb, int *ldbb, d *w, d *z, int *ldz, d *work, int *info) nogil +cdef void dsbgv(char *jobz, char *uplo, int *n, int *ka, int *kb, d *ab, int *ldab, d *bb, int *ldbb, d *w, d *z, int *ldz, d *work, int *info) noexcept nogil: + + _fortran_dsbgv(jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, w, z, ldz, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsbgvd "BLAS_FUNC(dsbgvd)"(char *jobz, char *uplo, int *n, int *ka, int *kb, d *ab, int *ldab, d *bb, int *ldbb, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void dsbgvd(char *jobz, char *uplo, int *n, int *ka, int *kb, d *ab, int *ldab, d *bb, int *ldbb, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_dsbgvd(jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, w, z, ldz, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsbgvx "BLAS_FUNC(dsbgvx)"(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, d *ab, int *ldab, d *bb, int *ldbb, d *q, int *ldq, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) nogil +cdef void dsbgvx(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, d *ab, int *ldab, d *bb, int *ldbb, d *q, int *ldq, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_dsbgvx(jobz, range, uplo, n, ka, kb, ab, ldab, bb, ldbb, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsbtrd "BLAS_FUNC(dsbtrd)"(char *vect, char *uplo, int *n, int *kd, d *ab, int *ldab, d *d, d *e, d *q, int *ldq, d *work, int *info) nogil +cdef void dsbtrd(char *vect, char *uplo, int *n, int *kd, d *ab, int *ldab, d *d, d *e, d *q, int *ldq, d *work, int *info) noexcept nogil: + + _fortran_dsbtrd(vect, uplo, n, kd, ab, ldab, d, e, q, ldq, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsfrk "BLAS_FUNC(dsfrk)"(char *transr, char *uplo, char *trans, int *n, int *k, d *alpha, d *a, int *lda, d *beta, d *c) nogil +cdef void dsfrk(char *transr, char *uplo, char *trans, int *n, int *k, d *alpha, d *a, int *lda, d *beta, d *c) noexcept nogil: + + _fortran_dsfrk(transr, uplo, trans, n, k, alpha, a, lda, beta, c) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsgesv "BLAS_FUNC(dsgesv)"(int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *work, s *swork, int *iter, int *info) nogil +cdef void dsgesv(int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *work, s *swork, int *iter, int *info) noexcept nogil: + + _fortran_dsgesv(n, nrhs, a, lda, ipiv, b, ldb, x, ldx, work, swork, iter, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dspcon "BLAS_FUNC(dspcon)"(char *uplo, int *n, d *ap, int *ipiv, d *anorm, d *rcond, d *work, int *iwork, int *info) nogil +cdef void dspcon(char *uplo, int *n, d *ap, int *ipiv, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dspcon(uplo, n, ap, ipiv, anorm, rcond, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dspev "BLAS_FUNC(dspev)"(char *jobz, char *uplo, int *n, d *ap, d *w, d *z, int *ldz, d *work, int *info) nogil +cdef void dspev(char *jobz, char *uplo, int *n, d *ap, d *w, d *z, int *ldz, d *work, int *info) noexcept nogil: + + _fortran_dspev(jobz, uplo, n, ap, w, z, ldz, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dspevd "BLAS_FUNC(dspevd)"(char *jobz, char *uplo, int *n, d *ap, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void dspevd(char *jobz, char *uplo, int *n, d *ap, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_dspevd(jobz, uplo, n, ap, w, z, ldz, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dspevx "BLAS_FUNC(dspevx)"(char *jobz, char *range, char *uplo, int *n, d *ap, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) nogil +cdef void dspevx(char *jobz, char *range, char *uplo, int *n, d *ap, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_dspevx(jobz, range, uplo, n, ap, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dspgst "BLAS_FUNC(dspgst)"(int *itype, char *uplo, int *n, d *ap, d *bp, int *info) nogil +cdef void dspgst(int *itype, char *uplo, int *n, d *ap, d *bp, int *info) noexcept nogil: + + _fortran_dspgst(itype, uplo, n, ap, bp, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dspgv "BLAS_FUNC(dspgv)"(int *itype, char *jobz, char *uplo, int *n, d *ap, d *bp, d *w, d *z, int *ldz, d *work, int *info) nogil +cdef void dspgv(int *itype, char *jobz, char *uplo, int *n, d *ap, d *bp, d *w, d *z, int *ldz, d *work, int *info) noexcept nogil: + + _fortran_dspgv(itype, jobz, uplo, n, ap, bp, w, z, ldz, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dspgvd "BLAS_FUNC(dspgvd)"(int *itype, char *jobz, char *uplo, int *n, d *ap, d *bp, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void dspgvd(int *itype, char *jobz, char *uplo, int *n, d *ap, d *bp, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_dspgvd(itype, jobz, uplo, n, ap, bp, w, z, ldz, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dspgvx "BLAS_FUNC(dspgvx)"(int *itype, char *jobz, char *range, char *uplo, int *n, d *ap, d *bp, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) nogil +cdef void dspgvx(int *itype, char *jobz, char *range, char *uplo, int *n, d *ap, d *bp, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_dspgvx(itype, jobz, range, uplo, n, ap, bp, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsposv "BLAS_FUNC(dsposv)"(char *uplo, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *x, int *ldx, d *work, s *swork, int *iter, int *info) nogil +cdef void dsposv(char *uplo, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *x, int *ldx, d *work, s *swork, int *iter, int *info) noexcept nogil: + + _fortran_dsposv(uplo, n, nrhs, a, lda, b, ldb, x, ldx, work, swork, iter, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsprfs "BLAS_FUNC(dsprfs)"(char *uplo, int *n, int *nrhs, d *ap, d *afp, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) nogil +cdef void dsprfs(char *uplo, int *n, int *nrhs, d *ap, d *afp, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dsprfs(uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dspsv "BLAS_FUNC(dspsv)"(char *uplo, int *n, int *nrhs, d *ap, int *ipiv, d *b, int *ldb, int *info) nogil +cdef void dspsv(char *uplo, int *n, int *nrhs, d *ap, int *ipiv, d *b, int *ldb, int *info) noexcept nogil: + + _fortran_dspsv(uplo, n, nrhs, ap, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dspsvx "BLAS_FUNC(dspsvx)"(char *fact, char *uplo, int *n, int *nrhs, d *ap, d *afp, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) nogil +cdef void dspsvx(char *fact, char *uplo, int *n, int *nrhs, d *ap, d *afp, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dspsvx(fact, uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsptrd "BLAS_FUNC(dsptrd)"(char *uplo, int *n, d *ap, d *d, d *e, d *tau, int *info) nogil +cdef void dsptrd(char *uplo, int *n, d *ap, d *d, d *e, d *tau, int *info) noexcept nogil: + + _fortran_dsptrd(uplo, n, ap, d, e, tau, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsptrf "BLAS_FUNC(dsptrf)"(char *uplo, int *n, d *ap, int *ipiv, int *info) nogil +cdef void dsptrf(char *uplo, int *n, d *ap, int *ipiv, int *info) noexcept nogil: + + _fortran_dsptrf(uplo, n, ap, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsptri "BLAS_FUNC(dsptri)"(char *uplo, int *n, d *ap, int *ipiv, d *work, int *info) nogil +cdef void dsptri(char *uplo, int *n, d *ap, int *ipiv, d *work, int *info) noexcept nogil: + + _fortran_dsptri(uplo, n, ap, ipiv, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsptrs "BLAS_FUNC(dsptrs)"(char *uplo, int *n, int *nrhs, d *ap, int *ipiv, d *b, int *ldb, int *info) nogil +cdef void dsptrs(char *uplo, int *n, int *nrhs, d *ap, int *ipiv, d *b, int *ldb, int *info) noexcept nogil: + + _fortran_dsptrs(uplo, n, nrhs, ap, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dstebz "BLAS_FUNC(dstebz)"(char *range, char *order, int *n, d *vl, d *vu, int *il, int *iu, d *abstol, d *d, d *e, int *m, int *nsplit, d *w, int *iblock, int *isplit, d *work, int *iwork, int *info) nogil +cdef void dstebz(char *range, char *order, int *n, d *vl, d *vu, int *il, int *iu, d *abstol, d *d, d *e, int *m, int *nsplit, d *w, int *iblock, int *isplit, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dstebz(range, order, n, vl, vu, il, iu, abstol, d, e, m, nsplit, w, iblock, isplit, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dstedc "BLAS_FUNC(dstedc)"(char *compz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void dstedc(char *compz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_dstedc(compz, n, d, e, z, ldz, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dstegr "BLAS_FUNC(dstegr)"(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, int *isuppz, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void dstegr(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, int *isuppz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_dstegr(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dstein "BLAS_FUNC(dstein)"(int *n, d *d, d *e, int *m, d *w, int *iblock, int *isplit, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) nogil +cdef void dstein(int *n, d *d, d *e, int *m, d *w, int *iblock, int *isplit, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_dstein(n, d, e, m, w, iblock, isplit, z, ldz, work, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dstemr "BLAS_FUNC(dstemr)"(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, int *m, d *w, d *z, int *ldz, int *nzc, int *isuppz, bint *tryrac, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void dstemr(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, int *m, d *w, d *z, int *ldz, int *nzc, int *isuppz, bint *tryrac, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_dstemr(jobz, range, n, d, e, vl, vu, il, iu, m, w, z, ldz, nzc, isuppz, tryrac, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsteqr "BLAS_FUNC(dsteqr)"(char *compz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *info) nogil +cdef void dsteqr(char *compz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *info) noexcept nogil: + + _fortran_dsteqr(compz, n, d, e, z, ldz, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsterf "BLAS_FUNC(dsterf)"(int *n, d *d, d *e, int *info) nogil +cdef void dsterf(int *n, d *d, d *e, int *info) noexcept nogil: + + _fortran_dsterf(n, d, e, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dstev "BLAS_FUNC(dstev)"(char *jobz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *info) nogil +cdef void dstev(char *jobz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *info) noexcept nogil: + + _fortran_dstev(jobz, n, d, e, z, ldz, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dstevd "BLAS_FUNC(dstevd)"(char *jobz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void dstevd(char *jobz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_dstevd(jobz, n, d, e, z, ldz, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dstevr "BLAS_FUNC(dstevr)"(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, int *isuppz, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void dstevr(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, int *isuppz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_dstevr(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dstevx "BLAS_FUNC(dstevx)"(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) nogil +cdef void dstevx(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_dstevx(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsycon "BLAS_FUNC(dsycon)"(char *uplo, int *n, d *a, int *lda, int *ipiv, d *anorm, d *rcond, d *work, int *iwork, int *info) nogil +cdef void dsycon(char *uplo, int *n, d *a, int *lda, int *ipiv, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dsycon(uplo, n, a, lda, ipiv, anorm, rcond, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsyconv "BLAS_FUNC(dsyconv)"(char *uplo, char *way, int *n, d *a, int *lda, int *ipiv, d *work, int *info) nogil +cdef void dsyconv(char *uplo, char *way, int *n, d *a, int *lda, int *ipiv, d *work, int *info) noexcept nogil: + + _fortran_dsyconv(uplo, way, n, a, lda, ipiv, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsyequb "BLAS_FUNC(dsyequb)"(char *uplo, int *n, d *a, int *lda, d *s, d *scond, d *amax, d *work, int *info) nogil +cdef void dsyequb(char *uplo, int *n, d *a, int *lda, d *s, d *scond, d *amax, d *work, int *info) noexcept nogil: + + _fortran_dsyequb(uplo, n, a, lda, s, scond, amax, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsyev "BLAS_FUNC(dsyev)"(char *jobz, char *uplo, int *n, d *a, int *lda, d *w, d *work, int *lwork, int *info) nogil +cdef void dsyev(char *jobz, char *uplo, int *n, d *a, int *lda, d *w, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dsyev(jobz, uplo, n, a, lda, w, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsyevd "BLAS_FUNC(dsyevd)"(char *jobz, char *uplo, int *n, d *a, int *lda, d *w, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void dsyevd(char *jobz, char *uplo, int *n, d *a, int *lda, d *w, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_dsyevd(jobz, uplo, n, a, lda, w, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsyevr "BLAS_FUNC(dsyevr)"(char *jobz, char *range, char *uplo, int *n, d *a, int *lda, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, int *isuppz, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void dsyevr(char *jobz, char *range, char *uplo, int *n, d *a, int *lda, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, int *isuppz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_dsyevr(jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsyevx "BLAS_FUNC(dsyevx)"(char *jobz, char *range, char *uplo, int *n, d *a, int *lda, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *ifail, int *info) nogil +cdef void dsyevx(char *jobz, char *range, char *uplo, int *n, d *a, int *lda, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_dsyevx(jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol, m, w, z, ldz, work, lwork, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsygs2 "BLAS_FUNC(dsygs2)"(int *itype, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, int *info) nogil +cdef void dsygs2(int *itype, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, int *info) noexcept nogil: + + _fortran_dsygs2(itype, uplo, n, a, lda, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsygst "BLAS_FUNC(dsygst)"(int *itype, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, int *info) nogil +cdef void dsygst(int *itype, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, int *info) noexcept nogil: + + _fortran_dsygst(itype, uplo, n, a, lda, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsygv "BLAS_FUNC(dsygv)"(int *itype, char *jobz, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, d *w, d *work, int *lwork, int *info) nogil +cdef void dsygv(int *itype, char *jobz, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, d *w, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dsygv(itype, jobz, uplo, n, a, lda, b, ldb, w, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsygvd "BLAS_FUNC(dsygvd)"(int *itype, char *jobz, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, d *w, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void dsygvd(int *itype, char *jobz, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, d *w, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_dsygvd(itype, jobz, uplo, n, a, lda, b, ldb, w, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsygvx "BLAS_FUNC(dsygvx)"(int *itype, char *jobz, char *range, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *ifail, int *info) nogil +cdef void dsygvx(int *itype, char *jobz, char *range, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_dsygvx(itype, jobz, range, uplo, n, a, lda, b, ldb, vl, vu, il, iu, abstol, m, w, z, ldz, work, lwork, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsyrfs "BLAS_FUNC(dsyrfs)"(char *uplo, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) nogil +cdef void dsyrfs(char *uplo, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dsyrfs(uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsysv "BLAS_FUNC(dsysv)"(char *uplo, int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, d *work, int *lwork, int *info) nogil +cdef void dsysv(char *uplo, int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dsysv(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsysvx "BLAS_FUNC(dsysvx)"(char *fact, char *uplo, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *lwork, int *iwork, int *info) nogil +cdef void dsysvx(char *fact, char *uplo, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *lwork, int *iwork, int *info) noexcept nogil: + + _fortran_dsysvx(fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, lwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsyswapr "BLAS_FUNC(dsyswapr)"(char *uplo, int *n, d *a, int *lda, int *i1, int *i2) nogil +cdef void dsyswapr(char *uplo, int *n, d *a, int *lda, int *i1, int *i2) noexcept nogil: + + _fortran_dsyswapr(uplo, n, a, lda, i1, i2) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsytd2 "BLAS_FUNC(dsytd2)"(char *uplo, int *n, d *a, int *lda, d *d, d *e, d *tau, int *info) nogil +cdef void dsytd2(char *uplo, int *n, d *a, int *lda, d *d, d *e, d *tau, int *info) noexcept nogil: + + _fortran_dsytd2(uplo, n, a, lda, d, e, tau, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsytf2 "BLAS_FUNC(dsytf2)"(char *uplo, int *n, d *a, int *lda, int *ipiv, int *info) nogil +cdef void dsytf2(char *uplo, int *n, d *a, int *lda, int *ipiv, int *info) noexcept nogil: + + _fortran_dsytf2(uplo, n, a, lda, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsytrd "BLAS_FUNC(dsytrd)"(char *uplo, int *n, d *a, int *lda, d *d, d *e, d *tau, d *work, int *lwork, int *info) nogil +cdef void dsytrd(char *uplo, int *n, d *a, int *lda, d *d, d *e, d *tau, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dsytrd(uplo, n, a, lda, d, e, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsytrf "BLAS_FUNC(dsytrf)"(char *uplo, int *n, d *a, int *lda, int *ipiv, d *work, int *lwork, int *info) nogil +cdef void dsytrf(char *uplo, int *n, d *a, int *lda, int *ipiv, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dsytrf(uplo, n, a, lda, ipiv, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsytri "BLAS_FUNC(dsytri)"(char *uplo, int *n, d *a, int *lda, int *ipiv, d *work, int *info) nogil +cdef void dsytri(char *uplo, int *n, d *a, int *lda, int *ipiv, d *work, int *info) noexcept nogil: + + _fortran_dsytri(uplo, n, a, lda, ipiv, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsytri2 "BLAS_FUNC(dsytri2)"(char *uplo, int *n, d *a, int *lda, int *ipiv, d *work, int *lwork, int *info) nogil +cdef void dsytri2(char *uplo, int *n, d *a, int *lda, int *ipiv, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dsytri2(uplo, n, a, lda, ipiv, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsytri2x "BLAS_FUNC(dsytri2x)"(char *uplo, int *n, d *a, int *lda, int *ipiv, d *work, int *nb, int *info) nogil +cdef void dsytri2x(char *uplo, int *n, d *a, int *lda, int *ipiv, d *work, int *nb, int *info) noexcept nogil: + + _fortran_dsytri2x(uplo, n, a, lda, ipiv, work, nb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsytrs "BLAS_FUNC(dsytrs)"(char *uplo, int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, int *info) nogil +cdef void dsytrs(char *uplo, int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, int *info) noexcept nogil: + + _fortran_dsytrs(uplo, n, nrhs, a, lda, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dsytrs2 "BLAS_FUNC(dsytrs2)"(char *uplo, int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, d *work, int *info) nogil +cdef void dsytrs2(char *uplo, int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, d *work, int *info) noexcept nogil: + + _fortran_dsytrs2(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtbcon "BLAS_FUNC(dtbcon)"(char *norm, char *uplo, char *diag, int *n, int *kd, d *ab, int *ldab, d *rcond, d *work, int *iwork, int *info) nogil +cdef void dtbcon(char *norm, char *uplo, char *diag, int *n, int *kd, d *ab, int *ldab, d *rcond, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dtbcon(norm, uplo, diag, n, kd, ab, ldab, rcond, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtbrfs "BLAS_FUNC(dtbrfs)"(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) nogil +cdef void dtbrfs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dtbrfs(uplo, trans, diag, n, kd, nrhs, ab, ldab, b, ldb, x, ldx, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtbtrs "BLAS_FUNC(dtbtrs)"(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *b, int *ldb, int *info) nogil +cdef void dtbtrs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *b, int *ldb, int *info) noexcept nogil: + + _fortran_dtbtrs(uplo, trans, diag, n, kd, nrhs, ab, ldab, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtfsm "BLAS_FUNC(dtfsm)"(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, d *alpha, d *a, d *b, int *ldb) nogil +cdef void dtfsm(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, d *alpha, d *a, d *b, int *ldb) noexcept nogil: + + _fortran_dtfsm(transr, side, uplo, trans, diag, m, n, alpha, a, b, ldb) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtftri "BLAS_FUNC(dtftri)"(char *transr, char *uplo, char *diag, int *n, d *a, int *info) nogil +cdef void dtftri(char *transr, char *uplo, char *diag, int *n, d *a, int *info) noexcept nogil: + + _fortran_dtftri(transr, uplo, diag, n, a, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtfttp "BLAS_FUNC(dtfttp)"(char *transr, char *uplo, int *n, d *arf, d *ap, int *info) nogil +cdef void dtfttp(char *transr, char *uplo, int *n, d *arf, d *ap, int *info) noexcept nogil: + + _fortran_dtfttp(transr, uplo, n, arf, ap, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtfttr "BLAS_FUNC(dtfttr)"(char *transr, char *uplo, int *n, d *arf, d *a, int *lda, int *info) nogil +cdef void dtfttr(char *transr, char *uplo, int *n, d *arf, d *a, int *lda, int *info) noexcept nogil: + + _fortran_dtfttr(transr, uplo, n, arf, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtgevc "BLAS_FUNC(dtgevc)"(char *side, char *howmny, bint *select, int *n, d *s, int *lds, d *p, int *ldp, d *vl, int *ldvl, d *vr, int *ldvr, int *mm, int *m, d *work, int *info) nogil +cdef void dtgevc(char *side, char *howmny, bint *select, int *n, d *s, int *lds, d *p, int *ldp, d *vl, int *ldvl, d *vr, int *ldvr, int *mm, int *m, d *work, int *info) noexcept nogil: + + _fortran_dtgevc(side, howmny, select, n, s, lds, p, ldp, vl, ldvl, vr, ldvr, mm, m, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtgex2 "BLAS_FUNC(dtgex2)"(bint *wantq, bint *wantz, int *n, d *a, int *lda, d *b, int *ldb, d *q, int *ldq, d *z, int *ldz, int *j1, int *n1, int *n2, d *work, int *lwork, int *info) nogil +cdef void dtgex2(bint *wantq, bint *wantz, int *n, d *a, int *lda, d *b, int *ldb, d *q, int *ldq, d *z, int *ldz, int *j1, int *n1, int *n2, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dtgex2(wantq, wantz, n, a, lda, b, ldb, q, ldq, z, ldz, j1, n1, n2, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtgexc "BLAS_FUNC(dtgexc)"(bint *wantq, bint *wantz, int *n, d *a, int *lda, d *b, int *ldb, d *q, int *ldq, d *z, int *ldz, int *ifst, int *ilst, d *work, int *lwork, int *info) nogil +cdef void dtgexc(bint *wantq, bint *wantz, int *n, d *a, int *lda, d *b, int *ldb, d *q, int *ldq, d *z, int *ldz, int *ifst, int *ilst, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dtgexc(wantq, wantz, n, a, lda, b, ldb, q, ldq, z, ldz, ifst, ilst, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtgsen "BLAS_FUNC(dtgsen)"(int *ijob, bint *wantq, bint *wantz, bint *select, int *n, d *a, int *lda, d *b, int *ldb, d *alphar, d *alphai, d *beta, d *q, int *ldq, d *z, int *ldz, int *m, d *pl, d *pr, d *dif, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void dtgsen(int *ijob, bint *wantq, bint *wantz, bint *select, int *n, d *a, int *lda, d *b, int *ldb, d *alphar, d *alphai, d *beta, d *q, int *ldq, d *z, int *ldz, int *m, d *pl, d *pr, d *dif, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_dtgsen(ijob, wantq, wantz, select, n, a, lda, b, ldb, alphar, alphai, beta, q, ldq, z, ldz, m, pl, pr, dif, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtgsja "BLAS_FUNC(dtgsja)"(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, d *a, int *lda, d *b, int *ldb, d *tola, d *tolb, d *alpha, d *beta, d *u, int *ldu, d *v, int *ldv, d *q, int *ldq, d *work, int *ncycle, int *info) nogil +cdef void dtgsja(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, d *a, int *lda, d *b, int *ldb, d *tola, d *tolb, d *alpha, d *beta, d *u, int *ldu, d *v, int *ldv, d *q, int *ldq, d *work, int *ncycle, int *info) noexcept nogil: + + _fortran_dtgsja(jobu, jobv, jobq, m, p, n, k, l, a, lda, b, ldb, tola, tolb, alpha, beta, u, ldu, v, ldv, q, ldq, work, ncycle, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtgsna "BLAS_FUNC(dtgsna)"(char *job, char *howmny, bint *select, int *n, d *a, int *lda, d *b, int *ldb, d *vl, int *ldvl, d *vr, int *ldvr, d *s, d *dif, int *mm, int *m, d *work, int *lwork, int *iwork, int *info) nogil +cdef void dtgsna(char *job, char *howmny, bint *select, int *n, d *a, int *lda, d *b, int *ldb, d *vl, int *ldvl, d *vr, int *ldvr, d *s, d *dif, int *mm, int *m, d *work, int *lwork, int *iwork, int *info) noexcept nogil: + + _fortran_dtgsna(job, howmny, select, n, a, lda, b, ldb, vl, ldvl, vr, ldvr, s, dif, mm, m, work, lwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtgsy2 "BLAS_FUNC(dtgsy2)"(char *trans, int *ijob, int *m, int *n, d *a, int *lda, d *b, int *ldb, d *c, int *ldc, d *d, int *ldd, d *e, int *lde, d *f, int *ldf, d *scale, d *rdsum, d *rdscal, int *iwork, int *pq, int *info) nogil +cdef void dtgsy2(char *trans, int *ijob, int *m, int *n, d *a, int *lda, d *b, int *ldb, d *c, int *ldc, d *d, int *ldd, d *e, int *lde, d *f, int *ldf, d *scale, d *rdsum, d *rdscal, int *iwork, int *pq, int *info) noexcept nogil: + + _fortran_dtgsy2(trans, ijob, m, n, a, lda, b, ldb, c, ldc, d, ldd, e, lde, f, ldf, scale, rdsum, rdscal, iwork, pq, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtgsyl "BLAS_FUNC(dtgsyl)"(char *trans, int *ijob, int *m, int *n, d *a, int *lda, d *b, int *ldb, d *c, int *ldc, d *d, int *ldd, d *e, int *lde, d *f, int *ldf, d *scale, d *dif, d *work, int *lwork, int *iwork, int *info) nogil +cdef void dtgsyl(char *trans, int *ijob, int *m, int *n, d *a, int *lda, d *b, int *ldb, d *c, int *ldc, d *d, int *ldd, d *e, int *lde, d *f, int *ldf, d *scale, d *dif, d *work, int *lwork, int *iwork, int *info) noexcept nogil: + + _fortran_dtgsyl(trans, ijob, m, n, a, lda, b, ldb, c, ldc, d, ldd, e, lde, f, ldf, scale, dif, work, lwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtpcon "BLAS_FUNC(dtpcon)"(char *norm, char *uplo, char *diag, int *n, d *ap, d *rcond, d *work, int *iwork, int *info) nogil +cdef void dtpcon(char *norm, char *uplo, char *diag, int *n, d *ap, d *rcond, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dtpcon(norm, uplo, diag, n, ap, rcond, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtpmqrt "BLAS_FUNC(dtpmqrt)"(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, d *v, int *ldv, d *t, int *ldt, d *a, int *lda, d *b, int *ldb, d *work, int *info) nogil +cdef void dtpmqrt(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, d *v, int *ldv, d *t, int *ldt, d *a, int *lda, d *b, int *ldb, d *work, int *info) noexcept nogil: + + _fortran_dtpmqrt(side, trans, m, n, k, l, nb, v, ldv, t, ldt, a, lda, b, ldb, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtpqrt "BLAS_FUNC(dtpqrt)"(int *m, int *n, int *l, int *nb, d *a, int *lda, d *b, int *ldb, d *t, int *ldt, d *work, int *info) nogil +cdef void dtpqrt(int *m, int *n, int *l, int *nb, d *a, int *lda, d *b, int *ldb, d *t, int *ldt, d *work, int *info) noexcept nogil: + + _fortran_dtpqrt(m, n, l, nb, a, lda, b, ldb, t, ldt, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtpqrt2 "BLAS_FUNC(dtpqrt2)"(int *m, int *n, int *l, d *a, int *lda, d *b, int *ldb, d *t, int *ldt, int *info) nogil +cdef void dtpqrt2(int *m, int *n, int *l, d *a, int *lda, d *b, int *ldb, d *t, int *ldt, int *info) noexcept nogil: + + _fortran_dtpqrt2(m, n, l, a, lda, b, ldb, t, ldt, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtprfb "BLAS_FUNC(dtprfb)"(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, d *v, int *ldv, d *t, int *ldt, d *a, int *lda, d *b, int *ldb, d *work, int *ldwork) nogil +cdef void dtprfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, d *v, int *ldv, d *t, int *ldt, d *a, int *lda, d *b, int *ldb, d *work, int *ldwork) noexcept nogil: + + _fortran_dtprfb(side, trans, direct, storev, m, n, k, l, v, ldv, t, ldt, a, lda, b, ldb, work, ldwork) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtprfs "BLAS_FUNC(dtprfs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, d *ap, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) nogil +cdef void dtprfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, d *ap, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dtprfs(uplo, trans, diag, n, nrhs, ap, b, ldb, x, ldx, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtptri "BLAS_FUNC(dtptri)"(char *uplo, char *diag, int *n, d *ap, int *info) nogil +cdef void dtptri(char *uplo, char *diag, int *n, d *ap, int *info) noexcept nogil: + + _fortran_dtptri(uplo, diag, n, ap, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtptrs "BLAS_FUNC(dtptrs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, d *ap, d *b, int *ldb, int *info) nogil +cdef void dtptrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, d *ap, d *b, int *ldb, int *info) noexcept nogil: + + _fortran_dtptrs(uplo, trans, diag, n, nrhs, ap, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtpttf "BLAS_FUNC(dtpttf)"(char *transr, char *uplo, int *n, d *ap, d *arf, int *info) nogil +cdef void dtpttf(char *transr, char *uplo, int *n, d *ap, d *arf, int *info) noexcept nogil: + + _fortran_dtpttf(transr, uplo, n, ap, arf, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtpttr "BLAS_FUNC(dtpttr)"(char *uplo, int *n, d *ap, d *a, int *lda, int *info) nogil +cdef void dtpttr(char *uplo, int *n, d *ap, d *a, int *lda, int *info) noexcept nogil: + + _fortran_dtpttr(uplo, n, ap, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtrcon "BLAS_FUNC(dtrcon)"(char *norm, char *uplo, char *diag, int *n, d *a, int *lda, d *rcond, d *work, int *iwork, int *info) nogil +cdef void dtrcon(char *norm, char *uplo, char *diag, int *n, d *a, int *lda, d *rcond, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dtrcon(norm, uplo, diag, n, a, lda, rcond, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtrevc "BLAS_FUNC(dtrevc)"(char *side, char *howmny, bint *select, int *n, d *t, int *ldt, d *vl, int *ldvl, d *vr, int *ldvr, int *mm, int *m, d *work, int *info) nogil +cdef void dtrevc(char *side, char *howmny, bint *select, int *n, d *t, int *ldt, d *vl, int *ldvl, d *vr, int *ldvr, int *mm, int *m, d *work, int *info) noexcept nogil: + + _fortran_dtrevc(side, howmny, select, n, t, ldt, vl, ldvl, vr, ldvr, mm, m, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtrexc "BLAS_FUNC(dtrexc)"(char *compq, int *n, d *t, int *ldt, d *q, int *ldq, int *ifst, int *ilst, d *work, int *info) nogil +cdef void dtrexc(char *compq, int *n, d *t, int *ldt, d *q, int *ldq, int *ifst, int *ilst, d *work, int *info) noexcept nogil: + + _fortran_dtrexc(compq, n, t, ldt, q, ldq, ifst, ilst, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtrrfs "BLAS_FUNC(dtrrfs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) nogil +cdef void dtrrfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_dtrrfs(uplo, trans, diag, n, nrhs, a, lda, b, ldb, x, ldx, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtrsen "BLAS_FUNC(dtrsen)"(char *job, char *compq, bint *select, int *n, d *t, int *ldt, d *q, int *ldq, d *wr, d *wi, int *m, d *s, d *sep, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void dtrsen(char *job, char *compq, bint *select, int *n, d *t, int *ldt, d *q, int *ldq, d *wr, d *wi, int *m, d *s, d *sep, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_dtrsen(job, compq, select, n, t, ldt, q, ldq, wr, wi, m, s, sep, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtrsna "BLAS_FUNC(dtrsna)"(char *job, char *howmny, bint *select, int *n, d *t, int *ldt, d *vl, int *ldvl, d *vr, int *ldvr, d *s, d *sep, int *mm, int *m, d *work, int *ldwork, int *iwork, int *info) nogil +cdef void dtrsna(char *job, char *howmny, bint *select, int *n, d *t, int *ldt, d *vl, int *ldvl, d *vr, int *ldvr, d *s, d *sep, int *mm, int *m, d *work, int *ldwork, int *iwork, int *info) noexcept nogil: + + _fortran_dtrsna(job, howmny, select, n, t, ldt, vl, ldvl, vr, ldvr, s, sep, mm, m, work, ldwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtrsyl "BLAS_FUNC(dtrsyl)"(char *trana, char *tranb, int *isgn, int *m, int *n, d *a, int *lda, d *b, int *ldb, d *c, int *ldc, d *scale, int *info) nogil +cdef void dtrsyl(char *trana, char *tranb, int *isgn, int *m, int *n, d *a, int *lda, d *b, int *ldb, d *c, int *ldc, d *scale, int *info) noexcept nogil: + + _fortran_dtrsyl(trana, tranb, isgn, m, n, a, lda, b, ldb, c, ldc, scale, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtrti2 "BLAS_FUNC(dtrti2)"(char *uplo, char *diag, int *n, d *a, int *lda, int *info) nogil +cdef void dtrti2(char *uplo, char *diag, int *n, d *a, int *lda, int *info) noexcept nogil: + + _fortran_dtrti2(uplo, diag, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtrtri "BLAS_FUNC(dtrtri)"(char *uplo, char *diag, int *n, d *a, int *lda, int *info) nogil +cdef void dtrtri(char *uplo, char *diag, int *n, d *a, int *lda, int *info) noexcept nogil: + + _fortran_dtrtri(uplo, diag, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtrtrs "BLAS_FUNC(dtrtrs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, int *info) nogil +cdef void dtrtrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, int *info) noexcept nogil: + + _fortran_dtrtrs(uplo, trans, diag, n, nrhs, a, lda, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtrttf "BLAS_FUNC(dtrttf)"(char *transr, char *uplo, int *n, d *a, int *lda, d *arf, int *info) nogil +cdef void dtrttf(char *transr, char *uplo, int *n, d *a, int *lda, d *arf, int *info) noexcept nogil: + + _fortran_dtrttf(transr, uplo, n, a, lda, arf, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtrttp "BLAS_FUNC(dtrttp)"(char *uplo, int *n, d *a, int *lda, d *ap, int *info) nogil +cdef void dtrttp(char *uplo, int *n, d *a, int *lda, d *ap, int *info) noexcept nogil: + + _fortran_dtrttp(uplo, n, a, lda, ap, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_dtzrzf "BLAS_FUNC(dtzrzf)"(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil +cdef void dtzrzf(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil: + + _fortran_dtzrzf(m, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_dzsum1 "BLAS_FUNC(dzsum1)"(int *n, npy_complex128 *cx, int *incx) nogil +cdef d dzsum1(int *n, z *cx, int *incx) noexcept nogil: + + return _fortran_dzsum1(n, cx, incx) + + +cdef extern from "_lapack_subroutines.h": + int _fortran_icmax1 "BLAS_FUNC(icmax1)"(int *n, npy_complex64 *cx, int *incx) nogil +cdef int icmax1(int *n, c *cx, int *incx) noexcept nogil: + + return _fortran_icmax1(n, cx, incx) + + +cdef extern from "_lapack_subroutines.h": + int _fortran_ieeeck "BLAS_FUNC(ieeeck)"(int *ispec, s *zero, s *one) nogil +cdef int ieeeck(int *ispec, s *zero, s *one) noexcept nogil: + + return _fortran_ieeeck(ispec, zero, one) + + +cdef extern from "_lapack_subroutines.h": + int _fortran_ilaclc "BLAS_FUNC(ilaclc)"(int *m, int *n, npy_complex64 *a, int *lda) nogil +cdef int ilaclc(int *m, int *n, c *a, int *lda) noexcept nogil: + + return _fortran_ilaclc(m, n, a, lda) + + +cdef extern from "_lapack_subroutines.h": + int _fortran_ilaclr "BLAS_FUNC(ilaclr)"(int *m, int *n, npy_complex64 *a, int *lda) nogil +cdef int ilaclr(int *m, int *n, c *a, int *lda) noexcept nogil: + + return _fortran_ilaclr(m, n, a, lda) + + +cdef extern from "_lapack_subroutines.h": + int _fortran_iladiag "BLAS_FUNC(iladiag)"(char *diag) nogil +cdef int iladiag(char *diag) noexcept nogil: + + return _fortran_iladiag(diag) + + +cdef extern from "_lapack_subroutines.h": + int _fortran_iladlc "BLAS_FUNC(iladlc)"(int *m, int *n, d *a, int *lda) nogil +cdef int iladlc(int *m, int *n, d *a, int *lda) noexcept nogil: + + return _fortran_iladlc(m, n, a, lda) + + +cdef extern from "_lapack_subroutines.h": + int _fortran_iladlr "BLAS_FUNC(iladlr)"(int *m, int *n, d *a, int *lda) nogil +cdef int iladlr(int *m, int *n, d *a, int *lda) noexcept nogil: + + return _fortran_iladlr(m, n, a, lda) + + +cdef extern from "_lapack_subroutines.h": + int _fortran_ilaprec "BLAS_FUNC(ilaprec)"(char *prec) nogil +cdef int ilaprec(char *prec) noexcept nogil: + + return _fortran_ilaprec(prec) + + +cdef extern from "_lapack_subroutines.h": + int _fortran_ilaslc "BLAS_FUNC(ilaslc)"(int *m, int *n, s *a, int *lda) nogil +cdef int ilaslc(int *m, int *n, s *a, int *lda) noexcept nogil: + + return _fortran_ilaslc(m, n, a, lda) + + +cdef extern from "_lapack_subroutines.h": + int _fortran_ilaslr "BLAS_FUNC(ilaslr)"(int *m, int *n, s *a, int *lda) nogil +cdef int ilaslr(int *m, int *n, s *a, int *lda) noexcept nogil: + + return _fortran_ilaslr(m, n, a, lda) + + +cdef extern from "_lapack_subroutines.h": + int _fortran_ilatrans "BLAS_FUNC(ilatrans)"(char *trans) nogil +cdef int ilatrans(char *trans) noexcept nogil: + + return _fortran_ilatrans(trans) + + +cdef extern from "_lapack_subroutines.h": + int _fortran_ilauplo "BLAS_FUNC(ilauplo)"(char *uplo) nogil +cdef int ilauplo(char *uplo) noexcept nogil: + + return _fortran_ilauplo(uplo) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ilaver "BLAS_FUNC(ilaver)"(int *vers_major, int *vers_minor, int *vers_patch) nogil +cdef void ilaver(int *vers_major, int *vers_minor, int *vers_patch) noexcept nogil: + + _fortran_ilaver(vers_major, vers_minor, vers_patch) + + +cdef extern from "_lapack_subroutines.h": + int _fortran_ilazlc "BLAS_FUNC(ilazlc)"(int *m, int *n, npy_complex128 *a, int *lda) nogil +cdef int ilazlc(int *m, int *n, z *a, int *lda) noexcept nogil: + + return _fortran_ilazlc(m, n, a, lda) + + +cdef extern from "_lapack_subroutines.h": + int _fortran_ilazlr "BLAS_FUNC(ilazlr)"(int *m, int *n, npy_complex128 *a, int *lda) nogil +cdef int ilazlr(int *m, int *n, z *a, int *lda) noexcept nogil: + + return _fortran_ilazlr(m, n, a, lda) + + +cdef extern from "_lapack_subroutines.h": + int _fortran_izmax1 "BLAS_FUNC(izmax1)"(int *n, npy_complex128 *cx, int *incx) nogil +cdef int izmax1(int *n, z *cx, int *incx) noexcept nogil: + + return _fortran_izmax1(n, cx, incx) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sbbcsd "BLAS_FUNC(sbbcsd)"(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, s *theta, s *phi, s *u1, int *ldu1, s *u2, int *ldu2, s *v1t, int *ldv1t, s *v2t, int *ldv2t, s *b11d, s *b11e, s *b12d, s *b12e, s *b21d, s *b21e, s *b22d, s *b22e, s *work, int *lwork, int *info) nogil +cdef void sbbcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, s *theta, s *phi, s *u1, int *ldu1, s *u2, int *ldu2, s *v1t, int *ldv1t, s *v2t, int *ldv2t, s *b11d, s *b11e, s *b12d, s *b12e, s *b21d, s *b21e, s *b22d, s *b22e, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sbbcsd(jobu1, jobu2, jobv1t, jobv2t, trans, m, p, q, theta, phi, u1, ldu1, u2, ldu2, v1t, ldv1t, v2t, ldv2t, b11d, b11e, b12d, b12e, b21d, b21e, b22d, b22e, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sbdsdc "BLAS_FUNC(sbdsdc)"(char *uplo, char *compq, int *n, s *d, s *e, s *u, int *ldu, s *vt, int *ldvt, s *q, int *iq, s *work, int *iwork, int *info) nogil +cdef void sbdsdc(char *uplo, char *compq, int *n, s *d, s *e, s *u, int *ldu, s *vt, int *ldvt, s *q, int *iq, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_sbdsdc(uplo, compq, n, d, e, u, ldu, vt, ldvt, q, iq, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sbdsqr "BLAS_FUNC(sbdsqr)"(char *uplo, int *n, int *ncvt, int *nru, int *ncc, s *d, s *e, s *vt, int *ldvt, s *u, int *ldu, s *c, int *ldc, s *work, int *info) nogil +cdef void sbdsqr(char *uplo, int *n, int *ncvt, int *nru, int *ncc, s *d, s *e, s *vt, int *ldvt, s *u, int *ldu, s *c, int *ldc, s *work, int *info) noexcept nogil: + + _fortran_sbdsqr(uplo, n, ncvt, nru, ncc, d, e, vt, ldvt, u, ldu, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_scsum1 "BLAS_FUNC(scsum1)"(int *n, npy_complex64 *cx, int *incx) nogil +cdef s scsum1(int *n, c *cx, int *incx) noexcept nogil: + + return _fortran_scsum1(n, cx, incx) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sdisna "BLAS_FUNC(sdisna)"(char *job, int *m, int *n, s *d, s *sep, int *info) nogil +cdef void sdisna(char *job, int *m, int *n, s *d, s *sep, int *info) noexcept nogil: + + _fortran_sdisna(job, m, n, d, sep, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgbbrd "BLAS_FUNC(sgbbrd)"(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, s *ab, int *ldab, s *d, s *e, s *q, int *ldq, s *pt, int *ldpt, s *c, int *ldc, s *work, int *info) nogil +cdef void sgbbrd(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, s *ab, int *ldab, s *d, s *e, s *q, int *ldq, s *pt, int *ldpt, s *c, int *ldc, s *work, int *info) noexcept nogil: + + _fortran_sgbbrd(vect, m, n, ncc, kl, ku, ab, ldab, d, e, q, ldq, pt, ldpt, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgbcon "BLAS_FUNC(sgbcon)"(char *norm, int *n, int *kl, int *ku, s *ab, int *ldab, int *ipiv, s *anorm, s *rcond, s *work, int *iwork, int *info) nogil +cdef void sgbcon(char *norm, int *n, int *kl, int *ku, s *ab, int *ldab, int *ipiv, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_sgbcon(norm, n, kl, ku, ab, ldab, ipiv, anorm, rcond, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgbequ "BLAS_FUNC(sgbequ)"(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) nogil +cdef void sgbequ(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil: + + _fortran_sgbequ(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgbequb "BLAS_FUNC(sgbequb)"(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) nogil +cdef void sgbequb(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil: + + _fortran_sgbequb(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgbrfs "BLAS_FUNC(sgbrfs)"(char *trans, int *n, int *kl, int *ku, int *nrhs, s *ab, int *ldab, s *afb, int *ldafb, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) nogil +cdef void sgbrfs(char *trans, int *n, int *kl, int *ku, int *nrhs, s *ab, int *ldab, s *afb, int *ldafb, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_sgbrfs(trans, n, kl, ku, nrhs, ab, ldab, afb, ldafb, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgbsv "BLAS_FUNC(sgbsv)"(int *n, int *kl, int *ku, int *nrhs, s *ab, int *ldab, int *ipiv, s *b, int *ldb, int *info) nogil +cdef void sgbsv(int *n, int *kl, int *ku, int *nrhs, s *ab, int *ldab, int *ipiv, s *b, int *ldb, int *info) noexcept nogil: + + _fortran_sgbsv(n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgbsvx "BLAS_FUNC(sgbsvx)"(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, s *ab, int *ldab, s *afb, int *ldafb, int *ipiv, char *equed, s *r, s *c, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) nogil +cdef void sgbsvx(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, s *ab, int *ldab, s *afb, int *ldafb, int *ipiv, char *equed, s *r, s *c, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_sgbsvx(fact, trans, n, kl, ku, nrhs, ab, ldab, afb, ldafb, ipiv, equed, r, c, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgbtf2 "BLAS_FUNC(sgbtf2)"(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, int *ipiv, int *info) nogil +cdef void sgbtf2(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, int *ipiv, int *info) noexcept nogil: + + _fortran_sgbtf2(m, n, kl, ku, ab, ldab, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgbtrf "BLAS_FUNC(sgbtrf)"(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, int *ipiv, int *info) nogil +cdef void sgbtrf(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, int *ipiv, int *info) noexcept nogil: + + _fortran_sgbtrf(m, n, kl, ku, ab, ldab, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgbtrs "BLAS_FUNC(sgbtrs)"(char *trans, int *n, int *kl, int *ku, int *nrhs, s *ab, int *ldab, int *ipiv, s *b, int *ldb, int *info) nogil +cdef void sgbtrs(char *trans, int *n, int *kl, int *ku, int *nrhs, s *ab, int *ldab, int *ipiv, s *b, int *ldb, int *info) noexcept nogil: + + _fortran_sgbtrs(trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgebak "BLAS_FUNC(sgebak)"(char *job, char *side, int *n, int *ilo, int *ihi, s *scale, int *m, s *v, int *ldv, int *info) nogil +cdef void sgebak(char *job, char *side, int *n, int *ilo, int *ihi, s *scale, int *m, s *v, int *ldv, int *info) noexcept nogil: + + _fortran_sgebak(job, side, n, ilo, ihi, scale, m, v, ldv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgebal "BLAS_FUNC(sgebal)"(char *job, int *n, s *a, int *lda, int *ilo, int *ihi, s *scale, int *info) nogil +cdef void sgebal(char *job, int *n, s *a, int *lda, int *ilo, int *ihi, s *scale, int *info) noexcept nogil: + + _fortran_sgebal(job, n, a, lda, ilo, ihi, scale, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgebd2 "BLAS_FUNC(sgebd2)"(int *m, int *n, s *a, int *lda, s *d, s *e, s *tauq, s *taup, s *work, int *info) nogil +cdef void sgebd2(int *m, int *n, s *a, int *lda, s *d, s *e, s *tauq, s *taup, s *work, int *info) noexcept nogil: + + _fortran_sgebd2(m, n, a, lda, d, e, tauq, taup, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgebrd "BLAS_FUNC(sgebrd)"(int *m, int *n, s *a, int *lda, s *d, s *e, s *tauq, s *taup, s *work, int *lwork, int *info) nogil +cdef void sgebrd(int *m, int *n, s *a, int *lda, s *d, s *e, s *tauq, s *taup, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sgebrd(m, n, a, lda, d, e, tauq, taup, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgecon "BLAS_FUNC(sgecon)"(char *norm, int *n, s *a, int *lda, s *anorm, s *rcond, s *work, int *iwork, int *info) nogil +cdef void sgecon(char *norm, int *n, s *a, int *lda, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_sgecon(norm, n, a, lda, anorm, rcond, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgeequ "BLAS_FUNC(sgeequ)"(int *m, int *n, s *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) nogil +cdef void sgeequ(int *m, int *n, s *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil: + + _fortran_sgeequ(m, n, a, lda, r, c, rowcnd, colcnd, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgeequb "BLAS_FUNC(sgeequb)"(int *m, int *n, s *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) nogil +cdef void sgeequb(int *m, int *n, s *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil: + + _fortran_sgeequb(m, n, a, lda, r, c, rowcnd, colcnd, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgees "BLAS_FUNC(sgees)"(char *jobvs, char *sort, _sselect2 *select, int *n, s *a, int *lda, int *sdim, s *wr, s *wi, s *vs, int *ldvs, s *work, int *lwork, bint *bwork, int *info) nogil +cdef void sgees(char *jobvs, char *sort, sselect2 *select, int *n, s *a, int *lda, int *sdim, s *wr, s *wi, s *vs, int *ldvs, s *work, int *lwork, bint *bwork, int *info) noexcept nogil: + + _fortran_sgees(jobvs, sort, <_sselect2*>select, n, a, lda, sdim, wr, wi, vs, ldvs, work, lwork, bwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgeesx "BLAS_FUNC(sgeesx)"(char *jobvs, char *sort, _sselect2 *select, char *sense, int *n, s *a, int *lda, int *sdim, s *wr, s *wi, s *vs, int *ldvs, s *rconde, s *rcondv, s *work, int *lwork, int *iwork, int *liwork, bint *bwork, int *info) nogil +cdef void sgeesx(char *jobvs, char *sort, sselect2 *select, char *sense, int *n, s *a, int *lda, int *sdim, s *wr, s *wi, s *vs, int *ldvs, s *rconde, s *rcondv, s *work, int *lwork, int *iwork, int *liwork, bint *bwork, int *info) noexcept nogil: + + _fortran_sgeesx(jobvs, sort, <_sselect2*>select, sense, n, a, lda, sdim, wr, wi, vs, ldvs, rconde, rcondv, work, lwork, iwork, liwork, bwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgeev "BLAS_FUNC(sgeev)"(char *jobvl, char *jobvr, int *n, s *a, int *lda, s *wr, s *wi, s *vl, int *ldvl, s *vr, int *ldvr, s *work, int *lwork, int *info) nogil +cdef void sgeev(char *jobvl, char *jobvr, int *n, s *a, int *lda, s *wr, s *wi, s *vl, int *ldvl, s *vr, int *ldvr, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sgeev(jobvl, jobvr, n, a, lda, wr, wi, vl, ldvl, vr, ldvr, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgeevx "BLAS_FUNC(sgeevx)"(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, s *a, int *lda, s *wr, s *wi, s *vl, int *ldvl, s *vr, int *ldvr, int *ilo, int *ihi, s *scale, s *abnrm, s *rconde, s *rcondv, s *work, int *lwork, int *iwork, int *info) nogil +cdef void sgeevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, s *a, int *lda, s *wr, s *wi, s *vl, int *ldvl, s *vr, int *ldvr, int *ilo, int *ihi, s *scale, s *abnrm, s *rconde, s *rcondv, s *work, int *lwork, int *iwork, int *info) noexcept nogil: + + _fortran_sgeevx(balanc, jobvl, jobvr, sense, n, a, lda, wr, wi, vl, ldvl, vr, ldvr, ilo, ihi, scale, abnrm, rconde, rcondv, work, lwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgehd2 "BLAS_FUNC(sgehd2)"(int *n, int *ilo, int *ihi, s *a, int *lda, s *tau, s *work, int *info) nogil +cdef void sgehd2(int *n, int *ilo, int *ihi, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil: + + _fortran_sgehd2(n, ilo, ihi, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgehrd "BLAS_FUNC(sgehrd)"(int *n, int *ilo, int *ihi, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil +cdef void sgehrd(int *n, int *ilo, int *ihi, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sgehrd(n, ilo, ihi, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgejsv "BLAS_FUNC(sgejsv)"(char *joba, char *jobu, char *jobv, char *jobr, char *jobt, char *jobp, int *m, int *n, s *a, int *lda, s *sva, s *u, int *ldu, s *v, int *ldv, s *work, int *lwork, int *iwork, int *info) nogil +cdef void sgejsv(char *joba, char *jobu, char *jobv, char *jobr, char *jobt, char *jobp, int *m, int *n, s *a, int *lda, s *sva, s *u, int *ldu, s *v, int *ldv, s *work, int *lwork, int *iwork, int *info) noexcept nogil: + + _fortran_sgejsv(joba, jobu, jobv, jobr, jobt, jobp, m, n, a, lda, sva, u, ldu, v, ldv, work, lwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgelq2 "BLAS_FUNC(sgelq2)"(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) nogil +cdef void sgelq2(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil: + + _fortran_sgelq2(m, n, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgelqf "BLAS_FUNC(sgelqf)"(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil +cdef void sgelqf(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sgelqf(m, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgels "BLAS_FUNC(sgels)"(char *trans, int *m, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, s *work, int *lwork, int *info) nogil +cdef void sgels(char *trans, int *m, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sgels(trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgelsd "BLAS_FUNC(sgelsd)"(int *m, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, s *s, s *rcond, int *rank, s *work, int *lwork, int *iwork, int *info) nogil +cdef void sgelsd(int *m, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, s *s, s *rcond, int *rank, s *work, int *lwork, int *iwork, int *info) noexcept nogil: + + _fortran_sgelsd(m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgelss "BLAS_FUNC(sgelss)"(int *m, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, s *s, s *rcond, int *rank, s *work, int *lwork, int *info) nogil +cdef void sgelss(int *m, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, s *s, s *rcond, int *rank, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sgelss(m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgelsy "BLAS_FUNC(sgelsy)"(int *m, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, int *jpvt, s *rcond, int *rank, s *work, int *lwork, int *info) nogil +cdef void sgelsy(int *m, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, int *jpvt, s *rcond, int *rank, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sgelsy(m, n, nrhs, a, lda, b, ldb, jpvt, rcond, rank, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgemqrt "BLAS_FUNC(sgemqrt)"(char *side, char *trans, int *m, int *n, int *k, int *nb, s *v, int *ldv, s *t, int *ldt, s *c, int *ldc, s *work, int *info) nogil +cdef void sgemqrt(char *side, char *trans, int *m, int *n, int *k, int *nb, s *v, int *ldv, s *t, int *ldt, s *c, int *ldc, s *work, int *info) noexcept nogil: + + _fortran_sgemqrt(side, trans, m, n, k, nb, v, ldv, t, ldt, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgeql2 "BLAS_FUNC(sgeql2)"(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) nogil +cdef void sgeql2(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil: + + _fortran_sgeql2(m, n, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgeqlf "BLAS_FUNC(sgeqlf)"(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil +cdef void sgeqlf(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sgeqlf(m, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgeqp3 "BLAS_FUNC(sgeqp3)"(int *m, int *n, s *a, int *lda, int *jpvt, s *tau, s *work, int *lwork, int *info) nogil +cdef void sgeqp3(int *m, int *n, s *a, int *lda, int *jpvt, s *tau, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sgeqp3(m, n, a, lda, jpvt, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgeqr2 "BLAS_FUNC(sgeqr2)"(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) nogil +cdef void sgeqr2(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil: + + _fortran_sgeqr2(m, n, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgeqr2p "BLAS_FUNC(sgeqr2p)"(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) nogil +cdef void sgeqr2p(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil: + + _fortran_sgeqr2p(m, n, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgeqrf "BLAS_FUNC(sgeqrf)"(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil +cdef void sgeqrf(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sgeqrf(m, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgeqrfp "BLAS_FUNC(sgeqrfp)"(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil +cdef void sgeqrfp(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sgeqrfp(m, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgeqrt "BLAS_FUNC(sgeqrt)"(int *m, int *n, int *nb, s *a, int *lda, s *t, int *ldt, s *work, int *info) nogil +cdef void sgeqrt(int *m, int *n, int *nb, s *a, int *lda, s *t, int *ldt, s *work, int *info) noexcept nogil: + + _fortran_sgeqrt(m, n, nb, a, lda, t, ldt, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgeqrt2 "BLAS_FUNC(sgeqrt2)"(int *m, int *n, s *a, int *lda, s *t, int *ldt, int *info) nogil +cdef void sgeqrt2(int *m, int *n, s *a, int *lda, s *t, int *ldt, int *info) noexcept nogil: + + _fortran_sgeqrt2(m, n, a, lda, t, ldt, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgeqrt3 "BLAS_FUNC(sgeqrt3)"(int *m, int *n, s *a, int *lda, s *t, int *ldt, int *info) nogil +cdef void sgeqrt3(int *m, int *n, s *a, int *lda, s *t, int *ldt, int *info) noexcept nogil: + + _fortran_sgeqrt3(m, n, a, lda, t, ldt, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgerfs "BLAS_FUNC(sgerfs)"(char *trans, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) nogil +cdef void sgerfs(char *trans, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_sgerfs(trans, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgerq2 "BLAS_FUNC(sgerq2)"(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) nogil +cdef void sgerq2(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil: + + _fortran_sgerq2(m, n, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgerqf "BLAS_FUNC(sgerqf)"(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil +cdef void sgerqf(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sgerqf(m, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgesc2 "BLAS_FUNC(sgesc2)"(int *n, s *a, int *lda, s *rhs, int *ipiv, int *jpiv, s *scale) nogil +cdef void sgesc2(int *n, s *a, int *lda, s *rhs, int *ipiv, int *jpiv, s *scale) noexcept nogil: + + _fortran_sgesc2(n, a, lda, rhs, ipiv, jpiv, scale) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgesdd "BLAS_FUNC(sgesdd)"(char *jobz, int *m, int *n, s *a, int *lda, s *s, s *u, int *ldu, s *vt, int *ldvt, s *work, int *lwork, int *iwork, int *info) nogil +cdef void sgesdd(char *jobz, int *m, int *n, s *a, int *lda, s *s, s *u, int *ldu, s *vt, int *ldvt, s *work, int *lwork, int *iwork, int *info) noexcept nogil: + + _fortran_sgesdd(jobz, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgesv "BLAS_FUNC(sgesv)"(int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, int *info) nogil +cdef void sgesv(int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, int *info) noexcept nogil: + + _fortran_sgesv(n, nrhs, a, lda, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgesvd "BLAS_FUNC(sgesvd)"(char *jobu, char *jobvt, int *m, int *n, s *a, int *lda, s *s, s *u, int *ldu, s *vt, int *ldvt, s *work, int *lwork, int *info) nogil +cdef void sgesvd(char *jobu, char *jobvt, int *m, int *n, s *a, int *lda, s *s, s *u, int *ldu, s *vt, int *ldvt, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sgesvd(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgesvj "BLAS_FUNC(sgesvj)"(char *joba, char *jobu, char *jobv, int *m, int *n, s *a, int *lda, s *sva, int *mv, s *v, int *ldv, s *work, int *lwork, int *info) nogil +cdef void sgesvj(char *joba, char *jobu, char *jobv, int *m, int *n, s *a, int *lda, s *sva, int *mv, s *v, int *ldv, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sgesvj(joba, jobu, jobv, m, n, a, lda, sva, mv, v, ldv, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgesvx "BLAS_FUNC(sgesvx)"(char *fact, char *trans, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, int *ipiv, char *equed, s *r, s *c, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) nogil +cdef void sgesvx(char *fact, char *trans, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, int *ipiv, char *equed, s *r, s *c, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_sgesvx(fact, trans, n, nrhs, a, lda, af, ldaf, ipiv, equed, r, c, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgetc2 "BLAS_FUNC(sgetc2)"(int *n, s *a, int *lda, int *ipiv, int *jpiv, int *info) nogil +cdef void sgetc2(int *n, s *a, int *lda, int *ipiv, int *jpiv, int *info) noexcept nogil: + + _fortran_sgetc2(n, a, lda, ipiv, jpiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgetf2 "BLAS_FUNC(sgetf2)"(int *m, int *n, s *a, int *lda, int *ipiv, int *info) nogil +cdef void sgetf2(int *m, int *n, s *a, int *lda, int *ipiv, int *info) noexcept nogil: + + _fortran_sgetf2(m, n, a, lda, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgetrf "BLAS_FUNC(sgetrf)"(int *m, int *n, s *a, int *lda, int *ipiv, int *info) nogil +cdef void sgetrf(int *m, int *n, s *a, int *lda, int *ipiv, int *info) noexcept nogil: + + _fortran_sgetrf(m, n, a, lda, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgetri "BLAS_FUNC(sgetri)"(int *n, s *a, int *lda, int *ipiv, s *work, int *lwork, int *info) nogil +cdef void sgetri(int *n, s *a, int *lda, int *ipiv, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sgetri(n, a, lda, ipiv, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgetrs "BLAS_FUNC(sgetrs)"(char *trans, int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, int *info) nogil +cdef void sgetrs(char *trans, int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, int *info) noexcept nogil: + + _fortran_sgetrs(trans, n, nrhs, a, lda, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sggbak "BLAS_FUNC(sggbak)"(char *job, char *side, int *n, int *ilo, int *ihi, s *lscale, s *rscale, int *m, s *v, int *ldv, int *info) nogil +cdef void sggbak(char *job, char *side, int *n, int *ilo, int *ihi, s *lscale, s *rscale, int *m, s *v, int *ldv, int *info) noexcept nogil: + + _fortran_sggbak(job, side, n, ilo, ihi, lscale, rscale, m, v, ldv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sggbal "BLAS_FUNC(sggbal)"(char *job, int *n, s *a, int *lda, s *b, int *ldb, int *ilo, int *ihi, s *lscale, s *rscale, s *work, int *info) nogil +cdef void sggbal(char *job, int *n, s *a, int *lda, s *b, int *ldb, int *ilo, int *ihi, s *lscale, s *rscale, s *work, int *info) noexcept nogil: + + _fortran_sggbal(job, n, a, lda, b, ldb, ilo, ihi, lscale, rscale, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgges "BLAS_FUNC(sgges)"(char *jobvsl, char *jobvsr, char *sort, _sselect3 *selctg, int *n, s *a, int *lda, s *b, int *ldb, int *sdim, s *alphar, s *alphai, s *beta, s *vsl, int *ldvsl, s *vsr, int *ldvsr, s *work, int *lwork, bint *bwork, int *info) nogil +cdef void sgges(char *jobvsl, char *jobvsr, char *sort, sselect3 *selctg, int *n, s *a, int *lda, s *b, int *ldb, int *sdim, s *alphar, s *alphai, s *beta, s *vsl, int *ldvsl, s *vsr, int *ldvsr, s *work, int *lwork, bint *bwork, int *info) noexcept nogil: + + _fortran_sgges(jobvsl, jobvsr, sort, <_sselect3*>selctg, n, a, lda, b, ldb, sdim, alphar, alphai, beta, vsl, ldvsl, vsr, ldvsr, work, lwork, bwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sggesx "BLAS_FUNC(sggesx)"(char *jobvsl, char *jobvsr, char *sort, _sselect3 *selctg, char *sense, int *n, s *a, int *lda, s *b, int *ldb, int *sdim, s *alphar, s *alphai, s *beta, s *vsl, int *ldvsl, s *vsr, int *ldvsr, s *rconde, s *rcondv, s *work, int *lwork, int *iwork, int *liwork, bint *bwork, int *info) nogil +cdef void sggesx(char *jobvsl, char *jobvsr, char *sort, sselect3 *selctg, char *sense, int *n, s *a, int *lda, s *b, int *ldb, int *sdim, s *alphar, s *alphai, s *beta, s *vsl, int *ldvsl, s *vsr, int *ldvsr, s *rconde, s *rcondv, s *work, int *lwork, int *iwork, int *liwork, bint *bwork, int *info) noexcept nogil: + + _fortran_sggesx(jobvsl, jobvsr, sort, <_sselect3*>selctg, sense, n, a, lda, b, ldb, sdim, alphar, alphai, beta, vsl, ldvsl, vsr, ldvsr, rconde, rcondv, work, lwork, iwork, liwork, bwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sggev "BLAS_FUNC(sggev)"(char *jobvl, char *jobvr, int *n, s *a, int *lda, s *b, int *ldb, s *alphar, s *alphai, s *beta, s *vl, int *ldvl, s *vr, int *ldvr, s *work, int *lwork, int *info) nogil +cdef void sggev(char *jobvl, char *jobvr, int *n, s *a, int *lda, s *b, int *ldb, s *alphar, s *alphai, s *beta, s *vl, int *ldvl, s *vr, int *ldvr, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sggev(jobvl, jobvr, n, a, lda, b, ldb, alphar, alphai, beta, vl, ldvl, vr, ldvr, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sggevx "BLAS_FUNC(sggevx)"(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, s *a, int *lda, s *b, int *ldb, s *alphar, s *alphai, s *beta, s *vl, int *ldvl, s *vr, int *ldvr, int *ilo, int *ihi, s *lscale, s *rscale, s *abnrm, s *bbnrm, s *rconde, s *rcondv, s *work, int *lwork, int *iwork, bint *bwork, int *info) nogil +cdef void sggevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, s *a, int *lda, s *b, int *ldb, s *alphar, s *alphai, s *beta, s *vl, int *ldvl, s *vr, int *ldvr, int *ilo, int *ihi, s *lscale, s *rscale, s *abnrm, s *bbnrm, s *rconde, s *rcondv, s *work, int *lwork, int *iwork, bint *bwork, int *info) noexcept nogil: + + _fortran_sggevx(balanc, jobvl, jobvr, sense, n, a, lda, b, ldb, alphar, alphai, beta, vl, ldvl, vr, ldvr, ilo, ihi, lscale, rscale, abnrm, bbnrm, rconde, rcondv, work, lwork, iwork, bwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sggglm "BLAS_FUNC(sggglm)"(int *n, int *m, int *p, s *a, int *lda, s *b, int *ldb, s *d, s *x, s *y, s *work, int *lwork, int *info) nogil +cdef void sggglm(int *n, int *m, int *p, s *a, int *lda, s *b, int *ldb, s *d, s *x, s *y, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sggglm(n, m, p, a, lda, b, ldb, d, x, y, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgghrd "BLAS_FUNC(sgghrd)"(char *compq, char *compz, int *n, int *ilo, int *ihi, s *a, int *lda, s *b, int *ldb, s *q, int *ldq, s *z, int *ldz, int *info) nogil +cdef void sgghrd(char *compq, char *compz, int *n, int *ilo, int *ihi, s *a, int *lda, s *b, int *ldb, s *q, int *ldq, s *z, int *ldz, int *info) noexcept nogil: + + _fortran_sgghrd(compq, compz, n, ilo, ihi, a, lda, b, ldb, q, ldq, z, ldz, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgglse "BLAS_FUNC(sgglse)"(int *m, int *n, int *p, s *a, int *lda, s *b, int *ldb, s *c, s *d, s *x, s *work, int *lwork, int *info) nogil +cdef void sgglse(int *m, int *n, int *p, s *a, int *lda, s *b, int *ldb, s *c, s *d, s *x, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sgglse(m, n, p, a, lda, b, ldb, c, d, x, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sggqrf "BLAS_FUNC(sggqrf)"(int *n, int *m, int *p, s *a, int *lda, s *taua, s *b, int *ldb, s *taub, s *work, int *lwork, int *info) nogil +cdef void sggqrf(int *n, int *m, int *p, s *a, int *lda, s *taua, s *b, int *ldb, s *taub, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sggqrf(n, m, p, a, lda, taua, b, ldb, taub, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sggrqf "BLAS_FUNC(sggrqf)"(int *m, int *p, int *n, s *a, int *lda, s *taua, s *b, int *ldb, s *taub, s *work, int *lwork, int *info) nogil +cdef void sggrqf(int *m, int *p, int *n, s *a, int *lda, s *taua, s *b, int *ldb, s *taub, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sggrqf(m, p, n, a, lda, taua, b, ldb, taub, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgsvj0 "BLAS_FUNC(sgsvj0)"(char *jobv, int *m, int *n, s *a, int *lda, s *d, s *sva, int *mv, s *v, int *ldv, s *eps, s *sfmin, s *tol, int *nsweep, s *work, int *lwork, int *info) nogil +cdef void sgsvj0(char *jobv, int *m, int *n, s *a, int *lda, s *d, s *sva, int *mv, s *v, int *ldv, s *eps, s *sfmin, s *tol, int *nsweep, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sgsvj0(jobv, m, n, a, lda, d, sva, mv, v, ldv, eps, sfmin, tol, nsweep, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgsvj1 "BLAS_FUNC(sgsvj1)"(char *jobv, int *m, int *n, int *n1, s *a, int *lda, s *d, s *sva, int *mv, s *v, int *ldv, s *eps, s *sfmin, s *tol, int *nsweep, s *work, int *lwork, int *info) nogil +cdef void sgsvj1(char *jobv, int *m, int *n, int *n1, s *a, int *lda, s *d, s *sva, int *mv, s *v, int *ldv, s *eps, s *sfmin, s *tol, int *nsweep, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sgsvj1(jobv, m, n, n1, a, lda, d, sva, mv, v, ldv, eps, sfmin, tol, nsweep, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgtcon "BLAS_FUNC(sgtcon)"(char *norm, int *n, s *dl, s *d, s *du, s *du2, int *ipiv, s *anorm, s *rcond, s *work, int *iwork, int *info) nogil +cdef void sgtcon(char *norm, int *n, s *dl, s *d, s *du, s *du2, int *ipiv, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_sgtcon(norm, n, dl, d, du, du2, ipiv, anorm, rcond, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgtrfs "BLAS_FUNC(sgtrfs)"(char *trans, int *n, int *nrhs, s *dl, s *d, s *du, s *dlf, s *df, s *duf, s *du2, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) nogil +cdef void sgtrfs(char *trans, int *n, int *nrhs, s *dl, s *d, s *du, s *dlf, s *df, s *duf, s *du2, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_sgtrfs(trans, n, nrhs, dl, d, du, dlf, df, duf, du2, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgtsv "BLAS_FUNC(sgtsv)"(int *n, int *nrhs, s *dl, s *d, s *du, s *b, int *ldb, int *info) nogil +cdef void sgtsv(int *n, int *nrhs, s *dl, s *d, s *du, s *b, int *ldb, int *info) noexcept nogil: + + _fortran_sgtsv(n, nrhs, dl, d, du, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgtsvx "BLAS_FUNC(sgtsvx)"(char *fact, char *trans, int *n, int *nrhs, s *dl, s *d, s *du, s *dlf, s *df, s *duf, s *du2, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) nogil +cdef void sgtsvx(char *fact, char *trans, int *n, int *nrhs, s *dl, s *d, s *du, s *dlf, s *df, s *duf, s *du2, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_sgtsvx(fact, trans, n, nrhs, dl, d, du, dlf, df, duf, du2, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgttrf "BLAS_FUNC(sgttrf)"(int *n, s *dl, s *d, s *du, s *du2, int *ipiv, int *info) nogil +cdef void sgttrf(int *n, s *dl, s *d, s *du, s *du2, int *ipiv, int *info) noexcept nogil: + + _fortran_sgttrf(n, dl, d, du, du2, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgttrs "BLAS_FUNC(sgttrs)"(char *trans, int *n, int *nrhs, s *dl, s *d, s *du, s *du2, int *ipiv, s *b, int *ldb, int *info) nogil +cdef void sgttrs(char *trans, int *n, int *nrhs, s *dl, s *d, s *du, s *du2, int *ipiv, s *b, int *ldb, int *info) noexcept nogil: + + _fortran_sgttrs(trans, n, nrhs, dl, d, du, du2, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sgtts2 "BLAS_FUNC(sgtts2)"(int *itrans, int *n, int *nrhs, s *dl, s *d, s *du, s *du2, int *ipiv, s *b, int *ldb) nogil +cdef void sgtts2(int *itrans, int *n, int *nrhs, s *dl, s *d, s *du, s *du2, int *ipiv, s *b, int *ldb) noexcept nogil: + + _fortran_sgtts2(itrans, n, nrhs, dl, d, du, du2, ipiv, b, ldb) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_shgeqz "BLAS_FUNC(shgeqz)"(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *t, int *ldt, s *alphar, s *alphai, s *beta, s *q, int *ldq, s *z, int *ldz, s *work, int *lwork, int *info) nogil +cdef void shgeqz(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *t, int *ldt, s *alphar, s *alphai, s *beta, s *q, int *ldq, s *z, int *ldz, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_shgeqz(job, compq, compz, n, ilo, ihi, h, ldh, t, ldt, alphar, alphai, beta, q, ldq, z, ldz, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_shsein "BLAS_FUNC(shsein)"(char *side, char *eigsrc, char *initv, bint *select, int *n, s *h, int *ldh, s *wr, s *wi, s *vl, int *ldvl, s *vr, int *ldvr, int *mm, int *m, s *work, int *ifaill, int *ifailr, int *info) nogil +cdef void shsein(char *side, char *eigsrc, char *initv, bint *select, int *n, s *h, int *ldh, s *wr, s *wi, s *vl, int *ldvl, s *vr, int *ldvr, int *mm, int *m, s *work, int *ifaill, int *ifailr, int *info) noexcept nogil: + + _fortran_shsein(side, eigsrc, initv, select, n, h, ldh, wr, wi, vl, ldvl, vr, ldvr, mm, m, work, ifaill, ifailr, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_shseqr "BLAS_FUNC(shseqr)"(char *job, char *compz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *wr, s *wi, s *z, int *ldz, s *work, int *lwork, int *info) nogil +cdef void shseqr(char *job, char *compz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *wr, s *wi, s *z, int *ldz, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_shseqr(job, compz, n, ilo, ihi, h, ldh, wr, wi, z, ldz, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slabad "BLAS_FUNC(slabad)"(s *small, s *large) nogil +cdef void slabad(s *small, s *large) noexcept nogil: + + _fortran_slabad(small, large) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slabrd "BLAS_FUNC(slabrd)"(int *m, int *n, int *nb, s *a, int *lda, s *d, s *e, s *tauq, s *taup, s *x, int *ldx, s *y, int *ldy) nogil +cdef void slabrd(int *m, int *n, int *nb, s *a, int *lda, s *d, s *e, s *tauq, s *taup, s *x, int *ldx, s *y, int *ldy) noexcept nogil: + + _fortran_slabrd(m, n, nb, a, lda, d, e, tauq, taup, x, ldx, y, ldy) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slacn2 "BLAS_FUNC(slacn2)"(int *n, s *v, s *x, int *isgn, s *est, int *kase, int *isave) nogil +cdef void slacn2(int *n, s *v, s *x, int *isgn, s *est, int *kase, int *isave) noexcept nogil: + + _fortran_slacn2(n, v, x, isgn, est, kase, isave) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slacon "BLAS_FUNC(slacon)"(int *n, s *v, s *x, int *isgn, s *est, int *kase) nogil +cdef void slacon(int *n, s *v, s *x, int *isgn, s *est, int *kase) noexcept nogil: + + _fortran_slacon(n, v, x, isgn, est, kase) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slacpy "BLAS_FUNC(slacpy)"(char *uplo, int *m, int *n, s *a, int *lda, s *b, int *ldb) nogil +cdef void slacpy(char *uplo, int *m, int *n, s *a, int *lda, s *b, int *ldb) noexcept nogil: + + _fortran_slacpy(uplo, m, n, a, lda, b, ldb) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sladiv "BLAS_FUNC(sladiv)"(s *a, s *b, s *c, s *d, s *p, s *q) nogil +cdef void sladiv(s *a, s *b, s *c, s *d, s *p, s *q) noexcept nogil: + + _fortran_sladiv(a, b, c, d, p, q) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slae2 "BLAS_FUNC(slae2)"(s *a, s *b, s *c, s *rt1, s *rt2) nogil +cdef void slae2(s *a, s *b, s *c, s *rt1, s *rt2) noexcept nogil: + + _fortran_slae2(a, b, c, rt1, rt2) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaebz "BLAS_FUNC(slaebz)"(int *ijob, int *nitmax, int *n, int *mmax, int *minp, int *nbmin, s *abstol, s *reltol, s *pivmin, s *d, s *e, s *e2, int *nval, s *ab, s *c, int *mout, int *nab, s *work, int *iwork, int *info) nogil +cdef void slaebz(int *ijob, int *nitmax, int *n, int *mmax, int *minp, int *nbmin, s *abstol, s *reltol, s *pivmin, s *d, s *e, s *e2, int *nval, s *ab, s *c, int *mout, int *nab, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_slaebz(ijob, nitmax, n, mmax, minp, nbmin, abstol, reltol, pivmin, d, e, e2, nval, ab, c, mout, nab, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaed0 "BLAS_FUNC(slaed0)"(int *icompq, int *qsiz, int *n, s *d, s *e, s *q, int *ldq, s *qstore, int *ldqs, s *work, int *iwork, int *info) nogil +cdef void slaed0(int *icompq, int *qsiz, int *n, s *d, s *e, s *q, int *ldq, s *qstore, int *ldqs, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_slaed0(icompq, qsiz, n, d, e, q, ldq, qstore, ldqs, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaed1 "BLAS_FUNC(slaed1)"(int *n, s *d, s *q, int *ldq, int *indxq, s *rho, int *cutpnt, s *work, int *iwork, int *info) nogil +cdef void slaed1(int *n, s *d, s *q, int *ldq, int *indxq, s *rho, int *cutpnt, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_slaed1(n, d, q, ldq, indxq, rho, cutpnt, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaed2 "BLAS_FUNC(slaed2)"(int *k, int *n, int *n1, s *d, s *q, int *ldq, int *indxq, s *rho, s *z, s *dlamda, s *w, s *q2, int *indx, int *indxc, int *indxp, int *coltyp, int *info) nogil +cdef void slaed2(int *k, int *n, int *n1, s *d, s *q, int *ldq, int *indxq, s *rho, s *z, s *dlamda, s *w, s *q2, int *indx, int *indxc, int *indxp, int *coltyp, int *info) noexcept nogil: + + _fortran_slaed2(k, n, n1, d, q, ldq, indxq, rho, z, dlamda, w, q2, indx, indxc, indxp, coltyp, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaed3 "BLAS_FUNC(slaed3)"(int *k, int *n, int *n1, s *d, s *q, int *ldq, s *rho, s *dlamda, s *q2, int *indx, int *ctot, s *w, s *s, int *info) nogil +cdef void slaed3(int *k, int *n, int *n1, s *d, s *q, int *ldq, s *rho, s *dlamda, s *q2, int *indx, int *ctot, s *w, s *s, int *info) noexcept nogil: + + _fortran_slaed3(k, n, n1, d, q, ldq, rho, dlamda, q2, indx, ctot, w, s, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaed4 "BLAS_FUNC(slaed4)"(int *n, int *i, s *d, s *z, s *delta, s *rho, s *dlam, int *info) nogil +cdef void slaed4(int *n, int *i, s *d, s *z, s *delta, s *rho, s *dlam, int *info) noexcept nogil: + + _fortran_slaed4(n, i, d, z, delta, rho, dlam, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaed5 "BLAS_FUNC(slaed5)"(int *i, s *d, s *z, s *delta, s *rho, s *dlam) nogil +cdef void slaed5(int *i, s *d, s *z, s *delta, s *rho, s *dlam) noexcept nogil: + + _fortran_slaed5(i, d, z, delta, rho, dlam) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaed6 "BLAS_FUNC(slaed6)"(int *kniter, bint *orgati, s *rho, s *d, s *z, s *finit, s *tau, int *info) nogil +cdef void slaed6(int *kniter, bint *orgati, s *rho, s *d, s *z, s *finit, s *tau, int *info) noexcept nogil: + + _fortran_slaed6(kniter, orgati, rho, d, z, finit, tau, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaed7 "BLAS_FUNC(slaed7)"(int *icompq, int *n, int *qsiz, int *tlvls, int *curlvl, int *curpbm, s *d, s *q, int *ldq, int *indxq, s *rho, int *cutpnt, s *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, s *givnum, s *work, int *iwork, int *info) nogil +cdef void slaed7(int *icompq, int *n, int *qsiz, int *tlvls, int *curlvl, int *curpbm, s *d, s *q, int *ldq, int *indxq, s *rho, int *cutpnt, s *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, s *givnum, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_slaed7(icompq, n, qsiz, tlvls, curlvl, curpbm, d, q, ldq, indxq, rho, cutpnt, qstore, qptr, prmptr, perm, givptr, givcol, givnum, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaed8 "BLAS_FUNC(slaed8)"(int *icompq, int *k, int *n, int *qsiz, s *d, s *q, int *ldq, int *indxq, s *rho, int *cutpnt, s *z, s *dlamda, s *q2, int *ldq2, s *w, int *perm, int *givptr, int *givcol, s *givnum, int *indxp, int *indx, int *info) nogil +cdef void slaed8(int *icompq, int *k, int *n, int *qsiz, s *d, s *q, int *ldq, int *indxq, s *rho, int *cutpnt, s *z, s *dlamda, s *q2, int *ldq2, s *w, int *perm, int *givptr, int *givcol, s *givnum, int *indxp, int *indx, int *info) noexcept nogil: + + _fortran_slaed8(icompq, k, n, qsiz, d, q, ldq, indxq, rho, cutpnt, z, dlamda, q2, ldq2, w, perm, givptr, givcol, givnum, indxp, indx, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaed9 "BLAS_FUNC(slaed9)"(int *k, int *kstart, int *kstop, int *n, s *d, s *q, int *ldq, s *rho, s *dlamda, s *w, s *s, int *lds, int *info) nogil +cdef void slaed9(int *k, int *kstart, int *kstop, int *n, s *d, s *q, int *ldq, s *rho, s *dlamda, s *w, s *s, int *lds, int *info) noexcept nogil: + + _fortran_slaed9(k, kstart, kstop, n, d, q, ldq, rho, dlamda, w, s, lds, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaeda "BLAS_FUNC(slaeda)"(int *n, int *tlvls, int *curlvl, int *curpbm, int *prmptr, int *perm, int *givptr, int *givcol, s *givnum, s *q, int *qptr, s *z, s *ztemp, int *info) nogil +cdef void slaeda(int *n, int *tlvls, int *curlvl, int *curpbm, int *prmptr, int *perm, int *givptr, int *givcol, s *givnum, s *q, int *qptr, s *z, s *ztemp, int *info) noexcept nogil: + + _fortran_slaeda(n, tlvls, curlvl, curpbm, prmptr, perm, givptr, givcol, givnum, q, qptr, z, ztemp, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaein "BLAS_FUNC(slaein)"(bint *rightv, bint *noinit, int *n, s *h, int *ldh, s *wr, s *wi, s *vr, s *vi, s *b, int *ldb, s *work, s *eps3, s *smlnum, s *bignum, int *info) nogil +cdef void slaein(bint *rightv, bint *noinit, int *n, s *h, int *ldh, s *wr, s *wi, s *vr, s *vi, s *b, int *ldb, s *work, s *eps3, s *smlnum, s *bignum, int *info) noexcept nogil: + + _fortran_slaein(rightv, noinit, n, h, ldh, wr, wi, vr, vi, b, ldb, work, eps3, smlnum, bignum, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaev2 "BLAS_FUNC(slaev2)"(s *a, s *b, s *c, s *rt1, s *rt2, s *cs1, s *sn1) nogil +cdef void slaev2(s *a, s *b, s *c, s *rt1, s *rt2, s *cs1, s *sn1) noexcept nogil: + + _fortran_slaev2(a, b, c, rt1, rt2, cs1, sn1) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaexc "BLAS_FUNC(slaexc)"(bint *wantq, int *n, s *t, int *ldt, s *q, int *ldq, int *j1, int *n1, int *n2, s *work, int *info) nogil +cdef void slaexc(bint *wantq, int *n, s *t, int *ldt, s *q, int *ldq, int *j1, int *n1, int *n2, s *work, int *info) noexcept nogil: + + _fortran_slaexc(wantq, n, t, ldt, q, ldq, j1, n1, n2, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slag2 "BLAS_FUNC(slag2)"(s *a, int *lda, s *b, int *ldb, s *safmin, s *scale1, s *scale2, s *wr1, s *wr2, s *wi) nogil +cdef void slag2(s *a, int *lda, s *b, int *ldb, s *safmin, s *scale1, s *scale2, s *wr1, s *wr2, s *wi) noexcept nogil: + + _fortran_slag2(a, lda, b, ldb, safmin, scale1, scale2, wr1, wr2, wi) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slag2d "BLAS_FUNC(slag2d)"(int *m, int *n, s *sa, int *ldsa, d *a, int *lda, int *info) nogil +cdef void slag2d(int *m, int *n, s *sa, int *ldsa, d *a, int *lda, int *info) noexcept nogil: + + _fortran_slag2d(m, n, sa, ldsa, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slags2 "BLAS_FUNC(slags2)"(bint *upper, s *a1, s *a2, s *a3, s *b1, s *b2, s *b3, s *csu, s *snu, s *csv, s *snv, s *csq, s *snq) nogil +cdef void slags2(bint *upper, s *a1, s *a2, s *a3, s *b1, s *b2, s *b3, s *csu, s *snu, s *csv, s *snv, s *csq, s *snq) noexcept nogil: + + _fortran_slags2(upper, a1, a2, a3, b1, b2, b3, csu, snu, csv, snv, csq, snq) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slagtf "BLAS_FUNC(slagtf)"(int *n, s *a, s *lambda_, s *b, s *c, s *tol, s *d, int *in_, int *info) nogil +cdef void slagtf(int *n, s *a, s *lambda_, s *b, s *c, s *tol, s *d, int *in_, int *info) noexcept nogil: + + _fortran_slagtf(n, a, lambda_, b, c, tol, d, in_, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slagtm "BLAS_FUNC(slagtm)"(char *trans, int *n, int *nrhs, s *alpha, s *dl, s *d, s *du, s *x, int *ldx, s *beta, s *b, int *ldb) nogil +cdef void slagtm(char *trans, int *n, int *nrhs, s *alpha, s *dl, s *d, s *du, s *x, int *ldx, s *beta, s *b, int *ldb) noexcept nogil: + + _fortran_slagtm(trans, n, nrhs, alpha, dl, d, du, x, ldx, beta, b, ldb) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slagts "BLAS_FUNC(slagts)"(int *job, int *n, s *a, s *b, s *c, s *d, int *in_, s *y, s *tol, int *info) nogil +cdef void slagts(int *job, int *n, s *a, s *b, s *c, s *d, int *in_, s *y, s *tol, int *info) noexcept nogil: + + _fortran_slagts(job, n, a, b, c, d, in_, y, tol, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slagv2 "BLAS_FUNC(slagv2)"(s *a, int *lda, s *b, int *ldb, s *alphar, s *alphai, s *beta, s *csl, s *snl, s *csr, s *snr) nogil +cdef void slagv2(s *a, int *lda, s *b, int *ldb, s *alphar, s *alphai, s *beta, s *csl, s *snl, s *csr, s *snr) noexcept nogil: + + _fortran_slagv2(a, lda, b, ldb, alphar, alphai, beta, csl, snl, csr, snr) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slahqr "BLAS_FUNC(slahqr)"(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *wr, s *wi, int *iloz, int *ihiz, s *z, int *ldz, int *info) nogil +cdef void slahqr(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *wr, s *wi, int *iloz, int *ihiz, s *z, int *ldz, int *info) noexcept nogil: + + _fortran_slahqr(wantt, wantz, n, ilo, ihi, h, ldh, wr, wi, iloz, ihiz, z, ldz, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slahr2 "BLAS_FUNC(slahr2)"(int *n, int *k, int *nb, s *a, int *lda, s *tau, s *t, int *ldt, s *y, int *ldy) nogil +cdef void slahr2(int *n, int *k, int *nb, s *a, int *lda, s *tau, s *t, int *ldt, s *y, int *ldy) noexcept nogil: + + _fortran_slahr2(n, k, nb, a, lda, tau, t, ldt, y, ldy) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaic1 "BLAS_FUNC(slaic1)"(int *job, int *j, s *x, s *sest, s *w, s *gamma, s *sestpr, s *s, s *c) nogil +cdef void slaic1(int *job, int *j, s *x, s *sest, s *w, s *gamma, s *sestpr, s *s, s *c) noexcept nogil: + + _fortran_slaic1(job, j, x, sest, w, gamma, sestpr, s, c) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaln2 "BLAS_FUNC(slaln2)"(bint *ltrans, int *na, int *nw, s *smin, s *ca, s *a, int *lda, s *d1, s *d2, s *b, int *ldb, s *wr, s *wi, s *x, int *ldx, s *scale, s *xnorm, int *info) nogil +cdef void slaln2(bint *ltrans, int *na, int *nw, s *smin, s *ca, s *a, int *lda, s *d1, s *d2, s *b, int *ldb, s *wr, s *wi, s *x, int *ldx, s *scale, s *xnorm, int *info) noexcept nogil: + + _fortran_slaln2(ltrans, na, nw, smin, ca, a, lda, d1, d2, b, ldb, wr, wi, x, ldx, scale, xnorm, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slals0 "BLAS_FUNC(slals0)"(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, s *b, int *ldb, s *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, s *givnum, int *ldgnum, s *poles, s *difl, s *difr, s *z, int *k, s *c, s *s, s *work, int *info) nogil +cdef void slals0(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, s *b, int *ldb, s *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, s *givnum, int *ldgnum, s *poles, s *difl, s *difr, s *z, int *k, s *c, s *s, s *work, int *info) noexcept nogil: + + _fortran_slals0(icompq, nl, nr, sqre, nrhs, b, ldb, bx, ldbx, perm, givptr, givcol, ldgcol, givnum, ldgnum, poles, difl, difr, z, k, c, s, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slalsa "BLAS_FUNC(slalsa)"(int *icompq, int *smlsiz, int *n, int *nrhs, s *b, int *ldb, s *bx, int *ldbx, s *u, int *ldu, s *vt, int *k, s *difl, s *difr, s *z, s *poles, int *givptr, int *givcol, int *ldgcol, int *perm, s *givnum, s *c, s *s, s *work, int *iwork, int *info) nogil +cdef void slalsa(int *icompq, int *smlsiz, int *n, int *nrhs, s *b, int *ldb, s *bx, int *ldbx, s *u, int *ldu, s *vt, int *k, s *difl, s *difr, s *z, s *poles, int *givptr, int *givcol, int *ldgcol, int *perm, s *givnum, s *c, s *s, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_slalsa(icompq, smlsiz, n, nrhs, b, ldb, bx, ldbx, u, ldu, vt, k, difl, difr, z, poles, givptr, givcol, ldgcol, perm, givnum, c, s, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slalsd "BLAS_FUNC(slalsd)"(char *uplo, int *smlsiz, int *n, int *nrhs, s *d, s *e, s *b, int *ldb, s *rcond, int *rank, s *work, int *iwork, int *info) nogil +cdef void slalsd(char *uplo, int *smlsiz, int *n, int *nrhs, s *d, s *e, s *b, int *ldb, s *rcond, int *rank, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_slalsd(uplo, smlsiz, n, nrhs, d, e, b, ldb, rcond, rank, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_slamch "BLAS_FUNC(slamch)"(char *cmach) nogil +cdef s slamch(char *cmach) noexcept nogil: + + return _fortran_slamch(cmach) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slamrg "BLAS_FUNC(slamrg)"(int *n1, int *n2, s *a, int *strd1, int *strd2, int *index_bn) nogil +cdef void slamrg(int *n1, int *n2, s *a, int *strd1, int *strd2, int *index_bn) noexcept nogil: + + _fortran_slamrg(n1, n2, a, strd1, strd2, index_bn) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_slangb "BLAS_FUNC(slangb)"(char *norm, int *n, int *kl, int *ku, s *ab, int *ldab, s *work) nogil +cdef s slangb(char *norm, int *n, int *kl, int *ku, s *ab, int *ldab, s *work) noexcept nogil: + + return _fortran_slangb(norm, n, kl, ku, ab, ldab, work) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_slange "BLAS_FUNC(slange)"(char *norm, int *m, int *n, s *a, int *lda, s *work) nogil +cdef s slange(char *norm, int *m, int *n, s *a, int *lda, s *work) noexcept nogil: + + return _fortran_slange(norm, m, n, a, lda, work) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_slangt "BLAS_FUNC(slangt)"(char *norm, int *n, s *dl, s *d, s *du) nogil +cdef s slangt(char *norm, int *n, s *dl, s *d, s *du) noexcept nogil: + + return _fortran_slangt(norm, n, dl, d, du) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_slanhs "BLAS_FUNC(slanhs)"(char *norm, int *n, s *a, int *lda, s *work) nogil +cdef s slanhs(char *norm, int *n, s *a, int *lda, s *work) noexcept nogil: + + return _fortran_slanhs(norm, n, a, lda, work) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_slansb "BLAS_FUNC(slansb)"(char *norm, char *uplo, int *n, int *k, s *ab, int *ldab, s *work) nogil +cdef s slansb(char *norm, char *uplo, int *n, int *k, s *ab, int *ldab, s *work) noexcept nogil: + + return _fortran_slansb(norm, uplo, n, k, ab, ldab, work) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_slansf "BLAS_FUNC(slansf)"(char *norm, char *transr, char *uplo, int *n, s *a, s *work) nogil +cdef s slansf(char *norm, char *transr, char *uplo, int *n, s *a, s *work) noexcept nogil: + + return _fortran_slansf(norm, transr, uplo, n, a, work) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_slansp "BLAS_FUNC(slansp)"(char *norm, char *uplo, int *n, s *ap, s *work) nogil +cdef s slansp(char *norm, char *uplo, int *n, s *ap, s *work) noexcept nogil: + + return _fortran_slansp(norm, uplo, n, ap, work) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_slanst "BLAS_FUNC(slanst)"(char *norm, int *n, s *d, s *e) nogil +cdef s slanst(char *norm, int *n, s *d, s *e) noexcept nogil: + + return _fortran_slanst(norm, n, d, e) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_slansy "BLAS_FUNC(slansy)"(char *norm, char *uplo, int *n, s *a, int *lda, s *work) nogil +cdef s slansy(char *norm, char *uplo, int *n, s *a, int *lda, s *work) noexcept nogil: + + return _fortran_slansy(norm, uplo, n, a, lda, work) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_slantb "BLAS_FUNC(slantb)"(char *norm, char *uplo, char *diag, int *n, int *k, s *ab, int *ldab, s *work) nogil +cdef s slantb(char *norm, char *uplo, char *diag, int *n, int *k, s *ab, int *ldab, s *work) noexcept nogil: + + return _fortran_slantb(norm, uplo, diag, n, k, ab, ldab, work) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_slantp "BLAS_FUNC(slantp)"(char *norm, char *uplo, char *diag, int *n, s *ap, s *work) nogil +cdef s slantp(char *norm, char *uplo, char *diag, int *n, s *ap, s *work) noexcept nogil: + + return _fortran_slantp(norm, uplo, diag, n, ap, work) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_slantr "BLAS_FUNC(slantr)"(char *norm, char *uplo, char *diag, int *m, int *n, s *a, int *lda, s *work) nogil +cdef s slantr(char *norm, char *uplo, char *diag, int *m, int *n, s *a, int *lda, s *work) noexcept nogil: + + return _fortran_slantr(norm, uplo, diag, m, n, a, lda, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slanv2 "BLAS_FUNC(slanv2)"(s *a, s *b, s *c, s *d, s *rt1r, s *rt1i, s *rt2r, s *rt2i, s *cs, s *sn) nogil +cdef void slanv2(s *a, s *b, s *c, s *d, s *rt1r, s *rt1i, s *rt2r, s *rt2i, s *cs, s *sn) noexcept nogil: + + _fortran_slanv2(a, b, c, d, rt1r, rt1i, rt2r, rt2i, cs, sn) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slapll "BLAS_FUNC(slapll)"(int *n, s *x, int *incx, s *y, int *incy, s *ssmin) nogil +cdef void slapll(int *n, s *x, int *incx, s *y, int *incy, s *ssmin) noexcept nogil: + + _fortran_slapll(n, x, incx, y, incy, ssmin) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slapmr "BLAS_FUNC(slapmr)"(bint *forwrd, int *m, int *n, s *x, int *ldx, int *k) nogil +cdef void slapmr(bint *forwrd, int *m, int *n, s *x, int *ldx, int *k) noexcept nogil: + + _fortran_slapmr(forwrd, m, n, x, ldx, k) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slapmt "BLAS_FUNC(slapmt)"(bint *forwrd, int *m, int *n, s *x, int *ldx, int *k) nogil +cdef void slapmt(bint *forwrd, int *m, int *n, s *x, int *ldx, int *k) noexcept nogil: + + _fortran_slapmt(forwrd, m, n, x, ldx, k) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_slapy2 "BLAS_FUNC(slapy2)"(s *x, s *y) nogil +cdef s slapy2(s *x, s *y) noexcept nogil: + + return _fortran_slapy2(x, y) + + +cdef extern from "_lapack_subroutines.h": + s _fortran_slapy3 "BLAS_FUNC(slapy3)"(s *x, s *y, s *z) nogil +cdef s slapy3(s *x, s *y, s *z) noexcept nogil: + + return _fortran_slapy3(x, y, z) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaqgb "BLAS_FUNC(slaqgb)"(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, char *equed) nogil +cdef void slaqgb(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, char *equed) noexcept nogil: + + _fortran_slaqgb(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaqge "BLAS_FUNC(slaqge)"(int *m, int *n, s *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, char *equed) nogil +cdef void slaqge(int *m, int *n, s *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, char *equed) noexcept nogil: + + _fortran_slaqge(m, n, a, lda, r, c, rowcnd, colcnd, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaqp2 "BLAS_FUNC(slaqp2)"(int *m, int *n, int *offset, s *a, int *lda, int *jpvt, s *tau, s *vn1, s *vn2, s *work) nogil +cdef void slaqp2(int *m, int *n, int *offset, s *a, int *lda, int *jpvt, s *tau, s *vn1, s *vn2, s *work) noexcept nogil: + + _fortran_slaqp2(m, n, offset, a, lda, jpvt, tau, vn1, vn2, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaqps "BLAS_FUNC(slaqps)"(int *m, int *n, int *offset, int *nb, int *kb, s *a, int *lda, int *jpvt, s *tau, s *vn1, s *vn2, s *auxv, s *f, int *ldf) nogil +cdef void slaqps(int *m, int *n, int *offset, int *nb, int *kb, s *a, int *lda, int *jpvt, s *tau, s *vn1, s *vn2, s *auxv, s *f, int *ldf) noexcept nogil: + + _fortran_slaqps(m, n, offset, nb, kb, a, lda, jpvt, tau, vn1, vn2, auxv, f, ldf) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaqr0 "BLAS_FUNC(slaqr0)"(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *wr, s *wi, int *iloz, int *ihiz, s *z, int *ldz, s *work, int *lwork, int *info) nogil +cdef void slaqr0(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *wr, s *wi, int *iloz, int *ihiz, s *z, int *ldz, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_slaqr0(wantt, wantz, n, ilo, ihi, h, ldh, wr, wi, iloz, ihiz, z, ldz, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaqr1 "BLAS_FUNC(slaqr1)"(int *n, s *h, int *ldh, s *sr1, s *si1, s *sr2, s *si2, s *v) nogil +cdef void slaqr1(int *n, s *h, int *ldh, s *sr1, s *si1, s *sr2, s *si2, s *v) noexcept nogil: + + _fortran_slaqr1(n, h, ldh, sr1, si1, sr2, si2, v) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaqr2 "BLAS_FUNC(slaqr2)"(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, s *h, int *ldh, int *iloz, int *ihiz, s *z, int *ldz, int *ns, int *nd, s *sr, s *si, s *v, int *ldv, int *nh, s *t, int *ldt, int *nv, s *wv, int *ldwv, s *work, int *lwork) nogil +cdef void slaqr2(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, s *h, int *ldh, int *iloz, int *ihiz, s *z, int *ldz, int *ns, int *nd, s *sr, s *si, s *v, int *ldv, int *nh, s *t, int *ldt, int *nv, s *wv, int *ldwv, s *work, int *lwork) noexcept nogil: + + _fortran_slaqr2(wantt, wantz, n, ktop, kbot, nw, h, ldh, iloz, ihiz, z, ldz, ns, nd, sr, si, v, ldv, nh, t, ldt, nv, wv, ldwv, work, lwork) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaqr3 "BLAS_FUNC(slaqr3)"(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, s *h, int *ldh, int *iloz, int *ihiz, s *z, int *ldz, int *ns, int *nd, s *sr, s *si, s *v, int *ldv, int *nh, s *t, int *ldt, int *nv, s *wv, int *ldwv, s *work, int *lwork) nogil +cdef void slaqr3(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, s *h, int *ldh, int *iloz, int *ihiz, s *z, int *ldz, int *ns, int *nd, s *sr, s *si, s *v, int *ldv, int *nh, s *t, int *ldt, int *nv, s *wv, int *ldwv, s *work, int *lwork) noexcept nogil: + + _fortran_slaqr3(wantt, wantz, n, ktop, kbot, nw, h, ldh, iloz, ihiz, z, ldz, ns, nd, sr, si, v, ldv, nh, t, ldt, nv, wv, ldwv, work, lwork) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaqr4 "BLAS_FUNC(slaqr4)"(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *wr, s *wi, int *iloz, int *ihiz, s *z, int *ldz, s *work, int *lwork, int *info) nogil +cdef void slaqr4(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *wr, s *wi, int *iloz, int *ihiz, s *z, int *ldz, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_slaqr4(wantt, wantz, n, ilo, ihi, h, ldh, wr, wi, iloz, ihiz, z, ldz, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaqr5 "BLAS_FUNC(slaqr5)"(bint *wantt, bint *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, s *sr, s *si, s *h, int *ldh, int *iloz, int *ihiz, s *z, int *ldz, s *v, int *ldv, s *u, int *ldu, int *nv, s *wv, int *ldwv, int *nh, s *wh, int *ldwh) nogil +cdef void slaqr5(bint *wantt, bint *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, s *sr, s *si, s *h, int *ldh, int *iloz, int *ihiz, s *z, int *ldz, s *v, int *ldv, s *u, int *ldu, int *nv, s *wv, int *ldwv, int *nh, s *wh, int *ldwh) noexcept nogil: + + _fortran_slaqr5(wantt, wantz, kacc22, n, ktop, kbot, nshfts, sr, si, h, ldh, iloz, ihiz, z, ldz, v, ldv, u, ldu, nv, wv, ldwv, nh, wh, ldwh) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaqsb "BLAS_FUNC(slaqsb)"(char *uplo, int *n, int *kd, s *ab, int *ldab, s *s, s *scond, s *amax, char *equed) nogil +cdef void slaqsb(char *uplo, int *n, int *kd, s *ab, int *ldab, s *s, s *scond, s *amax, char *equed) noexcept nogil: + + _fortran_slaqsb(uplo, n, kd, ab, ldab, s, scond, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaqsp "BLAS_FUNC(slaqsp)"(char *uplo, int *n, s *ap, s *s, s *scond, s *amax, char *equed) nogil +cdef void slaqsp(char *uplo, int *n, s *ap, s *s, s *scond, s *amax, char *equed) noexcept nogil: + + _fortran_slaqsp(uplo, n, ap, s, scond, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaqsy "BLAS_FUNC(slaqsy)"(char *uplo, int *n, s *a, int *lda, s *s, s *scond, s *amax, char *equed) nogil +cdef void slaqsy(char *uplo, int *n, s *a, int *lda, s *s, s *scond, s *amax, char *equed) noexcept nogil: + + _fortran_slaqsy(uplo, n, a, lda, s, scond, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaqtr "BLAS_FUNC(slaqtr)"(bint *ltran, bint *lreal, int *n, s *t, int *ldt, s *b, s *w, s *scale, s *x, s *work, int *info) nogil +cdef void slaqtr(bint *ltran, bint *lreal, int *n, s *t, int *ldt, s *b, s *w, s *scale, s *x, s *work, int *info) noexcept nogil: + + _fortran_slaqtr(ltran, lreal, n, t, ldt, b, w, scale, x, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slar1v "BLAS_FUNC(slar1v)"(int *n, int *b1, int *bn, s *lambda_, s *d, s *l, s *ld, s *lld, s *pivmin, s *gaptol, s *z, bint *wantnc, int *negcnt, s *ztz, s *mingma, int *r, int *isuppz, s *nrminv, s *resid, s *rqcorr, s *work) nogil +cdef void slar1v(int *n, int *b1, int *bn, s *lambda_, s *d, s *l, s *ld, s *lld, s *pivmin, s *gaptol, s *z, bint *wantnc, int *negcnt, s *ztz, s *mingma, int *r, int *isuppz, s *nrminv, s *resid, s *rqcorr, s *work) noexcept nogil: + + _fortran_slar1v(n, b1, bn, lambda_, d, l, ld, lld, pivmin, gaptol, z, wantnc, negcnt, ztz, mingma, r, isuppz, nrminv, resid, rqcorr, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slar2v "BLAS_FUNC(slar2v)"(int *n, s *x, s *y, s *z, int *incx, s *c, s *s, int *incc) nogil +cdef void slar2v(int *n, s *x, s *y, s *z, int *incx, s *c, s *s, int *incc) noexcept nogil: + + _fortran_slar2v(n, x, y, z, incx, c, s, incc) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slarf "BLAS_FUNC(slarf)"(char *side, int *m, int *n, s *v, int *incv, s *tau, s *c, int *ldc, s *work) nogil +cdef void slarf(char *side, int *m, int *n, s *v, int *incv, s *tau, s *c, int *ldc, s *work) noexcept nogil: + + _fortran_slarf(side, m, n, v, incv, tau, c, ldc, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slarfb "BLAS_FUNC(slarfb)"(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, s *v, int *ldv, s *t, int *ldt, s *c, int *ldc, s *work, int *ldwork) nogil +cdef void slarfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, s *v, int *ldv, s *t, int *ldt, s *c, int *ldc, s *work, int *ldwork) noexcept nogil: + + _fortran_slarfb(side, trans, direct, storev, m, n, k, v, ldv, t, ldt, c, ldc, work, ldwork) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slarfg "BLAS_FUNC(slarfg)"(int *n, s *alpha, s *x, int *incx, s *tau) nogil +cdef void slarfg(int *n, s *alpha, s *x, int *incx, s *tau) noexcept nogil: + + _fortran_slarfg(n, alpha, x, incx, tau) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slarfgp "BLAS_FUNC(slarfgp)"(int *n, s *alpha, s *x, int *incx, s *tau) nogil +cdef void slarfgp(int *n, s *alpha, s *x, int *incx, s *tau) noexcept nogil: + + _fortran_slarfgp(n, alpha, x, incx, tau) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slarft "BLAS_FUNC(slarft)"(char *direct, char *storev, int *n, int *k, s *v, int *ldv, s *tau, s *t, int *ldt) nogil +cdef void slarft(char *direct, char *storev, int *n, int *k, s *v, int *ldv, s *tau, s *t, int *ldt) noexcept nogil: + + _fortran_slarft(direct, storev, n, k, v, ldv, tau, t, ldt) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slarfx "BLAS_FUNC(slarfx)"(char *side, int *m, int *n, s *v, s *tau, s *c, int *ldc, s *work) nogil +cdef void slarfx(char *side, int *m, int *n, s *v, s *tau, s *c, int *ldc, s *work) noexcept nogil: + + _fortran_slarfx(side, m, n, v, tau, c, ldc, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slargv "BLAS_FUNC(slargv)"(int *n, s *x, int *incx, s *y, int *incy, s *c, int *incc) nogil +cdef void slargv(int *n, s *x, int *incx, s *y, int *incy, s *c, int *incc) noexcept nogil: + + _fortran_slargv(n, x, incx, y, incy, c, incc) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slarnv "BLAS_FUNC(slarnv)"(int *idist, int *iseed, int *n, s *x) nogil +cdef void slarnv(int *idist, int *iseed, int *n, s *x) noexcept nogil: + + _fortran_slarnv(idist, iseed, n, x) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slarra "BLAS_FUNC(slarra)"(int *n, s *d, s *e, s *e2, s *spltol, s *tnrm, int *nsplit, int *isplit, int *info) nogil +cdef void slarra(int *n, s *d, s *e, s *e2, s *spltol, s *tnrm, int *nsplit, int *isplit, int *info) noexcept nogil: + + _fortran_slarra(n, d, e, e2, spltol, tnrm, nsplit, isplit, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slarrb "BLAS_FUNC(slarrb)"(int *n, s *d, s *lld, int *ifirst, int *ilast, s *rtol1, s *rtol2, int *offset, s *w, s *wgap, s *werr, s *work, int *iwork, s *pivmin, s *spdiam, int *twist, int *info) nogil +cdef void slarrb(int *n, s *d, s *lld, int *ifirst, int *ilast, s *rtol1, s *rtol2, int *offset, s *w, s *wgap, s *werr, s *work, int *iwork, s *pivmin, s *spdiam, int *twist, int *info) noexcept nogil: + + _fortran_slarrb(n, d, lld, ifirst, ilast, rtol1, rtol2, offset, w, wgap, werr, work, iwork, pivmin, spdiam, twist, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slarrc "BLAS_FUNC(slarrc)"(char *jobt, int *n, s *vl, s *vu, s *d, s *e, s *pivmin, int *eigcnt, int *lcnt, int *rcnt, int *info) nogil +cdef void slarrc(char *jobt, int *n, s *vl, s *vu, s *d, s *e, s *pivmin, int *eigcnt, int *lcnt, int *rcnt, int *info) noexcept nogil: + + _fortran_slarrc(jobt, n, vl, vu, d, e, pivmin, eigcnt, lcnt, rcnt, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slarrd "BLAS_FUNC(slarrd)"(char *range, char *order, int *n, s *vl, s *vu, int *il, int *iu, s *gers, s *reltol, s *d, s *e, s *e2, s *pivmin, int *nsplit, int *isplit, int *m, s *w, s *werr, s *wl, s *wu, int *iblock, int *indexw, s *work, int *iwork, int *info) nogil +cdef void slarrd(char *range, char *order, int *n, s *vl, s *vu, int *il, int *iu, s *gers, s *reltol, s *d, s *e, s *e2, s *pivmin, int *nsplit, int *isplit, int *m, s *w, s *werr, s *wl, s *wu, int *iblock, int *indexw, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_slarrd(range, order, n, vl, vu, il, iu, gers, reltol, d, e, e2, pivmin, nsplit, isplit, m, w, werr, wl, wu, iblock, indexw, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slarre "BLAS_FUNC(slarre)"(char *range, int *n, s *vl, s *vu, int *il, int *iu, s *d, s *e, s *e2, s *rtol1, s *rtol2, s *spltol, int *nsplit, int *isplit, int *m, s *w, s *werr, s *wgap, int *iblock, int *indexw, s *gers, s *pivmin, s *work, int *iwork, int *info) nogil +cdef void slarre(char *range, int *n, s *vl, s *vu, int *il, int *iu, s *d, s *e, s *e2, s *rtol1, s *rtol2, s *spltol, int *nsplit, int *isplit, int *m, s *w, s *werr, s *wgap, int *iblock, int *indexw, s *gers, s *pivmin, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_slarre(range, n, vl, vu, il, iu, d, e, e2, rtol1, rtol2, spltol, nsplit, isplit, m, w, werr, wgap, iblock, indexw, gers, pivmin, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slarrf "BLAS_FUNC(slarrf)"(int *n, s *d, s *l, s *ld, int *clstrt, int *clend, s *w, s *wgap, s *werr, s *spdiam, s *clgapl, s *clgapr, s *pivmin, s *sigma, s *dplus, s *lplus, s *work, int *info) nogil +cdef void slarrf(int *n, s *d, s *l, s *ld, int *clstrt, int *clend, s *w, s *wgap, s *werr, s *spdiam, s *clgapl, s *clgapr, s *pivmin, s *sigma, s *dplus, s *lplus, s *work, int *info) noexcept nogil: + + _fortran_slarrf(n, d, l, ld, clstrt, clend, w, wgap, werr, spdiam, clgapl, clgapr, pivmin, sigma, dplus, lplus, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slarrj "BLAS_FUNC(slarrj)"(int *n, s *d, s *e2, int *ifirst, int *ilast, s *rtol, int *offset, s *w, s *werr, s *work, int *iwork, s *pivmin, s *spdiam, int *info) nogil +cdef void slarrj(int *n, s *d, s *e2, int *ifirst, int *ilast, s *rtol, int *offset, s *w, s *werr, s *work, int *iwork, s *pivmin, s *spdiam, int *info) noexcept nogil: + + _fortran_slarrj(n, d, e2, ifirst, ilast, rtol, offset, w, werr, work, iwork, pivmin, spdiam, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slarrk "BLAS_FUNC(slarrk)"(int *n, int *iw, s *gl, s *gu, s *d, s *e2, s *pivmin, s *reltol, s *w, s *werr, int *info) nogil +cdef void slarrk(int *n, int *iw, s *gl, s *gu, s *d, s *e2, s *pivmin, s *reltol, s *w, s *werr, int *info) noexcept nogil: + + _fortran_slarrk(n, iw, gl, gu, d, e2, pivmin, reltol, w, werr, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slarrr "BLAS_FUNC(slarrr)"(int *n, s *d, s *e, int *info) nogil +cdef void slarrr(int *n, s *d, s *e, int *info) noexcept nogil: + + _fortran_slarrr(n, d, e, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slarrv "BLAS_FUNC(slarrv)"(int *n, s *vl, s *vu, s *d, s *l, s *pivmin, int *isplit, int *m, int *dol, int *dou, s *minrgp, s *rtol1, s *rtol2, s *w, s *werr, s *wgap, int *iblock, int *indexw, s *gers, s *z, int *ldz, int *isuppz, s *work, int *iwork, int *info) nogil +cdef void slarrv(int *n, s *vl, s *vu, s *d, s *l, s *pivmin, int *isplit, int *m, int *dol, int *dou, s *minrgp, s *rtol1, s *rtol2, s *w, s *werr, s *wgap, int *iblock, int *indexw, s *gers, s *z, int *ldz, int *isuppz, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_slarrv(n, vl, vu, d, l, pivmin, isplit, m, dol, dou, minrgp, rtol1, rtol2, w, werr, wgap, iblock, indexw, gers, z, ldz, isuppz, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slartg "BLAS_FUNC(slartg)"(s *f, s *g, s *cs, s *sn, s *r) nogil +cdef void slartg(s *f, s *g, s *cs, s *sn, s *r) noexcept nogil: + + _fortran_slartg(f, g, cs, sn, r) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slartgp "BLAS_FUNC(slartgp)"(s *f, s *g, s *cs, s *sn, s *r) nogil +cdef void slartgp(s *f, s *g, s *cs, s *sn, s *r) noexcept nogil: + + _fortran_slartgp(f, g, cs, sn, r) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slartgs "BLAS_FUNC(slartgs)"(s *x, s *y, s *sigma, s *cs, s *sn) nogil +cdef void slartgs(s *x, s *y, s *sigma, s *cs, s *sn) noexcept nogil: + + _fortran_slartgs(x, y, sigma, cs, sn) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slartv "BLAS_FUNC(slartv)"(int *n, s *x, int *incx, s *y, int *incy, s *c, s *s, int *incc) nogil +cdef void slartv(int *n, s *x, int *incx, s *y, int *incy, s *c, s *s, int *incc) noexcept nogil: + + _fortran_slartv(n, x, incx, y, incy, c, s, incc) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaruv "BLAS_FUNC(slaruv)"(int *iseed, int *n, s *x) nogil +cdef void slaruv(int *iseed, int *n, s *x) noexcept nogil: + + _fortran_slaruv(iseed, n, x) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slarz "BLAS_FUNC(slarz)"(char *side, int *m, int *n, int *l, s *v, int *incv, s *tau, s *c, int *ldc, s *work) nogil +cdef void slarz(char *side, int *m, int *n, int *l, s *v, int *incv, s *tau, s *c, int *ldc, s *work) noexcept nogil: + + _fortran_slarz(side, m, n, l, v, incv, tau, c, ldc, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slarzb "BLAS_FUNC(slarzb)"(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, s *v, int *ldv, s *t, int *ldt, s *c, int *ldc, s *work, int *ldwork) nogil +cdef void slarzb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, s *v, int *ldv, s *t, int *ldt, s *c, int *ldc, s *work, int *ldwork) noexcept nogil: + + _fortran_slarzb(side, trans, direct, storev, m, n, k, l, v, ldv, t, ldt, c, ldc, work, ldwork) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slarzt "BLAS_FUNC(slarzt)"(char *direct, char *storev, int *n, int *k, s *v, int *ldv, s *tau, s *t, int *ldt) nogil +cdef void slarzt(char *direct, char *storev, int *n, int *k, s *v, int *ldv, s *tau, s *t, int *ldt) noexcept nogil: + + _fortran_slarzt(direct, storev, n, k, v, ldv, tau, t, ldt) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slas2 "BLAS_FUNC(slas2)"(s *f, s *g, s *h, s *ssmin, s *ssmax) nogil +cdef void slas2(s *f, s *g, s *h, s *ssmin, s *ssmax) noexcept nogil: + + _fortran_slas2(f, g, h, ssmin, ssmax) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slascl "BLAS_FUNC(slascl)"(char *type_bn, int *kl, int *ku, s *cfrom, s *cto, int *m, int *n, s *a, int *lda, int *info) nogil +cdef void slascl(char *type_bn, int *kl, int *ku, s *cfrom, s *cto, int *m, int *n, s *a, int *lda, int *info) noexcept nogil: + + _fortran_slascl(type_bn, kl, ku, cfrom, cto, m, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slasd0 "BLAS_FUNC(slasd0)"(int *n, int *sqre, s *d, s *e, s *u, int *ldu, s *vt, int *ldvt, int *smlsiz, int *iwork, s *work, int *info) nogil +cdef void slasd0(int *n, int *sqre, s *d, s *e, s *u, int *ldu, s *vt, int *ldvt, int *smlsiz, int *iwork, s *work, int *info) noexcept nogil: + + _fortran_slasd0(n, sqre, d, e, u, ldu, vt, ldvt, smlsiz, iwork, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slasd1 "BLAS_FUNC(slasd1)"(int *nl, int *nr, int *sqre, s *d, s *alpha, s *beta, s *u, int *ldu, s *vt, int *ldvt, int *idxq, int *iwork, s *work, int *info) nogil +cdef void slasd1(int *nl, int *nr, int *sqre, s *d, s *alpha, s *beta, s *u, int *ldu, s *vt, int *ldvt, int *idxq, int *iwork, s *work, int *info) noexcept nogil: + + _fortran_slasd1(nl, nr, sqre, d, alpha, beta, u, ldu, vt, ldvt, idxq, iwork, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slasd2 "BLAS_FUNC(slasd2)"(int *nl, int *nr, int *sqre, int *k, s *d, s *z, s *alpha, s *beta, s *u, int *ldu, s *vt, int *ldvt, s *dsigma, s *u2, int *ldu2, s *vt2, int *ldvt2, int *idxp, int *idx, int *idxc, int *idxq, int *coltyp, int *info) nogil +cdef void slasd2(int *nl, int *nr, int *sqre, int *k, s *d, s *z, s *alpha, s *beta, s *u, int *ldu, s *vt, int *ldvt, s *dsigma, s *u2, int *ldu2, s *vt2, int *ldvt2, int *idxp, int *idx, int *idxc, int *idxq, int *coltyp, int *info) noexcept nogil: + + _fortran_slasd2(nl, nr, sqre, k, d, z, alpha, beta, u, ldu, vt, ldvt, dsigma, u2, ldu2, vt2, ldvt2, idxp, idx, idxc, idxq, coltyp, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slasd3 "BLAS_FUNC(slasd3)"(int *nl, int *nr, int *sqre, int *k, s *d, s *q, int *ldq, s *dsigma, s *u, int *ldu, s *u2, int *ldu2, s *vt, int *ldvt, s *vt2, int *ldvt2, int *idxc, int *ctot, s *z, int *info) nogil +cdef void slasd3(int *nl, int *nr, int *sqre, int *k, s *d, s *q, int *ldq, s *dsigma, s *u, int *ldu, s *u2, int *ldu2, s *vt, int *ldvt, s *vt2, int *ldvt2, int *idxc, int *ctot, s *z, int *info) noexcept nogil: + + _fortran_slasd3(nl, nr, sqre, k, d, q, ldq, dsigma, u, ldu, u2, ldu2, vt, ldvt, vt2, ldvt2, idxc, ctot, z, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slasd4 "BLAS_FUNC(slasd4)"(int *n, int *i, s *d, s *z, s *delta, s *rho, s *sigma, s *work, int *info) nogil +cdef void slasd4(int *n, int *i, s *d, s *z, s *delta, s *rho, s *sigma, s *work, int *info) noexcept nogil: + + _fortran_slasd4(n, i, d, z, delta, rho, sigma, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slasd5 "BLAS_FUNC(slasd5)"(int *i, s *d, s *z, s *delta, s *rho, s *dsigma, s *work) nogil +cdef void slasd5(int *i, s *d, s *z, s *delta, s *rho, s *dsigma, s *work) noexcept nogil: + + _fortran_slasd5(i, d, z, delta, rho, dsigma, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slasd6 "BLAS_FUNC(slasd6)"(int *icompq, int *nl, int *nr, int *sqre, s *d, s *vf, s *vl, s *alpha, s *beta, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, s *givnum, int *ldgnum, s *poles, s *difl, s *difr, s *z, int *k, s *c, s *s, s *work, int *iwork, int *info) nogil +cdef void slasd6(int *icompq, int *nl, int *nr, int *sqre, s *d, s *vf, s *vl, s *alpha, s *beta, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, s *givnum, int *ldgnum, s *poles, s *difl, s *difr, s *z, int *k, s *c, s *s, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_slasd6(icompq, nl, nr, sqre, d, vf, vl, alpha, beta, idxq, perm, givptr, givcol, ldgcol, givnum, ldgnum, poles, difl, difr, z, k, c, s, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slasd7 "BLAS_FUNC(slasd7)"(int *icompq, int *nl, int *nr, int *sqre, int *k, s *d, s *z, s *zw, s *vf, s *vfw, s *vl, s *vlw, s *alpha, s *beta, s *dsigma, int *idx, int *idxp, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, s *givnum, int *ldgnum, s *c, s *s, int *info) nogil +cdef void slasd7(int *icompq, int *nl, int *nr, int *sqre, int *k, s *d, s *z, s *zw, s *vf, s *vfw, s *vl, s *vlw, s *alpha, s *beta, s *dsigma, int *idx, int *idxp, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, s *givnum, int *ldgnum, s *c, s *s, int *info) noexcept nogil: + + _fortran_slasd7(icompq, nl, nr, sqre, k, d, z, zw, vf, vfw, vl, vlw, alpha, beta, dsigma, idx, idxp, idxq, perm, givptr, givcol, ldgcol, givnum, ldgnum, c, s, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slasd8 "BLAS_FUNC(slasd8)"(int *icompq, int *k, s *d, s *z, s *vf, s *vl, s *difl, s *difr, int *lddifr, s *dsigma, s *work, int *info) nogil +cdef void slasd8(int *icompq, int *k, s *d, s *z, s *vf, s *vl, s *difl, s *difr, int *lddifr, s *dsigma, s *work, int *info) noexcept nogil: + + _fortran_slasd8(icompq, k, d, z, vf, vl, difl, difr, lddifr, dsigma, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slasda "BLAS_FUNC(slasda)"(int *icompq, int *smlsiz, int *n, int *sqre, s *d, s *e, s *u, int *ldu, s *vt, int *k, s *difl, s *difr, s *z, s *poles, int *givptr, int *givcol, int *ldgcol, int *perm, s *givnum, s *c, s *s, s *work, int *iwork, int *info) nogil +cdef void slasda(int *icompq, int *smlsiz, int *n, int *sqre, s *d, s *e, s *u, int *ldu, s *vt, int *k, s *difl, s *difr, s *z, s *poles, int *givptr, int *givcol, int *ldgcol, int *perm, s *givnum, s *c, s *s, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_slasda(icompq, smlsiz, n, sqre, d, e, u, ldu, vt, k, difl, difr, z, poles, givptr, givcol, ldgcol, perm, givnum, c, s, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slasdq "BLAS_FUNC(slasdq)"(char *uplo, int *sqre, int *n, int *ncvt, int *nru, int *ncc, s *d, s *e, s *vt, int *ldvt, s *u, int *ldu, s *c, int *ldc, s *work, int *info) nogil +cdef void slasdq(char *uplo, int *sqre, int *n, int *ncvt, int *nru, int *ncc, s *d, s *e, s *vt, int *ldvt, s *u, int *ldu, s *c, int *ldc, s *work, int *info) noexcept nogil: + + _fortran_slasdq(uplo, sqre, n, ncvt, nru, ncc, d, e, vt, ldvt, u, ldu, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slasdt "BLAS_FUNC(slasdt)"(int *n, int *lvl, int *nd, int *inode, int *ndiml, int *ndimr, int *msub) nogil +cdef void slasdt(int *n, int *lvl, int *nd, int *inode, int *ndiml, int *ndimr, int *msub) noexcept nogil: + + _fortran_slasdt(n, lvl, nd, inode, ndiml, ndimr, msub) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaset "BLAS_FUNC(slaset)"(char *uplo, int *m, int *n, s *alpha, s *beta, s *a, int *lda) nogil +cdef void slaset(char *uplo, int *m, int *n, s *alpha, s *beta, s *a, int *lda) noexcept nogil: + + _fortran_slaset(uplo, m, n, alpha, beta, a, lda) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slasq1 "BLAS_FUNC(slasq1)"(int *n, s *d, s *e, s *work, int *info) nogil +cdef void slasq1(int *n, s *d, s *e, s *work, int *info) noexcept nogil: + + _fortran_slasq1(n, d, e, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slasq2 "BLAS_FUNC(slasq2)"(int *n, s *z, int *info) nogil +cdef void slasq2(int *n, s *z, int *info) noexcept nogil: + + _fortran_slasq2(n, z, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slasq3 "BLAS_FUNC(slasq3)"(int *i0, int *n0, s *z, int *pp, s *dmin, s *sigma, s *desig, s *qmax, int *nfail, int *iter, int *ndiv, bint *ieee, int *ttype, s *dmin1, s *dmin2, s *dn, s *dn1, s *dn2, s *g, s *tau) nogil +cdef void slasq3(int *i0, int *n0, s *z, int *pp, s *dmin, s *sigma, s *desig, s *qmax, int *nfail, int *iter, int *ndiv, bint *ieee, int *ttype, s *dmin1, s *dmin2, s *dn, s *dn1, s *dn2, s *g, s *tau) noexcept nogil: + + _fortran_slasq3(i0, n0, z, pp, dmin, sigma, desig, qmax, nfail, iter, ndiv, ieee, ttype, dmin1, dmin2, dn, dn1, dn2, g, tau) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slasq4 "BLAS_FUNC(slasq4)"(int *i0, int *n0, s *z, int *pp, int *n0in, s *dmin, s *dmin1, s *dmin2, s *dn, s *dn1, s *dn2, s *tau, int *ttype, s *g) nogil +cdef void slasq4(int *i0, int *n0, s *z, int *pp, int *n0in, s *dmin, s *dmin1, s *dmin2, s *dn, s *dn1, s *dn2, s *tau, int *ttype, s *g) noexcept nogil: + + _fortran_slasq4(i0, n0, z, pp, n0in, dmin, dmin1, dmin2, dn, dn1, dn2, tau, ttype, g) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slasq6 "BLAS_FUNC(slasq6)"(int *i0, int *n0, s *z, int *pp, s *dmin, s *dmin1, s *dmin2, s *dn, s *dnm1, s *dnm2) nogil +cdef void slasq6(int *i0, int *n0, s *z, int *pp, s *dmin, s *dmin1, s *dmin2, s *dn, s *dnm1, s *dnm2) noexcept nogil: + + _fortran_slasq6(i0, n0, z, pp, dmin, dmin1, dmin2, dn, dnm1, dnm2) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slasr "BLAS_FUNC(slasr)"(char *side, char *pivot, char *direct, int *m, int *n, s *c, s *s, s *a, int *lda) nogil +cdef void slasr(char *side, char *pivot, char *direct, int *m, int *n, s *c, s *s, s *a, int *lda) noexcept nogil: + + _fortran_slasr(side, pivot, direct, m, n, c, s, a, lda) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slasrt "BLAS_FUNC(slasrt)"(char *id, int *n, s *d, int *info) nogil +cdef void slasrt(char *id, int *n, s *d, int *info) noexcept nogil: + + _fortran_slasrt(id, n, d, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slassq "BLAS_FUNC(slassq)"(int *n, s *x, int *incx, s *scale, s *sumsq) nogil +cdef void slassq(int *n, s *x, int *incx, s *scale, s *sumsq) noexcept nogil: + + _fortran_slassq(n, x, incx, scale, sumsq) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slasv2 "BLAS_FUNC(slasv2)"(s *f, s *g, s *h, s *ssmin, s *ssmax, s *snr, s *csr, s *snl, s *csl) nogil +cdef void slasv2(s *f, s *g, s *h, s *ssmin, s *ssmax, s *snr, s *csr, s *snl, s *csl) noexcept nogil: + + _fortran_slasv2(f, g, h, ssmin, ssmax, snr, csr, snl, csl) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slaswp "BLAS_FUNC(slaswp)"(int *n, s *a, int *lda, int *k1, int *k2, int *ipiv, int *incx) nogil +cdef void slaswp(int *n, s *a, int *lda, int *k1, int *k2, int *ipiv, int *incx) noexcept nogil: + + _fortran_slaswp(n, a, lda, k1, k2, ipiv, incx) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slasy2 "BLAS_FUNC(slasy2)"(bint *ltranl, bint *ltranr, int *isgn, int *n1, int *n2, s *tl, int *ldtl, s *tr, int *ldtr, s *b, int *ldb, s *scale, s *x, int *ldx, s *xnorm, int *info) nogil +cdef void slasy2(bint *ltranl, bint *ltranr, int *isgn, int *n1, int *n2, s *tl, int *ldtl, s *tr, int *ldtr, s *b, int *ldb, s *scale, s *x, int *ldx, s *xnorm, int *info) noexcept nogil: + + _fortran_slasy2(ltranl, ltranr, isgn, n1, n2, tl, ldtl, tr, ldtr, b, ldb, scale, x, ldx, xnorm, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slasyf "BLAS_FUNC(slasyf)"(char *uplo, int *n, int *nb, int *kb, s *a, int *lda, int *ipiv, s *w, int *ldw, int *info) nogil +cdef void slasyf(char *uplo, int *n, int *nb, int *kb, s *a, int *lda, int *ipiv, s *w, int *ldw, int *info) noexcept nogil: + + _fortran_slasyf(uplo, n, nb, kb, a, lda, ipiv, w, ldw, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slatbs "BLAS_FUNC(slatbs)"(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, s *ab, int *ldab, s *x, s *scale, s *cnorm, int *info) nogil +cdef void slatbs(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, s *ab, int *ldab, s *x, s *scale, s *cnorm, int *info) noexcept nogil: + + _fortran_slatbs(uplo, trans, diag, normin, n, kd, ab, ldab, x, scale, cnorm, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slatdf "BLAS_FUNC(slatdf)"(int *ijob, int *n, s *z, int *ldz, s *rhs, s *rdsum, s *rdscal, int *ipiv, int *jpiv) nogil +cdef void slatdf(int *ijob, int *n, s *z, int *ldz, s *rhs, s *rdsum, s *rdscal, int *ipiv, int *jpiv) noexcept nogil: + + _fortran_slatdf(ijob, n, z, ldz, rhs, rdsum, rdscal, ipiv, jpiv) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slatps "BLAS_FUNC(slatps)"(char *uplo, char *trans, char *diag, char *normin, int *n, s *ap, s *x, s *scale, s *cnorm, int *info) nogil +cdef void slatps(char *uplo, char *trans, char *diag, char *normin, int *n, s *ap, s *x, s *scale, s *cnorm, int *info) noexcept nogil: + + _fortran_slatps(uplo, trans, diag, normin, n, ap, x, scale, cnorm, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slatrd "BLAS_FUNC(slatrd)"(char *uplo, int *n, int *nb, s *a, int *lda, s *e, s *tau, s *w, int *ldw) nogil +cdef void slatrd(char *uplo, int *n, int *nb, s *a, int *lda, s *e, s *tau, s *w, int *ldw) noexcept nogil: + + _fortran_slatrd(uplo, n, nb, a, lda, e, tau, w, ldw) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slatrs "BLAS_FUNC(slatrs)"(char *uplo, char *trans, char *diag, char *normin, int *n, s *a, int *lda, s *x, s *scale, s *cnorm, int *info) nogil +cdef void slatrs(char *uplo, char *trans, char *diag, char *normin, int *n, s *a, int *lda, s *x, s *scale, s *cnorm, int *info) noexcept nogil: + + _fortran_slatrs(uplo, trans, diag, normin, n, a, lda, x, scale, cnorm, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slatrz "BLAS_FUNC(slatrz)"(int *m, int *n, int *l, s *a, int *lda, s *tau, s *work) nogil +cdef void slatrz(int *m, int *n, int *l, s *a, int *lda, s *tau, s *work) noexcept nogil: + + _fortran_slatrz(m, n, l, a, lda, tau, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slauu2 "BLAS_FUNC(slauu2)"(char *uplo, int *n, s *a, int *lda, int *info) nogil +cdef void slauu2(char *uplo, int *n, s *a, int *lda, int *info) noexcept nogil: + + _fortran_slauu2(uplo, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_slauum "BLAS_FUNC(slauum)"(char *uplo, int *n, s *a, int *lda, int *info) nogil +cdef void slauum(char *uplo, int *n, s *a, int *lda, int *info) noexcept nogil: + + _fortran_slauum(uplo, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sopgtr "BLAS_FUNC(sopgtr)"(char *uplo, int *n, s *ap, s *tau, s *q, int *ldq, s *work, int *info) nogil +cdef void sopgtr(char *uplo, int *n, s *ap, s *tau, s *q, int *ldq, s *work, int *info) noexcept nogil: + + _fortran_sopgtr(uplo, n, ap, tau, q, ldq, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sopmtr "BLAS_FUNC(sopmtr)"(char *side, char *uplo, char *trans, int *m, int *n, s *ap, s *tau, s *c, int *ldc, s *work, int *info) nogil +cdef void sopmtr(char *side, char *uplo, char *trans, int *m, int *n, s *ap, s *tau, s *c, int *ldc, s *work, int *info) noexcept nogil: + + _fortran_sopmtr(side, uplo, trans, m, n, ap, tau, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sorbdb "BLAS_FUNC(sorbdb)"(char *trans, char *signs, int *m, int *p, int *q, s *x11, int *ldx11, s *x12, int *ldx12, s *x21, int *ldx21, s *x22, int *ldx22, s *theta, s *phi, s *taup1, s *taup2, s *tauq1, s *tauq2, s *work, int *lwork, int *info) nogil +cdef void sorbdb(char *trans, char *signs, int *m, int *p, int *q, s *x11, int *ldx11, s *x12, int *ldx12, s *x21, int *ldx21, s *x22, int *ldx22, s *theta, s *phi, s *taup1, s *taup2, s *tauq1, s *tauq2, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sorbdb(trans, signs, m, p, q, x11, ldx11, x12, ldx12, x21, ldx21, x22, ldx22, theta, phi, taup1, taup2, tauq1, tauq2, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sorcsd "BLAS_FUNC(sorcsd)"(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, s *x11, int *ldx11, s *x12, int *ldx12, s *x21, int *ldx21, s *x22, int *ldx22, s *theta, s *u1, int *ldu1, s *u2, int *ldu2, s *v1t, int *ldv1t, s *v2t, int *ldv2t, s *work, int *lwork, int *iwork, int *info) nogil +cdef void sorcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, s *x11, int *ldx11, s *x12, int *ldx12, s *x21, int *ldx21, s *x22, int *ldx22, s *theta, s *u1, int *ldu1, s *u2, int *ldu2, s *v1t, int *ldv1t, s *v2t, int *ldv2t, s *work, int *lwork, int *iwork, int *info) noexcept nogil: + + _fortran_sorcsd(jobu1, jobu2, jobv1t, jobv2t, trans, signs, m, p, q, x11, ldx11, x12, ldx12, x21, ldx21, x22, ldx22, theta, u1, ldu1, u2, ldu2, v1t, ldv1t, v2t, ldv2t, work, lwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sorg2l "BLAS_FUNC(sorg2l)"(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *info) nogil +cdef void sorg2l(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil: + + _fortran_sorg2l(m, n, k, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sorg2r "BLAS_FUNC(sorg2r)"(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *info) nogil +cdef void sorg2r(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil: + + _fortran_sorg2r(m, n, k, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sorgbr "BLAS_FUNC(sorgbr)"(char *vect, int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil +cdef void sorgbr(char *vect, int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sorgbr(vect, m, n, k, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sorghr "BLAS_FUNC(sorghr)"(int *n, int *ilo, int *ihi, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil +cdef void sorghr(int *n, int *ilo, int *ihi, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sorghr(n, ilo, ihi, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sorgl2 "BLAS_FUNC(sorgl2)"(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *info) nogil +cdef void sorgl2(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil: + + _fortran_sorgl2(m, n, k, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sorglq "BLAS_FUNC(sorglq)"(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil +cdef void sorglq(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sorglq(m, n, k, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sorgql "BLAS_FUNC(sorgql)"(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil +cdef void sorgql(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sorgql(m, n, k, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sorgqr "BLAS_FUNC(sorgqr)"(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil +cdef void sorgqr(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sorgqr(m, n, k, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sorgr2 "BLAS_FUNC(sorgr2)"(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *info) nogil +cdef void sorgr2(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil: + + _fortran_sorgr2(m, n, k, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sorgrq "BLAS_FUNC(sorgrq)"(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil +cdef void sorgrq(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sorgrq(m, n, k, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sorgtr "BLAS_FUNC(sorgtr)"(char *uplo, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil +cdef void sorgtr(char *uplo, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sorgtr(uplo, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sorm2l "BLAS_FUNC(sorm2l)"(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) nogil +cdef void sorm2l(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) noexcept nogil: + + _fortran_sorm2l(side, trans, m, n, k, a, lda, tau, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sorm2r "BLAS_FUNC(sorm2r)"(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) nogil +cdef void sorm2r(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) noexcept nogil: + + _fortran_sorm2r(side, trans, m, n, k, a, lda, tau, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sormbr "BLAS_FUNC(sormbr)"(char *vect, char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) nogil +cdef void sormbr(char *vect, char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sormbr(vect, side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sormhr "BLAS_FUNC(sormhr)"(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) nogil +cdef void sormhr(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sormhr(side, trans, m, n, ilo, ihi, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sorml2 "BLAS_FUNC(sorml2)"(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) nogil +cdef void sorml2(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) noexcept nogil: + + _fortran_sorml2(side, trans, m, n, k, a, lda, tau, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sormlq "BLAS_FUNC(sormlq)"(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) nogil +cdef void sormlq(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sormlq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sormql "BLAS_FUNC(sormql)"(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) nogil +cdef void sormql(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sormql(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sormqr "BLAS_FUNC(sormqr)"(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) nogil +cdef void sormqr(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sormqr(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sormr2 "BLAS_FUNC(sormr2)"(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) nogil +cdef void sormr2(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) noexcept nogil: + + _fortran_sormr2(side, trans, m, n, k, a, lda, tau, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sormr3 "BLAS_FUNC(sormr3)"(char *side, char *trans, int *m, int *n, int *k, int *l, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) nogil +cdef void sormr3(char *side, char *trans, int *m, int *n, int *k, int *l, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) noexcept nogil: + + _fortran_sormr3(side, trans, m, n, k, l, a, lda, tau, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sormrq "BLAS_FUNC(sormrq)"(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) nogil +cdef void sormrq(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sormrq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sormrz "BLAS_FUNC(sormrz)"(char *side, char *trans, int *m, int *n, int *k, int *l, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) nogil +cdef void sormrz(char *side, char *trans, int *m, int *n, int *k, int *l, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sormrz(side, trans, m, n, k, l, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sormtr "BLAS_FUNC(sormtr)"(char *side, char *uplo, char *trans, int *m, int *n, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) nogil +cdef void sormtr(char *side, char *uplo, char *trans, int *m, int *n, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_sormtr(side, uplo, trans, m, n, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spbcon "BLAS_FUNC(spbcon)"(char *uplo, int *n, int *kd, s *ab, int *ldab, s *anorm, s *rcond, s *work, int *iwork, int *info) nogil +cdef void spbcon(char *uplo, int *n, int *kd, s *ab, int *ldab, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_spbcon(uplo, n, kd, ab, ldab, anorm, rcond, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spbequ "BLAS_FUNC(spbequ)"(char *uplo, int *n, int *kd, s *ab, int *ldab, s *s, s *scond, s *amax, int *info) nogil +cdef void spbequ(char *uplo, int *n, int *kd, s *ab, int *ldab, s *s, s *scond, s *amax, int *info) noexcept nogil: + + _fortran_spbequ(uplo, n, kd, ab, ldab, s, scond, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spbrfs "BLAS_FUNC(spbrfs)"(char *uplo, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *afb, int *ldafb, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) nogil +cdef void spbrfs(char *uplo, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *afb, int *ldafb, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_spbrfs(uplo, n, kd, nrhs, ab, ldab, afb, ldafb, b, ldb, x, ldx, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spbstf "BLAS_FUNC(spbstf)"(char *uplo, int *n, int *kd, s *ab, int *ldab, int *info) nogil +cdef void spbstf(char *uplo, int *n, int *kd, s *ab, int *ldab, int *info) noexcept nogil: + + _fortran_spbstf(uplo, n, kd, ab, ldab, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spbsv "BLAS_FUNC(spbsv)"(char *uplo, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *b, int *ldb, int *info) nogil +cdef void spbsv(char *uplo, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *b, int *ldb, int *info) noexcept nogil: + + _fortran_spbsv(uplo, n, kd, nrhs, ab, ldab, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spbsvx "BLAS_FUNC(spbsvx)"(char *fact, char *uplo, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *afb, int *ldafb, char *equed, s *s, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) nogil +cdef void spbsvx(char *fact, char *uplo, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *afb, int *ldafb, char *equed, s *s, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_spbsvx(fact, uplo, n, kd, nrhs, ab, ldab, afb, ldafb, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spbtf2 "BLAS_FUNC(spbtf2)"(char *uplo, int *n, int *kd, s *ab, int *ldab, int *info) nogil +cdef void spbtf2(char *uplo, int *n, int *kd, s *ab, int *ldab, int *info) noexcept nogil: + + _fortran_spbtf2(uplo, n, kd, ab, ldab, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spbtrf "BLAS_FUNC(spbtrf)"(char *uplo, int *n, int *kd, s *ab, int *ldab, int *info) nogil +cdef void spbtrf(char *uplo, int *n, int *kd, s *ab, int *ldab, int *info) noexcept nogil: + + _fortran_spbtrf(uplo, n, kd, ab, ldab, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spbtrs "BLAS_FUNC(spbtrs)"(char *uplo, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *b, int *ldb, int *info) nogil +cdef void spbtrs(char *uplo, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *b, int *ldb, int *info) noexcept nogil: + + _fortran_spbtrs(uplo, n, kd, nrhs, ab, ldab, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spftrf "BLAS_FUNC(spftrf)"(char *transr, char *uplo, int *n, s *a, int *info) nogil +cdef void spftrf(char *transr, char *uplo, int *n, s *a, int *info) noexcept nogil: + + _fortran_spftrf(transr, uplo, n, a, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spftri "BLAS_FUNC(spftri)"(char *transr, char *uplo, int *n, s *a, int *info) nogil +cdef void spftri(char *transr, char *uplo, int *n, s *a, int *info) noexcept nogil: + + _fortran_spftri(transr, uplo, n, a, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spftrs "BLAS_FUNC(spftrs)"(char *transr, char *uplo, int *n, int *nrhs, s *a, s *b, int *ldb, int *info) nogil +cdef void spftrs(char *transr, char *uplo, int *n, int *nrhs, s *a, s *b, int *ldb, int *info) noexcept nogil: + + _fortran_spftrs(transr, uplo, n, nrhs, a, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spocon "BLAS_FUNC(spocon)"(char *uplo, int *n, s *a, int *lda, s *anorm, s *rcond, s *work, int *iwork, int *info) nogil +cdef void spocon(char *uplo, int *n, s *a, int *lda, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_spocon(uplo, n, a, lda, anorm, rcond, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spoequ "BLAS_FUNC(spoequ)"(int *n, s *a, int *lda, s *s, s *scond, s *amax, int *info) nogil +cdef void spoequ(int *n, s *a, int *lda, s *s, s *scond, s *amax, int *info) noexcept nogil: + + _fortran_spoequ(n, a, lda, s, scond, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spoequb "BLAS_FUNC(spoequb)"(int *n, s *a, int *lda, s *s, s *scond, s *amax, int *info) nogil +cdef void spoequb(int *n, s *a, int *lda, s *s, s *scond, s *amax, int *info) noexcept nogil: + + _fortran_spoequb(n, a, lda, s, scond, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sporfs "BLAS_FUNC(sporfs)"(char *uplo, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) nogil +cdef void sporfs(char *uplo, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_sporfs(uplo, n, nrhs, a, lda, af, ldaf, b, ldb, x, ldx, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sposv "BLAS_FUNC(sposv)"(char *uplo, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, int *info) nogil +cdef void sposv(char *uplo, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, int *info) noexcept nogil: + + _fortran_sposv(uplo, n, nrhs, a, lda, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sposvx "BLAS_FUNC(sposvx)"(char *fact, char *uplo, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, char *equed, s *s, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) nogil +cdef void sposvx(char *fact, char *uplo, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, char *equed, s *s, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_sposvx(fact, uplo, n, nrhs, a, lda, af, ldaf, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spotf2 "BLAS_FUNC(spotf2)"(char *uplo, int *n, s *a, int *lda, int *info) nogil +cdef void spotf2(char *uplo, int *n, s *a, int *lda, int *info) noexcept nogil: + + _fortran_spotf2(uplo, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spotrf "BLAS_FUNC(spotrf)"(char *uplo, int *n, s *a, int *lda, int *info) nogil +cdef void spotrf(char *uplo, int *n, s *a, int *lda, int *info) noexcept nogil: + + _fortran_spotrf(uplo, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spotri "BLAS_FUNC(spotri)"(char *uplo, int *n, s *a, int *lda, int *info) nogil +cdef void spotri(char *uplo, int *n, s *a, int *lda, int *info) noexcept nogil: + + _fortran_spotri(uplo, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spotrs "BLAS_FUNC(spotrs)"(char *uplo, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, int *info) nogil +cdef void spotrs(char *uplo, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, int *info) noexcept nogil: + + _fortran_spotrs(uplo, n, nrhs, a, lda, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sppcon "BLAS_FUNC(sppcon)"(char *uplo, int *n, s *ap, s *anorm, s *rcond, s *work, int *iwork, int *info) nogil +cdef void sppcon(char *uplo, int *n, s *ap, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_sppcon(uplo, n, ap, anorm, rcond, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sppequ "BLAS_FUNC(sppequ)"(char *uplo, int *n, s *ap, s *s, s *scond, s *amax, int *info) nogil +cdef void sppequ(char *uplo, int *n, s *ap, s *s, s *scond, s *amax, int *info) noexcept nogil: + + _fortran_sppequ(uplo, n, ap, s, scond, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spprfs "BLAS_FUNC(spprfs)"(char *uplo, int *n, int *nrhs, s *ap, s *afp, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) nogil +cdef void spprfs(char *uplo, int *n, int *nrhs, s *ap, s *afp, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_spprfs(uplo, n, nrhs, ap, afp, b, ldb, x, ldx, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sppsv "BLAS_FUNC(sppsv)"(char *uplo, int *n, int *nrhs, s *ap, s *b, int *ldb, int *info) nogil +cdef void sppsv(char *uplo, int *n, int *nrhs, s *ap, s *b, int *ldb, int *info) noexcept nogil: + + _fortran_sppsv(uplo, n, nrhs, ap, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sppsvx "BLAS_FUNC(sppsvx)"(char *fact, char *uplo, int *n, int *nrhs, s *ap, s *afp, char *equed, s *s, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) nogil +cdef void sppsvx(char *fact, char *uplo, int *n, int *nrhs, s *ap, s *afp, char *equed, s *s, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_sppsvx(fact, uplo, n, nrhs, ap, afp, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spptrf "BLAS_FUNC(spptrf)"(char *uplo, int *n, s *ap, int *info) nogil +cdef void spptrf(char *uplo, int *n, s *ap, int *info) noexcept nogil: + + _fortran_spptrf(uplo, n, ap, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spptri "BLAS_FUNC(spptri)"(char *uplo, int *n, s *ap, int *info) nogil +cdef void spptri(char *uplo, int *n, s *ap, int *info) noexcept nogil: + + _fortran_spptri(uplo, n, ap, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spptrs "BLAS_FUNC(spptrs)"(char *uplo, int *n, int *nrhs, s *ap, s *b, int *ldb, int *info) nogil +cdef void spptrs(char *uplo, int *n, int *nrhs, s *ap, s *b, int *ldb, int *info) noexcept nogil: + + _fortran_spptrs(uplo, n, nrhs, ap, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spstf2 "BLAS_FUNC(spstf2)"(char *uplo, int *n, s *a, int *lda, int *piv, int *rank, s *tol, s *work, int *info) nogil +cdef void spstf2(char *uplo, int *n, s *a, int *lda, int *piv, int *rank, s *tol, s *work, int *info) noexcept nogil: + + _fortran_spstf2(uplo, n, a, lda, piv, rank, tol, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spstrf "BLAS_FUNC(spstrf)"(char *uplo, int *n, s *a, int *lda, int *piv, int *rank, s *tol, s *work, int *info) nogil +cdef void spstrf(char *uplo, int *n, s *a, int *lda, int *piv, int *rank, s *tol, s *work, int *info) noexcept nogil: + + _fortran_spstrf(uplo, n, a, lda, piv, rank, tol, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sptcon "BLAS_FUNC(sptcon)"(int *n, s *d, s *e, s *anorm, s *rcond, s *work, int *info) nogil +cdef void sptcon(int *n, s *d, s *e, s *anorm, s *rcond, s *work, int *info) noexcept nogil: + + _fortran_sptcon(n, d, e, anorm, rcond, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spteqr "BLAS_FUNC(spteqr)"(char *compz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *info) nogil +cdef void spteqr(char *compz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *info) noexcept nogil: + + _fortran_spteqr(compz, n, d, e, z, ldz, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sptrfs "BLAS_FUNC(sptrfs)"(int *n, int *nrhs, s *d, s *e, s *df, s *ef, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *info) nogil +cdef void sptrfs(int *n, int *nrhs, s *d, s *e, s *df, s *ef, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *info) noexcept nogil: + + _fortran_sptrfs(n, nrhs, d, e, df, ef, b, ldb, x, ldx, ferr, berr, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sptsv "BLAS_FUNC(sptsv)"(int *n, int *nrhs, s *d, s *e, s *b, int *ldb, int *info) nogil +cdef void sptsv(int *n, int *nrhs, s *d, s *e, s *b, int *ldb, int *info) noexcept nogil: + + _fortran_sptsv(n, nrhs, d, e, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sptsvx "BLAS_FUNC(sptsvx)"(char *fact, int *n, int *nrhs, s *d, s *e, s *df, s *ef, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *info) nogil +cdef void sptsvx(char *fact, int *n, int *nrhs, s *d, s *e, s *df, s *ef, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *info) noexcept nogil: + + _fortran_sptsvx(fact, n, nrhs, d, e, df, ef, b, ldb, x, ldx, rcond, ferr, berr, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spttrf "BLAS_FUNC(spttrf)"(int *n, s *d, s *e, int *info) nogil +cdef void spttrf(int *n, s *d, s *e, int *info) noexcept nogil: + + _fortran_spttrf(n, d, e, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_spttrs "BLAS_FUNC(spttrs)"(int *n, int *nrhs, s *d, s *e, s *b, int *ldb, int *info) nogil +cdef void spttrs(int *n, int *nrhs, s *d, s *e, s *b, int *ldb, int *info) noexcept nogil: + + _fortran_spttrs(n, nrhs, d, e, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sptts2 "BLAS_FUNC(sptts2)"(int *n, int *nrhs, s *d, s *e, s *b, int *ldb) nogil +cdef void sptts2(int *n, int *nrhs, s *d, s *e, s *b, int *ldb) noexcept nogil: + + _fortran_sptts2(n, nrhs, d, e, b, ldb) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_srscl "BLAS_FUNC(srscl)"(int *n, s *sa, s *sx, int *incx) nogil +cdef void srscl(int *n, s *sa, s *sx, int *incx) noexcept nogil: + + _fortran_srscl(n, sa, sx, incx) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssbev "BLAS_FUNC(ssbev)"(char *jobz, char *uplo, int *n, int *kd, s *ab, int *ldab, s *w, s *z, int *ldz, s *work, int *info) nogil +cdef void ssbev(char *jobz, char *uplo, int *n, int *kd, s *ab, int *ldab, s *w, s *z, int *ldz, s *work, int *info) noexcept nogil: + + _fortran_ssbev(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssbevd "BLAS_FUNC(ssbevd)"(char *jobz, char *uplo, int *n, int *kd, s *ab, int *ldab, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void ssbevd(char *jobz, char *uplo, int *n, int *kd, s *ab, int *ldab, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_ssbevd(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssbevx "BLAS_FUNC(ssbevx)"(char *jobz, char *range, char *uplo, int *n, int *kd, s *ab, int *ldab, s *q, int *ldq, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) nogil +cdef void ssbevx(char *jobz, char *range, char *uplo, int *n, int *kd, s *ab, int *ldab, s *q, int *ldq, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_ssbevx(jobz, range, uplo, n, kd, ab, ldab, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssbgst "BLAS_FUNC(ssbgst)"(char *vect, char *uplo, int *n, int *ka, int *kb, s *ab, int *ldab, s *bb, int *ldbb, s *x, int *ldx, s *work, int *info) nogil +cdef void ssbgst(char *vect, char *uplo, int *n, int *ka, int *kb, s *ab, int *ldab, s *bb, int *ldbb, s *x, int *ldx, s *work, int *info) noexcept nogil: + + _fortran_ssbgst(vect, uplo, n, ka, kb, ab, ldab, bb, ldbb, x, ldx, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssbgv "BLAS_FUNC(ssbgv)"(char *jobz, char *uplo, int *n, int *ka, int *kb, s *ab, int *ldab, s *bb, int *ldbb, s *w, s *z, int *ldz, s *work, int *info) nogil +cdef void ssbgv(char *jobz, char *uplo, int *n, int *ka, int *kb, s *ab, int *ldab, s *bb, int *ldbb, s *w, s *z, int *ldz, s *work, int *info) noexcept nogil: + + _fortran_ssbgv(jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, w, z, ldz, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssbgvd "BLAS_FUNC(ssbgvd)"(char *jobz, char *uplo, int *n, int *ka, int *kb, s *ab, int *ldab, s *bb, int *ldbb, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void ssbgvd(char *jobz, char *uplo, int *n, int *ka, int *kb, s *ab, int *ldab, s *bb, int *ldbb, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_ssbgvd(jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, w, z, ldz, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssbgvx "BLAS_FUNC(ssbgvx)"(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, s *ab, int *ldab, s *bb, int *ldbb, s *q, int *ldq, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) nogil +cdef void ssbgvx(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, s *ab, int *ldab, s *bb, int *ldbb, s *q, int *ldq, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_ssbgvx(jobz, range, uplo, n, ka, kb, ab, ldab, bb, ldbb, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssbtrd "BLAS_FUNC(ssbtrd)"(char *vect, char *uplo, int *n, int *kd, s *ab, int *ldab, s *d, s *e, s *q, int *ldq, s *work, int *info) nogil +cdef void ssbtrd(char *vect, char *uplo, int *n, int *kd, s *ab, int *ldab, s *d, s *e, s *q, int *ldq, s *work, int *info) noexcept nogil: + + _fortran_ssbtrd(vect, uplo, n, kd, ab, ldab, d, e, q, ldq, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssfrk "BLAS_FUNC(ssfrk)"(char *transr, char *uplo, char *trans, int *n, int *k, s *alpha, s *a, int *lda, s *beta, s *c) nogil +cdef void ssfrk(char *transr, char *uplo, char *trans, int *n, int *k, s *alpha, s *a, int *lda, s *beta, s *c) noexcept nogil: + + _fortran_ssfrk(transr, uplo, trans, n, k, alpha, a, lda, beta, c) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sspcon "BLAS_FUNC(sspcon)"(char *uplo, int *n, s *ap, int *ipiv, s *anorm, s *rcond, s *work, int *iwork, int *info) nogil +cdef void sspcon(char *uplo, int *n, s *ap, int *ipiv, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_sspcon(uplo, n, ap, ipiv, anorm, rcond, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sspev "BLAS_FUNC(sspev)"(char *jobz, char *uplo, int *n, s *ap, s *w, s *z, int *ldz, s *work, int *info) nogil +cdef void sspev(char *jobz, char *uplo, int *n, s *ap, s *w, s *z, int *ldz, s *work, int *info) noexcept nogil: + + _fortran_sspev(jobz, uplo, n, ap, w, z, ldz, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sspevd "BLAS_FUNC(sspevd)"(char *jobz, char *uplo, int *n, s *ap, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void sspevd(char *jobz, char *uplo, int *n, s *ap, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_sspevd(jobz, uplo, n, ap, w, z, ldz, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sspevx "BLAS_FUNC(sspevx)"(char *jobz, char *range, char *uplo, int *n, s *ap, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) nogil +cdef void sspevx(char *jobz, char *range, char *uplo, int *n, s *ap, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_sspevx(jobz, range, uplo, n, ap, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sspgst "BLAS_FUNC(sspgst)"(int *itype, char *uplo, int *n, s *ap, s *bp, int *info) nogil +cdef void sspgst(int *itype, char *uplo, int *n, s *ap, s *bp, int *info) noexcept nogil: + + _fortran_sspgst(itype, uplo, n, ap, bp, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sspgv "BLAS_FUNC(sspgv)"(int *itype, char *jobz, char *uplo, int *n, s *ap, s *bp, s *w, s *z, int *ldz, s *work, int *info) nogil +cdef void sspgv(int *itype, char *jobz, char *uplo, int *n, s *ap, s *bp, s *w, s *z, int *ldz, s *work, int *info) noexcept nogil: + + _fortran_sspgv(itype, jobz, uplo, n, ap, bp, w, z, ldz, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sspgvd "BLAS_FUNC(sspgvd)"(int *itype, char *jobz, char *uplo, int *n, s *ap, s *bp, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void sspgvd(int *itype, char *jobz, char *uplo, int *n, s *ap, s *bp, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_sspgvd(itype, jobz, uplo, n, ap, bp, w, z, ldz, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sspgvx "BLAS_FUNC(sspgvx)"(int *itype, char *jobz, char *range, char *uplo, int *n, s *ap, s *bp, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) nogil +cdef void sspgvx(int *itype, char *jobz, char *range, char *uplo, int *n, s *ap, s *bp, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_sspgvx(itype, jobz, range, uplo, n, ap, bp, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssprfs "BLAS_FUNC(ssprfs)"(char *uplo, int *n, int *nrhs, s *ap, s *afp, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) nogil +cdef void ssprfs(char *uplo, int *n, int *nrhs, s *ap, s *afp, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_ssprfs(uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sspsv "BLAS_FUNC(sspsv)"(char *uplo, int *n, int *nrhs, s *ap, int *ipiv, s *b, int *ldb, int *info) nogil +cdef void sspsv(char *uplo, int *n, int *nrhs, s *ap, int *ipiv, s *b, int *ldb, int *info) noexcept nogil: + + _fortran_sspsv(uplo, n, nrhs, ap, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sspsvx "BLAS_FUNC(sspsvx)"(char *fact, char *uplo, int *n, int *nrhs, s *ap, s *afp, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) nogil +cdef void sspsvx(char *fact, char *uplo, int *n, int *nrhs, s *ap, s *afp, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_sspsvx(fact, uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssptrd "BLAS_FUNC(ssptrd)"(char *uplo, int *n, s *ap, s *d, s *e, s *tau, int *info) nogil +cdef void ssptrd(char *uplo, int *n, s *ap, s *d, s *e, s *tau, int *info) noexcept nogil: + + _fortran_ssptrd(uplo, n, ap, d, e, tau, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssptrf "BLAS_FUNC(ssptrf)"(char *uplo, int *n, s *ap, int *ipiv, int *info) nogil +cdef void ssptrf(char *uplo, int *n, s *ap, int *ipiv, int *info) noexcept nogil: + + _fortran_ssptrf(uplo, n, ap, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssptri "BLAS_FUNC(ssptri)"(char *uplo, int *n, s *ap, int *ipiv, s *work, int *info) nogil +cdef void ssptri(char *uplo, int *n, s *ap, int *ipiv, s *work, int *info) noexcept nogil: + + _fortran_ssptri(uplo, n, ap, ipiv, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssptrs "BLAS_FUNC(ssptrs)"(char *uplo, int *n, int *nrhs, s *ap, int *ipiv, s *b, int *ldb, int *info) nogil +cdef void ssptrs(char *uplo, int *n, int *nrhs, s *ap, int *ipiv, s *b, int *ldb, int *info) noexcept nogil: + + _fortran_ssptrs(uplo, n, nrhs, ap, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sstebz "BLAS_FUNC(sstebz)"(char *range, char *order, int *n, s *vl, s *vu, int *il, int *iu, s *abstol, s *d, s *e, int *m, int *nsplit, s *w, int *iblock, int *isplit, s *work, int *iwork, int *info) nogil +cdef void sstebz(char *range, char *order, int *n, s *vl, s *vu, int *il, int *iu, s *abstol, s *d, s *e, int *m, int *nsplit, s *w, int *iblock, int *isplit, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_sstebz(range, order, n, vl, vu, il, iu, abstol, d, e, m, nsplit, w, iblock, isplit, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sstedc "BLAS_FUNC(sstedc)"(char *compz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void sstedc(char *compz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_sstedc(compz, n, d, e, z, ldz, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sstegr "BLAS_FUNC(sstegr)"(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, int *isuppz, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void sstegr(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, int *isuppz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_sstegr(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sstein "BLAS_FUNC(sstein)"(int *n, s *d, s *e, int *m, s *w, int *iblock, int *isplit, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) nogil +cdef void sstein(int *n, s *d, s *e, int *m, s *w, int *iblock, int *isplit, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_sstein(n, d, e, m, w, iblock, isplit, z, ldz, work, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sstemr "BLAS_FUNC(sstemr)"(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, int *m, s *w, s *z, int *ldz, int *nzc, int *isuppz, bint *tryrac, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void sstemr(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, int *m, s *w, s *z, int *ldz, int *nzc, int *isuppz, bint *tryrac, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_sstemr(jobz, range, n, d, e, vl, vu, il, iu, m, w, z, ldz, nzc, isuppz, tryrac, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssteqr "BLAS_FUNC(ssteqr)"(char *compz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *info) nogil +cdef void ssteqr(char *compz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *info) noexcept nogil: + + _fortran_ssteqr(compz, n, d, e, z, ldz, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssterf "BLAS_FUNC(ssterf)"(int *n, s *d, s *e, int *info) nogil +cdef void ssterf(int *n, s *d, s *e, int *info) noexcept nogil: + + _fortran_ssterf(n, d, e, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sstev "BLAS_FUNC(sstev)"(char *jobz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *info) nogil +cdef void sstev(char *jobz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *info) noexcept nogil: + + _fortran_sstev(jobz, n, d, e, z, ldz, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sstevd "BLAS_FUNC(sstevd)"(char *jobz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void sstevd(char *jobz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_sstevd(jobz, n, d, e, z, ldz, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sstevr "BLAS_FUNC(sstevr)"(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, int *isuppz, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void sstevr(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, int *isuppz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_sstevr(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_sstevx "BLAS_FUNC(sstevx)"(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) nogil +cdef void sstevx(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_sstevx(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssycon "BLAS_FUNC(ssycon)"(char *uplo, int *n, s *a, int *lda, int *ipiv, s *anorm, s *rcond, s *work, int *iwork, int *info) nogil +cdef void ssycon(char *uplo, int *n, s *a, int *lda, int *ipiv, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_ssycon(uplo, n, a, lda, ipiv, anorm, rcond, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssyconv "BLAS_FUNC(ssyconv)"(char *uplo, char *way, int *n, s *a, int *lda, int *ipiv, s *work, int *info) nogil +cdef void ssyconv(char *uplo, char *way, int *n, s *a, int *lda, int *ipiv, s *work, int *info) noexcept nogil: + + _fortran_ssyconv(uplo, way, n, a, lda, ipiv, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssyequb "BLAS_FUNC(ssyequb)"(char *uplo, int *n, s *a, int *lda, s *s, s *scond, s *amax, s *work, int *info) nogil +cdef void ssyequb(char *uplo, int *n, s *a, int *lda, s *s, s *scond, s *amax, s *work, int *info) noexcept nogil: + + _fortran_ssyequb(uplo, n, a, lda, s, scond, amax, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssyev "BLAS_FUNC(ssyev)"(char *jobz, char *uplo, int *n, s *a, int *lda, s *w, s *work, int *lwork, int *info) nogil +cdef void ssyev(char *jobz, char *uplo, int *n, s *a, int *lda, s *w, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_ssyev(jobz, uplo, n, a, lda, w, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssyevd "BLAS_FUNC(ssyevd)"(char *jobz, char *uplo, int *n, s *a, int *lda, s *w, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void ssyevd(char *jobz, char *uplo, int *n, s *a, int *lda, s *w, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_ssyevd(jobz, uplo, n, a, lda, w, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssyevr "BLAS_FUNC(ssyevr)"(char *jobz, char *range, char *uplo, int *n, s *a, int *lda, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, int *isuppz, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void ssyevr(char *jobz, char *range, char *uplo, int *n, s *a, int *lda, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, int *isuppz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_ssyevr(jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssyevx "BLAS_FUNC(ssyevx)"(char *jobz, char *range, char *uplo, int *n, s *a, int *lda, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *ifail, int *info) nogil +cdef void ssyevx(char *jobz, char *range, char *uplo, int *n, s *a, int *lda, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_ssyevx(jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol, m, w, z, ldz, work, lwork, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssygs2 "BLAS_FUNC(ssygs2)"(int *itype, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, int *info) nogil +cdef void ssygs2(int *itype, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, int *info) noexcept nogil: + + _fortran_ssygs2(itype, uplo, n, a, lda, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssygst "BLAS_FUNC(ssygst)"(int *itype, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, int *info) nogil +cdef void ssygst(int *itype, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, int *info) noexcept nogil: + + _fortran_ssygst(itype, uplo, n, a, lda, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssygv "BLAS_FUNC(ssygv)"(int *itype, char *jobz, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, s *w, s *work, int *lwork, int *info) nogil +cdef void ssygv(int *itype, char *jobz, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, s *w, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_ssygv(itype, jobz, uplo, n, a, lda, b, ldb, w, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssygvd "BLAS_FUNC(ssygvd)"(int *itype, char *jobz, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, s *w, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void ssygvd(int *itype, char *jobz, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, s *w, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_ssygvd(itype, jobz, uplo, n, a, lda, b, ldb, w, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssygvx "BLAS_FUNC(ssygvx)"(int *itype, char *jobz, char *range, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *ifail, int *info) nogil +cdef void ssygvx(int *itype, char *jobz, char *range, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_ssygvx(itype, jobz, range, uplo, n, a, lda, b, ldb, vl, vu, il, iu, abstol, m, w, z, ldz, work, lwork, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssyrfs "BLAS_FUNC(ssyrfs)"(char *uplo, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) nogil +cdef void ssyrfs(char *uplo, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_ssyrfs(uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssysv "BLAS_FUNC(ssysv)"(char *uplo, int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, s *work, int *lwork, int *info) nogil +cdef void ssysv(char *uplo, int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_ssysv(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssysvx "BLAS_FUNC(ssysvx)"(char *fact, char *uplo, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *lwork, int *iwork, int *info) nogil +cdef void ssysvx(char *fact, char *uplo, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *lwork, int *iwork, int *info) noexcept nogil: + + _fortran_ssysvx(fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, lwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssyswapr "BLAS_FUNC(ssyswapr)"(char *uplo, int *n, s *a, int *lda, int *i1, int *i2) nogil +cdef void ssyswapr(char *uplo, int *n, s *a, int *lda, int *i1, int *i2) noexcept nogil: + + _fortran_ssyswapr(uplo, n, a, lda, i1, i2) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssytd2 "BLAS_FUNC(ssytd2)"(char *uplo, int *n, s *a, int *lda, s *d, s *e, s *tau, int *info) nogil +cdef void ssytd2(char *uplo, int *n, s *a, int *lda, s *d, s *e, s *tau, int *info) noexcept nogil: + + _fortran_ssytd2(uplo, n, a, lda, d, e, tau, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssytf2 "BLAS_FUNC(ssytf2)"(char *uplo, int *n, s *a, int *lda, int *ipiv, int *info) nogil +cdef void ssytf2(char *uplo, int *n, s *a, int *lda, int *ipiv, int *info) noexcept nogil: + + _fortran_ssytf2(uplo, n, a, lda, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssytrd "BLAS_FUNC(ssytrd)"(char *uplo, int *n, s *a, int *lda, s *d, s *e, s *tau, s *work, int *lwork, int *info) nogil +cdef void ssytrd(char *uplo, int *n, s *a, int *lda, s *d, s *e, s *tau, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_ssytrd(uplo, n, a, lda, d, e, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssytrf "BLAS_FUNC(ssytrf)"(char *uplo, int *n, s *a, int *lda, int *ipiv, s *work, int *lwork, int *info) nogil +cdef void ssytrf(char *uplo, int *n, s *a, int *lda, int *ipiv, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_ssytrf(uplo, n, a, lda, ipiv, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssytri "BLAS_FUNC(ssytri)"(char *uplo, int *n, s *a, int *lda, int *ipiv, s *work, int *info) nogil +cdef void ssytri(char *uplo, int *n, s *a, int *lda, int *ipiv, s *work, int *info) noexcept nogil: + + _fortran_ssytri(uplo, n, a, lda, ipiv, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssytri2 "BLAS_FUNC(ssytri2)"(char *uplo, int *n, s *a, int *lda, int *ipiv, s *work, int *lwork, int *info) nogil +cdef void ssytri2(char *uplo, int *n, s *a, int *lda, int *ipiv, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_ssytri2(uplo, n, a, lda, ipiv, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssytri2x "BLAS_FUNC(ssytri2x)"(char *uplo, int *n, s *a, int *lda, int *ipiv, s *work, int *nb, int *info) nogil +cdef void ssytri2x(char *uplo, int *n, s *a, int *lda, int *ipiv, s *work, int *nb, int *info) noexcept nogil: + + _fortran_ssytri2x(uplo, n, a, lda, ipiv, work, nb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssytrs "BLAS_FUNC(ssytrs)"(char *uplo, int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, int *info) nogil +cdef void ssytrs(char *uplo, int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, int *info) noexcept nogil: + + _fortran_ssytrs(uplo, n, nrhs, a, lda, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ssytrs2 "BLAS_FUNC(ssytrs2)"(char *uplo, int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, s *work, int *info) nogil +cdef void ssytrs2(char *uplo, int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, s *work, int *info) noexcept nogil: + + _fortran_ssytrs2(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stbcon "BLAS_FUNC(stbcon)"(char *norm, char *uplo, char *diag, int *n, int *kd, s *ab, int *ldab, s *rcond, s *work, int *iwork, int *info) nogil +cdef void stbcon(char *norm, char *uplo, char *diag, int *n, int *kd, s *ab, int *ldab, s *rcond, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_stbcon(norm, uplo, diag, n, kd, ab, ldab, rcond, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stbrfs "BLAS_FUNC(stbrfs)"(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) nogil +cdef void stbrfs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_stbrfs(uplo, trans, diag, n, kd, nrhs, ab, ldab, b, ldb, x, ldx, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stbtrs "BLAS_FUNC(stbtrs)"(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *b, int *ldb, int *info) nogil +cdef void stbtrs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *b, int *ldb, int *info) noexcept nogil: + + _fortran_stbtrs(uplo, trans, diag, n, kd, nrhs, ab, ldab, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stfsm "BLAS_FUNC(stfsm)"(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, s *alpha, s *a, s *b, int *ldb) nogil +cdef void stfsm(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, s *alpha, s *a, s *b, int *ldb) noexcept nogil: + + _fortran_stfsm(transr, side, uplo, trans, diag, m, n, alpha, a, b, ldb) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stftri "BLAS_FUNC(stftri)"(char *transr, char *uplo, char *diag, int *n, s *a, int *info) nogil +cdef void stftri(char *transr, char *uplo, char *diag, int *n, s *a, int *info) noexcept nogil: + + _fortran_stftri(transr, uplo, diag, n, a, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stfttp "BLAS_FUNC(stfttp)"(char *transr, char *uplo, int *n, s *arf, s *ap, int *info) nogil +cdef void stfttp(char *transr, char *uplo, int *n, s *arf, s *ap, int *info) noexcept nogil: + + _fortran_stfttp(transr, uplo, n, arf, ap, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stfttr "BLAS_FUNC(stfttr)"(char *transr, char *uplo, int *n, s *arf, s *a, int *lda, int *info) nogil +cdef void stfttr(char *transr, char *uplo, int *n, s *arf, s *a, int *lda, int *info) noexcept nogil: + + _fortran_stfttr(transr, uplo, n, arf, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stgevc "BLAS_FUNC(stgevc)"(char *side, char *howmny, bint *select, int *n, s *s, int *lds, s *p, int *ldp, s *vl, int *ldvl, s *vr, int *ldvr, int *mm, int *m, s *work, int *info) nogil +cdef void stgevc(char *side, char *howmny, bint *select, int *n, s *s, int *lds, s *p, int *ldp, s *vl, int *ldvl, s *vr, int *ldvr, int *mm, int *m, s *work, int *info) noexcept nogil: + + _fortran_stgevc(side, howmny, select, n, s, lds, p, ldp, vl, ldvl, vr, ldvr, mm, m, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stgex2 "BLAS_FUNC(stgex2)"(bint *wantq, bint *wantz, int *n, s *a, int *lda, s *b, int *ldb, s *q, int *ldq, s *z, int *ldz, int *j1, int *n1, int *n2, s *work, int *lwork, int *info) nogil +cdef void stgex2(bint *wantq, bint *wantz, int *n, s *a, int *lda, s *b, int *ldb, s *q, int *ldq, s *z, int *ldz, int *j1, int *n1, int *n2, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_stgex2(wantq, wantz, n, a, lda, b, ldb, q, ldq, z, ldz, j1, n1, n2, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stgexc "BLAS_FUNC(stgexc)"(bint *wantq, bint *wantz, int *n, s *a, int *lda, s *b, int *ldb, s *q, int *ldq, s *z, int *ldz, int *ifst, int *ilst, s *work, int *lwork, int *info) nogil +cdef void stgexc(bint *wantq, bint *wantz, int *n, s *a, int *lda, s *b, int *ldb, s *q, int *ldq, s *z, int *ldz, int *ifst, int *ilst, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_stgexc(wantq, wantz, n, a, lda, b, ldb, q, ldq, z, ldz, ifst, ilst, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stgsen "BLAS_FUNC(stgsen)"(int *ijob, bint *wantq, bint *wantz, bint *select, int *n, s *a, int *lda, s *b, int *ldb, s *alphar, s *alphai, s *beta, s *q, int *ldq, s *z, int *ldz, int *m, s *pl, s *pr, s *dif, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void stgsen(int *ijob, bint *wantq, bint *wantz, bint *select, int *n, s *a, int *lda, s *b, int *ldb, s *alphar, s *alphai, s *beta, s *q, int *ldq, s *z, int *ldz, int *m, s *pl, s *pr, s *dif, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_stgsen(ijob, wantq, wantz, select, n, a, lda, b, ldb, alphar, alphai, beta, q, ldq, z, ldz, m, pl, pr, dif, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stgsja "BLAS_FUNC(stgsja)"(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, s *a, int *lda, s *b, int *ldb, s *tola, s *tolb, s *alpha, s *beta, s *u, int *ldu, s *v, int *ldv, s *q, int *ldq, s *work, int *ncycle, int *info) nogil +cdef void stgsja(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, s *a, int *lda, s *b, int *ldb, s *tola, s *tolb, s *alpha, s *beta, s *u, int *ldu, s *v, int *ldv, s *q, int *ldq, s *work, int *ncycle, int *info) noexcept nogil: + + _fortran_stgsja(jobu, jobv, jobq, m, p, n, k, l, a, lda, b, ldb, tola, tolb, alpha, beta, u, ldu, v, ldv, q, ldq, work, ncycle, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stgsna "BLAS_FUNC(stgsna)"(char *job, char *howmny, bint *select, int *n, s *a, int *lda, s *b, int *ldb, s *vl, int *ldvl, s *vr, int *ldvr, s *s, s *dif, int *mm, int *m, s *work, int *lwork, int *iwork, int *info) nogil +cdef void stgsna(char *job, char *howmny, bint *select, int *n, s *a, int *lda, s *b, int *ldb, s *vl, int *ldvl, s *vr, int *ldvr, s *s, s *dif, int *mm, int *m, s *work, int *lwork, int *iwork, int *info) noexcept nogil: + + _fortran_stgsna(job, howmny, select, n, a, lda, b, ldb, vl, ldvl, vr, ldvr, s, dif, mm, m, work, lwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stgsy2 "BLAS_FUNC(stgsy2)"(char *trans, int *ijob, int *m, int *n, s *a, int *lda, s *b, int *ldb, s *c, int *ldc, s *d, int *ldd, s *e, int *lde, s *f, int *ldf, s *scale, s *rdsum, s *rdscal, int *iwork, int *pq, int *info) nogil +cdef void stgsy2(char *trans, int *ijob, int *m, int *n, s *a, int *lda, s *b, int *ldb, s *c, int *ldc, s *d, int *ldd, s *e, int *lde, s *f, int *ldf, s *scale, s *rdsum, s *rdscal, int *iwork, int *pq, int *info) noexcept nogil: + + _fortran_stgsy2(trans, ijob, m, n, a, lda, b, ldb, c, ldc, d, ldd, e, lde, f, ldf, scale, rdsum, rdscal, iwork, pq, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stgsyl "BLAS_FUNC(stgsyl)"(char *trans, int *ijob, int *m, int *n, s *a, int *lda, s *b, int *ldb, s *c, int *ldc, s *d, int *ldd, s *e, int *lde, s *f, int *ldf, s *scale, s *dif, s *work, int *lwork, int *iwork, int *info) nogil +cdef void stgsyl(char *trans, int *ijob, int *m, int *n, s *a, int *lda, s *b, int *ldb, s *c, int *ldc, s *d, int *ldd, s *e, int *lde, s *f, int *ldf, s *scale, s *dif, s *work, int *lwork, int *iwork, int *info) noexcept nogil: + + _fortran_stgsyl(trans, ijob, m, n, a, lda, b, ldb, c, ldc, d, ldd, e, lde, f, ldf, scale, dif, work, lwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stpcon "BLAS_FUNC(stpcon)"(char *norm, char *uplo, char *diag, int *n, s *ap, s *rcond, s *work, int *iwork, int *info) nogil +cdef void stpcon(char *norm, char *uplo, char *diag, int *n, s *ap, s *rcond, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_stpcon(norm, uplo, diag, n, ap, rcond, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stpmqrt "BLAS_FUNC(stpmqrt)"(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, s *v, int *ldv, s *t, int *ldt, s *a, int *lda, s *b, int *ldb, s *work, int *info) nogil +cdef void stpmqrt(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, s *v, int *ldv, s *t, int *ldt, s *a, int *lda, s *b, int *ldb, s *work, int *info) noexcept nogil: + + _fortran_stpmqrt(side, trans, m, n, k, l, nb, v, ldv, t, ldt, a, lda, b, ldb, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stpqrt "BLAS_FUNC(stpqrt)"(int *m, int *n, int *l, int *nb, s *a, int *lda, s *b, int *ldb, s *t, int *ldt, s *work, int *info) nogil +cdef void stpqrt(int *m, int *n, int *l, int *nb, s *a, int *lda, s *b, int *ldb, s *t, int *ldt, s *work, int *info) noexcept nogil: + + _fortran_stpqrt(m, n, l, nb, a, lda, b, ldb, t, ldt, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stpqrt2 "BLAS_FUNC(stpqrt2)"(int *m, int *n, int *l, s *a, int *lda, s *b, int *ldb, s *t, int *ldt, int *info) nogil +cdef void stpqrt2(int *m, int *n, int *l, s *a, int *lda, s *b, int *ldb, s *t, int *ldt, int *info) noexcept nogil: + + _fortran_stpqrt2(m, n, l, a, lda, b, ldb, t, ldt, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stprfb "BLAS_FUNC(stprfb)"(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, s *v, int *ldv, s *t, int *ldt, s *a, int *lda, s *b, int *ldb, s *work, int *ldwork) nogil +cdef void stprfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, s *v, int *ldv, s *t, int *ldt, s *a, int *lda, s *b, int *ldb, s *work, int *ldwork) noexcept nogil: + + _fortran_stprfb(side, trans, direct, storev, m, n, k, l, v, ldv, t, ldt, a, lda, b, ldb, work, ldwork) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stprfs "BLAS_FUNC(stprfs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, s *ap, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) nogil +cdef void stprfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, s *ap, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_stprfs(uplo, trans, diag, n, nrhs, ap, b, ldb, x, ldx, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stptri "BLAS_FUNC(stptri)"(char *uplo, char *diag, int *n, s *ap, int *info) nogil +cdef void stptri(char *uplo, char *diag, int *n, s *ap, int *info) noexcept nogil: + + _fortran_stptri(uplo, diag, n, ap, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stptrs "BLAS_FUNC(stptrs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, s *ap, s *b, int *ldb, int *info) nogil +cdef void stptrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, s *ap, s *b, int *ldb, int *info) noexcept nogil: + + _fortran_stptrs(uplo, trans, diag, n, nrhs, ap, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stpttf "BLAS_FUNC(stpttf)"(char *transr, char *uplo, int *n, s *ap, s *arf, int *info) nogil +cdef void stpttf(char *transr, char *uplo, int *n, s *ap, s *arf, int *info) noexcept nogil: + + _fortran_stpttf(transr, uplo, n, ap, arf, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stpttr "BLAS_FUNC(stpttr)"(char *uplo, int *n, s *ap, s *a, int *lda, int *info) nogil +cdef void stpttr(char *uplo, int *n, s *ap, s *a, int *lda, int *info) noexcept nogil: + + _fortran_stpttr(uplo, n, ap, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_strcon "BLAS_FUNC(strcon)"(char *norm, char *uplo, char *diag, int *n, s *a, int *lda, s *rcond, s *work, int *iwork, int *info) nogil +cdef void strcon(char *norm, char *uplo, char *diag, int *n, s *a, int *lda, s *rcond, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_strcon(norm, uplo, diag, n, a, lda, rcond, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_strevc "BLAS_FUNC(strevc)"(char *side, char *howmny, bint *select, int *n, s *t, int *ldt, s *vl, int *ldvl, s *vr, int *ldvr, int *mm, int *m, s *work, int *info) nogil +cdef void strevc(char *side, char *howmny, bint *select, int *n, s *t, int *ldt, s *vl, int *ldvl, s *vr, int *ldvr, int *mm, int *m, s *work, int *info) noexcept nogil: + + _fortran_strevc(side, howmny, select, n, t, ldt, vl, ldvl, vr, ldvr, mm, m, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_strexc "BLAS_FUNC(strexc)"(char *compq, int *n, s *t, int *ldt, s *q, int *ldq, int *ifst, int *ilst, s *work, int *info) nogil +cdef void strexc(char *compq, int *n, s *t, int *ldt, s *q, int *ldq, int *ifst, int *ilst, s *work, int *info) noexcept nogil: + + _fortran_strexc(compq, n, t, ldt, q, ldq, ifst, ilst, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_strrfs "BLAS_FUNC(strrfs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) nogil +cdef void strrfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil: + + _fortran_strrfs(uplo, trans, diag, n, nrhs, a, lda, b, ldb, x, ldx, ferr, berr, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_strsen "BLAS_FUNC(strsen)"(char *job, char *compq, bint *select, int *n, s *t, int *ldt, s *q, int *ldq, s *wr, s *wi, int *m, s *s, s *sep, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void strsen(char *job, char *compq, bint *select, int *n, s *t, int *ldt, s *q, int *ldq, s *wr, s *wi, int *m, s *s, s *sep, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_strsen(job, compq, select, n, t, ldt, q, ldq, wr, wi, m, s, sep, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_strsna "BLAS_FUNC(strsna)"(char *job, char *howmny, bint *select, int *n, s *t, int *ldt, s *vl, int *ldvl, s *vr, int *ldvr, s *s, s *sep, int *mm, int *m, s *work, int *ldwork, int *iwork, int *info) nogil +cdef void strsna(char *job, char *howmny, bint *select, int *n, s *t, int *ldt, s *vl, int *ldvl, s *vr, int *ldvr, s *s, s *sep, int *mm, int *m, s *work, int *ldwork, int *iwork, int *info) noexcept nogil: + + _fortran_strsna(job, howmny, select, n, t, ldt, vl, ldvl, vr, ldvr, s, sep, mm, m, work, ldwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_strsyl "BLAS_FUNC(strsyl)"(char *trana, char *tranb, int *isgn, int *m, int *n, s *a, int *lda, s *b, int *ldb, s *c, int *ldc, s *scale, int *info) nogil +cdef void strsyl(char *trana, char *tranb, int *isgn, int *m, int *n, s *a, int *lda, s *b, int *ldb, s *c, int *ldc, s *scale, int *info) noexcept nogil: + + _fortran_strsyl(trana, tranb, isgn, m, n, a, lda, b, ldb, c, ldc, scale, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_strti2 "BLAS_FUNC(strti2)"(char *uplo, char *diag, int *n, s *a, int *lda, int *info) nogil +cdef void strti2(char *uplo, char *diag, int *n, s *a, int *lda, int *info) noexcept nogil: + + _fortran_strti2(uplo, diag, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_strtri "BLAS_FUNC(strtri)"(char *uplo, char *diag, int *n, s *a, int *lda, int *info) nogil +cdef void strtri(char *uplo, char *diag, int *n, s *a, int *lda, int *info) noexcept nogil: + + _fortran_strtri(uplo, diag, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_strtrs "BLAS_FUNC(strtrs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, int *info) nogil +cdef void strtrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, int *info) noexcept nogil: + + _fortran_strtrs(uplo, trans, diag, n, nrhs, a, lda, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_strttf "BLAS_FUNC(strttf)"(char *transr, char *uplo, int *n, s *a, int *lda, s *arf, int *info) nogil +cdef void strttf(char *transr, char *uplo, int *n, s *a, int *lda, s *arf, int *info) noexcept nogil: + + _fortran_strttf(transr, uplo, n, a, lda, arf, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_strttp "BLAS_FUNC(strttp)"(char *uplo, int *n, s *a, int *lda, s *ap, int *info) nogil +cdef void strttp(char *uplo, int *n, s *a, int *lda, s *ap, int *info) noexcept nogil: + + _fortran_strttp(uplo, n, a, lda, ap, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_stzrzf "BLAS_FUNC(stzrzf)"(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil +cdef void stzrzf(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil: + + _fortran_stzrzf(m, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_xerbla_array "BLAS_FUNC(xerbla_array)"(char *srname_array, int *srname_len, int *info) nogil +cdef void xerbla_array(char *srname_array, int *srname_len, int *info) noexcept nogil: + + _fortran_xerbla_array(srname_array, srname_len, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zbbcsd "BLAS_FUNC(zbbcsd)"(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, d *theta, d *phi, npy_complex128 *u1, int *ldu1, npy_complex128 *u2, int *ldu2, npy_complex128 *v1t, int *ldv1t, npy_complex128 *v2t, int *ldv2t, d *b11d, d *b11e, d *b12d, d *b12e, d *b21d, d *b21e, d *b22d, d *b22e, d *rwork, int *lrwork, int *info) nogil +cdef void zbbcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, d *theta, d *phi, z *u1, int *ldu1, z *u2, int *ldu2, z *v1t, int *ldv1t, z *v2t, int *ldv2t, d *b11d, d *b11e, d *b12d, d *b12e, d *b21d, d *b21e, d *b22d, d *b22e, d *rwork, int *lrwork, int *info) noexcept nogil: + + _fortran_zbbcsd(jobu1, jobu2, jobv1t, jobv2t, trans, m, p, q, theta, phi, u1, ldu1, u2, ldu2, v1t, ldv1t, v2t, ldv2t, b11d, b11e, b12d, b12e, b21d, b21e, b22d, b22e, rwork, lrwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zbdsqr "BLAS_FUNC(zbdsqr)"(char *uplo, int *n, int *ncvt, int *nru, int *ncc, d *d, d *e, npy_complex128 *vt, int *ldvt, npy_complex128 *u, int *ldu, npy_complex128 *c, int *ldc, d *rwork, int *info) nogil +cdef void zbdsqr(char *uplo, int *n, int *ncvt, int *nru, int *ncc, d *d, d *e, z *vt, int *ldvt, z *u, int *ldu, z *c, int *ldc, d *rwork, int *info) noexcept nogil: + + _fortran_zbdsqr(uplo, n, ncvt, nru, ncc, d, e, vt, ldvt, u, ldu, c, ldc, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zcgesv "BLAS_FUNC(zcgesv)"(int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, npy_complex128 *work, npy_complex64 *swork, d *rwork, int *iter, int *info) nogil +cdef void zcgesv(int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, z *x, int *ldx, z *work, c *swork, d *rwork, int *iter, int *info) noexcept nogil: + + _fortran_zcgesv(n, nrhs, a, lda, ipiv, b, ldb, x, ldx, work, swork, rwork, iter, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zcposv "BLAS_FUNC(zcposv)"(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, npy_complex128 *work, npy_complex64 *swork, d *rwork, int *iter, int *info) nogil +cdef void zcposv(char *uplo, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, z *x, int *ldx, z *work, c *swork, d *rwork, int *iter, int *info) noexcept nogil: + + _fortran_zcposv(uplo, n, nrhs, a, lda, b, ldb, x, ldx, work, swork, rwork, iter, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zdrscl "BLAS_FUNC(zdrscl)"(int *n, d *sa, npy_complex128 *sx, int *incx) nogil +cdef void zdrscl(int *n, d *sa, z *sx, int *incx) noexcept nogil: + + _fortran_zdrscl(n, sa, sx, incx) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgbbrd "BLAS_FUNC(zgbbrd)"(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, npy_complex128 *ab, int *ldab, d *d, d *e, npy_complex128 *q, int *ldq, npy_complex128 *pt, int *ldpt, npy_complex128 *c, int *ldc, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zgbbrd(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, z *ab, int *ldab, d *d, d *e, z *q, int *ldq, z *pt, int *ldpt, z *c, int *ldc, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zgbbrd(vect, m, n, ncc, kl, ku, ab, ldab, d, e, q, ldq, pt, ldpt, c, ldc, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgbcon "BLAS_FUNC(zgbcon)"(char *norm, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, int *ipiv, d *anorm, d *rcond, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zgbcon(char *norm, int *n, int *kl, int *ku, z *ab, int *ldab, int *ipiv, d *anorm, d *rcond, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zgbcon(norm, n, kl, ku, ab, ldab, ipiv, anorm, rcond, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgbequ "BLAS_FUNC(zgbequ)"(int *m, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) nogil +cdef void zgbequ(int *m, int *n, int *kl, int *ku, z *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil: + + _fortran_zgbequ(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgbequb "BLAS_FUNC(zgbequb)"(int *m, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) nogil +cdef void zgbequb(int *m, int *n, int *kl, int *ku, z *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil: + + _fortran_zgbequb(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgbrfs "BLAS_FUNC(zgbrfs)"(char *trans, int *n, int *kl, int *ku, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *afb, int *ldafb, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zgbrfs(char *trans, int *n, int *kl, int *ku, int *nrhs, z *ab, int *ldab, z *afb, int *ldafb, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zgbrfs(trans, n, kl, ku, nrhs, ab, ldab, afb, ldafb, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgbsv "BLAS_FUNC(zgbsv)"(int *n, int *kl, int *ku, int *nrhs, npy_complex128 *ab, int *ldab, int *ipiv, npy_complex128 *b, int *ldb, int *info) nogil +cdef void zgbsv(int *n, int *kl, int *ku, int *nrhs, z *ab, int *ldab, int *ipiv, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_zgbsv(n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgbsvx "BLAS_FUNC(zgbsvx)"(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *afb, int *ldafb, int *ipiv, char *equed, d *r, d *c, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *rcond, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zgbsvx(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, z *ab, int *ldab, z *afb, int *ldafb, int *ipiv, char *equed, d *r, d *c, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zgbsvx(fact, trans, n, kl, ku, nrhs, ab, ldab, afb, ldafb, ipiv, equed, r, c, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgbtf2 "BLAS_FUNC(zgbtf2)"(int *m, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, int *ipiv, int *info) nogil +cdef void zgbtf2(int *m, int *n, int *kl, int *ku, z *ab, int *ldab, int *ipiv, int *info) noexcept nogil: + + _fortran_zgbtf2(m, n, kl, ku, ab, ldab, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgbtrf "BLAS_FUNC(zgbtrf)"(int *m, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, int *ipiv, int *info) nogil +cdef void zgbtrf(int *m, int *n, int *kl, int *ku, z *ab, int *ldab, int *ipiv, int *info) noexcept nogil: + + _fortran_zgbtrf(m, n, kl, ku, ab, ldab, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgbtrs "BLAS_FUNC(zgbtrs)"(char *trans, int *n, int *kl, int *ku, int *nrhs, npy_complex128 *ab, int *ldab, int *ipiv, npy_complex128 *b, int *ldb, int *info) nogil +cdef void zgbtrs(char *trans, int *n, int *kl, int *ku, int *nrhs, z *ab, int *ldab, int *ipiv, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_zgbtrs(trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgebak "BLAS_FUNC(zgebak)"(char *job, char *side, int *n, int *ilo, int *ihi, d *scale, int *m, npy_complex128 *v, int *ldv, int *info) nogil +cdef void zgebak(char *job, char *side, int *n, int *ilo, int *ihi, d *scale, int *m, z *v, int *ldv, int *info) noexcept nogil: + + _fortran_zgebak(job, side, n, ilo, ihi, scale, m, v, ldv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgebal "BLAS_FUNC(zgebal)"(char *job, int *n, npy_complex128 *a, int *lda, int *ilo, int *ihi, d *scale, int *info) nogil +cdef void zgebal(char *job, int *n, z *a, int *lda, int *ilo, int *ihi, d *scale, int *info) noexcept nogil: + + _fortran_zgebal(job, n, a, lda, ilo, ihi, scale, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgebd2 "BLAS_FUNC(zgebd2)"(int *m, int *n, npy_complex128 *a, int *lda, d *d, d *e, npy_complex128 *tauq, npy_complex128 *taup, npy_complex128 *work, int *info) nogil +cdef void zgebd2(int *m, int *n, z *a, int *lda, d *d, d *e, z *tauq, z *taup, z *work, int *info) noexcept nogil: + + _fortran_zgebd2(m, n, a, lda, d, e, tauq, taup, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgebrd "BLAS_FUNC(zgebrd)"(int *m, int *n, npy_complex128 *a, int *lda, d *d, d *e, npy_complex128 *tauq, npy_complex128 *taup, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zgebrd(int *m, int *n, z *a, int *lda, d *d, d *e, z *tauq, z *taup, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zgebrd(m, n, a, lda, d, e, tauq, taup, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgecon "BLAS_FUNC(zgecon)"(char *norm, int *n, npy_complex128 *a, int *lda, d *anorm, d *rcond, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zgecon(char *norm, int *n, z *a, int *lda, d *anorm, d *rcond, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zgecon(norm, n, a, lda, anorm, rcond, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgeequ "BLAS_FUNC(zgeequ)"(int *m, int *n, npy_complex128 *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) nogil +cdef void zgeequ(int *m, int *n, z *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil: + + _fortran_zgeequ(m, n, a, lda, r, c, rowcnd, colcnd, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgeequb "BLAS_FUNC(zgeequb)"(int *m, int *n, npy_complex128 *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) nogil +cdef void zgeequb(int *m, int *n, z *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil: + + _fortran_zgeequb(m, n, a, lda, r, c, rowcnd, colcnd, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgees "BLAS_FUNC(zgees)"(char *jobvs, char *sort, _zselect1 *select, int *n, npy_complex128 *a, int *lda, int *sdim, npy_complex128 *w, npy_complex128 *vs, int *ldvs, npy_complex128 *work, int *lwork, d *rwork, bint *bwork, int *info) nogil +cdef void zgees(char *jobvs, char *sort, zselect1 *select, int *n, z *a, int *lda, int *sdim, z *w, z *vs, int *ldvs, z *work, int *lwork, d *rwork, bint *bwork, int *info) noexcept nogil: + + _fortran_zgees(jobvs, sort, <_zselect1*>select, n, a, lda, sdim, w, vs, ldvs, work, lwork, rwork, bwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgeesx "BLAS_FUNC(zgeesx)"(char *jobvs, char *sort, _zselect1 *select, char *sense, int *n, npy_complex128 *a, int *lda, int *sdim, npy_complex128 *w, npy_complex128 *vs, int *ldvs, d *rconde, d *rcondv, npy_complex128 *work, int *lwork, d *rwork, bint *bwork, int *info) nogil +cdef void zgeesx(char *jobvs, char *sort, zselect1 *select, char *sense, int *n, z *a, int *lda, int *sdim, z *w, z *vs, int *ldvs, d *rconde, d *rcondv, z *work, int *lwork, d *rwork, bint *bwork, int *info) noexcept nogil: + + _fortran_zgeesx(jobvs, sort, <_zselect1*>select, sense, n, a, lda, sdim, w, vs, ldvs, rconde, rcondv, work, lwork, rwork, bwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgeev "BLAS_FUNC(zgeev)"(char *jobvl, char *jobvr, int *n, npy_complex128 *a, int *lda, npy_complex128 *w, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, npy_complex128 *work, int *lwork, d *rwork, int *info) nogil +cdef void zgeev(char *jobvl, char *jobvr, int *n, z *a, int *lda, z *w, z *vl, int *ldvl, z *vr, int *ldvr, z *work, int *lwork, d *rwork, int *info) noexcept nogil: + + _fortran_zgeev(jobvl, jobvr, n, a, lda, w, vl, ldvl, vr, ldvr, work, lwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgeevx "BLAS_FUNC(zgeevx)"(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, npy_complex128 *a, int *lda, npy_complex128 *w, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, int *ilo, int *ihi, d *scale, d *abnrm, d *rconde, d *rcondv, npy_complex128 *work, int *lwork, d *rwork, int *info) nogil +cdef void zgeevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, z *a, int *lda, z *w, z *vl, int *ldvl, z *vr, int *ldvr, int *ilo, int *ihi, d *scale, d *abnrm, d *rconde, d *rcondv, z *work, int *lwork, d *rwork, int *info) noexcept nogil: + + _fortran_zgeevx(balanc, jobvl, jobvr, sense, n, a, lda, w, vl, ldvl, vr, ldvr, ilo, ihi, scale, abnrm, rconde, rcondv, work, lwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgehd2 "BLAS_FUNC(zgehd2)"(int *n, int *ilo, int *ihi, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info) nogil +cdef void zgehd2(int *n, int *ilo, int *ihi, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil: + + _fortran_zgehd2(n, ilo, ihi, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgehrd "BLAS_FUNC(zgehrd)"(int *n, int *ilo, int *ihi, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zgehrd(int *n, int *ilo, int *ihi, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zgehrd(n, ilo, ihi, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgelq2 "BLAS_FUNC(zgelq2)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info) nogil +cdef void zgelq2(int *m, int *n, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil: + + _fortran_zgelq2(m, n, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgelqf "BLAS_FUNC(zgelqf)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zgelqf(int *m, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zgelqf(m, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgels "BLAS_FUNC(zgels)"(char *trans, int *m, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zgels(char *trans, int *m, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zgels(trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgelsd "BLAS_FUNC(zgelsd)"(int *m, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, d *s, d *rcond, int *rank, npy_complex128 *work, int *lwork, d *rwork, int *iwork, int *info) nogil +cdef void zgelsd(int *m, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, d *s, d *rcond, int *rank, z *work, int *lwork, d *rwork, int *iwork, int *info) noexcept nogil: + + _fortran_zgelsd(m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, rwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgelss "BLAS_FUNC(zgelss)"(int *m, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, d *s, d *rcond, int *rank, npy_complex128 *work, int *lwork, d *rwork, int *info) nogil +cdef void zgelss(int *m, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, d *s, d *rcond, int *rank, z *work, int *lwork, d *rwork, int *info) noexcept nogil: + + _fortran_zgelss(m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgelsy "BLAS_FUNC(zgelsy)"(int *m, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *jpvt, d *rcond, int *rank, npy_complex128 *work, int *lwork, d *rwork, int *info) nogil +cdef void zgelsy(int *m, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, int *jpvt, d *rcond, int *rank, z *work, int *lwork, d *rwork, int *info) noexcept nogil: + + _fortran_zgelsy(m, n, nrhs, a, lda, b, ldb, jpvt, rcond, rank, work, lwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgemqrt "BLAS_FUNC(zgemqrt)"(char *side, char *trans, int *m, int *n, int *k, int *nb, npy_complex128 *v, int *ldv, npy_complex128 *t, int *ldt, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info) nogil +cdef void zgemqrt(char *side, char *trans, int *m, int *n, int *k, int *nb, z *v, int *ldv, z *t, int *ldt, z *c, int *ldc, z *work, int *info) noexcept nogil: + + _fortran_zgemqrt(side, trans, m, n, k, nb, v, ldv, t, ldt, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgeql2 "BLAS_FUNC(zgeql2)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info) nogil +cdef void zgeql2(int *m, int *n, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil: + + _fortran_zgeql2(m, n, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgeqlf "BLAS_FUNC(zgeqlf)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zgeqlf(int *m, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zgeqlf(m, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgeqp3 "BLAS_FUNC(zgeqp3)"(int *m, int *n, npy_complex128 *a, int *lda, int *jpvt, npy_complex128 *tau, npy_complex128 *work, int *lwork, d *rwork, int *info) nogil +cdef void zgeqp3(int *m, int *n, z *a, int *lda, int *jpvt, z *tau, z *work, int *lwork, d *rwork, int *info) noexcept nogil: + + _fortran_zgeqp3(m, n, a, lda, jpvt, tau, work, lwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgeqr2 "BLAS_FUNC(zgeqr2)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info) nogil +cdef void zgeqr2(int *m, int *n, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil: + + _fortran_zgeqr2(m, n, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgeqr2p "BLAS_FUNC(zgeqr2p)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info) nogil +cdef void zgeqr2p(int *m, int *n, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil: + + _fortran_zgeqr2p(m, n, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgeqrf "BLAS_FUNC(zgeqrf)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zgeqrf(int *m, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zgeqrf(m, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgeqrfp "BLAS_FUNC(zgeqrfp)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zgeqrfp(int *m, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zgeqrfp(m, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgeqrt "BLAS_FUNC(zgeqrt)"(int *m, int *n, int *nb, npy_complex128 *a, int *lda, npy_complex128 *t, int *ldt, npy_complex128 *work, int *info) nogil +cdef void zgeqrt(int *m, int *n, int *nb, z *a, int *lda, z *t, int *ldt, z *work, int *info) noexcept nogil: + + _fortran_zgeqrt(m, n, nb, a, lda, t, ldt, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgeqrt2 "BLAS_FUNC(zgeqrt2)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *t, int *ldt, int *info) nogil +cdef void zgeqrt2(int *m, int *n, z *a, int *lda, z *t, int *ldt, int *info) noexcept nogil: + + _fortran_zgeqrt2(m, n, a, lda, t, ldt, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgeqrt3 "BLAS_FUNC(zgeqrt3)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *t, int *ldt, int *info) nogil +cdef void zgeqrt3(int *m, int *n, z *a, int *lda, z *t, int *ldt, int *info) noexcept nogil: + + _fortran_zgeqrt3(m, n, a, lda, t, ldt, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgerfs "BLAS_FUNC(zgerfs)"(char *trans, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zgerfs(char *trans, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zgerfs(trans, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgerq2 "BLAS_FUNC(zgerq2)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info) nogil +cdef void zgerq2(int *m, int *n, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil: + + _fortran_zgerq2(m, n, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgerqf "BLAS_FUNC(zgerqf)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zgerqf(int *m, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zgerqf(m, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgesc2 "BLAS_FUNC(zgesc2)"(int *n, npy_complex128 *a, int *lda, npy_complex128 *rhs, int *ipiv, int *jpiv, d *scale) nogil +cdef void zgesc2(int *n, z *a, int *lda, z *rhs, int *ipiv, int *jpiv, d *scale) noexcept nogil: + + _fortran_zgesc2(n, a, lda, rhs, ipiv, jpiv, scale) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgesdd "BLAS_FUNC(zgesdd)"(char *jobz, int *m, int *n, npy_complex128 *a, int *lda, d *s, npy_complex128 *u, int *ldu, npy_complex128 *vt, int *ldvt, npy_complex128 *work, int *lwork, d *rwork, int *iwork, int *info) nogil +cdef void zgesdd(char *jobz, int *m, int *n, z *a, int *lda, d *s, z *u, int *ldu, z *vt, int *ldvt, z *work, int *lwork, d *rwork, int *iwork, int *info) noexcept nogil: + + _fortran_zgesdd(jobz, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, rwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgesv "BLAS_FUNC(zgesv)"(int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, int *info) nogil +cdef void zgesv(int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_zgesv(n, nrhs, a, lda, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgesvd "BLAS_FUNC(zgesvd)"(char *jobu, char *jobvt, int *m, int *n, npy_complex128 *a, int *lda, d *s, npy_complex128 *u, int *ldu, npy_complex128 *vt, int *ldvt, npy_complex128 *work, int *lwork, d *rwork, int *info) nogil +cdef void zgesvd(char *jobu, char *jobvt, int *m, int *n, z *a, int *lda, d *s, z *u, int *ldu, z *vt, int *ldvt, z *work, int *lwork, d *rwork, int *info) noexcept nogil: + + _fortran_zgesvd(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgesvx "BLAS_FUNC(zgesvx)"(char *fact, char *trans, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, int *ipiv, char *equed, d *r, d *c, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *rcond, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zgesvx(char *fact, char *trans, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, int *ipiv, char *equed, d *r, d *c, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zgesvx(fact, trans, n, nrhs, a, lda, af, ldaf, ipiv, equed, r, c, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgetc2 "BLAS_FUNC(zgetc2)"(int *n, npy_complex128 *a, int *lda, int *ipiv, int *jpiv, int *info) nogil +cdef void zgetc2(int *n, z *a, int *lda, int *ipiv, int *jpiv, int *info) noexcept nogil: + + _fortran_zgetc2(n, a, lda, ipiv, jpiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgetf2 "BLAS_FUNC(zgetf2)"(int *m, int *n, npy_complex128 *a, int *lda, int *ipiv, int *info) nogil +cdef void zgetf2(int *m, int *n, z *a, int *lda, int *ipiv, int *info) noexcept nogil: + + _fortran_zgetf2(m, n, a, lda, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgetrf "BLAS_FUNC(zgetrf)"(int *m, int *n, npy_complex128 *a, int *lda, int *ipiv, int *info) nogil +cdef void zgetrf(int *m, int *n, z *a, int *lda, int *ipiv, int *info) noexcept nogil: + + _fortran_zgetrf(m, n, a, lda, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgetri "BLAS_FUNC(zgetri)"(int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zgetri(int *n, z *a, int *lda, int *ipiv, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zgetri(n, a, lda, ipiv, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgetrs "BLAS_FUNC(zgetrs)"(char *trans, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, int *info) nogil +cdef void zgetrs(char *trans, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_zgetrs(trans, n, nrhs, a, lda, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zggbak "BLAS_FUNC(zggbak)"(char *job, char *side, int *n, int *ilo, int *ihi, d *lscale, d *rscale, int *m, npy_complex128 *v, int *ldv, int *info) nogil +cdef void zggbak(char *job, char *side, int *n, int *ilo, int *ihi, d *lscale, d *rscale, int *m, z *v, int *ldv, int *info) noexcept nogil: + + _fortran_zggbak(job, side, n, ilo, ihi, lscale, rscale, m, v, ldv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zggbal "BLAS_FUNC(zggbal)"(char *job, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *ilo, int *ihi, d *lscale, d *rscale, d *work, int *info) nogil +cdef void zggbal(char *job, int *n, z *a, int *lda, z *b, int *ldb, int *ilo, int *ihi, d *lscale, d *rscale, d *work, int *info) noexcept nogil: + + _fortran_zggbal(job, n, a, lda, b, ldb, ilo, ihi, lscale, rscale, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgges "BLAS_FUNC(zgges)"(char *jobvsl, char *jobvsr, char *sort, _zselect2 *selctg, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *sdim, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *vsl, int *ldvsl, npy_complex128 *vsr, int *ldvsr, npy_complex128 *work, int *lwork, d *rwork, bint *bwork, int *info) nogil +cdef void zgges(char *jobvsl, char *jobvsr, char *sort, zselect2 *selctg, int *n, z *a, int *lda, z *b, int *ldb, int *sdim, z *alpha, z *beta, z *vsl, int *ldvsl, z *vsr, int *ldvsr, z *work, int *lwork, d *rwork, bint *bwork, int *info) noexcept nogil: + + _fortran_zgges(jobvsl, jobvsr, sort, <_zselect2*>selctg, n, a, lda, b, ldb, sdim, alpha, beta, vsl, ldvsl, vsr, ldvsr, work, lwork, rwork, bwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zggesx "BLAS_FUNC(zggesx)"(char *jobvsl, char *jobvsr, char *sort, _zselect2 *selctg, char *sense, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *sdim, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *vsl, int *ldvsl, npy_complex128 *vsr, int *ldvsr, d *rconde, d *rcondv, npy_complex128 *work, int *lwork, d *rwork, int *iwork, int *liwork, bint *bwork, int *info) nogil +cdef void zggesx(char *jobvsl, char *jobvsr, char *sort, zselect2 *selctg, char *sense, int *n, z *a, int *lda, z *b, int *ldb, int *sdim, z *alpha, z *beta, z *vsl, int *ldvsl, z *vsr, int *ldvsr, d *rconde, d *rcondv, z *work, int *lwork, d *rwork, int *iwork, int *liwork, bint *bwork, int *info) noexcept nogil: + + _fortran_zggesx(jobvsl, jobvsr, sort, <_zselect2*>selctg, sense, n, a, lda, b, ldb, sdim, alpha, beta, vsl, ldvsl, vsr, ldvsr, rconde, rcondv, work, lwork, rwork, iwork, liwork, bwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zggev "BLAS_FUNC(zggev)"(char *jobvl, char *jobvr, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, npy_complex128 *work, int *lwork, d *rwork, int *info) nogil +cdef void zggev(char *jobvl, char *jobvr, int *n, z *a, int *lda, z *b, int *ldb, z *alpha, z *beta, z *vl, int *ldvl, z *vr, int *ldvr, z *work, int *lwork, d *rwork, int *info) noexcept nogil: + + _fortran_zggev(jobvl, jobvr, n, a, lda, b, ldb, alpha, beta, vl, ldvl, vr, ldvr, work, lwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zggevx "BLAS_FUNC(zggevx)"(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, int *ilo, int *ihi, d *lscale, d *rscale, d *abnrm, d *bbnrm, d *rconde, d *rcondv, npy_complex128 *work, int *lwork, d *rwork, int *iwork, bint *bwork, int *info) nogil +cdef void zggevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, z *a, int *lda, z *b, int *ldb, z *alpha, z *beta, z *vl, int *ldvl, z *vr, int *ldvr, int *ilo, int *ihi, d *lscale, d *rscale, d *abnrm, d *bbnrm, d *rconde, d *rcondv, z *work, int *lwork, d *rwork, int *iwork, bint *bwork, int *info) noexcept nogil: + + _fortran_zggevx(balanc, jobvl, jobvr, sense, n, a, lda, b, ldb, alpha, beta, vl, ldvl, vr, ldvr, ilo, ihi, lscale, rscale, abnrm, bbnrm, rconde, rcondv, work, lwork, rwork, iwork, bwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zggglm "BLAS_FUNC(zggglm)"(int *n, int *m, int *p, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *d, npy_complex128 *x, npy_complex128 *y, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zggglm(int *n, int *m, int *p, z *a, int *lda, z *b, int *ldb, z *d, z *x, z *y, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zggglm(n, m, p, a, lda, b, ldb, d, x, y, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgghrd "BLAS_FUNC(zgghrd)"(char *compq, char *compz, int *n, int *ilo, int *ihi, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *q, int *ldq, npy_complex128 *z, int *ldz, int *info) nogil +cdef void zgghrd(char *compq, char *compz, int *n, int *ilo, int *ihi, z *a, int *lda, z *b, int *ldb, z *q, int *ldq, z *z, int *ldz, int *info) noexcept nogil: + + _fortran_zgghrd(compq, compz, n, ilo, ihi, a, lda, b, ldb, q, ldq, z, ldz, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgglse "BLAS_FUNC(zgglse)"(int *m, int *n, int *p, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *c, npy_complex128 *d, npy_complex128 *x, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zgglse(int *m, int *n, int *p, z *a, int *lda, z *b, int *ldb, z *c, z *d, z *x, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zgglse(m, n, p, a, lda, b, ldb, c, d, x, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zggqrf "BLAS_FUNC(zggqrf)"(int *n, int *m, int *p, npy_complex128 *a, int *lda, npy_complex128 *taua, npy_complex128 *b, int *ldb, npy_complex128 *taub, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zggqrf(int *n, int *m, int *p, z *a, int *lda, z *taua, z *b, int *ldb, z *taub, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zggqrf(n, m, p, a, lda, taua, b, ldb, taub, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zggrqf "BLAS_FUNC(zggrqf)"(int *m, int *p, int *n, npy_complex128 *a, int *lda, npy_complex128 *taua, npy_complex128 *b, int *ldb, npy_complex128 *taub, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zggrqf(int *m, int *p, int *n, z *a, int *lda, z *taua, z *b, int *ldb, z *taub, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zggrqf(m, p, n, a, lda, taua, b, ldb, taub, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgtcon "BLAS_FUNC(zgtcon)"(char *norm, int *n, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *du2, int *ipiv, d *anorm, d *rcond, npy_complex128 *work, int *info) nogil +cdef void zgtcon(char *norm, int *n, z *dl, z *d, z *du, z *du2, int *ipiv, d *anorm, d *rcond, z *work, int *info) noexcept nogil: + + _fortran_zgtcon(norm, n, dl, d, du, du2, ipiv, anorm, rcond, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgtrfs "BLAS_FUNC(zgtrfs)"(char *trans, int *n, int *nrhs, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *dlf, npy_complex128 *df, npy_complex128 *duf, npy_complex128 *du2, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zgtrfs(char *trans, int *n, int *nrhs, z *dl, z *d, z *du, z *dlf, z *df, z *duf, z *du2, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zgtrfs(trans, n, nrhs, dl, d, du, dlf, df, duf, du2, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgtsv "BLAS_FUNC(zgtsv)"(int *n, int *nrhs, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *b, int *ldb, int *info) nogil +cdef void zgtsv(int *n, int *nrhs, z *dl, z *d, z *du, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_zgtsv(n, nrhs, dl, d, du, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgtsvx "BLAS_FUNC(zgtsvx)"(char *fact, char *trans, int *n, int *nrhs, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *dlf, npy_complex128 *df, npy_complex128 *duf, npy_complex128 *du2, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *rcond, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zgtsvx(char *fact, char *trans, int *n, int *nrhs, z *dl, z *d, z *du, z *dlf, z *df, z *duf, z *du2, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zgtsvx(fact, trans, n, nrhs, dl, d, du, dlf, df, duf, du2, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgttrf "BLAS_FUNC(zgttrf)"(int *n, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *du2, int *ipiv, int *info) nogil +cdef void zgttrf(int *n, z *dl, z *d, z *du, z *du2, int *ipiv, int *info) noexcept nogil: + + _fortran_zgttrf(n, dl, d, du, du2, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgttrs "BLAS_FUNC(zgttrs)"(char *trans, int *n, int *nrhs, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *du2, int *ipiv, npy_complex128 *b, int *ldb, int *info) nogil +cdef void zgttrs(char *trans, int *n, int *nrhs, z *dl, z *d, z *du, z *du2, int *ipiv, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_zgttrs(trans, n, nrhs, dl, d, du, du2, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zgtts2 "BLAS_FUNC(zgtts2)"(int *itrans, int *n, int *nrhs, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *du2, int *ipiv, npy_complex128 *b, int *ldb) nogil +cdef void zgtts2(int *itrans, int *n, int *nrhs, z *dl, z *d, z *du, z *du2, int *ipiv, z *b, int *ldb) noexcept nogil: + + _fortran_zgtts2(itrans, n, nrhs, dl, d, du, du2, ipiv, b, ldb) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhbev "BLAS_FUNC(zhbev)"(char *jobz, char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zhbev(char *jobz, char *uplo, int *n, int *kd, z *ab, int *ldab, d *w, z *z, int *ldz, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zhbev(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhbevd "BLAS_FUNC(zhbevd)"(char *jobz, char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil +cdef void zhbevd(char *jobz, char *uplo, int *n, int *kd, z *ab, int *ldab, d *w, z *z, int *ldz, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_zhbevd(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhbevx "BLAS_FUNC(zhbevx)"(char *jobz, char *range, char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, npy_complex128 *q, int *ldq, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, d *rwork, int *iwork, int *ifail, int *info) nogil +cdef void zhbevx(char *jobz, char *range, char *uplo, int *n, int *kd, z *ab, int *ldab, z *q, int *ldq, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, z *work, d *rwork, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_zhbevx(jobz, range, uplo, n, kd, ab, ldab, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhbgst "BLAS_FUNC(zhbgst)"(char *vect, char *uplo, int *n, int *ka, int *kb, npy_complex128 *ab, int *ldab, npy_complex128 *bb, int *ldbb, npy_complex128 *x, int *ldx, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zhbgst(char *vect, char *uplo, int *n, int *ka, int *kb, z *ab, int *ldab, z *bb, int *ldbb, z *x, int *ldx, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zhbgst(vect, uplo, n, ka, kb, ab, ldab, bb, ldbb, x, ldx, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhbgv "BLAS_FUNC(zhbgv)"(char *jobz, char *uplo, int *n, int *ka, int *kb, npy_complex128 *ab, int *ldab, npy_complex128 *bb, int *ldbb, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zhbgv(char *jobz, char *uplo, int *n, int *ka, int *kb, z *ab, int *ldab, z *bb, int *ldbb, d *w, z *z, int *ldz, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zhbgv(jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, w, z, ldz, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhbgvd "BLAS_FUNC(zhbgvd)"(char *jobz, char *uplo, int *n, int *ka, int *kb, npy_complex128 *ab, int *ldab, npy_complex128 *bb, int *ldbb, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil +cdef void zhbgvd(char *jobz, char *uplo, int *n, int *ka, int *kb, z *ab, int *ldab, z *bb, int *ldbb, d *w, z *z, int *ldz, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_zhbgvd(jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, w, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhbgvx "BLAS_FUNC(zhbgvx)"(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, npy_complex128 *ab, int *ldab, npy_complex128 *bb, int *ldbb, npy_complex128 *q, int *ldq, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, d *rwork, int *iwork, int *ifail, int *info) nogil +cdef void zhbgvx(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, z *ab, int *ldab, z *bb, int *ldbb, z *q, int *ldq, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, z *work, d *rwork, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_zhbgvx(jobz, range, uplo, n, ka, kb, ab, ldab, bb, ldbb, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhbtrd "BLAS_FUNC(zhbtrd)"(char *vect, char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, d *d, d *e, npy_complex128 *q, int *ldq, npy_complex128 *work, int *info) nogil +cdef void zhbtrd(char *vect, char *uplo, int *n, int *kd, z *ab, int *ldab, d *d, d *e, z *q, int *ldq, z *work, int *info) noexcept nogil: + + _fortran_zhbtrd(vect, uplo, n, kd, ab, ldab, d, e, q, ldq, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhecon "BLAS_FUNC(zhecon)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, d *anorm, d *rcond, npy_complex128 *work, int *info) nogil +cdef void zhecon(char *uplo, int *n, z *a, int *lda, int *ipiv, d *anorm, d *rcond, z *work, int *info) noexcept nogil: + + _fortran_zhecon(uplo, n, a, lda, ipiv, anorm, rcond, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zheequb "BLAS_FUNC(zheequb)"(char *uplo, int *n, npy_complex128 *a, int *lda, d *s, d *scond, d *amax, npy_complex128 *work, int *info) nogil +cdef void zheequb(char *uplo, int *n, z *a, int *lda, d *s, d *scond, d *amax, z *work, int *info) noexcept nogil: + + _fortran_zheequb(uplo, n, a, lda, s, scond, amax, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zheev "BLAS_FUNC(zheev)"(char *jobz, char *uplo, int *n, npy_complex128 *a, int *lda, d *w, npy_complex128 *work, int *lwork, d *rwork, int *info) nogil +cdef void zheev(char *jobz, char *uplo, int *n, z *a, int *lda, d *w, z *work, int *lwork, d *rwork, int *info) noexcept nogil: + + _fortran_zheev(jobz, uplo, n, a, lda, w, work, lwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zheevd "BLAS_FUNC(zheevd)"(char *jobz, char *uplo, int *n, npy_complex128 *a, int *lda, d *w, npy_complex128 *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil +cdef void zheevd(char *jobz, char *uplo, int *n, z *a, int *lda, d *w, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_zheevd(jobz, uplo, n, a, lda, w, work, lwork, rwork, lrwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zheevr "BLAS_FUNC(zheevr)"(char *jobz, char *range, char *uplo, int *n, npy_complex128 *a, int *lda, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, npy_complex128 *z, int *ldz, int *isuppz, npy_complex128 *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil +cdef void zheevr(char *jobz, char *range, char *uplo, int *n, z *a, int *lda, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, int *isuppz, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_zheevr(jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, rwork, lrwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zheevx "BLAS_FUNC(zheevx)"(char *jobz, char *range, char *uplo, int *n, npy_complex128 *a, int *lda, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, d *rwork, int *iwork, int *ifail, int *info) nogil +cdef void zheevx(char *jobz, char *range, char *uplo, int *n, z *a, int *lda, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, z *work, int *lwork, d *rwork, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_zheevx(jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol, m, w, z, ldz, work, lwork, rwork, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhegs2 "BLAS_FUNC(zhegs2)"(int *itype, char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *info) nogil +cdef void zhegs2(int *itype, char *uplo, int *n, z *a, int *lda, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_zhegs2(itype, uplo, n, a, lda, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhegst "BLAS_FUNC(zhegst)"(int *itype, char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *info) nogil +cdef void zhegst(int *itype, char *uplo, int *n, z *a, int *lda, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_zhegst(itype, uplo, n, a, lda, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhegv "BLAS_FUNC(zhegv)"(int *itype, char *jobz, char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, d *w, npy_complex128 *work, int *lwork, d *rwork, int *info) nogil +cdef void zhegv(int *itype, char *jobz, char *uplo, int *n, z *a, int *lda, z *b, int *ldb, d *w, z *work, int *lwork, d *rwork, int *info) noexcept nogil: + + _fortran_zhegv(itype, jobz, uplo, n, a, lda, b, ldb, w, work, lwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhegvd "BLAS_FUNC(zhegvd)"(int *itype, char *jobz, char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, d *w, npy_complex128 *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil +cdef void zhegvd(int *itype, char *jobz, char *uplo, int *n, z *a, int *lda, z *b, int *ldb, d *w, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_zhegvd(itype, jobz, uplo, n, a, lda, b, ldb, w, work, lwork, rwork, lrwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhegvx "BLAS_FUNC(zhegvx)"(int *itype, char *jobz, char *range, char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, d *rwork, int *iwork, int *ifail, int *info) nogil +cdef void zhegvx(int *itype, char *jobz, char *range, char *uplo, int *n, z *a, int *lda, z *b, int *ldb, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, z *work, int *lwork, d *rwork, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_zhegvx(itype, jobz, range, uplo, n, a, lda, b, ldb, vl, vu, il, iu, abstol, m, w, z, ldz, work, lwork, rwork, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zherfs "BLAS_FUNC(zherfs)"(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zherfs(char *uplo, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zherfs(uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhesv "BLAS_FUNC(zhesv)"(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zhesv(char *uplo, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zhesv(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhesvx "BLAS_FUNC(zhesvx)"(char *fact, char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *rcond, d *ferr, d *berr, npy_complex128 *work, int *lwork, d *rwork, int *info) nogil +cdef void zhesvx(char *fact, char *uplo, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, int *lwork, d *rwork, int *info) noexcept nogil: + + _fortran_zhesvx(fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, lwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zheswapr "BLAS_FUNC(zheswapr)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *i1, int *i2) nogil +cdef void zheswapr(char *uplo, int *n, z *a, int *lda, int *i1, int *i2) noexcept nogil: + + _fortran_zheswapr(uplo, n, a, lda, i1, i2) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhetd2 "BLAS_FUNC(zhetd2)"(char *uplo, int *n, npy_complex128 *a, int *lda, d *d, d *e, npy_complex128 *tau, int *info) nogil +cdef void zhetd2(char *uplo, int *n, z *a, int *lda, d *d, d *e, z *tau, int *info) noexcept nogil: + + _fortran_zhetd2(uplo, n, a, lda, d, e, tau, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhetf2 "BLAS_FUNC(zhetf2)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, int *info) nogil +cdef void zhetf2(char *uplo, int *n, z *a, int *lda, int *ipiv, int *info) noexcept nogil: + + _fortran_zhetf2(uplo, n, a, lda, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhetrd "BLAS_FUNC(zhetrd)"(char *uplo, int *n, npy_complex128 *a, int *lda, d *d, d *e, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zhetrd(char *uplo, int *n, z *a, int *lda, d *d, d *e, z *tau, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zhetrd(uplo, n, a, lda, d, e, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhetrf "BLAS_FUNC(zhetrf)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zhetrf(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zhetrf(uplo, n, a, lda, ipiv, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhetri "BLAS_FUNC(zhetri)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *info) nogil +cdef void zhetri(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *info) noexcept nogil: + + _fortran_zhetri(uplo, n, a, lda, ipiv, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhetri2 "BLAS_FUNC(zhetri2)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zhetri2(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zhetri2(uplo, n, a, lda, ipiv, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhetri2x "BLAS_FUNC(zhetri2x)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *nb, int *info) nogil +cdef void zhetri2x(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *nb, int *info) noexcept nogil: + + _fortran_zhetri2x(uplo, n, a, lda, ipiv, work, nb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhetrs "BLAS_FUNC(zhetrs)"(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, int *info) nogil +cdef void zhetrs(char *uplo, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_zhetrs(uplo, n, nrhs, a, lda, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhetrs2 "BLAS_FUNC(zhetrs2)"(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *work, int *info) nogil +cdef void zhetrs2(char *uplo, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, z *work, int *info) noexcept nogil: + + _fortran_zhetrs2(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhfrk "BLAS_FUNC(zhfrk)"(char *transr, char *uplo, char *trans, int *n, int *k, d *alpha, npy_complex128 *a, int *lda, d *beta, npy_complex128 *c) nogil +cdef void zhfrk(char *transr, char *uplo, char *trans, int *n, int *k, d *alpha, z *a, int *lda, d *beta, z *c) noexcept nogil: + + _fortran_zhfrk(transr, uplo, trans, n, k, alpha, a, lda, beta, c) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhgeqz "BLAS_FUNC(zhgeqz)"(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, npy_complex128 *h, int *ldh, npy_complex128 *t, int *ldt, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *q, int *ldq, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, d *rwork, int *info) nogil +cdef void zhgeqz(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, z *h, int *ldh, z *t, int *ldt, z *alpha, z *beta, z *q, int *ldq, z *z, int *ldz, z *work, int *lwork, d *rwork, int *info) noexcept nogil: + + _fortran_zhgeqz(job, compq, compz, n, ilo, ihi, h, ldh, t, ldt, alpha, beta, q, ldq, z, ldz, work, lwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhpcon "BLAS_FUNC(zhpcon)"(char *uplo, int *n, npy_complex128 *ap, int *ipiv, d *anorm, d *rcond, npy_complex128 *work, int *info) nogil +cdef void zhpcon(char *uplo, int *n, z *ap, int *ipiv, d *anorm, d *rcond, z *work, int *info) noexcept nogil: + + _fortran_zhpcon(uplo, n, ap, ipiv, anorm, rcond, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhpev "BLAS_FUNC(zhpev)"(char *jobz, char *uplo, int *n, npy_complex128 *ap, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zhpev(char *jobz, char *uplo, int *n, z *ap, d *w, z *z, int *ldz, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zhpev(jobz, uplo, n, ap, w, z, ldz, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhpevd "BLAS_FUNC(zhpevd)"(char *jobz, char *uplo, int *n, npy_complex128 *ap, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil +cdef void zhpevd(char *jobz, char *uplo, int *n, z *ap, d *w, z *z, int *ldz, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_zhpevd(jobz, uplo, n, ap, w, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhpevx "BLAS_FUNC(zhpevx)"(char *jobz, char *range, char *uplo, int *n, npy_complex128 *ap, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, d *rwork, int *iwork, int *ifail, int *info) nogil +cdef void zhpevx(char *jobz, char *range, char *uplo, int *n, z *ap, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, z *work, d *rwork, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_zhpevx(jobz, range, uplo, n, ap, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhpgst "BLAS_FUNC(zhpgst)"(int *itype, char *uplo, int *n, npy_complex128 *ap, npy_complex128 *bp, int *info) nogil +cdef void zhpgst(int *itype, char *uplo, int *n, z *ap, z *bp, int *info) noexcept nogil: + + _fortran_zhpgst(itype, uplo, n, ap, bp, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhpgv "BLAS_FUNC(zhpgv)"(int *itype, char *jobz, char *uplo, int *n, npy_complex128 *ap, npy_complex128 *bp, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zhpgv(int *itype, char *jobz, char *uplo, int *n, z *ap, z *bp, d *w, z *z, int *ldz, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zhpgv(itype, jobz, uplo, n, ap, bp, w, z, ldz, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhpgvd "BLAS_FUNC(zhpgvd)"(int *itype, char *jobz, char *uplo, int *n, npy_complex128 *ap, npy_complex128 *bp, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil +cdef void zhpgvd(int *itype, char *jobz, char *uplo, int *n, z *ap, z *bp, d *w, z *z, int *ldz, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_zhpgvd(itype, jobz, uplo, n, ap, bp, w, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhpgvx "BLAS_FUNC(zhpgvx)"(int *itype, char *jobz, char *range, char *uplo, int *n, npy_complex128 *ap, npy_complex128 *bp, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, d *rwork, int *iwork, int *ifail, int *info) nogil +cdef void zhpgvx(int *itype, char *jobz, char *range, char *uplo, int *n, z *ap, z *bp, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, z *work, d *rwork, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_zhpgvx(itype, jobz, range, uplo, n, ap, bp, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhprfs "BLAS_FUNC(zhprfs)"(char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *afp, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zhprfs(char *uplo, int *n, int *nrhs, z *ap, z *afp, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zhprfs(uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhpsv "BLAS_FUNC(zhpsv)"(char *uplo, int *n, int *nrhs, npy_complex128 *ap, int *ipiv, npy_complex128 *b, int *ldb, int *info) nogil +cdef void zhpsv(char *uplo, int *n, int *nrhs, z *ap, int *ipiv, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_zhpsv(uplo, n, nrhs, ap, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhpsvx "BLAS_FUNC(zhpsvx)"(char *fact, char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *afp, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *rcond, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zhpsvx(char *fact, char *uplo, int *n, int *nrhs, z *ap, z *afp, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zhpsvx(fact, uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhptrd "BLAS_FUNC(zhptrd)"(char *uplo, int *n, npy_complex128 *ap, d *d, d *e, npy_complex128 *tau, int *info) nogil +cdef void zhptrd(char *uplo, int *n, z *ap, d *d, d *e, z *tau, int *info) noexcept nogil: + + _fortran_zhptrd(uplo, n, ap, d, e, tau, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhptrf "BLAS_FUNC(zhptrf)"(char *uplo, int *n, npy_complex128 *ap, int *ipiv, int *info) nogil +cdef void zhptrf(char *uplo, int *n, z *ap, int *ipiv, int *info) noexcept nogil: + + _fortran_zhptrf(uplo, n, ap, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhptri "BLAS_FUNC(zhptri)"(char *uplo, int *n, npy_complex128 *ap, int *ipiv, npy_complex128 *work, int *info) nogil +cdef void zhptri(char *uplo, int *n, z *ap, int *ipiv, z *work, int *info) noexcept nogil: + + _fortran_zhptri(uplo, n, ap, ipiv, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhptrs "BLAS_FUNC(zhptrs)"(char *uplo, int *n, int *nrhs, npy_complex128 *ap, int *ipiv, npy_complex128 *b, int *ldb, int *info) nogil +cdef void zhptrs(char *uplo, int *n, int *nrhs, z *ap, int *ipiv, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_zhptrs(uplo, n, nrhs, ap, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhsein "BLAS_FUNC(zhsein)"(char *side, char *eigsrc, char *initv, bint *select, int *n, npy_complex128 *h, int *ldh, npy_complex128 *w, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, int *mm, int *m, npy_complex128 *work, d *rwork, int *ifaill, int *ifailr, int *info) nogil +cdef void zhsein(char *side, char *eigsrc, char *initv, bint *select, int *n, z *h, int *ldh, z *w, z *vl, int *ldvl, z *vr, int *ldvr, int *mm, int *m, z *work, d *rwork, int *ifaill, int *ifailr, int *info) noexcept nogil: + + _fortran_zhsein(side, eigsrc, initv, select, n, h, ldh, w, vl, ldvl, vr, ldvr, mm, m, work, rwork, ifaill, ifailr, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zhseqr "BLAS_FUNC(zhseqr)"(char *job, char *compz, int *n, int *ilo, int *ihi, npy_complex128 *h, int *ldh, npy_complex128 *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zhseqr(char *job, char *compz, int *n, int *ilo, int *ihi, z *h, int *ldh, z *w, z *z, int *ldz, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zhseqr(job, compz, n, ilo, ihi, h, ldh, w, z, ldz, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlabrd "BLAS_FUNC(zlabrd)"(int *m, int *n, int *nb, npy_complex128 *a, int *lda, d *d, d *e, npy_complex128 *tauq, npy_complex128 *taup, npy_complex128 *x, int *ldx, npy_complex128 *y, int *ldy) nogil +cdef void zlabrd(int *m, int *n, int *nb, z *a, int *lda, d *d, d *e, z *tauq, z *taup, z *x, int *ldx, z *y, int *ldy) noexcept nogil: + + _fortran_zlabrd(m, n, nb, a, lda, d, e, tauq, taup, x, ldx, y, ldy) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlacgv "BLAS_FUNC(zlacgv)"(int *n, npy_complex128 *x, int *incx) nogil +cdef void zlacgv(int *n, z *x, int *incx) noexcept nogil: + + _fortran_zlacgv(n, x, incx) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlacn2 "BLAS_FUNC(zlacn2)"(int *n, npy_complex128 *v, npy_complex128 *x, d *est, int *kase, int *isave) nogil +cdef void zlacn2(int *n, z *v, z *x, d *est, int *kase, int *isave) noexcept nogil: + + _fortran_zlacn2(n, v, x, est, kase, isave) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlacon "BLAS_FUNC(zlacon)"(int *n, npy_complex128 *v, npy_complex128 *x, d *est, int *kase) nogil +cdef void zlacon(int *n, z *v, z *x, d *est, int *kase) noexcept nogil: + + _fortran_zlacon(n, v, x, est, kase) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlacp2 "BLAS_FUNC(zlacp2)"(char *uplo, int *m, int *n, d *a, int *lda, npy_complex128 *b, int *ldb) nogil +cdef void zlacp2(char *uplo, int *m, int *n, d *a, int *lda, z *b, int *ldb) noexcept nogil: + + _fortran_zlacp2(uplo, m, n, a, lda, b, ldb) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlacpy "BLAS_FUNC(zlacpy)"(char *uplo, int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb) nogil +cdef void zlacpy(char *uplo, int *m, int *n, z *a, int *lda, z *b, int *ldb) noexcept nogil: + + _fortran_zlacpy(uplo, m, n, a, lda, b, ldb) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlacrm "BLAS_FUNC(zlacrm)"(int *m, int *n, npy_complex128 *a, int *lda, d *b, int *ldb, npy_complex128 *c, int *ldc, d *rwork) nogil +cdef void zlacrm(int *m, int *n, z *a, int *lda, d *b, int *ldb, z *c, int *ldc, d *rwork) noexcept nogil: + + _fortran_zlacrm(m, n, a, lda, b, ldb, c, ldc, rwork) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlacrt "BLAS_FUNC(zlacrt)"(int *n, npy_complex128 *cx, int *incx, npy_complex128 *cy, int *incy, npy_complex128 *c, npy_complex128 *s) nogil +cdef void zlacrt(int *n, z *cx, int *incx, z *cy, int *incy, z *c, z *s) noexcept nogil: + + _fortran_zlacrt(n, cx, incx, cy, incy, c, s) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zladiv "(zladivwrp_)"(npy_complex128 *out, npy_complex128 *x, npy_complex128 *y) nogil +cdef z zladiv(z *x, z *y) noexcept nogil: + cdef z out + _fortran_zladiv(&out, x, y) + return out + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaed0 "BLAS_FUNC(zlaed0)"(int *qsiz, int *n, d *d, d *e, npy_complex128 *q, int *ldq, npy_complex128 *qstore, int *ldqs, d *rwork, int *iwork, int *info) nogil +cdef void zlaed0(int *qsiz, int *n, d *d, d *e, z *q, int *ldq, z *qstore, int *ldqs, d *rwork, int *iwork, int *info) noexcept nogil: + + _fortran_zlaed0(qsiz, n, d, e, q, ldq, qstore, ldqs, rwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaed7 "BLAS_FUNC(zlaed7)"(int *n, int *cutpnt, int *qsiz, int *tlvls, int *curlvl, int *curpbm, d *d, npy_complex128 *q, int *ldq, d *rho, int *indxq, d *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, d *givnum, npy_complex128 *work, d *rwork, int *iwork, int *info) nogil +cdef void zlaed7(int *n, int *cutpnt, int *qsiz, int *tlvls, int *curlvl, int *curpbm, d *d, z *q, int *ldq, d *rho, int *indxq, d *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, d *givnum, z *work, d *rwork, int *iwork, int *info) noexcept nogil: + + _fortran_zlaed7(n, cutpnt, qsiz, tlvls, curlvl, curpbm, d, q, ldq, rho, indxq, qstore, qptr, prmptr, perm, givptr, givcol, givnum, work, rwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaed8 "BLAS_FUNC(zlaed8)"(int *k, int *n, int *qsiz, npy_complex128 *q, int *ldq, d *d, d *rho, int *cutpnt, d *z, d *dlamda, npy_complex128 *q2, int *ldq2, d *w, int *indxp, int *indx, int *indxq, int *perm, int *givptr, int *givcol, d *givnum, int *info) nogil +cdef void zlaed8(int *k, int *n, int *qsiz, z *q, int *ldq, d *d, d *rho, int *cutpnt, d *z, d *dlamda, z *q2, int *ldq2, d *w, int *indxp, int *indx, int *indxq, int *perm, int *givptr, int *givcol, d *givnum, int *info) noexcept nogil: + + _fortran_zlaed8(k, n, qsiz, q, ldq, d, rho, cutpnt, z, dlamda, q2, ldq2, w, indxp, indx, indxq, perm, givptr, givcol, givnum, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaein "BLAS_FUNC(zlaein)"(bint *rightv, bint *noinit, int *n, npy_complex128 *h, int *ldh, npy_complex128 *w, npy_complex128 *v, npy_complex128 *b, int *ldb, d *rwork, d *eps3, d *smlnum, int *info) nogil +cdef void zlaein(bint *rightv, bint *noinit, int *n, z *h, int *ldh, z *w, z *v, z *b, int *ldb, d *rwork, d *eps3, d *smlnum, int *info) noexcept nogil: + + _fortran_zlaein(rightv, noinit, n, h, ldh, w, v, b, ldb, rwork, eps3, smlnum, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaesy "BLAS_FUNC(zlaesy)"(npy_complex128 *a, npy_complex128 *b, npy_complex128 *c, npy_complex128 *rt1, npy_complex128 *rt2, npy_complex128 *evscal, npy_complex128 *cs1, npy_complex128 *sn1) nogil +cdef void zlaesy(z *a, z *b, z *c, z *rt1, z *rt2, z *evscal, z *cs1, z *sn1) noexcept nogil: + + _fortran_zlaesy(a, b, c, rt1, rt2, evscal, cs1, sn1) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaev2 "BLAS_FUNC(zlaev2)"(npy_complex128 *a, npy_complex128 *b, npy_complex128 *c, d *rt1, d *rt2, d *cs1, npy_complex128 *sn1) nogil +cdef void zlaev2(z *a, z *b, z *c, d *rt1, d *rt2, d *cs1, z *sn1) noexcept nogil: + + _fortran_zlaev2(a, b, c, rt1, rt2, cs1, sn1) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlag2c "BLAS_FUNC(zlag2c)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex64 *sa, int *ldsa, int *info) nogil +cdef void zlag2c(int *m, int *n, z *a, int *lda, c *sa, int *ldsa, int *info) noexcept nogil: + + _fortran_zlag2c(m, n, a, lda, sa, ldsa, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlags2 "BLAS_FUNC(zlags2)"(bint *upper, d *a1, npy_complex128 *a2, d *a3, d *b1, npy_complex128 *b2, d *b3, d *csu, npy_complex128 *snu, d *csv, npy_complex128 *snv, d *csq, npy_complex128 *snq) nogil +cdef void zlags2(bint *upper, d *a1, z *a2, d *a3, d *b1, z *b2, d *b3, d *csu, z *snu, d *csv, z *snv, d *csq, z *snq) noexcept nogil: + + _fortran_zlags2(upper, a1, a2, a3, b1, b2, b3, csu, snu, csv, snv, csq, snq) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlagtm "BLAS_FUNC(zlagtm)"(char *trans, int *n, int *nrhs, d *alpha, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *x, int *ldx, d *beta, npy_complex128 *b, int *ldb) nogil +cdef void zlagtm(char *trans, int *n, int *nrhs, d *alpha, z *dl, z *d, z *du, z *x, int *ldx, d *beta, z *b, int *ldb) noexcept nogil: + + _fortran_zlagtm(trans, n, nrhs, alpha, dl, d, du, x, ldx, beta, b, ldb) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlahef "BLAS_FUNC(zlahef)"(char *uplo, int *n, int *nb, int *kb, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *w, int *ldw, int *info) nogil +cdef void zlahef(char *uplo, int *n, int *nb, int *kb, z *a, int *lda, int *ipiv, z *w, int *ldw, int *info) noexcept nogil: + + _fortran_zlahef(uplo, n, nb, kb, a, lda, ipiv, w, ldw, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlahqr "BLAS_FUNC(zlahqr)"(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, npy_complex128 *h, int *ldh, npy_complex128 *w, int *iloz, int *ihiz, npy_complex128 *z, int *ldz, int *info) nogil +cdef void zlahqr(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, z *h, int *ldh, z *w, int *iloz, int *ihiz, z *z, int *ldz, int *info) noexcept nogil: + + _fortran_zlahqr(wantt, wantz, n, ilo, ihi, h, ldh, w, iloz, ihiz, z, ldz, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlahr2 "BLAS_FUNC(zlahr2)"(int *n, int *k, int *nb, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *t, int *ldt, npy_complex128 *y, int *ldy) nogil +cdef void zlahr2(int *n, int *k, int *nb, z *a, int *lda, z *tau, z *t, int *ldt, z *y, int *ldy) noexcept nogil: + + _fortran_zlahr2(n, k, nb, a, lda, tau, t, ldt, y, ldy) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaic1 "BLAS_FUNC(zlaic1)"(int *job, int *j, npy_complex128 *x, d *sest, npy_complex128 *w, npy_complex128 *gamma, d *sestpr, npy_complex128 *s, npy_complex128 *c) nogil +cdef void zlaic1(int *job, int *j, z *x, d *sest, z *w, z *gamma, d *sestpr, z *s, z *c) noexcept nogil: + + _fortran_zlaic1(job, j, x, sest, w, gamma, sestpr, s, c) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlals0 "BLAS_FUNC(zlals0)"(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, npy_complex128 *b, int *ldb, npy_complex128 *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, d *givnum, int *ldgnum, d *poles, d *difl, d *difr, d *z, int *k, d *c, d *s, d *rwork, int *info) nogil +cdef void zlals0(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, z *b, int *ldb, z *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, d *givnum, int *ldgnum, d *poles, d *difl, d *difr, d *z, int *k, d *c, d *s, d *rwork, int *info) noexcept nogil: + + _fortran_zlals0(icompq, nl, nr, sqre, nrhs, b, ldb, bx, ldbx, perm, givptr, givcol, ldgcol, givnum, ldgnum, poles, difl, difr, z, k, c, s, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlalsa "BLAS_FUNC(zlalsa)"(int *icompq, int *smlsiz, int *n, int *nrhs, npy_complex128 *b, int *ldb, npy_complex128 *bx, int *ldbx, d *u, int *ldu, d *vt, int *k, d *difl, d *difr, d *z, d *poles, int *givptr, int *givcol, int *ldgcol, int *perm, d *givnum, d *c, d *s, d *rwork, int *iwork, int *info) nogil +cdef void zlalsa(int *icompq, int *smlsiz, int *n, int *nrhs, z *b, int *ldb, z *bx, int *ldbx, d *u, int *ldu, d *vt, int *k, d *difl, d *difr, d *z, d *poles, int *givptr, int *givcol, int *ldgcol, int *perm, d *givnum, d *c, d *s, d *rwork, int *iwork, int *info) noexcept nogil: + + _fortran_zlalsa(icompq, smlsiz, n, nrhs, b, ldb, bx, ldbx, u, ldu, vt, k, difl, difr, z, poles, givptr, givcol, ldgcol, perm, givnum, c, s, rwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlalsd "BLAS_FUNC(zlalsd)"(char *uplo, int *smlsiz, int *n, int *nrhs, d *d, d *e, npy_complex128 *b, int *ldb, d *rcond, int *rank, npy_complex128 *work, d *rwork, int *iwork, int *info) nogil +cdef void zlalsd(char *uplo, int *smlsiz, int *n, int *nrhs, d *d, d *e, z *b, int *ldb, d *rcond, int *rank, z *work, d *rwork, int *iwork, int *info) noexcept nogil: + + _fortran_zlalsd(uplo, smlsiz, n, nrhs, d, e, b, ldb, rcond, rank, work, rwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_zlangb "BLAS_FUNC(zlangb)"(char *norm, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, d *work) nogil +cdef d zlangb(char *norm, int *n, int *kl, int *ku, z *ab, int *ldab, d *work) noexcept nogil: + + return _fortran_zlangb(norm, n, kl, ku, ab, ldab, work) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_zlange "BLAS_FUNC(zlange)"(char *norm, int *m, int *n, npy_complex128 *a, int *lda, d *work) nogil +cdef d zlange(char *norm, int *m, int *n, z *a, int *lda, d *work) noexcept nogil: + + return _fortran_zlange(norm, m, n, a, lda, work) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_zlangt "BLAS_FUNC(zlangt)"(char *norm, int *n, npy_complex128 *dl, npy_complex128 *d_, npy_complex128 *du) nogil +cdef d zlangt(char *norm, int *n, z *dl, z *d_, z *du) noexcept nogil: + + return _fortran_zlangt(norm, n, dl, d_, du) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_zlanhb "BLAS_FUNC(zlanhb)"(char *norm, char *uplo, int *n, int *k, npy_complex128 *ab, int *ldab, d *work) nogil +cdef d zlanhb(char *norm, char *uplo, int *n, int *k, z *ab, int *ldab, d *work) noexcept nogil: + + return _fortran_zlanhb(norm, uplo, n, k, ab, ldab, work) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_zlanhe "BLAS_FUNC(zlanhe)"(char *norm, char *uplo, int *n, npy_complex128 *a, int *lda, d *work) nogil +cdef d zlanhe(char *norm, char *uplo, int *n, z *a, int *lda, d *work) noexcept nogil: + + return _fortran_zlanhe(norm, uplo, n, a, lda, work) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_zlanhf "BLAS_FUNC(zlanhf)"(char *norm, char *transr, char *uplo, int *n, npy_complex128 *a, d *work) nogil +cdef d zlanhf(char *norm, char *transr, char *uplo, int *n, z *a, d *work) noexcept nogil: + + return _fortran_zlanhf(norm, transr, uplo, n, a, work) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_zlanhp "BLAS_FUNC(zlanhp)"(char *norm, char *uplo, int *n, npy_complex128 *ap, d *work) nogil +cdef d zlanhp(char *norm, char *uplo, int *n, z *ap, d *work) noexcept nogil: + + return _fortran_zlanhp(norm, uplo, n, ap, work) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_zlanhs "BLAS_FUNC(zlanhs)"(char *norm, int *n, npy_complex128 *a, int *lda, d *work) nogil +cdef d zlanhs(char *norm, int *n, z *a, int *lda, d *work) noexcept nogil: + + return _fortran_zlanhs(norm, n, a, lda, work) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_zlanht "BLAS_FUNC(zlanht)"(char *norm, int *n, d *d_, npy_complex128 *e) nogil +cdef d zlanht(char *norm, int *n, d *d_, z *e) noexcept nogil: + + return _fortran_zlanht(norm, n, d_, e) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_zlansb "BLAS_FUNC(zlansb)"(char *norm, char *uplo, int *n, int *k, npy_complex128 *ab, int *ldab, d *work) nogil +cdef d zlansb(char *norm, char *uplo, int *n, int *k, z *ab, int *ldab, d *work) noexcept nogil: + + return _fortran_zlansb(norm, uplo, n, k, ab, ldab, work) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_zlansp "BLAS_FUNC(zlansp)"(char *norm, char *uplo, int *n, npy_complex128 *ap, d *work) nogil +cdef d zlansp(char *norm, char *uplo, int *n, z *ap, d *work) noexcept nogil: + + return _fortran_zlansp(norm, uplo, n, ap, work) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_zlansy "BLAS_FUNC(zlansy)"(char *norm, char *uplo, int *n, npy_complex128 *a, int *lda, d *work) nogil +cdef d zlansy(char *norm, char *uplo, int *n, z *a, int *lda, d *work) noexcept nogil: + + return _fortran_zlansy(norm, uplo, n, a, lda, work) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_zlantb "BLAS_FUNC(zlantb)"(char *norm, char *uplo, char *diag, int *n, int *k, npy_complex128 *ab, int *ldab, d *work) nogil +cdef d zlantb(char *norm, char *uplo, char *diag, int *n, int *k, z *ab, int *ldab, d *work) noexcept nogil: + + return _fortran_zlantb(norm, uplo, diag, n, k, ab, ldab, work) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_zlantp "BLAS_FUNC(zlantp)"(char *norm, char *uplo, char *diag, int *n, npy_complex128 *ap, d *work) nogil +cdef d zlantp(char *norm, char *uplo, char *diag, int *n, z *ap, d *work) noexcept nogil: + + return _fortran_zlantp(norm, uplo, diag, n, ap, work) + + +cdef extern from "_lapack_subroutines.h": + d _fortran_zlantr "BLAS_FUNC(zlantr)"(char *norm, char *uplo, char *diag, int *m, int *n, npy_complex128 *a, int *lda, d *work) nogil +cdef d zlantr(char *norm, char *uplo, char *diag, int *m, int *n, z *a, int *lda, d *work) noexcept nogil: + + return _fortran_zlantr(norm, uplo, diag, m, n, a, lda, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlapll "BLAS_FUNC(zlapll)"(int *n, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, d *ssmin) nogil +cdef void zlapll(int *n, z *x, int *incx, z *y, int *incy, d *ssmin) noexcept nogil: + + _fortran_zlapll(n, x, incx, y, incy, ssmin) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlapmr "BLAS_FUNC(zlapmr)"(bint *forwrd, int *m, int *n, npy_complex128 *x, int *ldx, int *k) nogil +cdef void zlapmr(bint *forwrd, int *m, int *n, z *x, int *ldx, int *k) noexcept nogil: + + _fortran_zlapmr(forwrd, m, n, x, ldx, k) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlapmt "BLAS_FUNC(zlapmt)"(bint *forwrd, int *m, int *n, npy_complex128 *x, int *ldx, int *k) nogil +cdef void zlapmt(bint *forwrd, int *m, int *n, z *x, int *ldx, int *k) noexcept nogil: + + _fortran_zlapmt(forwrd, m, n, x, ldx, k) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaqgb "BLAS_FUNC(zlaqgb)"(int *m, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, char *equed) nogil +cdef void zlaqgb(int *m, int *n, int *kl, int *ku, z *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, char *equed) noexcept nogil: + + _fortran_zlaqgb(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaqge "BLAS_FUNC(zlaqge)"(int *m, int *n, npy_complex128 *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, char *equed) nogil +cdef void zlaqge(int *m, int *n, z *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, char *equed) noexcept nogil: + + _fortran_zlaqge(m, n, a, lda, r, c, rowcnd, colcnd, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaqhb "BLAS_FUNC(zlaqhb)"(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, d *s, d *scond, d *amax, char *equed) nogil +cdef void zlaqhb(char *uplo, int *n, int *kd, z *ab, int *ldab, d *s, d *scond, d *amax, char *equed) noexcept nogil: + + _fortran_zlaqhb(uplo, n, kd, ab, ldab, s, scond, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaqhe "BLAS_FUNC(zlaqhe)"(char *uplo, int *n, npy_complex128 *a, int *lda, d *s, d *scond, d *amax, char *equed) nogil +cdef void zlaqhe(char *uplo, int *n, z *a, int *lda, d *s, d *scond, d *amax, char *equed) noexcept nogil: + + _fortran_zlaqhe(uplo, n, a, lda, s, scond, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaqhp "BLAS_FUNC(zlaqhp)"(char *uplo, int *n, npy_complex128 *ap, d *s, d *scond, d *amax, char *equed) nogil +cdef void zlaqhp(char *uplo, int *n, z *ap, d *s, d *scond, d *amax, char *equed) noexcept nogil: + + _fortran_zlaqhp(uplo, n, ap, s, scond, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaqp2 "BLAS_FUNC(zlaqp2)"(int *m, int *n, int *offset, npy_complex128 *a, int *lda, int *jpvt, npy_complex128 *tau, d *vn1, d *vn2, npy_complex128 *work) nogil +cdef void zlaqp2(int *m, int *n, int *offset, z *a, int *lda, int *jpvt, z *tau, d *vn1, d *vn2, z *work) noexcept nogil: + + _fortran_zlaqp2(m, n, offset, a, lda, jpvt, tau, vn1, vn2, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaqps "BLAS_FUNC(zlaqps)"(int *m, int *n, int *offset, int *nb, int *kb, npy_complex128 *a, int *lda, int *jpvt, npy_complex128 *tau, d *vn1, d *vn2, npy_complex128 *auxv, npy_complex128 *f, int *ldf) nogil +cdef void zlaqps(int *m, int *n, int *offset, int *nb, int *kb, z *a, int *lda, int *jpvt, z *tau, d *vn1, d *vn2, z *auxv, z *f, int *ldf) noexcept nogil: + + _fortran_zlaqps(m, n, offset, nb, kb, a, lda, jpvt, tau, vn1, vn2, auxv, f, ldf) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaqr0 "BLAS_FUNC(zlaqr0)"(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, npy_complex128 *h, int *ldh, npy_complex128 *w, int *iloz, int *ihiz, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zlaqr0(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, z *h, int *ldh, z *w, int *iloz, int *ihiz, z *z, int *ldz, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zlaqr0(wantt, wantz, n, ilo, ihi, h, ldh, w, iloz, ihiz, z, ldz, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaqr1 "BLAS_FUNC(zlaqr1)"(int *n, npy_complex128 *h, int *ldh, npy_complex128 *s1, npy_complex128 *s2, npy_complex128 *v) nogil +cdef void zlaqr1(int *n, z *h, int *ldh, z *s1, z *s2, z *v) noexcept nogil: + + _fortran_zlaqr1(n, h, ldh, s1, s2, v) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaqr2 "BLAS_FUNC(zlaqr2)"(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, npy_complex128 *h, int *ldh, int *iloz, int *ihiz, npy_complex128 *z, int *ldz, int *ns, int *nd, npy_complex128 *sh, npy_complex128 *v, int *ldv, int *nh, npy_complex128 *t, int *ldt, int *nv, npy_complex128 *wv, int *ldwv, npy_complex128 *work, int *lwork) nogil +cdef void zlaqr2(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, z *h, int *ldh, int *iloz, int *ihiz, z *z, int *ldz, int *ns, int *nd, z *sh, z *v, int *ldv, int *nh, z *t, int *ldt, int *nv, z *wv, int *ldwv, z *work, int *lwork) noexcept nogil: + + _fortran_zlaqr2(wantt, wantz, n, ktop, kbot, nw, h, ldh, iloz, ihiz, z, ldz, ns, nd, sh, v, ldv, nh, t, ldt, nv, wv, ldwv, work, lwork) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaqr3 "BLAS_FUNC(zlaqr3)"(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, npy_complex128 *h, int *ldh, int *iloz, int *ihiz, npy_complex128 *z, int *ldz, int *ns, int *nd, npy_complex128 *sh, npy_complex128 *v, int *ldv, int *nh, npy_complex128 *t, int *ldt, int *nv, npy_complex128 *wv, int *ldwv, npy_complex128 *work, int *lwork) nogil +cdef void zlaqr3(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, z *h, int *ldh, int *iloz, int *ihiz, z *z, int *ldz, int *ns, int *nd, z *sh, z *v, int *ldv, int *nh, z *t, int *ldt, int *nv, z *wv, int *ldwv, z *work, int *lwork) noexcept nogil: + + _fortran_zlaqr3(wantt, wantz, n, ktop, kbot, nw, h, ldh, iloz, ihiz, z, ldz, ns, nd, sh, v, ldv, nh, t, ldt, nv, wv, ldwv, work, lwork) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaqr4 "BLAS_FUNC(zlaqr4)"(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, npy_complex128 *h, int *ldh, npy_complex128 *w, int *iloz, int *ihiz, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zlaqr4(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, z *h, int *ldh, z *w, int *iloz, int *ihiz, z *z, int *ldz, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zlaqr4(wantt, wantz, n, ilo, ihi, h, ldh, w, iloz, ihiz, z, ldz, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaqr5 "BLAS_FUNC(zlaqr5)"(bint *wantt, bint *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, npy_complex128 *s, npy_complex128 *h, int *ldh, int *iloz, int *ihiz, npy_complex128 *z, int *ldz, npy_complex128 *v, int *ldv, npy_complex128 *u, int *ldu, int *nv, npy_complex128 *wv, int *ldwv, int *nh, npy_complex128 *wh, int *ldwh) nogil +cdef void zlaqr5(bint *wantt, bint *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, z *s, z *h, int *ldh, int *iloz, int *ihiz, z *z, int *ldz, z *v, int *ldv, z *u, int *ldu, int *nv, z *wv, int *ldwv, int *nh, z *wh, int *ldwh) noexcept nogil: + + _fortran_zlaqr5(wantt, wantz, kacc22, n, ktop, kbot, nshfts, s, h, ldh, iloz, ihiz, z, ldz, v, ldv, u, ldu, nv, wv, ldwv, nh, wh, ldwh) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaqsb "BLAS_FUNC(zlaqsb)"(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, d *s, d *scond, d *amax, char *equed) nogil +cdef void zlaqsb(char *uplo, int *n, int *kd, z *ab, int *ldab, d *s, d *scond, d *amax, char *equed) noexcept nogil: + + _fortran_zlaqsb(uplo, n, kd, ab, ldab, s, scond, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaqsp "BLAS_FUNC(zlaqsp)"(char *uplo, int *n, npy_complex128 *ap, d *s, d *scond, d *amax, char *equed) nogil +cdef void zlaqsp(char *uplo, int *n, z *ap, d *s, d *scond, d *amax, char *equed) noexcept nogil: + + _fortran_zlaqsp(uplo, n, ap, s, scond, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaqsy "BLAS_FUNC(zlaqsy)"(char *uplo, int *n, npy_complex128 *a, int *lda, d *s, d *scond, d *amax, char *equed) nogil +cdef void zlaqsy(char *uplo, int *n, z *a, int *lda, d *s, d *scond, d *amax, char *equed) noexcept nogil: + + _fortran_zlaqsy(uplo, n, a, lda, s, scond, amax, equed) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlar1v "BLAS_FUNC(zlar1v)"(int *n, int *b1, int *bn, d *lambda_, d *d, d *l, d *ld, d *lld, d *pivmin, d *gaptol, npy_complex128 *z, bint *wantnc, int *negcnt, d *ztz, d *mingma, int *r, int *isuppz, d *nrminv, d *resid, d *rqcorr, d *work) nogil +cdef void zlar1v(int *n, int *b1, int *bn, d *lambda_, d *d, d *l, d *ld, d *lld, d *pivmin, d *gaptol, z *z, bint *wantnc, int *negcnt, d *ztz, d *mingma, int *r, int *isuppz, d *nrminv, d *resid, d *rqcorr, d *work) noexcept nogil: + + _fortran_zlar1v(n, b1, bn, lambda_, d, l, ld, lld, pivmin, gaptol, z, wantnc, negcnt, ztz, mingma, r, isuppz, nrminv, resid, rqcorr, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlar2v "BLAS_FUNC(zlar2v)"(int *n, npy_complex128 *x, npy_complex128 *y, npy_complex128 *z, int *incx, d *c, npy_complex128 *s, int *incc) nogil +cdef void zlar2v(int *n, z *x, z *y, z *z, int *incx, d *c, z *s, int *incc) noexcept nogil: + + _fortran_zlar2v(n, x, y, z, incx, c, s, incc) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlarcm "BLAS_FUNC(zlarcm)"(int *m, int *n, d *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *c, int *ldc, d *rwork) nogil +cdef void zlarcm(int *m, int *n, d *a, int *lda, z *b, int *ldb, z *c, int *ldc, d *rwork) noexcept nogil: + + _fortran_zlarcm(m, n, a, lda, b, ldb, c, ldc, rwork) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlarf "BLAS_FUNC(zlarf)"(char *side, int *m, int *n, npy_complex128 *v, int *incv, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work) nogil +cdef void zlarf(char *side, int *m, int *n, z *v, int *incv, z *tau, z *c, int *ldc, z *work) noexcept nogil: + + _fortran_zlarf(side, m, n, v, incv, tau, c, ldc, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlarfb "BLAS_FUNC(zlarfb)"(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, npy_complex128 *v, int *ldv, npy_complex128 *t, int *ldt, npy_complex128 *c, int *ldc, npy_complex128 *work, int *ldwork) nogil +cdef void zlarfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, z *v, int *ldv, z *t, int *ldt, z *c, int *ldc, z *work, int *ldwork) noexcept nogil: + + _fortran_zlarfb(side, trans, direct, storev, m, n, k, v, ldv, t, ldt, c, ldc, work, ldwork) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlarfg "BLAS_FUNC(zlarfg)"(int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *tau) nogil +cdef void zlarfg(int *n, z *alpha, z *x, int *incx, z *tau) noexcept nogil: + + _fortran_zlarfg(n, alpha, x, incx, tau) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlarfgp "BLAS_FUNC(zlarfgp)"(int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *tau) nogil +cdef void zlarfgp(int *n, z *alpha, z *x, int *incx, z *tau) noexcept nogil: + + _fortran_zlarfgp(n, alpha, x, incx, tau) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlarft "BLAS_FUNC(zlarft)"(char *direct, char *storev, int *n, int *k, npy_complex128 *v, int *ldv, npy_complex128 *tau, npy_complex128 *t, int *ldt) nogil +cdef void zlarft(char *direct, char *storev, int *n, int *k, z *v, int *ldv, z *tau, z *t, int *ldt) noexcept nogil: + + _fortran_zlarft(direct, storev, n, k, v, ldv, tau, t, ldt) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlarfx "BLAS_FUNC(zlarfx)"(char *side, int *m, int *n, npy_complex128 *v, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work) nogil +cdef void zlarfx(char *side, int *m, int *n, z *v, z *tau, z *c, int *ldc, z *work) noexcept nogil: + + _fortran_zlarfx(side, m, n, v, tau, c, ldc, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlargv "BLAS_FUNC(zlargv)"(int *n, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, d *c, int *incc) nogil +cdef void zlargv(int *n, z *x, int *incx, z *y, int *incy, d *c, int *incc) noexcept nogil: + + _fortran_zlargv(n, x, incx, y, incy, c, incc) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlarnv "BLAS_FUNC(zlarnv)"(int *idist, int *iseed, int *n, npy_complex128 *x) nogil +cdef void zlarnv(int *idist, int *iseed, int *n, z *x) noexcept nogil: + + _fortran_zlarnv(idist, iseed, n, x) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlarrv "BLAS_FUNC(zlarrv)"(int *n, d *vl, d *vu, d *d, d *l, d *pivmin, int *isplit, int *m, int *dol, int *dou, d *minrgp, d *rtol1, d *rtol2, d *w, d *werr, d *wgap, int *iblock, int *indexw, d *gers, npy_complex128 *z, int *ldz, int *isuppz, d *work, int *iwork, int *info) nogil +cdef void zlarrv(int *n, d *vl, d *vu, d *d, d *l, d *pivmin, int *isplit, int *m, int *dol, int *dou, d *minrgp, d *rtol1, d *rtol2, d *w, d *werr, d *wgap, int *iblock, int *indexw, d *gers, z *z, int *ldz, int *isuppz, d *work, int *iwork, int *info) noexcept nogil: + + _fortran_zlarrv(n, vl, vu, d, l, pivmin, isplit, m, dol, dou, minrgp, rtol1, rtol2, w, werr, wgap, iblock, indexw, gers, z, ldz, isuppz, work, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlartg "BLAS_FUNC(zlartg)"(npy_complex128 *f, npy_complex128 *g, d *cs, npy_complex128 *sn, npy_complex128 *r) nogil +cdef void zlartg(z *f, z *g, d *cs, z *sn, z *r) noexcept nogil: + + _fortran_zlartg(f, g, cs, sn, r) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlartv "BLAS_FUNC(zlartv)"(int *n, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, d *c, npy_complex128 *s, int *incc) nogil +cdef void zlartv(int *n, z *x, int *incx, z *y, int *incy, d *c, z *s, int *incc) noexcept nogil: + + _fortran_zlartv(n, x, incx, y, incy, c, s, incc) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlarz "BLAS_FUNC(zlarz)"(char *side, int *m, int *n, int *l, npy_complex128 *v, int *incv, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work) nogil +cdef void zlarz(char *side, int *m, int *n, int *l, z *v, int *incv, z *tau, z *c, int *ldc, z *work) noexcept nogil: + + _fortran_zlarz(side, m, n, l, v, incv, tau, c, ldc, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlarzb "BLAS_FUNC(zlarzb)"(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, npy_complex128 *v, int *ldv, npy_complex128 *t, int *ldt, npy_complex128 *c, int *ldc, npy_complex128 *work, int *ldwork) nogil +cdef void zlarzb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, z *v, int *ldv, z *t, int *ldt, z *c, int *ldc, z *work, int *ldwork) noexcept nogil: + + _fortran_zlarzb(side, trans, direct, storev, m, n, k, l, v, ldv, t, ldt, c, ldc, work, ldwork) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlarzt "BLAS_FUNC(zlarzt)"(char *direct, char *storev, int *n, int *k, npy_complex128 *v, int *ldv, npy_complex128 *tau, npy_complex128 *t, int *ldt) nogil +cdef void zlarzt(char *direct, char *storev, int *n, int *k, z *v, int *ldv, z *tau, z *t, int *ldt) noexcept nogil: + + _fortran_zlarzt(direct, storev, n, k, v, ldv, tau, t, ldt) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlascl "BLAS_FUNC(zlascl)"(char *type_bn, int *kl, int *ku, d *cfrom, d *cto, int *m, int *n, npy_complex128 *a, int *lda, int *info) nogil +cdef void zlascl(char *type_bn, int *kl, int *ku, d *cfrom, d *cto, int *m, int *n, z *a, int *lda, int *info) noexcept nogil: + + _fortran_zlascl(type_bn, kl, ku, cfrom, cto, m, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaset "BLAS_FUNC(zlaset)"(char *uplo, int *m, int *n, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *a, int *lda) nogil +cdef void zlaset(char *uplo, int *m, int *n, z *alpha, z *beta, z *a, int *lda) noexcept nogil: + + _fortran_zlaset(uplo, m, n, alpha, beta, a, lda) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlasr "BLAS_FUNC(zlasr)"(char *side, char *pivot, char *direct, int *m, int *n, d *c, d *s, npy_complex128 *a, int *lda) nogil +cdef void zlasr(char *side, char *pivot, char *direct, int *m, int *n, d *c, d *s, z *a, int *lda) noexcept nogil: + + _fortran_zlasr(side, pivot, direct, m, n, c, s, a, lda) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlassq "BLAS_FUNC(zlassq)"(int *n, npy_complex128 *x, int *incx, d *scale, d *sumsq) nogil +cdef void zlassq(int *n, z *x, int *incx, d *scale, d *sumsq) noexcept nogil: + + _fortran_zlassq(n, x, incx, scale, sumsq) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlaswp "BLAS_FUNC(zlaswp)"(int *n, npy_complex128 *a, int *lda, int *k1, int *k2, int *ipiv, int *incx) nogil +cdef void zlaswp(int *n, z *a, int *lda, int *k1, int *k2, int *ipiv, int *incx) noexcept nogil: + + _fortran_zlaswp(n, a, lda, k1, k2, ipiv, incx) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlasyf "BLAS_FUNC(zlasyf)"(char *uplo, int *n, int *nb, int *kb, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *w, int *ldw, int *info) nogil +cdef void zlasyf(char *uplo, int *n, int *nb, int *kb, z *a, int *lda, int *ipiv, z *w, int *ldw, int *info) noexcept nogil: + + _fortran_zlasyf(uplo, n, nb, kb, a, lda, ipiv, w, ldw, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlat2c "BLAS_FUNC(zlat2c)"(char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex64 *sa, int *ldsa, int *info) nogil +cdef void zlat2c(char *uplo, int *n, z *a, int *lda, c *sa, int *ldsa, int *info) noexcept nogil: + + _fortran_zlat2c(uplo, n, a, lda, sa, ldsa, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlatbs "BLAS_FUNC(zlatbs)"(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, npy_complex128 *ab, int *ldab, npy_complex128 *x, d *scale, d *cnorm, int *info) nogil +cdef void zlatbs(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, z *ab, int *ldab, z *x, d *scale, d *cnorm, int *info) noexcept nogil: + + _fortran_zlatbs(uplo, trans, diag, normin, n, kd, ab, ldab, x, scale, cnorm, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlatdf "BLAS_FUNC(zlatdf)"(int *ijob, int *n, npy_complex128 *z, int *ldz, npy_complex128 *rhs, d *rdsum, d *rdscal, int *ipiv, int *jpiv) nogil +cdef void zlatdf(int *ijob, int *n, z *z, int *ldz, z *rhs, d *rdsum, d *rdscal, int *ipiv, int *jpiv) noexcept nogil: + + _fortran_zlatdf(ijob, n, z, ldz, rhs, rdsum, rdscal, ipiv, jpiv) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlatps "BLAS_FUNC(zlatps)"(char *uplo, char *trans, char *diag, char *normin, int *n, npy_complex128 *ap, npy_complex128 *x, d *scale, d *cnorm, int *info) nogil +cdef void zlatps(char *uplo, char *trans, char *diag, char *normin, int *n, z *ap, z *x, d *scale, d *cnorm, int *info) noexcept nogil: + + _fortran_zlatps(uplo, trans, diag, normin, n, ap, x, scale, cnorm, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlatrd "BLAS_FUNC(zlatrd)"(char *uplo, int *n, int *nb, npy_complex128 *a, int *lda, d *e, npy_complex128 *tau, npy_complex128 *w, int *ldw) nogil +cdef void zlatrd(char *uplo, int *n, int *nb, z *a, int *lda, d *e, z *tau, z *w, int *ldw) noexcept nogil: + + _fortran_zlatrd(uplo, n, nb, a, lda, e, tau, w, ldw) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlatrs "BLAS_FUNC(zlatrs)"(char *uplo, char *trans, char *diag, char *normin, int *n, npy_complex128 *a, int *lda, npy_complex128 *x, d *scale, d *cnorm, int *info) nogil +cdef void zlatrs(char *uplo, char *trans, char *diag, char *normin, int *n, z *a, int *lda, z *x, d *scale, d *cnorm, int *info) noexcept nogil: + + _fortran_zlatrs(uplo, trans, diag, normin, n, a, lda, x, scale, cnorm, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlatrz "BLAS_FUNC(zlatrz)"(int *m, int *n, int *l, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work) nogil +cdef void zlatrz(int *m, int *n, int *l, z *a, int *lda, z *tau, z *work) noexcept nogil: + + _fortran_zlatrz(m, n, l, a, lda, tau, work) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlauu2 "BLAS_FUNC(zlauu2)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *info) nogil +cdef void zlauu2(char *uplo, int *n, z *a, int *lda, int *info) noexcept nogil: + + _fortran_zlauu2(uplo, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zlauum "BLAS_FUNC(zlauum)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *info) nogil +cdef void zlauum(char *uplo, int *n, z *a, int *lda, int *info) noexcept nogil: + + _fortran_zlauum(uplo, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpbcon "BLAS_FUNC(zpbcon)"(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, d *anorm, d *rcond, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zpbcon(char *uplo, int *n, int *kd, z *ab, int *ldab, d *anorm, d *rcond, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zpbcon(uplo, n, kd, ab, ldab, anorm, rcond, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpbequ "BLAS_FUNC(zpbequ)"(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, d *s, d *scond, d *amax, int *info) nogil +cdef void zpbequ(char *uplo, int *n, int *kd, z *ab, int *ldab, d *s, d *scond, d *amax, int *info) noexcept nogil: + + _fortran_zpbequ(uplo, n, kd, ab, ldab, s, scond, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpbrfs "BLAS_FUNC(zpbrfs)"(char *uplo, int *n, int *kd, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *afb, int *ldafb, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zpbrfs(char *uplo, int *n, int *kd, int *nrhs, z *ab, int *ldab, z *afb, int *ldafb, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zpbrfs(uplo, n, kd, nrhs, ab, ldab, afb, ldafb, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpbstf "BLAS_FUNC(zpbstf)"(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, int *info) nogil +cdef void zpbstf(char *uplo, int *n, int *kd, z *ab, int *ldab, int *info) noexcept nogil: + + _fortran_zpbstf(uplo, n, kd, ab, ldab, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpbsv "BLAS_FUNC(zpbsv)"(char *uplo, int *n, int *kd, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *b, int *ldb, int *info) nogil +cdef void zpbsv(char *uplo, int *n, int *kd, int *nrhs, z *ab, int *ldab, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_zpbsv(uplo, n, kd, nrhs, ab, ldab, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpbsvx "BLAS_FUNC(zpbsvx)"(char *fact, char *uplo, int *n, int *kd, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *afb, int *ldafb, char *equed, d *s, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *rcond, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zpbsvx(char *fact, char *uplo, int *n, int *kd, int *nrhs, z *ab, int *ldab, z *afb, int *ldafb, char *equed, d *s, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zpbsvx(fact, uplo, n, kd, nrhs, ab, ldab, afb, ldafb, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpbtf2 "BLAS_FUNC(zpbtf2)"(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, int *info) nogil +cdef void zpbtf2(char *uplo, int *n, int *kd, z *ab, int *ldab, int *info) noexcept nogil: + + _fortran_zpbtf2(uplo, n, kd, ab, ldab, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpbtrf "BLAS_FUNC(zpbtrf)"(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, int *info) nogil +cdef void zpbtrf(char *uplo, int *n, int *kd, z *ab, int *ldab, int *info) noexcept nogil: + + _fortran_zpbtrf(uplo, n, kd, ab, ldab, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpbtrs "BLAS_FUNC(zpbtrs)"(char *uplo, int *n, int *kd, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *b, int *ldb, int *info) nogil +cdef void zpbtrs(char *uplo, int *n, int *kd, int *nrhs, z *ab, int *ldab, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_zpbtrs(uplo, n, kd, nrhs, ab, ldab, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpftrf "BLAS_FUNC(zpftrf)"(char *transr, char *uplo, int *n, npy_complex128 *a, int *info) nogil +cdef void zpftrf(char *transr, char *uplo, int *n, z *a, int *info) noexcept nogil: + + _fortran_zpftrf(transr, uplo, n, a, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpftri "BLAS_FUNC(zpftri)"(char *transr, char *uplo, int *n, npy_complex128 *a, int *info) nogil +cdef void zpftri(char *transr, char *uplo, int *n, z *a, int *info) noexcept nogil: + + _fortran_zpftri(transr, uplo, n, a, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpftrs "BLAS_FUNC(zpftrs)"(char *transr, char *uplo, int *n, int *nrhs, npy_complex128 *a, npy_complex128 *b, int *ldb, int *info) nogil +cdef void zpftrs(char *transr, char *uplo, int *n, int *nrhs, z *a, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_zpftrs(transr, uplo, n, nrhs, a, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpocon "BLAS_FUNC(zpocon)"(char *uplo, int *n, npy_complex128 *a, int *lda, d *anorm, d *rcond, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zpocon(char *uplo, int *n, z *a, int *lda, d *anorm, d *rcond, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zpocon(uplo, n, a, lda, anorm, rcond, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpoequ "BLAS_FUNC(zpoequ)"(int *n, npy_complex128 *a, int *lda, d *s, d *scond, d *amax, int *info) nogil +cdef void zpoequ(int *n, z *a, int *lda, d *s, d *scond, d *amax, int *info) noexcept nogil: + + _fortran_zpoequ(n, a, lda, s, scond, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpoequb "BLAS_FUNC(zpoequb)"(int *n, npy_complex128 *a, int *lda, d *s, d *scond, d *amax, int *info) nogil +cdef void zpoequb(int *n, z *a, int *lda, d *s, d *scond, d *amax, int *info) noexcept nogil: + + _fortran_zpoequb(n, a, lda, s, scond, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zporfs "BLAS_FUNC(zporfs)"(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zporfs(char *uplo, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zporfs(uplo, n, nrhs, a, lda, af, ldaf, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zposv "BLAS_FUNC(zposv)"(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *info) nogil +cdef void zposv(char *uplo, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_zposv(uplo, n, nrhs, a, lda, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zposvx "BLAS_FUNC(zposvx)"(char *fact, char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, char *equed, d *s, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *rcond, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zposvx(char *fact, char *uplo, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, char *equed, d *s, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zposvx(fact, uplo, n, nrhs, a, lda, af, ldaf, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpotf2 "BLAS_FUNC(zpotf2)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *info) nogil +cdef void zpotf2(char *uplo, int *n, z *a, int *lda, int *info) noexcept nogil: + + _fortran_zpotf2(uplo, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpotrf "BLAS_FUNC(zpotrf)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *info) nogil +cdef void zpotrf(char *uplo, int *n, z *a, int *lda, int *info) noexcept nogil: + + _fortran_zpotrf(uplo, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpotri "BLAS_FUNC(zpotri)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *info) nogil +cdef void zpotri(char *uplo, int *n, z *a, int *lda, int *info) noexcept nogil: + + _fortran_zpotri(uplo, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpotrs "BLAS_FUNC(zpotrs)"(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *info) nogil +cdef void zpotrs(char *uplo, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_zpotrs(uplo, n, nrhs, a, lda, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zppcon "BLAS_FUNC(zppcon)"(char *uplo, int *n, npy_complex128 *ap, d *anorm, d *rcond, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zppcon(char *uplo, int *n, z *ap, d *anorm, d *rcond, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zppcon(uplo, n, ap, anorm, rcond, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zppequ "BLAS_FUNC(zppequ)"(char *uplo, int *n, npy_complex128 *ap, d *s, d *scond, d *amax, int *info) nogil +cdef void zppequ(char *uplo, int *n, z *ap, d *s, d *scond, d *amax, int *info) noexcept nogil: + + _fortran_zppequ(uplo, n, ap, s, scond, amax, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpprfs "BLAS_FUNC(zpprfs)"(char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *afp, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zpprfs(char *uplo, int *n, int *nrhs, z *ap, z *afp, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zpprfs(uplo, n, nrhs, ap, afp, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zppsv "BLAS_FUNC(zppsv)"(char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *b, int *ldb, int *info) nogil +cdef void zppsv(char *uplo, int *n, int *nrhs, z *ap, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_zppsv(uplo, n, nrhs, ap, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zppsvx "BLAS_FUNC(zppsvx)"(char *fact, char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *afp, char *equed, d *s, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *rcond, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zppsvx(char *fact, char *uplo, int *n, int *nrhs, z *ap, z *afp, char *equed, d *s, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zppsvx(fact, uplo, n, nrhs, ap, afp, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpptrf "BLAS_FUNC(zpptrf)"(char *uplo, int *n, npy_complex128 *ap, int *info) nogil +cdef void zpptrf(char *uplo, int *n, z *ap, int *info) noexcept nogil: + + _fortran_zpptrf(uplo, n, ap, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpptri "BLAS_FUNC(zpptri)"(char *uplo, int *n, npy_complex128 *ap, int *info) nogil +cdef void zpptri(char *uplo, int *n, z *ap, int *info) noexcept nogil: + + _fortran_zpptri(uplo, n, ap, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpptrs "BLAS_FUNC(zpptrs)"(char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *b, int *ldb, int *info) nogil +cdef void zpptrs(char *uplo, int *n, int *nrhs, z *ap, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_zpptrs(uplo, n, nrhs, ap, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpstf2 "BLAS_FUNC(zpstf2)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *piv, int *rank, d *tol, d *work, int *info) nogil +cdef void zpstf2(char *uplo, int *n, z *a, int *lda, int *piv, int *rank, d *tol, d *work, int *info) noexcept nogil: + + _fortran_zpstf2(uplo, n, a, lda, piv, rank, tol, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpstrf "BLAS_FUNC(zpstrf)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *piv, int *rank, d *tol, d *work, int *info) nogil +cdef void zpstrf(char *uplo, int *n, z *a, int *lda, int *piv, int *rank, d *tol, d *work, int *info) noexcept nogil: + + _fortran_zpstrf(uplo, n, a, lda, piv, rank, tol, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zptcon "BLAS_FUNC(zptcon)"(int *n, d *d, npy_complex128 *e, d *anorm, d *rcond, d *rwork, int *info) nogil +cdef void zptcon(int *n, d *d, z *e, d *anorm, d *rcond, d *rwork, int *info) noexcept nogil: + + _fortran_zptcon(n, d, e, anorm, rcond, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpteqr "BLAS_FUNC(zpteqr)"(char *compz, int *n, d *d, d *e, npy_complex128 *z, int *ldz, d *work, int *info) nogil +cdef void zpteqr(char *compz, int *n, d *d, d *e, z *z, int *ldz, d *work, int *info) noexcept nogil: + + _fortran_zpteqr(compz, n, d, e, z, ldz, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zptrfs "BLAS_FUNC(zptrfs)"(char *uplo, int *n, int *nrhs, d *d, npy_complex128 *e, d *df, npy_complex128 *ef, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zptrfs(char *uplo, int *n, int *nrhs, d *d, z *e, d *df, z *ef, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zptrfs(uplo, n, nrhs, d, e, df, ef, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zptsv "BLAS_FUNC(zptsv)"(int *n, int *nrhs, d *d, npy_complex128 *e, npy_complex128 *b, int *ldb, int *info) nogil +cdef void zptsv(int *n, int *nrhs, d *d, z *e, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_zptsv(n, nrhs, d, e, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zptsvx "BLAS_FUNC(zptsvx)"(char *fact, int *n, int *nrhs, d *d, npy_complex128 *e, d *df, npy_complex128 *ef, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *rcond, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zptsvx(char *fact, int *n, int *nrhs, d *d, z *e, d *df, z *ef, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zptsvx(fact, n, nrhs, d, e, df, ef, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpttrf "BLAS_FUNC(zpttrf)"(int *n, d *d, npy_complex128 *e, int *info) nogil +cdef void zpttrf(int *n, d *d, z *e, int *info) noexcept nogil: + + _fortran_zpttrf(n, d, e, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zpttrs "BLAS_FUNC(zpttrs)"(char *uplo, int *n, int *nrhs, d *d, npy_complex128 *e, npy_complex128 *b, int *ldb, int *info) nogil +cdef void zpttrs(char *uplo, int *n, int *nrhs, d *d, z *e, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_zpttrs(uplo, n, nrhs, d, e, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zptts2 "BLAS_FUNC(zptts2)"(int *iuplo, int *n, int *nrhs, d *d, npy_complex128 *e, npy_complex128 *b, int *ldb) nogil +cdef void zptts2(int *iuplo, int *n, int *nrhs, d *d, z *e, z *b, int *ldb) noexcept nogil: + + _fortran_zptts2(iuplo, n, nrhs, d, e, b, ldb) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zrot "BLAS_FUNC(zrot)"(int *n, npy_complex128 *cx, int *incx, npy_complex128 *cy, int *incy, d *c, npy_complex128 *s) nogil +cdef void zrot(int *n, z *cx, int *incx, z *cy, int *incy, d *c, z *s) noexcept nogil: + + _fortran_zrot(n, cx, incx, cy, incy, c, s) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zspcon "BLAS_FUNC(zspcon)"(char *uplo, int *n, npy_complex128 *ap, int *ipiv, d *anorm, d *rcond, npy_complex128 *work, int *info) nogil +cdef void zspcon(char *uplo, int *n, z *ap, int *ipiv, d *anorm, d *rcond, z *work, int *info) noexcept nogil: + + _fortran_zspcon(uplo, n, ap, ipiv, anorm, rcond, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zspmv "BLAS_FUNC(zspmv)"(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *ap, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy) nogil +cdef void zspmv(char *uplo, int *n, z *alpha, z *ap, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil: + + _fortran_zspmv(uplo, n, alpha, ap, x, incx, beta, y, incy) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zspr "BLAS_FUNC(zspr)"(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *ap) nogil +cdef void zspr(char *uplo, int *n, z *alpha, z *x, int *incx, z *ap) noexcept nogil: + + _fortran_zspr(uplo, n, alpha, x, incx, ap) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zsprfs "BLAS_FUNC(zsprfs)"(char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *afp, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zsprfs(char *uplo, int *n, int *nrhs, z *ap, z *afp, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zsprfs(uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zspsv "BLAS_FUNC(zspsv)"(char *uplo, int *n, int *nrhs, npy_complex128 *ap, int *ipiv, npy_complex128 *b, int *ldb, int *info) nogil +cdef void zspsv(char *uplo, int *n, int *nrhs, z *ap, int *ipiv, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_zspsv(uplo, n, nrhs, ap, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zspsvx "BLAS_FUNC(zspsvx)"(char *fact, char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *afp, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *rcond, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zspsvx(char *fact, char *uplo, int *n, int *nrhs, z *ap, z *afp, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zspsvx(fact, uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zsptrf "BLAS_FUNC(zsptrf)"(char *uplo, int *n, npy_complex128 *ap, int *ipiv, int *info) nogil +cdef void zsptrf(char *uplo, int *n, z *ap, int *ipiv, int *info) noexcept nogil: + + _fortran_zsptrf(uplo, n, ap, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zsptri "BLAS_FUNC(zsptri)"(char *uplo, int *n, npy_complex128 *ap, int *ipiv, npy_complex128 *work, int *info) nogil +cdef void zsptri(char *uplo, int *n, z *ap, int *ipiv, z *work, int *info) noexcept nogil: + + _fortran_zsptri(uplo, n, ap, ipiv, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zsptrs "BLAS_FUNC(zsptrs)"(char *uplo, int *n, int *nrhs, npy_complex128 *ap, int *ipiv, npy_complex128 *b, int *ldb, int *info) nogil +cdef void zsptrs(char *uplo, int *n, int *nrhs, z *ap, int *ipiv, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_zsptrs(uplo, n, nrhs, ap, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zstedc "BLAS_FUNC(zstedc)"(char *compz, int *n, d *d, d *e, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil +cdef void zstedc(char *compz, int *n, d *d, d *e, z *z, int *ldz, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_zstedc(compz, n, d, e, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zstegr "BLAS_FUNC(zstegr)"(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, npy_complex128 *z, int *ldz, int *isuppz, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void zstegr(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, int *isuppz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_zstegr(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zstein "BLAS_FUNC(zstein)"(int *n, d *d, d *e, int *m, d *w, int *iblock, int *isplit, npy_complex128 *z, int *ldz, d *work, int *iwork, int *ifail, int *info) nogil +cdef void zstein(int *n, d *d, d *e, int *m, d *w, int *iblock, int *isplit, z *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil: + + _fortran_zstein(n, d, e, m, w, iblock, isplit, z, ldz, work, iwork, ifail, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zstemr "BLAS_FUNC(zstemr)"(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, int *m, d *w, npy_complex128 *z, int *ldz, int *nzc, int *isuppz, bint *tryrac, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void zstemr(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, int *m, d *w, z *z, int *ldz, int *nzc, int *isuppz, bint *tryrac, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_zstemr(jobz, range, n, d, e, vl, vu, il, iu, m, w, z, ldz, nzc, isuppz, tryrac, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zsteqr "BLAS_FUNC(zsteqr)"(char *compz, int *n, d *d, d *e, npy_complex128 *z, int *ldz, d *work, int *info) nogil +cdef void zsteqr(char *compz, int *n, d *d, d *e, z *z, int *ldz, d *work, int *info) noexcept nogil: + + _fortran_zsteqr(compz, n, d, e, z, ldz, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zsycon "BLAS_FUNC(zsycon)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, d *anorm, d *rcond, npy_complex128 *work, int *info) nogil +cdef void zsycon(char *uplo, int *n, z *a, int *lda, int *ipiv, d *anorm, d *rcond, z *work, int *info) noexcept nogil: + + _fortran_zsycon(uplo, n, a, lda, ipiv, anorm, rcond, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zsyconv "BLAS_FUNC(zsyconv)"(char *uplo, char *way, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *info) nogil +cdef void zsyconv(char *uplo, char *way, int *n, z *a, int *lda, int *ipiv, z *work, int *info) noexcept nogil: + + _fortran_zsyconv(uplo, way, n, a, lda, ipiv, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zsyequb "BLAS_FUNC(zsyequb)"(char *uplo, int *n, npy_complex128 *a, int *lda, d *s, d *scond, d *amax, npy_complex128 *work, int *info) nogil +cdef void zsyequb(char *uplo, int *n, z *a, int *lda, d *s, d *scond, d *amax, z *work, int *info) noexcept nogil: + + _fortran_zsyequb(uplo, n, a, lda, s, scond, amax, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zsymv "BLAS_FUNC(zsymv)"(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy) nogil +cdef void zsymv(char *uplo, int *n, z *alpha, z *a, int *lda, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil: + + _fortran_zsymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zsyr "BLAS_FUNC(zsyr)"(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *a, int *lda) nogil +cdef void zsyr(char *uplo, int *n, z *alpha, z *x, int *incx, z *a, int *lda) noexcept nogil: + + _fortran_zsyr(uplo, n, alpha, x, incx, a, lda) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zsyrfs "BLAS_FUNC(zsyrfs)"(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil +cdef void zsyrfs(char *uplo, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_zsyrfs(uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zsysv "BLAS_FUNC(zsysv)"(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zsysv(char *uplo, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zsysv(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zsysvx "BLAS_FUNC(zsysvx)"(char *fact, char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *rcond, d *ferr, d *berr, npy_complex128 *work, int *lwork, d *rwork, int *info) nogil +cdef void zsysvx(char *fact, char *uplo, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, int *lwork, d *rwork, int *info) noexcept nogil: + + _fortran_zsysvx(fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, lwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zsyswapr "BLAS_FUNC(zsyswapr)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *i1, int *i2) nogil +cdef void zsyswapr(char *uplo, int *n, z *a, int *lda, int *i1, int *i2) noexcept nogil: + + _fortran_zsyswapr(uplo, n, a, lda, i1, i2) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zsytf2 "BLAS_FUNC(zsytf2)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, int *info) nogil +cdef void zsytf2(char *uplo, int *n, z *a, int *lda, int *ipiv, int *info) noexcept nogil: + + _fortran_zsytf2(uplo, n, a, lda, ipiv, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zsytrf "BLAS_FUNC(zsytrf)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zsytrf(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zsytrf(uplo, n, a, lda, ipiv, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zsytri "BLAS_FUNC(zsytri)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *info) nogil +cdef void zsytri(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *info) noexcept nogil: + + _fortran_zsytri(uplo, n, a, lda, ipiv, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zsytri2 "BLAS_FUNC(zsytri2)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zsytri2(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zsytri2(uplo, n, a, lda, ipiv, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zsytri2x "BLAS_FUNC(zsytri2x)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *nb, int *info) nogil +cdef void zsytri2x(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *nb, int *info) noexcept nogil: + + _fortran_zsytri2x(uplo, n, a, lda, ipiv, work, nb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zsytrs "BLAS_FUNC(zsytrs)"(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, int *info) nogil +cdef void zsytrs(char *uplo, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_zsytrs(uplo, n, nrhs, a, lda, ipiv, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zsytrs2 "BLAS_FUNC(zsytrs2)"(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *work, int *info) nogil +cdef void zsytrs2(char *uplo, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, z *work, int *info) noexcept nogil: + + _fortran_zsytrs2(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztbcon "BLAS_FUNC(ztbcon)"(char *norm, char *uplo, char *diag, int *n, int *kd, npy_complex128 *ab, int *ldab, d *rcond, npy_complex128 *work, d *rwork, int *info) nogil +cdef void ztbcon(char *norm, char *uplo, char *diag, int *n, int *kd, z *ab, int *ldab, d *rcond, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_ztbcon(norm, uplo, diag, n, kd, ab, ldab, rcond, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztbrfs "BLAS_FUNC(ztbrfs)"(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil +cdef void ztbrfs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, z *ab, int *ldab, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_ztbrfs(uplo, trans, diag, n, kd, nrhs, ab, ldab, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztbtrs "BLAS_FUNC(ztbtrs)"(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *b, int *ldb, int *info) nogil +cdef void ztbtrs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, z *ab, int *ldab, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_ztbtrs(uplo, trans, diag, n, kd, nrhs, ab, ldab, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztfsm "BLAS_FUNC(ztfsm)"(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, npy_complex128 *b, int *ldb) nogil +cdef void ztfsm(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, z *alpha, z *a, z *b, int *ldb) noexcept nogil: + + _fortran_ztfsm(transr, side, uplo, trans, diag, m, n, alpha, a, b, ldb) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztftri "BLAS_FUNC(ztftri)"(char *transr, char *uplo, char *diag, int *n, npy_complex128 *a, int *info) nogil +cdef void ztftri(char *transr, char *uplo, char *diag, int *n, z *a, int *info) noexcept nogil: + + _fortran_ztftri(transr, uplo, diag, n, a, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztfttp "BLAS_FUNC(ztfttp)"(char *transr, char *uplo, int *n, npy_complex128 *arf, npy_complex128 *ap, int *info) nogil +cdef void ztfttp(char *transr, char *uplo, int *n, z *arf, z *ap, int *info) noexcept nogil: + + _fortran_ztfttp(transr, uplo, n, arf, ap, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztfttr "BLAS_FUNC(ztfttr)"(char *transr, char *uplo, int *n, npy_complex128 *arf, npy_complex128 *a, int *lda, int *info) nogil +cdef void ztfttr(char *transr, char *uplo, int *n, z *arf, z *a, int *lda, int *info) noexcept nogil: + + _fortran_ztfttr(transr, uplo, n, arf, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztgevc "BLAS_FUNC(ztgevc)"(char *side, char *howmny, bint *select, int *n, npy_complex128 *s, int *lds, npy_complex128 *p, int *ldp, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, int *mm, int *m, npy_complex128 *work, d *rwork, int *info) nogil +cdef void ztgevc(char *side, char *howmny, bint *select, int *n, z *s, int *lds, z *p, int *ldp, z *vl, int *ldvl, z *vr, int *ldvr, int *mm, int *m, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_ztgevc(side, howmny, select, n, s, lds, p, ldp, vl, ldvl, vr, ldvr, mm, m, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztgex2 "BLAS_FUNC(ztgex2)"(bint *wantq, bint *wantz, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *q, int *ldq, npy_complex128 *z, int *ldz, int *j1, int *info) nogil +cdef void ztgex2(bint *wantq, bint *wantz, int *n, z *a, int *lda, z *b, int *ldb, z *q, int *ldq, z *z, int *ldz, int *j1, int *info) noexcept nogil: + + _fortran_ztgex2(wantq, wantz, n, a, lda, b, ldb, q, ldq, z, ldz, j1, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztgexc "BLAS_FUNC(ztgexc)"(bint *wantq, bint *wantz, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *q, int *ldq, npy_complex128 *z, int *ldz, int *ifst, int *ilst, int *info) nogil +cdef void ztgexc(bint *wantq, bint *wantz, int *n, z *a, int *lda, z *b, int *ldb, z *q, int *ldq, z *z, int *ldz, int *ifst, int *ilst, int *info) noexcept nogil: + + _fortran_ztgexc(wantq, wantz, n, a, lda, b, ldb, q, ldq, z, ldz, ifst, ilst, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztgsen "BLAS_FUNC(ztgsen)"(int *ijob, bint *wantq, bint *wantz, bint *select, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *q, int *ldq, npy_complex128 *z, int *ldz, int *m, d *pl, d *pr, d *dif, npy_complex128 *work, int *lwork, int *iwork, int *liwork, int *info) nogil +cdef void ztgsen(int *ijob, bint *wantq, bint *wantz, bint *select, int *n, z *a, int *lda, z *b, int *ldb, z *alpha, z *beta, z *q, int *ldq, z *z, int *ldz, int *m, d *pl, d *pr, d *dif, z *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil: + + _fortran_ztgsen(ijob, wantq, wantz, select, n, a, lda, b, ldb, alpha, beta, q, ldq, z, ldz, m, pl, pr, dif, work, lwork, iwork, liwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztgsja "BLAS_FUNC(ztgsja)"(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, d *tola, d *tolb, d *alpha, d *beta, npy_complex128 *u, int *ldu, npy_complex128 *v, int *ldv, npy_complex128 *q, int *ldq, npy_complex128 *work, int *ncycle, int *info) nogil +cdef void ztgsja(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, z *a, int *lda, z *b, int *ldb, d *tola, d *tolb, d *alpha, d *beta, z *u, int *ldu, z *v, int *ldv, z *q, int *ldq, z *work, int *ncycle, int *info) noexcept nogil: + + _fortran_ztgsja(jobu, jobv, jobq, m, p, n, k, l, a, lda, b, ldb, tola, tolb, alpha, beta, u, ldu, v, ldv, q, ldq, work, ncycle, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztgsna "BLAS_FUNC(ztgsna)"(char *job, char *howmny, bint *select, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, d *s, d *dif, int *mm, int *m, npy_complex128 *work, int *lwork, int *iwork, int *info) nogil +cdef void ztgsna(char *job, char *howmny, bint *select, int *n, z *a, int *lda, z *b, int *ldb, z *vl, int *ldvl, z *vr, int *ldvr, d *s, d *dif, int *mm, int *m, z *work, int *lwork, int *iwork, int *info) noexcept nogil: + + _fortran_ztgsna(job, howmny, select, n, a, lda, b, ldb, vl, ldvl, vr, ldvr, s, dif, mm, m, work, lwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztgsy2 "BLAS_FUNC(ztgsy2)"(char *trans, int *ijob, int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *c, int *ldc, npy_complex128 *d, int *ldd, npy_complex128 *e, int *lde, npy_complex128 *f, int *ldf, d *scale, d *rdsum, d *rdscal, int *info) nogil +cdef void ztgsy2(char *trans, int *ijob, int *m, int *n, z *a, int *lda, z *b, int *ldb, z *c, int *ldc, z *d, int *ldd, z *e, int *lde, z *f, int *ldf, d *scale, d *rdsum, d *rdscal, int *info) noexcept nogil: + + _fortran_ztgsy2(trans, ijob, m, n, a, lda, b, ldb, c, ldc, d, ldd, e, lde, f, ldf, scale, rdsum, rdscal, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztgsyl "BLAS_FUNC(ztgsyl)"(char *trans, int *ijob, int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *c, int *ldc, npy_complex128 *d, int *ldd, npy_complex128 *e, int *lde, npy_complex128 *f, int *ldf, d *scale, d *dif, npy_complex128 *work, int *lwork, int *iwork, int *info) nogil +cdef void ztgsyl(char *trans, int *ijob, int *m, int *n, z *a, int *lda, z *b, int *ldb, z *c, int *ldc, z *d, int *ldd, z *e, int *lde, z *f, int *ldf, d *scale, d *dif, z *work, int *lwork, int *iwork, int *info) noexcept nogil: + + _fortran_ztgsyl(trans, ijob, m, n, a, lda, b, ldb, c, ldc, d, ldd, e, lde, f, ldf, scale, dif, work, lwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztpcon "BLAS_FUNC(ztpcon)"(char *norm, char *uplo, char *diag, int *n, npy_complex128 *ap, d *rcond, npy_complex128 *work, d *rwork, int *info) nogil +cdef void ztpcon(char *norm, char *uplo, char *diag, int *n, z *ap, d *rcond, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_ztpcon(norm, uplo, diag, n, ap, rcond, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztpmqrt "BLAS_FUNC(ztpmqrt)"(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, npy_complex128 *v, int *ldv, npy_complex128 *t, int *ldt, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *work, int *info) nogil +cdef void ztpmqrt(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, z *v, int *ldv, z *t, int *ldt, z *a, int *lda, z *b, int *ldb, z *work, int *info) noexcept nogil: + + _fortran_ztpmqrt(side, trans, m, n, k, l, nb, v, ldv, t, ldt, a, lda, b, ldb, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztpqrt "BLAS_FUNC(ztpqrt)"(int *m, int *n, int *l, int *nb, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *t, int *ldt, npy_complex128 *work, int *info) nogil +cdef void ztpqrt(int *m, int *n, int *l, int *nb, z *a, int *lda, z *b, int *ldb, z *t, int *ldt, z *work, int *info) noexcept nogil: + + _fortran_ztpqrt(m, n, l, nb, a, lda, b, ldb, t, ldt, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztpqrt2 "BLAS_FUNC(ztpqrt2)"(int *m, int *n, int *l, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *t, int *ldt, int *info) nogil +cdef void ztpqrt2(int *m, int *n, int *l, z *a, int *lda, z *b, int *ldb, z *t, int *ldt, int *info) noexcept nogil: + + _fortran_ztpqrt2(m, n, l, a, lda, b, ldb, t, ldt, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztprfb "BLAS_FUNC(ztprfb)"(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, npy_complex128 *v, int *ldv, npy_complex128 *t, int *ldt, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *work, int *ldwork) nogil +cdef void ztprfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, z *v, int *ldv, z *t, int *ldt, z *a, int *lda, z *b, int *ldb, z *work, int *ldwork) noexcept nogil: + + _fortran_ztprfb(side, trans, direct, storev, m, n, k, l, v, ldv, t, ldt, a, lda, b, ldb, work, ldwork) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztprfs "BLAS_FUNC(ztprfs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil +cdef void ztprfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, z *ap, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_ztprfs(uplo, trans, diag, n, nrhs, ap, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztptri "BLAS_FUNC(ztptri)"(char *uplo, char *diag, int *n, npy_complex128 *ap, int *info) nogil +cdef void ztptri(char *uplo, char *diag, int *n, z *ap, int *info) noexcept nogil: + + _fortran_ztptri(uplo, diag, n, ap, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztptrs "BLAS_FUNC(ztptrs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *b, int *ldb, int *info) nogil +cdef void ztptrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, z *ap, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_ztptrs(uplo, trans, diag, n, nrhs, ap, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztpttf "BLAS_FUNC(ztpttf)"(char *transr, char *uplo, int *n, npy_complex128 *ap, npy_complex128 *arf, int *info) nogil +cdef void ztpttf(char *transr, char *uplo, int *n, z *ap, z *arf, int *info) noexcept nogil: + + _fortran_ztpttf(transr, uplo, n, ap, arf, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztpttr "BLAS_FUNC(ztpttr)"(char *uplo, int *n, npy_complex128 *ap, npy_complex128 *a, int *lda, int *info) nogil +cdef void ztpttr(char *uplo, int *n, z *ap, z *a, int *lda, int *info) noexcept nogil: + + _fortran_ztpttr(uplo, n, ap, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztrcon "BLAS_FUNC(ztrcon)"(char *norm, char *uplo, char *diag, int *n, npy_complex128 *a, int *lda, d *rcond, npy_complex128 *work, d *rwork, int *info) nogil +cdef void ztrcon(char *norm, char *uplo, char *diag, int *n, z *a, int *lda, d *rcond, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_ztrcon(norm, uplo, diag, n, a, lda, rcond, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztrevc "BLAS_FUNC(ztrevc)"(char *side, char *howmny, bint *select, int *n, npy_complex128 *t, int *ldt, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, int *mm, int *m, npy_complex128 *work, d *rwork, int *info) nogil +cdef void ztrevc(char *side, char *howmny, bint *select, int *n, z *t, int *ldt, z *vl, int *ldvl, z *vr, int *ldvr, int *mm, int *m, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_ztrevc(side, howmny, select, n, t, ldt, vl, ldvl, vr, ldvr, mm, m, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztrexc "BLAS_FUNC(ztrexc)"(char *compq, int *n, npy_complex128 *t, int *ldt, npy_complex128 *q, int *ldq, int *ifst, int *ilst, int *info) nogil +cdef void ztrexc(char *compq, int *n, z *t, int *ldt, z *q, int *ldq, int *ifst, int *ilst, int *info) noexcept nogil: + + _fortran_ztrexc(compq, n, t, ldt, q, ldq, ifst, ilst, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztrrfs "BLAS_FUNC(ztrrfs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil +cdef void ztrrfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil: + + _fortran_ztrrfs(uplo, trans, diag, n, nrhs, a, lda, b, ldb, x, ldx, ferr, berr, work, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztrsen "BLAS_FUNC(ztrsen)"(char *job, char *compq, bint *select, int *n, npy_complex128 *t, int *ldt, npy_complex128 *q, int *ldq, npy_complex128 *w, int *m, d *s, d *sep, npy_complex128 *work, int *lwork, int *info) nogil +cdef void ztrsen(char *job, char *compq, bint *select, int *n, z *t, int *ldt, z *q, int *ldq, z *w, int *m, d *s, d *sep, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_ztrsen(job, compq, select, n, t, ldt, q, ldq, w, m, s, sep, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztrsna "BLAS_FUNC(ztrsna)"(char *job, char *howmny, bint *select, int *n, npy_complex128 *t, int *ldt, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, d *s, d *sep, int *mm, int *m, npy_complex128 *work, int *ldwork, d *rwork, int *info) nogil +cdef void ztrsna(char *job, char *howmny, bint *select, int *n, z *t, int *ldt, z *vl, int *ldvl, z *vr, int *ldvr, d *s, d *sep, int *mm, int *m, z *work, int *ldwork, d *rwork, int *info) noexcept nogil: + + _fortran_ztrsna(job, howmny, select, n, t, ldt, vl, ldvl, vr, ldvr, s, sep, mm, m, work, ldwork, rwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztrsyl "BLAS_FUNC(ztrsyl)"(char *trana, char *tranb, int *isgn, int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *c, int *ldc, d *scale, int *info) nogil +cdef void ztrsyl(char *trana, char *tranb, int *isgn, int *m, int *n, z *a, int *lda, z *b, int *ldb, z *c, int *ldc, d *scale, int *info) noexcept nogil: + + _fortran_ztrsyl(trana, tranb, isgn, m, n, a, lda, b, ldb, c, ldc, scale, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztrti2 "BLAS_FUNC(ztrti2)"(char *uplo, char *diag, int *n, npy_complex128 *a, int *lda, int *info) nogil +cdef void ztrti2(char *uplo, char *diag, int *n, z *a, int *lda, int *info) noexcept nogil: + + _fortran_ztrti2(uplo, diag, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztrtri "BLAS_FUNC(ztrtri)"(char *uplo, char *diag, int *n, npy_complex128 *a, int *lda, int *info) nogil +cdef void ztrtri(char *uplo, char *diag, int *n, z *a, int *lda, int *info) noexcept nogil: + + _fortran_ztrtri(uplo, diag, n, a, lda, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztrtrs "BLAS_FUNC(ztrtrs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *info) nogil +cdef void ztrtrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, int *info) noexcept nogil: + + _fortran_ztrtrs(uplo, trans, diag, n, nrhs, a, lda, b, ldb, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztrttf "BLAS_FUNC(ztrttf)"(char *transr, char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *arf, int *info) nogil +cdef void ztrttf(char *transr, char *uplo, int *n, z *a, int *lda, z *arf, int *info) noexcept nogil: + + _fortran_ztrttf(transr, uplo, n, a, lda, arf, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztrttp "BLAS_FUNC(ztrttp)"(char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *ap, int *info) nogil +cdef void ztrttp(char *uplo, int *n, z *a, int *lda, z *ap, int *info) noexcept nogil: + + _fortran_ztrttp(uplo, n, a, lda, ap, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_ztzrzf "BLAS_FUNC(ztzrzf)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil +cdef void ztzrzf(int *m, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_ztzrzf(m, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zunbdb "BLAS_FUNC(zunbdb)"(char *trans, char *signs, int *m, int *p, int *q, npy_complex128 *x11, int *ldx11, npy_complex128 *x12, int *ldx12, npy_complex128 *x21, int *ldx21, npy_complex128 *x22, int *ldx22, d *theta, d *phi, npy_complex128 *taup1, npy_complex128 *taup2, npy_complex128 *tauq1, npy_complex128 *tauq2, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zunbdb(char *trans, char *signs, int *m, int *p, int *q, z *x11, int *ldx11, z *x12, int *ldx12, z *x21, int *ldx21, z *x22, int *ldx22, d *theta, d *phi, z *taup1, z *taup2, z *tauq1, z *tauq2, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zunbdb(trans, signs, m, p, q, x11, ldx11, x12, ldx12, x21, ldx21, x22, ldx22, theta, phi, taup1, taup2, tauq1, tauq2, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zuncsd "BLAS_FUNC(zuncsd)"(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, npy_complex128 *x11, int *ldx11, npy_complex128 *x12, int *ldx12, npy_complex128 *x21, int *ldx21, npy_complex128 *x22, int *ldx22, d *theta, npy_complex128 *u1, int *ldu1, npy_complex128 *u2, int *ldu2, npy_complex128 *v1t, int *ldv1t, npy_complex128 *v2t, int *ldv2t, npy_complex128 *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *info) nogil +cdef void zuncsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, z *x11, int *ldx11, z *x12, int *ldx12, z *x21, int *ldx21, z *x22, int *ldx22, d *theta, z *u1, int *ldu1, z *u2, int *ldu2, z *v1t, int *ldv1t, z *v2t, int *ldv2t, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *info) noexcept nogil: + + _fortran_zuncsd(jobu1, jobu2, jobv1t, jobv2t, trans, signs, m, p, q, x11, ldx11, x12, ldx12, x21, ldx21, x22, ldx22, theta, u1, ldu1, u2, ldu2, v1t, ldv1t, v2t, ldv2t, work, lwork, rwork, lrwork, iwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zung2l "BLAS_FUNC(zung2l)"(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info) nogil +cdef void zung2l(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil: + + _fortran_zung2l(m, n, k, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zung2r "BLAS_FUNC(zung2r)"(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info) nogil +cdef void zung2r(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil: + + _fortran_zung2r(m, n, k, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zungbr "BLAS_FUNC(zungbr)"(char *vect, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zungbr(char *vect, int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zungbr(vect, m, n, k, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zunghr "BLAS_FUNC(zunghr)"(int *n, int *ilo, int *ihi, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zunghr(int *n, int *ilo, int *ihi, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zunghr(n, ilo, ihi, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zungl2 "BLAS_FUNC(zungl2)"(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info) nogil +cdef void zungl2(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil: + + _fortran_zungl2(m, n, k, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zunglq "BLAS_FUNC(zunglq)"(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zunglq(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zunglq(m, n, k, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zungql "BLAS_FUNC(zungql)"(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zungql(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zungql(m, n, k, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zungqr "BLAS_FUNC(zungqr)"(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zungqr(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zungqr(m, n, k, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zungr2 "BLAS_FUNC(zungr2)"(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info) nogil +cdef void zungr2(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil: + + _fortran_zungr2(m, n, k, a, lda, tau, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zungrq "BLAS_FUNC(zungrq)"(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zungrq(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zungrq(m, n, k, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zungtr "BLAS_FUNC(zungtr)"(char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zungtr(char *uplo, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zungtr(uplo, n, a, lda, tau, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zunm2l "BLAS_FUNC(zunm2l)"(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info) nogil +cdef void zunm2l(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *info) noexcept nogil: + + _fortran_zunm2l(side, trans, m, n, k, a, lda, tau, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zunm2r "BLAS_FUNC(zunm2r)"(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info) nogil +cdef void zunm2r(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *info) noexcept nogil: + + _fortran_zunm2r(side, trans, m, n, k, a, lda, tau, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zunmbr "BLAS_FUNC(zunmbr)"(char *vect, char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zunmbr(char *vect, char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zunmbr(vect, side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zunmhr "BLAS_FUNC(zunmhr)"(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zunmhr(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zunmhr(side, trans, m, n, ilo, ihi, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zunml2 "BLAS_FUNC(zunml2)"(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info) nogil +cdef void zunml2(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *info) noexcept nogil: + + _fortran_zunml2(side, trans, m, n, k, a, lda, tau, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zunmlq "BLAS_FUNC(zunmlq)"(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zunmlq(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zunmlq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zunmql "BLAS_FUNC(zunmql)"(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zunmql(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zunmql(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zunmqr "BLAS_FUNC(zunmqr)"(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zunmqr(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zunmqr(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zunmr2 "BLAS_FUNC(zunmr2)"(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info) nogil +cdef void zunmr2(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *info) noexcept nogil: + + _fortran_zunmr2(side, trans, m, n, k, a, lda, tau, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zunmr3 "BLAS_FUNC(zunmr3)"(char *side, char *trans, int *m, int *n, int *k, int *l, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info) nogil +cdef void zunmr3(char *side, char *trans, int *m, int *n, int *k, int *l, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *info) noexcept nogil: + + _fortran_zunmr3(side, trans, m, n, k, l, a, lda, tau, c, ldc, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zunmrq "BLAS_FUNC(zunmrq)"(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zunmrq(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zunmrq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zunmrz "BLAS_FUNC(zunmrz)"(char *side, char *trans, int *m, int *n, int *k, int *l, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zunmrz(char *side, char *trans, int *m, int *n, int *k, int *l, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zunmrz(side, trans, m, n, k, l, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zunmtr "BLAS_FUNC(zunmtr)"(char *side, char *uplo, char *trans, int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info) nogil +cdef void zunmtr(char *side, char *uplo, char *trans, int *m, int *n, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil: + + _fortran_zunmtr(side, uplo, trans, m, n, a, lda, tau, c, ldc, work, lwork, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zupgtr "BLAS_FUNC(zupgtr)"(char *uplo, int *n, npy_complex128 *ap, npy_complex128 *tau, npy_complex128 *q, int *ldq, npy_complex128 *work, int *info) nogil +cdef void zupgtr(char *uplo, int *n, z *ap, z *tau, z *q, int *ldq, z *work, int *info) noexcept nogil: + + _fortran_zupgtr(uplo, n, ap, tau, q, ldq, work, info) + + +cdef extern from "_lapack_subroutines.h": + void _fortran_zupmtr "BLAS_FUNC(zupmtr)"(char *side, char *uplo, char *trans, int *m, int *n, npy_complex128 *ap, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info) nogil +cdef void zupmtr(char *side, char *uplo, char *trans, int *m, int *n, z *ap, z *tau, z *c, int *ldc, z *work, int *info) noexcept nogil: + + _fortran_zupmtr(side, uplo, trans, m, n, ap, tau, c, ldc, work, info) + + + +# Python accessible wrappers for testing: + +def _test_dlamch(cmach): + # This conversion is necessary to handle Python 3 strings. + cmach_bytes = bytes(cmach) + # Now that it is a bytes representation, a non-temporary variable + # must be passed as a part of the function call. + cdef char* cmach_char = cmach_bytes + return dlamch(cmach_char) + +def _test_slamch(cmach): + # This conversion is necessary to handle Python 3 strings. + cmach_bytes = bytes(cmach) + # Now that it is a bytes representation, a non-temporary variable + # must be passed as a part of the function call. + cdef char* cmach_char = cmach_bytes + return slamch(cmach_char) + +cpdef double complex _test_zladiv(double complex zx, double complex zy) noexcept nogil: + return zladiv(&zx, &zy) + +cpdef float complex _test_cladiv(float complex cx, float complex cy) noexcept nogil: + return cladiv(&cx, &cy) diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/decomp.py b/venv/lib/python3.10/site-packages/scipy/linalg/decomp.py new file mode 100644 index 0000000000000000000000000000000000000000..b1c61752110cf270f9cbd8c113c81032cf551511 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/decomp.py @@ -0,0 +1,25 @@ +# This file is not meant for public use and will be removed in SciPy v2.0.0. +# Use the `scipy.linalg` namespace for importing the functions +# included below. + +from scipy._lib.deprecation import _sub_module_deprecation + + +__all__ = [ # noqa: F822 + 'eig', 'eigvals', 'eigh', 'eigvalsh', + 'eig_banded', 'eigvals_banded', + 'eigh_tridiagonal', 'eigvalsh_tridiagonal', 'hessenberg', 'cdf2rdf', + 'array', 'isfinite', 'inexact', 'nonzero', 'iscomplexobj', + 'flatnonzero', 'argsort', 'iscomplex', 'einsum', 'eye', 'inf', + 'LinAlgError', 'norm', 'get_lapack_funcs' +] + + +def __dir__(): + return __all__ + + +def __getattr__(name): + return _sub_module_deprecation(sub_package="linalg", module="decomp", + private_modules=["_decomp"], all=__all__, + attribute=name) diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/decomp_cholesky.py b/venv/lib/python3.10/site-packages/scipy/linalg/decomp_cholesky.py new file mode 100644 index 0000000000000000000000000000000000000000..beec324d3503725c40438b6a09789b0804df5688 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/decomp_cholesky.py @@ -0,0 +1,22 @@ +# This file is not meant for public use and will be removed in SciPy v2.0.0. +# Use the `scipy.linalg` namespace for importing the functions +# included below. + +from scipy._lib.deprecation import _sub_module_deprecation + + +__all__ = [ # noqa: F822 + 'cholesky', 'cho_factor', 'cho_solve', 'cholesky_banded', + 'cho_solve_banded', 'asarray_chkfinite', 'atleast_2d', + 'LinAlgError', 'get_lapack_funcs' +] + + +def __dir__(): + return __all__ + + +def __getattr__(name): + return _sub_module_deprecation(sub_package="linalg", module="decomp_cholesky", + private_modules=["_decomp_cholesky"], all=__all__, + attribute=name) diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/decomp_lu.py b/venv/lib/python3.10/site-packages/scipy/linalg/decomp_lu.py new file mode 100644 index 0000000000000000000000000000000000000000..ab46ddcbd13938a978c96b4e248302b5efe2b553 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/decomp_lu.py @@ -0,0 +1,21 @@ +# This file is not meant for public use and will be removed in SciPy v2.0.0. +# Use the `scipy.linalg` namespace for importing the functions +# included below. + +from scipy._lib.deprecation import _sub_module_deprecation + + +__all__ = [ # noqa: F822 + 'lu', 'lu_solve', 'lu_factor', + 'asarray_chkfinite', 'LinAlgWarning', 'get_lapack_funcs', +] + + +def __dir__(): + return __all__ + + +def __getattr__(name): + return _sub_module_deprecation(sub_package="linalg", module="decomp_lu", + private_modules=["_decomp_lu"], all=__all__, + attribute=name) diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/decomp_qr.py b/venv/lib/python3.10/site-packages/scipy/linalg/decomp_qr.py new file mode 100644 index 0000000000000000000000000000000000000000..77df617b5edf0b4d7f5b812a08a2621a891047d2 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/decomp_qr.py @@ -0,0 +1,20 @@ +# This file is not meant for public use and will be removed in SciPy v2.0.0. +# Use the `scipy.linalg` namespace for importing the functions +# included below. + +from scipy._lib.deprecation import _sub_module_deprecation + + +__all__ = [ # noqa: F822 + 'qr', 'qr_multiply', 'rq', 'get_lapack_funcs', 'safecall' +] + + +def __dir__(): + return __all__ + + +def __getattr__(name): + return _sub_module_deprecation(sub_package="linalg", module="decomp_qr", + private_modules=["_decomp_qr"], all=__all__, + attribute=name) diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/decomp_schur.py b/venv/lib/python3.10/site-packages/scipy/linalg/decomp_schur.py new file mode 100644 index 0000000000000000000000000000000000000000..387fe8ad5c2acb36144b3f84e8afdf6e5762a1d3 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/decomp_schur.py @@ -0,0 +1,22 @@ +# This file is not meant for public use and will be removed in SciPy v2.0.0. +# Use the `scipy.linalg` namespace for importing the functions +# included below. + +from scipy._lib.deprecation import _sub_module_deprecation + + +__all__ = [ # noqa: F822 + 'schur', 'rsf2csf', 'asarray_chkfinite', 'single', 'array', 'norm', + 'LinAlgError', 'get_lapack_funcs', 'eigvals', 'eps', 'feps' +] + + +def __dir__(): + return __all__ + + +def __getattr__(name): + return _sub_module_deprecation(sub_package="linalg", module="decomp_schur", + private_modules=["_decomp_schur"], all=__all__, + attribute=name) + diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/decomp_svd.py b/venv/lib/python3.10/site-packages/scipy/linalg/decomp_svd.py new file mode 100644 index 0000000000000000000000000000000000000000..64d0ce8562f06a3837df050f0ea6b8b15a2b359e --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/decomp_svd.py @@ -0,0 +1,21 @@ +# This file is not meant for public use and will be removed in SciPy v2.0.0. +# Use the `scipy.linalg` namespace for importing the functions +# included below. + +from scipy._lib.deprecation import _sub_module_deprecation + + +__all__ = [ # noqa: F822 + 'svd', 'svdvals', 'diagsvd', 'orth', 'subspace_angles', 'null_space', + 'LinAlgError', 'get_lapack_funcs' +] + + +def __dir__(): + return __all__ + + +def __getattr__(name): + return _sub_module_deprecation(sub_package="linalg", module="decomp_svd", + private_modules=["_decomp_svd"], all=__all__, + attribute=name) diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/interpolative.py b/venv/lib/python3.10/site-packages/scipy/linalg/interpolative.py new file mode 100644 index 0000000000000000000000000000000000000000..b91cdd63a6a5dbf63446de81997747b548beb6bb --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/interpolative.py @@ -0,0 +1,1015 @@ +#****************************************************************************** +# Copyright (C) 2013 Kenneth L. Ho +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. Redistributions in binary +# form must reproduce the above copyright notice, this list of conditions and +# the following disclaimer in the documentation and/or other materials +# provided with the distribution. +# +# None of the names of the copyright holders may be used to endorse or +# promote products derived from this software without specific prior written +# permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +#****************************************************************************** + +# Python module for interfacing with `id_dist`. + +r""" +====================================================================== +Interpolative matrix decomposition (:mod:`scipy.linalg.interpolative`) +====================================================================== + +.. moduleauthor:: Kenneth L. Ho + +.. versionadded:: 0.13 + +.. currentmodule:: scipy.linalg.interpolative + +An interpolative decomposition (ID) of a matrix :math:`A \in +\mathbb{C}^{m \times n}` of rank :math:`k \leq \min \{ m, n \}` is a +factorization + +.. math:: + A \Pi = + \begin{bmatrix} + A \Pi_{1} & A \Pi_{2} + \end{bmatrix} = + A \Pi_{1} + \begin{bmatrix} + I & T + \end{bmatrix}, + +where :math:`\Pi = [\Pi_{1}, \Pi_{2}]` is a permutation matrix with +:math:`\Pi_{1} \in \{ 0, 1 \}^{n \times k}`, i.e., :math:`A \Pi_{2} = +A \Pi_{1} T`. This can equivalently be written as :math:`A = BP`, +where :math:`B = A \Pi_{1}` and :math:`P = [I, T] \Pi^{\mathsf{T}}` +are the *skeleton* and *interpolation matrices*, respectively. + +If :math:`A` does not have exact rank :math:`k`, then there exists an +approximation in the form of an ID such that :math:`A = BP + E`, where +:math:`\| E \| \sim \sigma_{k + 1}` is on the order of the :math:`(k + +1)`-th largest singular value of :math:`A`. Note that :math:`\sigma_{k ++ 1}` is the best possible error for a rank-:math:`k` approximation +and, in fact, is achieved by the singular value decomposition (SVD) +:math:`A \approx U S V^{*}`, where :math:`U \in \mathbb{C}^{m \times +k}` and :math:`V \in \mathbb{C}^{n \times k}` have orthonormal columns +and :math:`S = \mathop{\mathrm{diag}} (\sigma_{i}) \in \mathbb{C}^{k +\times k}` is diagonal with nonnegative entries. The principal +advantages of using an ID over an SVD are that: + +- it is cheaper to construct; +- it preserves the structure of :math:`A`; and +- it is more efficient to compute with in light of the identity submatrix of :math:`P`. + +Routines +======== + +Main functionality: + +.. autosummary:: + :toctree: generated/ + + interp_decomp + reconstruct_matrix_from_id + reconstruct_interp_matrix + reconstruct_skel_matrix + id_to_svd + svd + estimate_spectral_norm + estimate_spectral_norm_diff + estimate_rank + +Support functions: + +.. autosummary:: + :toctree: generated/ + + seed + rand + + +References +========== + +This module uses the ID software package [1]_ by Martinsson, Rokhlin, +Shkolnisky, and Tygert, which is a Fortran library for computing IDs +using various algorithms, including the rank-revealing QR approach of +[2]_ and the more recent randomized methods described in [3]_, [4]_, +and [5]_. This module exposes its functionality in a way convenient +for Python users. Note that this module does not add any functionality +beyond that of organizing a simpler and more consistent interface. + +We advise the user to consult also the `documentation for the ID package +`_. + +.. [1] P.G. Martinsson, V. Rokhlin, Y. Shkolnisky, M. Tygert. "ID: a + software package for low-rank approximation of matrices via interpolative + decompositions, version 0.2." http://tygert.com/id_doc.4.pdf. + +.. [2] H. Cheng, Z. Gimbutas, P.G. Martinsson, V. Rokhlin. "On the + compression of low rank matrices." *SIAM J. Sci. Comput.* 26 (4): 1389--1404, + 2005. :doi:`10.1137/030602678`. + +.. [3] E. Liberty, F. Woolfe, P.G. Martinsson, V. Rokhlin, M. + Tygert. "Randomized algorithms for the low-rank approximation of matrices." + *Proc. Natl. Acad. Sci. U.S.A.* 104 (51): 20167--20172, 2007. + :doi:`10.1073/pnas.0709640104`. + +.. [4] P.G. Martinsson, V. Rokhlin, M. Tygert. "A randomized + algorithm for the decomposition of matrices." *Appl. Comput. Harmon. Anal.* 30 + (1): 47--68, 2011. :doi:`10.1016/j.acha.2010.02.003`. + +.. [5] F. Woolfe, E. Liberty, V. Rokhlin, M. Tygert. "A fast + randomized algorithm for the approximation of matrices." *Appl. Comput. + Harmon. Anal.* 25 (3): 335--366, 2008. :doi:`10.1016/j.acha.2007.12.002`. + + +Tutorial +======== + +Initializing +------------ + +The first step is to import :mod:`scipy.linalg.interpolative` by issuing the +command: + +>>> import scipy.linalg.interpolative as sli + +Now let's build a matrix. For this, we consider a Hilbert matrix, which is well +know to have low rank: + +>>> from scipy.linalg import hilbert +>>> n = 1000 +>>> A = hilbert(n) + +We can also do this explicitly via: + +>>> import numpy as np +>>> n = 1000 +>>> A = np.empty((n, n), order='F') +>>> for j in range(n): +... for i in range(n): +... A[i,j] = 1. / (i + j + 1) + +Note the use of the flag ``order='F'`` in :func:`numpy.empty`. This +instantiates the matrix in Fortran-contiguous order and is important for +avoiding data copying when passing to the backend. + +We then define multiplication routines for the matrix by regarding it as a +:class:`scipy.sparse.linalg.LinearOperator`: + +>>> from scipy.sparse.linalg import aslinearoperator +>>> L = aslinearoperator(A) + +This automatically sets up methods describing the action of the matrix and its +adjoint on a vector. + +Computing an ID +--------------- + +We have several choices of algorithm to compute an ID. These fall largely +according to two dichotomies: + +1. how the matrix is represented, i.e., via its entries or via its action on a + vector; and +2. whether to approximate it to a fixed relative precision or to a fixed rank. + +We step through each choice in turn below. + +In all cases, the ID is represented by three parameters: + +1. a rank ``k``; +2. an index array ``idx``; and +3. interpolation coefficients ``proj``. + +The ID is specified by the relation +``np.dot(A[:,idx[:k]], proj) == A[:,idx[k:]]``. + +From matrix entries +................... + +We first consider a matrix given in terms of its entries. + +To compute an ID to a fixed precision, type: + +>>> eps = 1e-3 +>>> k, idx, proj = sli.interp_decomp(A, eps) + +where ``eps < 1`` is the desired precision. + +To compute an ID to a fixed rank, use: + +>>> idx, proj = sli.interp_decomp(A, k) + +where ``k >= 1`` is the desired rank. + +Both algorithms use random sampling and are usually faster than the +corresponding older, deterministic algorithms, which can be accessed via the +commands: + +>>> k, idx, proj = sli.interp_decomp(A, eps, rand=False) + +and: + +>>> idx, proj = sli.interp_decomp(A, k, rand=False) + +respectively. + +From matrix action +.................. + +Now consider a matrix given in terms of its action on a vector as a +:class:`scipy.sparse.linalg.LinearOperator`. + +To compute an ID to a fixed precision, type: + +>>> k, idx, proj = sli.interp_decomp(L, eps) + +To compute an ID to a fixed rank, use: + +>>> idx, proj = sli.interp_decomp(L, k) + +These algorithms are randomized. + +Reconstructing an ID +-------------------- + +The ID routines above do not output the skeleton and interpolation matrices +explicitly but instead return the relevant information in a more compact (and +sometimes more useful) form. To build these matrices, write: + +>>> B = sli.reconstruct_skel_matrix(A, k, idx) + +for the skeleton matrix and: + +>>> P = sli.reconstruct_interp_matrix(idx, proj) + +for the interpolation matrix. The ID approximation can then be computed as: + +>>> C = np.dot(B, P) + +This can also be constructed directly using: + +>>> C = sli.reconstruct_matrix_from_id(B, idx, proj) + +without having to first compute ``P``. + +Alternatively, this can be done explicitly as well using: + +>>> B = A[:,idx[:k]] +>>> P = np.hstack([np.eye(k), proj])[:,np.argsort(idx)] +>>> C = np.dot(B, P) + +Computing an SVD +---------------- + +An ID can be converted to an SVD via the command: + +>>> U, S, V = sli.id_to_svd(B, idx, proj) + +The SVD approximation is then: + +>>> approx = U @ np.diag(S) @ V.conj().T + +The SVD can also be computed "fresh" by combining both the ID and conversion +steps into one command. Following the various ID algorithms above, there are +correspondingly various SVD algorithms that one can employ. + +From matrix entries +................... + +We consider first SVD algorithms for a matrix given in terms of its entries. + +To compute an SVD to a fixed precision, type: + +>>> U, S, V = sli.svd(A, eps) + +To compute an SVD to a fixed rank, use: + +>>> U, S, V = sli.svd(A, k) + +Both algorithms use random sampling; for the deterministic versions, issue the +keyword ``rand=False`` as above. + +From matrix action +.................. + +Now consider a matrix given in terms of its action on a vector. + +To compute an SVD to a fixed precision, type: + +>>> U, S, V = sli.svd(L, eps) + +To compute an SVD to a fixed rank, use: + +>>> U, S, V = sli.svd(L, k) + +Utility routines +---------------- + +Several utility routines are also available. + +To estimate the spectral norm of a matrix, use: + +>>> snorm = sli.estimate_spectral_norm(A) + +This algorithm is based on the randomized power method and thus requires only +matrix-vector products. The number of iterations to take can be set using the +keyword ``its`` (default: ``its=20``). The matrix is interpreted as a +:class:`scipy.sparse.linalg.LinearOperator`, but it is also valid to supply it +as a :class:`numpy.ndarray`, in which case it is trivially converted using +:func:`scipy.sparse.linalg.aslinearoperator`. + +The same algorithm can also estimate the spectral norm of the difference of two +matrices ``A1`` and ``A2`` as follows: + +>>> A1, A2 = A**2, A +>>> diff = sli.estimate_spectral_norm_diff(A1, A2) + +This is often useful for checking the accuracy of a matrix approximation. + +Some routines in :mod:`scipy.linalg.interpolative` require estimating the rank +of a matrix as well. This can be done with either: + +>>> k = sli.estimate_rank(A, eps) + +or: + +>>> k = sli.estimate_rank(L, eps) + +depending on the representation. The parameter ``eps`` controls the definition +of the numerical rank. + +Finally, the random number generation required for all randomized routines can +be controlled via :func:`scipy.linalg.interpolative.seed`. To reset the seed +values to their original values, use: + +>>> sli.seed('default') + +To specify the seed values, use: + +>>> s = 42 +>>> sli.seed(s) + +where ``s`` must be an integer or array of 55 floats. If an integer, the array +of floats is obtained by using ``numpy.random.rand`` with the given integer +seed. + +To simply generate some random numbers, type: + +>>> arr = sli.rand(n) + +where ``n`` is the number of random numbers to generate. + +Remarks +------- + +The above functions all automatically detect the appropriate interface and work +with both real and complex data types, passing input arguments to the proper +backend routine. + +""" + +import scipy.linalg._interpolative_backend as _backend +import numpy as np +import sys + +__all__ = [ + 'estimate_rank', + 'estimate_spectral_norm', + 'estimate_spectral_norm_diff', + 'id_to_svd', + 'interp_decomp', + 'rand', + 'reconstruct_interp_matrix', + 'reconstruct_matrix_from_id', + 'reconstruct_skel_matrix', + 'seed', + 'svd', +] + +_DTYPE_ERROR = ValueError("invalid input dtype (input must be float64 or complex128)") +_TYPE_ERROR = TypeError("invalid input type (must be array or LinearOperator)") +_32BIT_ERROR = ValueError("interpolative decomposition on 32-bit systems " + "with complex128 is buggy") +_IS_32BIT = (sys.maxsize < 2**32) + + +def _is_real(A): + try: + if A.dtype == np.complex128: + return False + elif A.dtype == np.float64: + return True + else: + raise _DTYPE_ERROR + except AttributeError as e: + raise _TYPE_ERROR from e + + +def seed(seed=None): + """ + Seed the internal random number generator used in this ID package. + + The generator is a lagged Fibonacci method with 55-element internal state. + + Parameters + ---------- + seed : int, sequence, 'default', optional + If 'default', the random seed is reset to a default value. + + If `seed` is a sequence containing 55 floating-point numbers + in range [0,1], these are used to set the internal state of + the generator. + + If the value is an integer, the internal state is obtained + from `numpy.random.RandomState` (MT19937) with the integer + used as the initial seed. + + If `seed` is omitted (None), ``numpy.random.rand`` is used to + initialize the generator. + + """ + # For details, see :func:`_backend.id_srand`, :func:`_backend.id_srandi`, + # and :func:`_backend.id_srando`. + + if isinstance(seed, str) and seed == 'default': + _backend.id_srando() + elif hasattr(seed, '__len__'): + state = np.asfortranarray(seed, dtype=float) + if state.shape != (55,): + raise ValueError("invalid input size") + elif state.min() < 0 or state.max() > 1: + raise ValueError("values not in range [0,1]") + _backend.id_srandi(state) + elif seed is None: + _backend.id_srandi(np.random.rand(55)) + else: + rnd = np.random.RandomState(seed) + _backend.id_srandi(rnd.rand(55)) + + +def rand(*shape): + """ + Generate standard uniform pseudorandom numbers via a very efficient lagged + Fibonacci method. + + This routine is used for all random number generation in this package and + can affect ID and SVD results. + + Parameters + ---------- + *shape + Shape of output array + + """ + # For details, see :func:`_backend.id_srand`, and :func:`_backend.id_srando`. + return _backend.id_srand(np.prod(shape)).reshape(shape) + + +def interp_decomp(A, eps_or_k, rand=True): + """ + Compute ID of a matrix. + + An ID of a matrix `A` is a factorization defined by a rank `k`, a column + index array `idx`, and interpolation coefficients `proj` such that:: + + numpy.dot(A[:,idx[:k]], proj) = A[:,idx[k:]] + + The original matrix can then be reconstructed as:: + + numpy.hstack([A[:,idx[:k]], + numpy.dot(A[:,idx[:k]], proj)] + )[:,numpy.argsort(idx)] + + or via the routine :func:`reconstruct_matrix_from_id`. This can + equivalently be written as:: + + numpy.dot(A[:,idx[:k]], + numpy.hstack([numpy.eye(k), proj]) + )[:,np.argsort(idx)] + + in terms of the skeleton and interpolation matrices:: + + B = A[:,idx[:k]] + + and:: + + P = numpy.hstack([numpy.eye(k), proj])[:,np.argsort(idx)] + + respectively. See also :func:`reconstruct_interp_matrix` and + :func:`reconstruct_skel_matrix`. + + The ID can be computed to any relative precision or rank (depending on the + value of `eps_or_k`). If a precision is specified (`eps_or_k < 1`), then + this function has the output signature:: + + k, idx, proj = interp_decomp(A, eps_or_k) + + Otherwise, if a rank is specified (`eps_or_k >= 1`), then the output + signature is:: + + idx, proj = interp_decomp(A, eps_or_k) + + .. This function automatically detects the form of the input parameters + and passes them to the appropriate backend. For details, see + :func:`_backend.iddp_id`, :func:`_backend.iddp_aid`, + :func:`_backend.iddp_rid`, :func:`_backend.iddr_id`, + :func:`_backend.iddr_aid`, :func:`_backend.iddr_rid`, + :func:`_backend.idzp_id`, :func:`_backend.idzp_aid`, + :func:`_backend.idzp_rid`, :func:`_backend.idzr_id`, + :func:`_backend.idzr_aid`, and :func:`_backend.idzr_rid`. + + Parameters + ---------- + A : :class:`numpy.ndarray` or :class:`scipy.sparse.linalg.LinearOperator` with `rmatvec` + Matrix to be factored + eps_or_k : float or int + Relative error (if `eps_or_k < 1`) or rank (if `eps_or_k >= 1`) of + approximation. + rand : bool, optional + Whether to use random sampling if `A` is of type :class:`numpy.ndarray` + (randomized algorithms are always used if `A` is of type + :class:`scipy.sparse.linalg.LinearOperator`). + + Returns + ------- + k : int + Rank required to achieve specified relative precision if + `eps_or_k < 1`. + idx : :class:`numpy.ndarray` + Column index array. + proj : :class:`numpy.ndarray` + Interpolation coefficients. + """ # numpy/numpydoc#87 # noqa: E501 + from scipy.sparse.linalg import LinearOperator + + real = _is_real(A) + + if isinstance(A, np.ndarray): + if eps_or_k < 1: + eps = eps_or_k + if rand: + if real: + k, idx, proj = _backend.iddp_aid(eps, A) + else: + if _IS_32BIT: + raise _32BIT_ERROR + k, idx, proj = _backend.idzp_aid(eps, A) + else: + if real: + k, idx, proj = _backend.iddp_id(eps, A) + else: + k, idx, proj = _backend.idzp_id(eps, A) + return k, idx - 1, proj + else: + k = int(eps_or_k) + if rand: + if real: + idx, proj = _backend.iddr_aid(A, k) + else: + if _IS_32BIT: + raise _32BIT_ERROR + idx, proj = _backend.idzr_aid(A, k) + else: + if real: + idx, proj = _backend.iddr_id(A, k) + else: + idx, proj = _backend.idzr_id(A, k) + return idx - 1, proj + elif isinstance(A, LinearOperator): + m, n = A.shape + matveca = A.rmatvec + if eps_or_k < 1: + eps = eps_or_k + if real: + k, idx, proj = _backend.iddp_rid(eps, m, n, matveca) + else: + if _IS_32BIT: + raise _32BIT_ERROR + k, idx, proj = _backend.idzp_rid(eps, m, n, matveca) + return k, idx - 1, proj + else: + k = int(eps_or_k) + if real: + idx, proj = _backend.iddr_rid(m, n, matveca, k) + else: + if _IS_32BIT: + raise _32BIT_ERROR + idx, proj = _backend.idzr_rid(m, n, matveca, k) + return idx - 1, proj + else: + raise _TYPE_ERROR + + +def reconstruct_matrix_from_id(B, idx, proj): + """ + Reconstruct matrix from its ID. + + A matrix `A` with skeleton matrix `B` and ID indices and coefficients `idx` + and `proj`, respectively, can be reconstructed as:: + + numpy.hstack([B, numpy.dot(B, proj)])[:,numpy.argsort(idx)] + + See also :func:`reconstruct_interp_matrix` and + :func:`reconstruct_skel_matrix`. + + .. This function automatically detects the matrix data type and calls the + appropriate backend. For details, see :func:`_backend.idd_reconid` and + :func:`_backend.idz_reconid`. + + Parameters + ---------- + B : :class:`numpy.ndarray` + Skeleton matrix. + idx : :class:`numpy.ndarray` + Column index array. + proj : :class:`numpy.ndarray` + Interpolation coefficients. + + Returns + ------- + :class:`numpy.ndarray` + Reconstructed matrix. + """ + if _is_real(B): + return _backend.idd_reconid(B, idx + 1, proj) + else: + return _backend.idz_reconid(B, idx + 1, proj) + + +def reconstruct_interp_matrix(idx, proj): + """ + Reconstruct interpolation matrix from ID. + + The interpolation matrix can be reconstructed from the ID indices and + coefficients `idx` and `proj`, respectively, as:: + + P = numpy.hstack([numpy.eye(proj.shape[0]), proj])[:,numpy.argsort(idx)] + + The original matrix can then be reconstructed from its skeleton matrix `B` + via:: + + numpy.dot(B, P) + + See also :func:`reconstruct_matrix_from_id` and + :func:`reconstruct_skel_matrix`. + + .. This function automatically detects the matrix data type and calls the + appropriate backend. For details, see :func:`_backend.idd_reconint` and + :func:`_backend.idz_reconint`. + + Parameters + ---------- + idx : :class:`numpy.ndarray` + Column index array. + proj : :class:`numpy.ndarray` + Interpolation coefficients. + + Returns + ------- + :class:`numpy.ndarray` + Interpolation matrix. + """ + if _is_real(proj): + return _backend.idd_reconint(idx + 1, proj) + else: + return _backend.idz_reconint(idx + 1, proj) + + +def reconstruct_skel_matrix(A, k, idx): + """ + Reconstruct skeleton matrix from ID. + + The skeleton matrix can be reconstructed from the original matrix `A` and its + ID rank and indices `k` and `idx`, respectively, as:: + + B = A[:,idx[:k]] + + The original matrix can then be reconstructed via:: + + numpy.hstack([B, numpy.dot(B, proj)])[:,numpy.argsort(idx)] + + See also :func:`reconstruct_matrix_from_id` and + :func:`reconstruct_interp_matrix`. + + .. This function automatically detects the matrix data type and calls the + appropriate backend. For details, see :func:`_backend.idd_copycols` and + :func:`_backend.idz_copycols`. + + Parameters + ---------- + A : :class:`numpy.ndarray` + Original matrix. + k : int + Rank of ID. + idx : :class:`numpy.ndarray` + Column index array. + + Returns + ------- + :class:`numpy.ndarray` + Skeleton matrix. + """ + if _is_real(A): + return _backend.idd_copycols(A, k, idx + 1) + else: + return _backend.idz_copycols(A, k, idx + 1) + + +def id_to_svd(B, idx, proj): + """ + Convert ID to SVD. + + The SVD reconstruction of a matrix with skeleton matrix `B` and ID indices and + coefficients `idx` and `proj`, respectively, is:: + + U, S, V = id_to_svd(B, idx, proj) + A = numpy.dot(U, numpy.dot(numpy.diag(S), V.conj().T)) + + See also :func:`svd`. + + .. This function automatically detects the matrix data type and calls the + appropriate backend. For details, see :func:`_backend.idd_id2svd` and + :func:`_backend.idz_id2svd`. + + Parameters + ---------- + B : :class:`numpy.ndarray` + Skeleton matrix. + idx : :class:`numpy.ndarray` + Column index array. + proj : :class:`numpy.ndarray` + Interpolation coefficients. + + Returns + ------- + U : :class:`numpy.ndarray` + Left singular vectors. + S : :class:`numpy.ndarray` + Singular values. + V : :class:`numpy.ndarray` + Right singular vectors. + """ + if _is_real(B): + U, V, S = _backend.idd_id2svd(B, idx + 1, proj) + else: + U, V, S = _backend.idz_id2svd(B, idx + 1, proj) + return U, S, V + + +def estimate_spectral_norm(A, its=20): + """ + Estimate spectral norm of a matrix by the randomized power method. + + .. This function automatically detects the matrix data type and calls the + appropriate backend. For details, see :func:`_backend.idd_snorm` and + :func:`_backend.idz_snorm`. + + Parameters + ---------- + A : :class:`scipy.sparse.linalg.LinearOperator` + Matrix given as a :class:`scipy.sparse.linalg.LinearOperator` with the + `matvec` and `rmatvec` methods (to apply the matrix and its adjoint). + its : int, optional + Number of power method iterations. + + Returns + ------- + float + Spectral norm estimate. + """ + from scipy.sparse.linalg import aslinearoperator + A = aslinearoperator(A) + m, n = A.shape + def matvec(x): + return A.matvec(x) + def matveca(x): + return A.rmatvec(x) + if _is_real(A): + return _backend.idd_snorm(m, n, matveca, matvec, its=its) + else: + return _backend.idz_snorm(m, n, matveca, matvec, its=its) + + +def estimate_spectral_norm_diff(A, B, its=20): + """ + 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, optional + Number of power method iterations. + + Returns + ------- + float + Spectral norm estimate of matrix difference. + """ + from scipy.sparse.linalg import aslinearoperator + A = aslinearoperator(A) + B = aslinearoperator(B) + m, n = A.shape + def matvec1(x): + return A.matvec(x) + def matveca1(x): + return A.rmatvec(x) + def matvec2(x): + return B.matvec(x) + def matveca2(x): + return B.rmatvec(x) + if _is_real(A): + return _backend.idd_diffsnorm( + m, n, matveca1, matveca2, matvec1, matvec2, its=its) + else: + return _backend.idz_diffsnorm( + m, n, matveca1, matveca2, matvec1, matvec2, its=its) + + +def svd(A, eps_or_k, rand=True): + """ + Compute SVD of a matrix via an ID. + + An SVD of a matrix `A` is a factorization:: + + A = numpy.dot(U, numpy.dot(numpy.diag(S), V.conj().T)) + + where `U` and `V` have orthonormal columns and `S` is nonnegative. + + The SVD can be computed to any relative precision or rank (depending on the + value of `eps_or_k`). + + See also :func:`interp_decomp` and :func:`id_to_svd`. + + .. This function automatically detects the form of the input parameters and + passes them to the appropriate backend. For details, see + :func:`_backend.iddp_svd`, :func:`_backend.iddp_asvd`, + :func:`_backend.iddp_rsvd`, :func:`_backend.iddr_svd`, + :func:`_backend.iddr_asvd`, :func:`_backend.iddr_rsvd`, + :func:`_backend.idzp_svd`, :func:`_backend.idzp_asvd`, + :func:`_backend.idzp_rsvd`, :func:`_backend.idzr_svd`, + :func:`_backend.idzr_asvd`, and :func:`_backend.idzr_rsvd`. + + Parameters + ---------- + A : :class:`numpy.ndarray` or :class:`scipy.sparse.linalg.LinearOperator` + Matrix to be factored, given as either a :class:`numpy.ndarray` or a + :class:`scipy.sparse.linalg.LinearOperator` with the `matvec` and + `rmatvec` methods (to apply the matrix and its adjoint). + eps_or_k : float or int + Relative error (if `eps_or_k < 1`) or rank (if `eps_or_k >= 1`) of + approximation. + rand : bool, optional + Whether to use random sampling if `A` is of type :class:`numpy.ndarray` + (randomized algorithms are always used if `A` is of type + :class:`scipy.sparse.linalg.LinearOperator`). + + Returns + ------- + U : :class:`numpy.ndarray` + Left singular vectors. + S : :class:`numpy.ndarray` + Singular values. + V : :class:`numpy.ndarray` + Right singular vectors. + """ + from scipy.sparse.linalg import LinearOperator + + real = _is_real(A) + + if isinstance(A, np.ndarray): + if eps_or_k < 1: + eps = eps_or_k + if rand: + if real: + U, V, S = _backend.iddp_asvd(eps, A) + else: + if _IS_32BIT: + raise _32BIT_ERROR + U, V, S = _backend.idzp_asvd(eps, A) + else: + if real: + U, V, S = _backend.iddp_svd(eps, A) + else: + U, V, S = _backend.idzp_svd(eps, A) + else: + k = int(eps_or_k) + if k > min(A.shape): + raise ValueError(f"Approximation rank {k} exceeds min(A.shape) = " + f" {min(A.shape)} ") + if rand: + if real: + U, V, S = _backend.iddr_asvd(A, k) + else: + if _IS_32BIT: + raise _32BIT_ERROR + U, V, S = _backend.idzr_asvd(A, k) + else: + if real: + U, V, S = _backend.iddr_svd(A, k) + else: + U, V, S = _backend.idzr_svd(A, k) + elif isinstance(A, LinearOperator): + m, n = A.shape + def matvec(x): + return A.matvec(x) + def matveca(x): + return A.rmatvec(x) + if eps_or_k < 1: + eps = eps_or_k + if real: + U, V, S = _backend.iddp_rsvd(eps, m, n, matveca, matvec) + else: + if _IS_32BIT: + raise _32BIT_ERROR + U, V, S = _backend.idzp_rsvd(eps, m, n, matveca, matvec) + else: + k = int(eps_or_k) + if real: + U, V, S = _backend.iddr_rsvd(m, n, matveca, matvec, k) + else: + if _IS_32BIT: + raise _32BIT_ERROR + U, V, S = _backend.idzr_rsvd(m, n, matveca, matvec, k) + else: + raise _TYPE_ERROR + return U, S, V + + +def estimate_rank(A, eps): + """ + Estimate matrix rank to a specified relative precision using randomized + methods. + + The matrix `A` can be given as either a :class:`numpy.ndarray` or a + :class:`scipy.sparse.linalg.LinearOperator`, with different algorithms used + for each case. If `A` is of type :class:`numpy.ndarray`, then the output + rank is typically about 8 higher than the actual numerical rank. + + .. This function automatically detects the form of the input parameters and + passes them to the appropriate backend. For details, + see :func:`_backend.idd_estrank`, :func:`_backend.idd_findrank`, + :func:`_backend.idz_estrank`, and :func:`_backend.idz_findrank`. + + Parameters + ---------- + A : :class:`numpy.ndarray` or :class:`scipy.sparse.linalg.LinearOperator` + Matrix whose rank is to be estimated, given as either a + :class:`numpy.ndarray` or a :class:`scipy.sparse.linalg.LinearOperator` + with the `rmatvec` method (to apply the matrix adjoint). + eps : float + Relative error for numerical rank definition. + + Returns + ------- + int + Estimated matrix rank. + """ + from scipy.sparse.linalg import LinearOperator + + real = _is_real(A) + + if isinstance(A, np.ndarray): + if real: + rank = _backend.idd_estrank(eps, A) + else: + rank = _backend.idz_estrank(eps, A) + if rank == 0: + # special return value for nearly full rank + rank = min(A.shape) + return rank + elif isinstance(A, LinearOperator): + m, n = A.shape + matveca = A.rmatvec + if real: + return _backend.idd_findrank(eps, m, n, matveca) + else: + return _backend.idz_findrank(eps, m, n, matveca) + else: + raise _TYPE_ERROR diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/lapack.py b/venv/lib/python3.10/site-packages/scipy/linalg/lapack.py new file mode 100644 index 0000000000000000000000000000000000000000..57b0f65138b36dc9542f429dc73f88b6aac03004 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/lapack.py @@ -0,0 +1,1039 @@ +""" +Low-level LAPACK functions (:mod:`scipy.linalg.lapack`) +======================================================= + +This module contains low-level functions from the LAPACK library. + +.. versionadded:: 0.12.0 + +.. note:: + + The common ``overwrite_<>`` option in many routines, allows the + input arrays to be overwritten to avoid extra memory allocation. + However this requires the array to satisfy two conditions + which are memory order and the data type to match exactly the + order and the type expected by the routine. + + As an example, if you pass a double precision float array to any + ``S....`` routine which expects single precision arguments, f2py + will create an intermediate array to match the argument types and + overwriting will be performed on that intermediate array. + + Similarly, if a C-contiguous array is passed, f2py will pass a + FORTRAN-contiguous array internally. Please make sure that these + details are satisfied. More information can be found in the f2py + documentation. + +.. warning:: + + These functions do little to no error checking. + It is possible to cause crashes by mis-using them, + so prefer using the higher-level routines in `scipy.linalg`. + +Finding functions +----------------- + +.. autosummary:: + :toctree: generated/ + + get_lapack_funcs + +All functions +------------- + +.. autosummary:: + :toctree: generated/ + + sgbsv + dgbsv + cgbsv + zgbsv + + sgbtrf + dgbtrf + cgbtrf + zgbtrf + + sgbtrs + dgbtrs + cgbtrs + zgbtrs + + sgebal + dgebal + cgebal + zgebal + + sgecon + dgecon + cgecon + zgecon + + sgeequ + dgeequ + cgeequ + zgeequ + + sgeequb + dgeequb + cgeequb + zgeequb + + sgees + dgees + cgees + zgees + + sgeev + dgeev + cgeev + zgeev + + sgeev_lwork + dgeev_lwork + cgeev_lwork + zgeev_lwork + + sgehrd + dgehrd + cgehrd + zgehrd + + sgehrd_lwork + dgehrd_lwork + cgehrd_lwork + zgehrd_lwork + + sgejsv + dgejsv + + sgels + dgels + cgels + zgels + + sgels_lwork + dgels_lwork + cgels_lwork + zgels_lwork + + sgelsd + dgelsd + cgelsd + zgelsd + + sgelsd_lwork + dgelsd_lwork + cgelsd_lwork + zgelsd_lwork + + sgelss + dgelss + cgelss + zgelss + + sgelss_lwork + dgelss_lwork + cgelss_lwork + zgelss_lwork + + sgelsy + dgelsy + cgelsy + zgelsy + + sgelsy_lwork + dgelsy_lwork + cgelsy_lwork + zgelsy_lwork + + sgeqp3 + dgeqp3 + cgeqp3 + zgeqp3 + + sgeqrf + dgeqrf + cgeqrf + zgeqrf + + sgeqrf_lwork + dgeqrf_lwork + cgeqrf_lwork + zgeqrf_lwork + + sgeqrfp + dgeqrfp + cgeqrfp + zgeqrfp + + sgeqrfp_lwork + dgeqrfp_lwork + cgeqrfp_lwork + zgeqrfp_lwork + + sgerqf + dgerqf + cgerqf + zgerqf + + sgesdd + dgesdd + cgesdd + zgesdd + + sgesdd_lwork + dgesdd_lwork + cgesdd_lwork + zgesdd_lwork + + sgesv + dgesv + cgesv + zgesv + + sgesvd + dgesvd + cgesvd + zgesvd + + sgesvd_lwork + dgesvd_lwork + cgesvd_lwork + zgesvd_lwork + + sgesvx + dgesvx + cgesvx + zgesvx + + sgetrf + dgetrf + cgetrf + zgetrf + + sgetc2 + dgetc2 + cgetc2 + zgetc2 + + sgetri + dgetri + cgetri + zgetri + + sgetri_lwork + dgetri_lwork + cgetri_lwork + zgetri_lwork + + sgetrs + dgetrs + cgetrs + zgetrs + + sgesc2 + dgesc2 + cgesc2 + zgesc2 + + sgges + dgges + cgges + zgges + + sggev + dggev + cggev + zggev + + sgglse + dgglse + cgglse + zgglse + + sgglse_lwork + dgglse_lwork + cgglse_lwork + zgglse_lwork + + sgtsv + dgtsv + cgtsv + zgtsv + + sgtsvx + dgtsvx + cgtsvx + zgtsvx + + chbevd + zhbevd + + chbevx + zhbevx + + checon + zhecon + + cheequb + zheequb + + cheev + zheev + + cheev_lwork + zheev_lwork + + cheevd + zheevd + + cheevd_lwork + zheevd_lwork + + cheevr + zheevr + + cheevr_lwork + zheevr_lwork + + cheevx + zheevx + + cheevx_lwork + zheevx_lwork + + chegst + zhegst + + chegv + zhegv + + chegv_lwork + zhegv_lwork + + chegvd + zhegvd + + chegvx + zhegvx + + chegvx_lwork + zhegvx_lwork + + chesv + zhesv + + chesv_lwork + zhesv_lwork + + chesvx + zhesvx + + chesvx_lwork + zhesvx_lwork + + chetrd + zhetrd + + chetrd_lwork + zhetrd_lwork + + chetrf + zhetrf + + chetrf_lwork + zhetrf_lwork + + chfrk + zhfrk + + slamch + dlamch + + slange + dlange + clange + zlange + + slarf + dlarf + clarf + zlarf + + slarfg + dlarfg + clarfg + zlarfg + + slartg + dlartg + clartg + zlartg + + slasd4 + dlasd4 + + slaswp + dlaswp + claswp + zlaswp + + slauum + dlauum + clauum + zlauum + + sorcsd + dorcsd + sorcsd_lwork + dorcsd_lwork + + sorghr + dorghr + sorghr_lwork + dorghr_lwork + + sorgqr + dorgqr + + sorgrq + dorgrq + + sormqr + dormqr + + sormrz + dormrz + + sormrz_lwork + dormrz_lwork + + spbsv + dpbsv + cpbsv + zpbsv + + spbtrf + dpbtrf + cpbtrf + zpbtrf + + spbtrs + dpbtrs + cpbtrs + zpbtrs + + spftrf + dpftrf + cpftrf + zpftrf + + spftri + dpftri + cpftri + zpftri + + spftrs + dpftrs + cpftrs + zpftrs + + spocon + dpocon + cpocon + zpocon + + spstrf + dpstrf + cpstrf + zpstrf + + spstf2 + dpstf2 + cpstf2 + zpstf2 + + sposv + dposv + cposv + zposv + + sposvx + dposvx + cposvx + zposvx + + spotrf + dpotrf + cpotrf + zpotrf + + spotri + dpotri + cpotri + zpotri + + spotrs + dpotrs + cpotrs + zpotrs + + sppcon + dppcon + cppcon + zppcon + + sppsv + dppsv + cppsv + zppsv + + spptrf + dpptrf + cpptrf + zpptrf + + spptri + dpptri + cpptri + zpptri + + spptrs + dpptrs + cpptrs + zpptrs + + sptsv + dptsv + cptsv + zptsv + + sptsvx + dptsvx + cptsvx + zptsvx + + spttrf + dpttrf + cpttrf + zpttrf + + spttrs + dpttrs + cpttrs + zpttrs + + spteqr + dpteqr + cpteqr + zpteqr + + crot + zrot + + ssbev + dsbev + + ssbevd + dsbevd + + ssbevx + dsbevx + + ssfrk + dsfrk + + sstebz + dstebz + + sstein + dstein + + sstemr + dstemr + + sstemr_lwork + dstemr_lwork + + ssterf + dsterf + + sstev + dstev + + ssycon + dsycon + csycon + zsycon + + ssyconv + dsyconv + csyconv + zsyconv + + ssyequb + dsyequb + csyequb + zsyequb + + ssyev + dsyev + + ssyev_lwork + dsyev_lwork + + ssyevd + dsyevd + + ssyevd_lwork + dsyevd_lwork + + ssyevr + dsyevr + + ssyevr_lwork + dsyevr_lwork + + ssyevx + dsyevx + + ssyevx_lwork + dsyevx_lwork + + ssygst + dsygst + + ssygv + dsygv + + ssygv_lwork + dsygv_lwork + + ssygvd + dsygvd + + ssygvx + dsygvx + + ssygvx_lwork + dsygvx_lwork + + ssysv + dsysv + csysv + zsysv + + ssysv_lwork + dsysv_lwork + csysv_lwork + zsysv_lwork + + ssysvx + dsysvx + csysvx + zsysvx + + ssysvx_lwork + dsysvx_lwork + csysvx_lwork + zsysvx_lwork + + ssytf2 + dsytf2 + csytf2 + zsytf2 + + ssytrd + dsytrd + + ssytrd_lwork + dsytrd_lwork + + ssytrf + dsytrf + csytrf + zsytrf + + ssytrf_lwork + dsytrf_lwork + csytrf_lwork + zsytrf_lwork + + stbtrs + dtbtrs + ctbtrs + ztbtrs + + stfsm + dtfsm + ctfsm + ztfsm + + stfttp + dtfttp + ctfttp + ztfttp + + stfttr + dtfttr + ctfttr + ztfttr + + stgexc + dtgexc + ctgexc + ztgexc + + stgsen + dtgsen + ctgsen + ztgsen + + stgsen_lwork + dtgsen_lwork + ctgsen_lwork + ztgsen_lwork + + stgsyl + dtgsyl + + stpttf + dtpttf + ctpttf + ztpttf + + stpttr + dtpttr + ctpttr + ztpttr + + strexc + dtrexc + ctrexc + ztrexc + + strsen + dtrsen + ctrsen + ztrsen + + strsen_lwork + dtrsen_lwork + ctrsen_lwork + ztrsen_lwork + + strsyl + dtrsyl + ctrsyl + ztrsyl + + strtri + dtrtri + ctrtri + ztrtri + + strtrs + dtrtrs + ctrtrs + ztrtrs + + strttf + dtrttf + ctrttf + ztrttf + + strttp + dtrttp + ctrttp + ztrttp + + stzrzf + dtzrzf + ctzrzf + ztzrzf + + stzrzf_lwork + dtzrzf_lwork + ctzrzf_lwork + ztzrzf_lwork + + cunghr + zunghr + + cunghr_lwork + zunghr_lwork + + cungqr + zungqr + + cungrq + zungrq + + cunmqr + zunmqr + + sgeqrt + dgeqrt + cgeqrt + zgeqrt + + sgemqrt + dgemqrt + cgemqrt + zgemqrt + + sgttrf + dgttrf + cgttrf + zgttrf + + sgttrs + dgttrs + cgttrs + zgttrs + + stpqrt + dtpqrt + ctpqrt + ztpqrt + + stpmqrt + dtpmqrt + ctpmqrt + ztpmqrt + + cuncsd + zuncsd + + cuncsd_lwork + zuncsd_lwork + + cunmrz + zunmrz + + cunmrz_lwork + zunmrz_lwork + + ilaver + +""" +# +# Author: Pearu Peterson, March 2002 +# + +import numpy as _np +from .blas import _get_funcs, _memoize_get_funcs +from scipy.linalg import _flapack +from re import compile as regex_compile +try: + from scipy.linalg import _clapack +except ImportError: + _clapack = None + +try: + from scipy.linalg import _flapack_64 + HAS_ILP64 = True +except ImportError: + HAS_ILP64 = False + _flapack_64 = None + + +# Expose all functions (only flapack --- clapack is an implementation detail) +empty_module = None +from scipy.linalg._flapack import * # noqa: E402, F403 +del empty_module + +__all__ = ['get_lapack_funcs'] + +# some convenience alias for complex functions +_lapack_alias = { + 'corghr': 'cunghr', 'zorghr': 'zunghr', + 'corghr_lwork': 'cunghr_lwork', 'zorghr_lwork': 'zunghr_lwork', + 'corgqr': 'cungqr', 'zorgqr': 'zungqr', + 'cormqr': 'cunmqr', 'zormqr': 'zunmqr', + 'corgrq': 'cungrq', 'zorgrq': 'zungrq', +} + + +# Place guards against docstring rendering issues with special characters +p1 = regex_compile(r'with bounds (?P.*?)( and (?P.*?) storage){0,1}\n') +p2 = regex_compile(r'Default: (?P.*?)\n') + + +def backtickrepl(m): + if m.group('s'): + return ('with bounds ``{}`` with ``{}`` storage\n' + ''.format(m.group('b'), m.group('s'))) + else: + return 'with bounds ``{}``\n'.format(m.group('b')) + + +for routine in [ssyevr, dsyevr, cheevr, zheevr, + ssyevx, dsyevx, cheevx, zheevx, + ssygvd, dsygvd, chegvd, zhegvd]: + if routine.__doc__: + routine.__doc__ = p1.sub(backtickrepl, routine.__doc__) + routine.__doc__ = p2.sub('Default ``\\1``\n', routine.__doc__) + else: + continue + +del regex_compile, p1, p2, backtickrepl + + +@_memoize_get_funcs +def get_lapack_funcs(names, arrays=(), dtype=None, ilp64=False): + """Return available LAPACK function objects from names. + + Arrays are used to determine the optimal prefix of LAPACK routines. + + Parameters + ---------- + names : str or sequence of str + Name(s) of LAPACK functions without type prefix. + + arrays : sequence of ndarrays, optional + Arrays can be given to determine optimal prefix of LAPACK + routines. If not given, double-precision routines will be + used, otherwise the most generic type in arrays will be used. + + dtype : str or dtype, optional + Data-type specifier. Not used if `arrays` is non-empty. + + ilp64 : {True, False, 'preferred'}, optional + Whether to return ILP64 routine variant. + Choosing 'preferred' returns ILP64 routine if available, and + otherwise the 32-bit routine. Default: False + + Returns + ------- + funcs : list + List containing the found function(s). + + Notes + ----- + This routine automatically chooses between Fortran/C + interfaces. Fortran code is used whenever possible for arrays with + column major order. In all other cases, C code is preferred. + + In LAPACK, the naming convention is that all functions start with a + type prefix, which depends on the type of the principal + matrix. These can be one of {'s', 'd', 'c', 'z'} for the NumPy + types {float32, float64, complex64, complex128} respectively, and + are stored in attribute ``typecode`` of the returned functions. + + Examples + -------- + Suppose we would like to use '?lange' routine which computes the selected + norm of an array. We pass our array in order to get the correct 'lange' + flavor. + + >>> import numpy as np + >>> import scipy.linalg as LA + >>> rng = np.random.default_rng() + + >>> a = rng.random((3,2)) + >>> x_lange = LA.get_lapack_funcs('lange', (a,)) + >>> x_lange.typecode + 'd' + >>> x_lange = LA.get_lapack_funcs('lange',(a*1j,)) + >>> x_lange.typecode + 'z' + + Several LAPACK routines work best when its internal WORK array has + the optimal size (big enough for fast computation and small enough to + avoid waste of memory). This size is determined also by a dedicated query + to the function which is often wrapped as a standalone function and + commonly denoted as ``###_lwork``. Below is an example for ``?sysv`` + + >>> a = rng.random((1000, 1000)) + >>> b = rng.random((1000, 1)) * 1j + >>> # We pick up zsysv and zsysv_lwork due to b array + ... xsysv, xlwork = LA.get_lapack_funcs(('sysv', 'sysv_lwork'), (a, b)) + >>> opt_lwork, _ = xlwork(a.shape[0]) # returns a complex for 'z' prefix + >>> udut, ipiv, x, info = xsysv(a, b, lwork=int(opt_lwork.real)) + + """ + if isinstance(ilp64, str): + if ilp64 == 'preferred': + ilp64 = HAS_ILP64 + else: + raise ValueError("Invalid value for 'ilp64'") + + if not ilp64: + return _get_funcs(names, arrays, dtype, + "LAPACK", _flapack, _clapack, + "flapack", "clapack", _lapack_alias, + ilp64=False) + else: + if not HAS_ILP64: + raise RuntimeError("LAPACK ILP64 routine requested, but Scipy " + "compiled only with 32-bit BLAS") + return _get_funcs(names, arrays, dtype, + "LAPACK", _flapack_64, None, + "flapack_64", None, _lapack_alias, + ilp64=True) + + +_int32_max = _np.iinfo(_np.int32).max +_int64_max = _np.iinfo(_np.int64).max + + +def _compute_lwork(routine, *args, **kwargs): + """ + Round floating-point lwork returned by lapack to integer. + + Several LAPACK routines compute optimal values for LWORK, which + they return in a floating-point variable. However, for large + values of LWORK, single-precision floating point is not sufficient + to hold the exact value --- some LAPACK versions (<= 3.5.0 at + least) truncate the returned integer to single precision and in + some cases this can be smaller than the required value. + + Examples + -------- + >>> from scipy.linalg import lapack + >>> n = 5000 + >>> s_r, s_lw = lapack.get_lapack_funcs(('sysvx', 'sysvx_lwork')) + >>> lwork = lapack._compute_lwork(s_lw, n) + >>> lwork + 32000 + + """ + dtype = getattr(routine, 'dtype', None) + int_dtype = getattr(routine, 'int_dtype', None) + ret = routine(*args, **kwargs) + if ret[-1] != 0: + raise ValueError("Internal work array size computation failed: " + "%d" % (ret[-1],)) + + if len(ret) == 2: + return _check_work_float(ret[0].real, dtype, int_dtype) + else: + return tuple(_check_work_float(x.real, dtype, int_dtype) + for x in ret[:-1]) + + +def _check_work_float(value, dtype, int_dtype): + """ + Convert LAPACK-returned work array size float to integer, + carefully for single-precision types. + """ + + if dtype == _np.float32 or dtype == _np.complex64: + # Single-precision routine -- take next fp value to work + # around possible truncation in LAPACK code + value = _np.nextafter(value, _np.inf, dtype=_np.float32) + + value = int(value) + if int_dtype.itemsize == 4: + if value < 0 or value > _int32_max: + raise ValueError("Too large work array required -- computation " + "cannot be performed with standard 32-bit" + " LAPACK.") + elif int_dtype.itemsize == 8: + if value < 0 or value > _int64_max: + raise ValueError("Too large work array required -- computation" + " cannot be performed with standard 64-bit" + " LAPACK.") + return value diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/matfuncs.py b/venv/lib/python3.10/site-packages/scipy/linalg/matfuncs.py new file mode 100644 index 0000000000000000000000000000000000000000..f845585070b461ffe2638f87ead493bdec42e571 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/matfuncs.py @@ -0,0 +1,25 @@ +# This file is not meant for public use and will be removed in SciPy v2.0.0. +# Use the `scipy.linalg` namespace for importing the functions +# included below. + +from scipy._lib.deprecation import _sub_module_deprecation + + +__all__ = [ # noqa: F822 + 'expm', 'cosm', 'sinm', 'tanm', 'coshm', 'sinhm', + 'tanhm', 'logm', 'funm', 'signm', 'sqrtm', + 'expm_frechet', 'expm_cond', 'fractional_matrix_power', + 'khatri_rao', 'prod', 'logical_not', 'ravel', 'transpose', + 'conjugate', 'absolute', 'amax', 'sign', 'isfinite', 'single', + 'norm', 'solve', 'inv', 'triu', 'svd', 'schur', 'rsf2csf', 'eps', 'feps' +] + + +def __dir__(): + return __all__ + + +def __getattr__(name): + return _sub_module_deprecation(sub_package="linalg", module="matfuncs", + private_modules=["_matfuncs"], all=__all__, + attribute=name) diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/misc.py b/venv/lib/python3.10/site-packages/scipy/linalg/misc.py new file mode 100644 index 0000000000000000000000000000000000000000..1fad087489c6a24c8e33df54b811b6c37a3a46d4 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/misc.py @@ -0,0 +1,21 @@ +# This file is not meant for public use and will be removed in SciPy v2.0.0. +# Use the `scipy.linalg` namespace for importing the functions +# included below. + +from scipy._lib.deprecation import _sub_module_deprecation + + +__all__ = [ # noqa: F822 + 'LinAlgError', 'LinAlgWarning', 'norm', 'get_blas_funcs', + 'get_lapack_funcs' +] + + +def __dir__(): + return __all__ + + +def __getattr__(name): + return _sub_module_deprecation(sub_package="linalg", module="misc", + private_modules=["_misc"], all=__all__, + attribute=name) diff --git a/venv/lib/python3.10/site-packages/scipy/linalg/special_matrices.py b/venv/lib/python3.10/site-packages/scipy/linalg/special_matrices.py new file mode 100644 index 0000000000000000000000000000000000000000..03091d12c70c4fce4a81786f9f223f9882286fd3 --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/linalg/special_matrices.py @@ -0,0 +1,22 @@ +# This file is not meant for public use and will be removed in SciPy v2.0.0. +# Use the `scipy.linalg` namespace for importing the functions +# included below. + +from scipy._lib.deprecation import _sub_module_deprecation + +__all__ = [ # noqa: F822 + 'toeplitz', 'circulant', 'hankel', + 'hadamard', 'leslie', 'kron', 'block_diag', 'companion', + 'helmert', 'hilbert', 'invhilbert', 'pascal', 'invpascal', 'dft', + 'fiedler', 'fiedler_companion', 'convolution_matrix', 'as_strided' +] + + +def __dir__(): + return __all__ + + +def __getattr__(name): + return _sub_module_deprecation(sub_package="linalg", module="special_matrices", + private_modules=["_special_matrices"], all=__all__, + attribute=name) diff --git a/venv/lib/python3.10/site-packages/scipy/optimize.pxd b/venv/lib/python3.10/site-packages/scipy/optimize.pxd new file mode 100644 index 0000000000000000000000000000000000000000..2402eeb020d34ad8b82e287e32545423911ff66c --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/optimize.pxd @@ -0,0 +1 @@ +from .optimize cimport cython_optimize diff --git a/venv/lib/python3.10/site-packages/scipy/version.py b/venv/lib/python3.10/site-packages/scipy/version.py new file mode 100644 index 0000000000000000000000000000000000000000..db73d1943ef5d7a2fcdd510aea849c3b4901984b --- /dev/null +++ b/venv/lib/python3.10/site-packages/scipy/version.py @@ -0,0 +1,12 @@ +# THIS FILE IS GENERATED DURING THE SCIPY BUILD +# See tools/version_utils.py for details + +short_version = '1.13.0' +version = '1.13.0' +full_version = '1.13.0' +git_revision = '7dcd8c5' +commit_count = '1580' +release = True + +if not release: + version = full_version