bundles / scipy 1.17.1 / scipy / linalg / lapack / _compute_lwork
function
scipy.linalg.lapack:_compute_lwork
source: /scipy/linalg/lapack.py :1028
Signature
def _compute_lwork ( routine , * args , ** kwargs ) Summary
Round floating-point lwork returned by lapack to integer.
Extended Summary
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
✗Aliases
-
scipy.linalg._basic._compute_lwork