diff --git a/scipy/linalg/blas.py b/scipy/linalg/blas.py index 7b0a5908155d..6462db9e288d 100644 --- a/scipy/linalg/blas.py +++ b/scipy/linalg/blas.py @@ -6,6 +6,24 @@ .. 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. diff --git a/scipy/linalg/lapack.py b/scipy/linalg/lapack.py index a3561430d453..cdaffd065a16 100644 --- a/scipy/linalg/lapack.py +++ b/scipy/linalg/lapack.py @@ -10,6 +10,24 @@ .. 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.