Low-level BLAS functions (scipy.linalg.blas)#
This module contains low-level functions from the BLAS library.
Added in version 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 misusing them,
so prefer using the higher-level routines in scipy.linalg.
Note
Prefer using get_blas_funcs to importing the bare functions directly.
If you do, for example, from scipy.linalg.blas import dgemm, the dgemm
function may be either LP64 or ILP64, depending on how SciPy is built.
The following is more robust:
>>> from scipy.linalg.blas import get_blas_funcs
>>> dgemm = get_blas_funcs('gemm', dtype='float64', ilp64='preferred')
>>> dgemm.int_dtype
dtype('int32') # may vary
Finding functions#
|
Return available BLAS function objects from names. |
|
Find best-matching BLAS/LAPACK type. |
BLAS Level 1 functions#
|
Compute the sum of absolute values |
|
Compute |
|
Compute |
|
Compute the Euclidean norm |
|
Copy x into y (BLAS |
|
Compute the dot product |
|
Compute the Euclidean norm |
|
Apply a Givens plane rotation to x and y: |
|
Construct a Givens plane rotation |
|
Apply a modified Givens rotation to x and y (BLAS |
|
Construct a modified Givens rotation (BLAS |
|
Scale x in place by a: |
|
Swap the contents of x and y in place (BLAS |
|
Compute the sum of absolute values |
|
Compute |
|
Copy x into y (BLAS |
|
Compute the dot product |
|
Compute the Euclidean norm |
|
Apply a Givens plane rotation to x and y: |
|
Construct a Givens plane rotation |
|
Apply a modified Givens rotation to x and y (BLAS |
|
Construct a modified Givens rotation (BLAS |
|
Scale x in place by a: |
|
Swap the contents of x and y in place (BLAS |
|
Compute |
|
Compute the Euclidean norm |
|
Return the index of the element of x with the largest absolute value (BLAS |
|
Return the index of the element of x with the largest absolute value (BLAS |
|
Return the index of the element of x with the largest absolute value (BLAS |
|
Return the index of the element of x with the largest absolute value (BLAS |
|
Compute |
|
Copy x into y (BLAS |
|
Compute the dot product with x conjugated: |
|
Compute the unconjugated dot product |
|
Construct a Givens plane rotation |
|
Scale x in place by a: |
|
Apply a Givens plane rotation to x and y: |
|
Scale complex x by the real scalar a: |
|
Swap the contents of x and y in place (BLAS |
|
Compute |
|
Copy x into y (BLAS |
|
Compute the dot product with x conjugated: |
|
Compute the unconjugated dot product |
|
Apply a Givens plane rotation to x and y: |
|
Scale complex x by the real scalar a: |
|
Construct a Givens plane rotation |
|
Scale x in place by a: |
|
Swap the contents of x and y in place (BLAS |
BLAS Level 2 functions#
|
Compute |
|
Compute the matrix-vector product |
|
General rank-1 update |
|
Compute |
|
Compute |
|
Packed symmetric rank-1 update |
|
Packed symmetric rank-2 update |
|
Compute |
|
Symmetric rank-1 update |
|
Symmetric rank-2 update |
|
Compute the triangular matrix-vector product |
|
Solve the triangular system |
|
Compute the triangular matrix-vector product |
|
Solve the triangular system |
|
Compute the triangular matrix-vector product |
|
Solve the triangular system |
|
Compute |
|
Compute the matrix-vector product |
|
General rank-1 update |
|
Compute |
|
Compute |
|
Packed symmetric rank-1 update |
|
Packed symmetric rank-2 update |
|
Compute |
|
Symmetric rank-1 update |
|
Symmetric rank-2 update |
|
Compute the triangular matrix-vector product |
|
Solve the triangular system |
|
Compute the triangular matrix-vector product |
|
Solve the triangular system |
|
Compute the triangular matrix-vector product |
|
Solve the triangular system |
|
Compute |
|
Compute the matrix-vector product |
|
General rank-1 update |
|
General rank-1 update |
|
Compute |
|
Compute |
|
Hermitian rank-1 update |
|
Hermitian rank-2 update |
|
Compute |
|
Packed Hermitian rank-1 update |
|
Packed Hermitian rank-2 update |
|
Compute |
|
Packed symmetric rank-1 update |
|
Compute |
|
Symmetric rank-1 update |
|
Compute the triangular matrix-vector product |
|
Solve the triangular system |
|
Compute the triangular matrix-vector product |
|
Solve the triangular system |
|
Compute the triangular matrix-vector product |
|
Solve the triangular system |
|
Compute |
|
Compute the matrix-vector product |
|
General rank-1 update |
|
General rank-1 update |
|
Compute |
|
Compute |
|
Hermitian rank-1 update |
|
Hermitian rank-2 update |
|
Compute |
|
Packed Hermitian rank-1 update |
|
Packed Hermitian rank-2 update |
|
Compute |
|
Packed symmetric rank-1 update |
|
Compute |
|
Symmetric rank-1 update |
|
Compute the triangular matrix-vector product |
|
Solve the triangular system |
|
Compute the triangular matrix-vector product |
|
Solve the triangular system |
|
Compute the triangular matrix-vector product |
|
Solve the triangular system |
BLAS Level 3 functions#
|
Compute the matrix-matrix product |
|
Compute |
|
Symmetric rank-2k update |
|
Symmetric rank-k update |
|
Compute the triangular matrix-matrix product |
|
Solve the triangular system |
|
Compute the matrix-matrix product |
|
Compute |
|
Symmetric rank-2k update |
|
Symmetric rank-k update |
|
Compute the triangular matrix-matrix product |
|
Solve the triangular system |
|
Compute the matrix-matrix product |
|
Compute |
|
Hermitian rank-2k update |
|
Hermitian rank-k update |
|
Compute |
|
Symmetric rank-2k update |
|
Symmetric rank-k update |
|
Compute the triangular matrix-matrix product |
|
Solve the triangular system |
|
Compute the matrix-matrix product |
|
Compute |
|
Hermitian rank-2k update |
|
Hermitian rank-k update |
|
Compute |
|
Symmetric rank-2k update |
|
Symmetric rank-k update |
|
Compute the triangular matrix-matrix product |
|
Solve the triangular system |