Skip to content

Instantly share code, notes, and snippets.

@risicle
Created March 11, 2022 22:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save risicle/d7450ec92bd89bff138ead438c28ce1c to your computer and use it in GitHub Desktop.
Save risicle/d7450ec92bd89bff138ead438c28ce1c to your computer and use it in GitHub Desktop.
scipy flapack intermediate files generated with numpy 26e656e7989e776a9292b9eba88cef7ec9fec5cb (good)
This file has been truncated, but you can view the full file.
/* File: _flapackmodule.c
* This file is auto-generated with f2py (version:1.21.99).
* f2py is a Fortran to Python Interface Generator (FPIG), Second Edition,
* written by Pearu Peterson <pearu@cens.ioc.ee>.
* Generation date: Fri Feb 4 14:45:41 2022
* Do not edit this file directly unless you know what you are doing!!!
*/
#ifdef __cplusplus
extern "C" {
#endif
/*********************** See f2py2e/cfuncs.py: includes ***********************/
#include <Python.h>
#include <stdarg.h>
#include "fortranobject.h"
#include <string.h>
#include <setjmp.h>
#include <math.h>
/**************** See f2py2e/rules.py: mod_rules['modulebody'] ****************/
static PyObject *_flapack_error;
static PyObject *_flapack_module;
/*********************** See f2py2e/cfuncs.py: typedefs ***********************/
typedef char * string;
typedef struct {float r,i;} complex_float;
typedef struct {double r,i;} complex_double;
/****************** See f2py2e/cfuncs.py: typedefs_generated ******************/
typedef int(*cb_zselect_in_gges__user__routines_typedef)(complex_double *,complex_double *);
typedef int(*cb_cselect_in_gges__user__routines_typedef)(complex_float *,complex_float *);
typedef int(*cb_dselect_in_gges__user__routines_typedef)(double *,double *,double *);
typedef int(*cb_sselect_in_gges__user__routines_typedef)(float *,float *,float *);
typedef int(*cb_dselect_in_gees__user__routines_typedef)(double *,double *);
typedef int(*cb_sselect_in_gees__user__routines_typedef)(float *,float *);
typedef int(*cb_zselect_in_gees__user__routines_typedef)(complex_double *);
typedef int(*cb_cselect_in_gees__user__routines_typedef)(complex_float *);
/********************** See f2py2e/cfuncs.py: cppmacros **********************/
#define PRINTPYOBJERR(obj)\
fprintf(stderr,"_flapack.error is related to ");\
PyObject_Print((PyObject *)obj,stderr,Py_PRINT_RAW);\
fprintf(stderr,"\n");
\
#define FAILNULL(p) do { \
if ((p) == NULL) { \
PyErr_SetString(PyExc_MemoryError, "NULL pointer found"); \
goto capi_fail; \
} \
} while (0)
#define STRINGMALLOC(str,len)\
if ((str = (string)malloc(len+1)) == NULL) {\
PyErr_SetString(PyExc_MemoryError, "out of memory");\
goto capi_fail;\
} else {\
(str)[len] = '\0';\
}
#define GETSCALARFROMPYTUPLE(tuple,index,var,ctype,mess) {\
if ((capi_tmp = PyTuple_GetItem((tuple),(index)))==NULL) goto capi_fail;\
if (!(ctype ## _from_pyobj((var),capi_tmp,mess)))\
goto capi_fail;\
}
#define pyobj_from_float1(v) (PyFloat_FromDouble(v))
#ifdef DEBUGCFUNCS
#define CFUNCSMESS(mess) fprintf(stderr,"debug-capi:"mess);
#define CFUNCSMESSPY(mess,obj) CFUNCSMESS(mess) \
PyObject_Print((PyObject *)obj,stderr,Py_PRINT_RAW);\
fprintf(stderr,"\n");
#else
#define CFUNCSMESS(mess)
#define CFUNCSMESSPY(mess,obj)
#endif
#ifndef F2PY_THREAD_LOCAL_DECL
#if defined(_MSC_VER) \
|| defined(_WIN32) || defined(_WIN64) \
|| defined(__MINGW32__) || defined(__MINGW64__)
#define F2PY_THREAD_LOCAL_DECL __declspec(thread)
#elif defined(__STDC_VERSION__) \
&& (__STDC_VERSION__ >= 201112L) \
&& !defined(__STDC_NO_THREADS__) \
&& (!defined(__GLIBC__) || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 12))
/* __STDC_NO_THREADS__ was first defined in a maintenance release of glibc 2.12,
see https://lists.gnu.org/archive/html/commit-hurd/2012-07/msg00180.html,
so `!defined(__STDC_NO_THREADS__)` may give false positive for the existence
of `threads.h` when using an older release of glibc 2.12 */
#include <threads.h>
#define F2PY_THREAD_LOCAL_DECL thread_local
#elif defined(__GNUC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 4)))
#define F2PY_THREAD_LOCAL_DECL __thread
#endif
#endif
#define pyobj_from_double1(v) (PyFloat_FromDouble(v))
#define pyobj_from_complex_float1(v) (PyComplex_FromDoubles(v.r,v.i))
#define pyobj_from_complex_double1(v) (PyComplex_FromDoubles(v.r,v.i))
#if defined(PREPEND_FORTRAN)
#if defined(NO_APPEND_FORTRAN)
#if defined(UPPERCASE_FORTRAN)
#define F_FUNC(f,F) _##F
#else
#define F_FUNC(f,F) _##f
#endif
#else
#if defined(UPPERCASE_FORTRAN)
#define F_FUNC(f,F) _##F##_
#else
#define F_FUNC(f,F) _##f##_
#endif
#endif
#else
#if defined(NO_APPEND_FORTRAN)
#if defined(UPPERCASE_FORTRAN)
#define F_FUNC(f,F) F
#else
#define F_FUNC(f,F) f
#endif
#else
#if defined(UPPERCASE_FORTRAN)
#define F_FUNC(f,F) F##_
#else
#define F_FUNC(f,F) f##_
#endif
#endif
#endif
#if defined(UNDERSCORE_G77)
#define F_FUNC_US(f,F) F_FUNC(f##_,F##_)
#else
#define F_FUNC_US(f,F) F_FUNC(f,F)
#endif
#define rank(var) var ## _Rank
#define shape(var,dim) var ## _Dims[dim]
#define old_rank(var) (PyArray_NDIM((PyArrayObject *)(capi_ ## var ## _tmp)))
#define old_shape(var,dim) PyArray_DIM(((PyArrayObject *)(capi_ ## var ## _tmp)),dim)
#define fshape(var,dim) shape(var,rank(var)-dim-1)
#define len(var) shape(var,0)
#define flen(var) fshape(var,0)
#define old_size(var) PyArray_SIZE((PyArrayObject *)(capi_ ## var ## _tmp))
/* #define index(i) capi_i ## i */
#define slen(var) capi_ ## var ## _len
#define size(var, ...) f2py_size((PyArrayObject *)(capi_ ## var ## _tmp), ## __VA_ARGS__, -1)
#define CHECKSCALAR(check,tcheck,name,show,var)\
if (!(check)) {\
char errstring[256];\
sprintf(errstring, "%s: "show, "("tcheck") failed for "name, var);\
PyErr_SetString(_flapack_error,errstring);\
/*goto capi_fail;*/\
} else
#ifndef max
#define max(a,b) ((a > b) ? (a) : (b))
#endif
#ifndef min
#define min(a,b) ((a < b) ? (a) : (b))
#endif
#ifndef MAX
#define MAX(a,b) ((a > b) ? (a) : (b))
#endif
#ifndef MIN
#define MIN(a,b) ((a < b) ? (a) : (b))
#endif
#define CHECKARRAY(check,tcheck,name) \
if (!(check)) {\
PyErr_SetString(_flapack_error,"("tcheck") failed for "name);\
/*goto capi_fail;*/\
} else
/*
STRINGPADN replaces null values with padding values from the right.
`to` must have size of at least N bytes.
If the `to[N-1]` has null value, then replace it and all the
preceding, nulls with the given padding.
STRINGPADN(to, N, PADDING, NULLVALUE) is an inverse operation.
*/
#define STRINGPADN(to, N, NULLVALUE, PADDING) \
do { \
int _m = (N); \
char *_to = (to); \
for (_m -= 1; _m >= 0 && _to[_m] == NULLVALUE; _m--) { \
_to[_m] = PADDING; \
} \
} while (0)
#define STRINGFREE(str) do {if (!(str == NULL)) free(str);} while (0)
#define CHECKSTRING(check,tcheck,name,show,var)\
if (!(check)) {\
char errstring[256];\
sprintf(errstring, "%s: "show, "("tcheck") failed for "name, slen(var), var);\
PyErr_SetString(_flapack_error, errstring);\
/*goto capi_fail;*/\
} else
#define SWAP(a,b,t) {\
t *c;\
c = a;\
a = b;\
b = c;}
#if defined(PREPEND_FORTRAN)
#if defined(NO_APPEND_FORTRAN)
#if defined(UPPERCASE_FORTRAN)
#define F_WRAPPEDFUNC(f,F) _F2PYWRAP##F
#else
#define F_WRAPPEDFUNC(f,F) _f2pywrap##f
#endif
#else
#if defined(UPPERCASE_FORTRAN)
#define F_WRAPPEDFUNC(f,F) _F2PYWRAP##F##_
#else
#define F_WRAPPEDFUNC(f,F) _f2pywrap##f##_
#endif
#endif
#else
#if defined(NO_APPEND_FORTRAN)
#if defined(UPPERCASE_FORTRAN)
#define F_WRAPPEDFUNC(f,F) F2PYWRAP##F
#else
#define F_WRAPPEDFUNC(f,F) f2pywrap##f
#endif
#else
#if defined(UPPERCASE_FORTRAN)
#define F_WRAPPEDFUNC(f,F) F2PYWRAP##F##_
#else
#define F_WRAPPEDFUNC(f,F) f2pywrap##f##_
#endif
#endif
#endif
#if defined(UNDERSCORE_G77)
#define F_WRAPPEDFUNC_US(f,F) F_WRAPPEDFUNC(f##_,F##_)
#else
#define F_WRAPPEDFUNC_US(f,F) F_WRAPPEDFUNC(f,F)
#endif
/*
STRINGCOPYN copies N bytes.
`to` and `from` buffers must have sizes of at least N bytes.
*/
#define STRINGCOPYN(to,from,N) \
do { \
int _m = (N); \
char *_to = (to); \
char *_from = (from); \
FAILNULL(_to); FAILNULL(_from); \
(void)strncpy(_to, _from, _m); \
} while (0)
/************************ See f2py2e/cfuncs.py: cfuncs ************************/
static int
complex_double_from_pyobj(complex_double* v, PyObject *obj, const char *errmess) {
Py_complex c;
if (PyComplex_Check(obj)) {
c = PyComplex_AsCComplex(obj);
(*v).r = c.real;
(*v).i = c.imag;
return 1;
}
if (PyArray_IsScalar(obj, ComplexFloating)) {
if (PyArray_IsScalar(obj, CFloat)) {
npy_cfloat new;
PyArray_ScalarAsCtype(obj, &new);
(*v).r = (double)new.real;
(*v).i = (double)new.imag;
}
else if (PyArray_IsScalar(obj, CLongDouble)) {
npy_clongdouble new;
PyArray_ScalarAsCtype(obj, &new);
(*v).r = (double)new.real;
(*v).i = (double)new.imag;
}
else { /* if (PyArray_IsScalar(obj, CDouble)) */
PyArray_ScalarAsCtype(obj, v);
}
return 1;
}
if (PyArray_CheckScalar(obj)) { /* 0-dim array or still array scalar */
PyObject *arr;
if (PyArray_Check(obj)) {
arr = PyArray_Cast((PyArrayObject *)obj, NPY_CDOUBLE);
}
else {
arr = PyArray_FromScalar(obj, PyArray_DescrFromType(NPY_CDOUBLE));
}
if (arr == NULL) {
return 0;
}
(*v).r = ((npy_cdouble *)PyArray_DATA(arr))->real;
(*v).i = ((npy_cdouble *)PyArray_DATA(arr))->imag;
Py_DECREF(arr);
return 1;
}
/* Python does not provide PyNumber_Complex function :-( */
(*v).i = 0.0;
if (PyFloat_Check(obj)) {
(*v).r = PyFloat_AsDouble(obj);
return !((*v).r == -1.0 && PyErr_Occurred());
}
if (PyLong_Check(obj)) {
(*v).r = PyLong_AsDouble(obj);
return !((*v).r == -1.0 && PyErr_Occurred());
}
if (PySequence_Check(obj) && !(PyBytes_Check(obj) || PyUnicode_Check(obj))) {
PyObject *tmp = PySequence_GetItem(obj,0);
if (tmp) {
if (complex_double_from_pyobj(v,tmp,errmess)) {
Py_DECREF(tmp);
return 1;
}
Py_DECREF(tmp);
}
}
{
PyObject* err = PyErr_Occurred();
if (err==NULL)
err = PyExc_TypeError;
PyErr_SetString(err,errmess);
}
return 0;
}
static int
double_from_pyobj(double* v, PyObject *obj, const char *errmess)
{
PyObject* tmp = NULL;
if (PyFloat_Check(obj)) {
*v = PyFloat_AsDouble(obj);
return !(*v == -1.0 && PyErr_Occurred());
}
tmp = PyNumber_Float(obj);
if (tmp) {
*v = PyFloat_AsDouble(tmp);
Py_DECREF(tmp);
return !(*v == -1.0 && PyErr_Occurred());
}
if (PyComplex_Check(obj))
tmp = PyObject_GetAttrString(obj,"real");
else if (PyBytes_Check(obj) || PyUnicode_Check(obj))
/*pass*/;
else if (PySequence_Check(obj))
tmp = PySequence_GetItem(obj,0);
if (tmp) {
PyErr_Clear();
if (double_from_pyobj(v,tmp,errmess)) {Py_DECREF(tmp); return 1;}
Py_DECREF(tmp);
}
{
PyObject* err = PyErr_Occurred();
if (err==NULL) err = _flapack_error;
PyErr_SetString(err,errmess);
}
return 0;
}
static int f2py_size(PyArrayObject* var, ...)
{
npy_int sz = 0;
npy_int dim;
npy_int rank;
va_list argp;
va_start(argp, var);
dim = va_arg(argp, npy_int);
if (dim==-1)
{
sz = PyArray_SIZE(var);
}
else
{
rank = PyArray_NDIM(var);
if (dim>=1 && dim<=rank)
sz = PyArray_DIM(var, dim-1);
else
fprintf(stderr, "f2py_size: 2nd argument value=%d fails to satisfy 1<=value<=%d. Result will be 0.\n", dim, rank);
}
va_end(argp);
return sz;
}
static int
int_from_pyobj(int* v, PyObject *obj, const char *errmess)
{
PyObject* tmp = NULL;
if (PyLong_Check(obj)) {
*v = Npy__PyLong_AsInt(obj);
return !(*v == -1 && PyErr_Occurred());
}
tmp = PyNumber_Long(obj);
if (tmp) {
*v = Npy__PyLong_AsInt(tmp);
Py_DECREF(tmp);
return !(*v == -1 && PyErr_Occurred());
}
if (PyComplex_Check(obj))
tmp = PyObject_GetAttrString(obj,"real");
else if (PyBytes_Check(obj) || PyUnicode_Check(obj))
/*pass*/;
else if (PySequence_Check(obj))
tmp = PySequence_GetItem(obj, 0);
if (tmp) {
PyErr_Clear();
if (int_from_pyobj(v, tmp, errmess)) {
Py_DECREF(tmp);
return 1;
}
Py_DECREF(tmp);
}
{
PyObject* err = PyErr_Occurred();
if (err == NULL) {
err = _flapack_error;
}
PyErr_SetString(err, errmess);
}
return 0;
}
/*
Create a new string buffer `str` of at most length `len` from a
Python string-like object `obj`.
The string buffer has given size (len) or the size of inistr when len==-1.
The string buffer is padded with blanks: in Fortran, trailing blanks
are insignificant contrary to C nulls.
*/
static int
string_from_pyobj(string *str, int *len, const string inistr, PyObject *obj,
const char *errmess)
{
PyObject *tmp = NULL;
string buf = NULL;
npy_intp n = -1;
#ifdef DEBUGCFUNCS
fprintf(stderr,"string_from_pyobj(str='%s',len=%d,inistr='%s',obj=%p)\n",
(char*)str, *len, (char *)inistr, obj);
#endif
if (obj == Py_None) {
n = strlen(inistr);
buf = inistr;
}
else if (PyArray_Check(obj)) {
PyArrayObject *arr = (PyArrayObject *)obj;
if (!ISCONTIGUOUS(arr)) {
PyErr_SetString(PyExc_ValueError,
"array object is non-contiguous.");
goto capi_fail;
}
n = PyArray_NBYTES(arr);
buf = PyArray_DATA(arr);
n = strnlen(buf, n);
}
else {
if (PyBytes_Check(obj)) {
tmp = obj;
Py_INCREF(tmp);
}
else if (PyUnicode_Check(obj)) {
tmp = PyUnicode_AsASCIIString(obj);
}
else {
PyObject *tmp2;
tmp2 = PyObject_Str(obj);
if (tmp2) {
tmp = PyUnicode_AsASCIIString(tmp2);
Py_DECREF(tmp2);
}
else {
tmp = NULL;
}
}
if (tmp == NULL) goto capi_fail;
n = PyBytes_GET_SIZE(tmp);
buf = PyBytes_AS_STRING(tmp);
}
if (*len == -1) {
/* TODO: change the type of `len` so that we can remove this */
if (n > NPY_MAX_INT) {
PyErr_SetString(PyExc_OverflowError,
"object too large for a 32-bit int");
goto capi_fail;
}
*len = n;
}
else if (*len < n) {
/* discard the last (len-n) bytes of input buf */
n = *len;
}
if (n < 0 || *len < 0 || buf == NULL) {
goto capi_fail;
}
STRINGMALLOC(*str, *len); // *str is allocated with size (*len + 1)
if (n < *len) {
/*
Pad fixed-width string with nulls. The caller will replace
nulls with blanks when the corresponding argument is not
intent(c).
*/
memset(*str + n, '\0', *len - n);
}
STRINGCOPYN(*str, buf, n);
Py_XDECREF(tmp);
return 1;
capi_fail:
Py_XDECREF(tmp);
{
PyObject* err = PyErr_Occurred();
if (err == NULL) {
err = _flapack_error;
}
PyErr_SetString(err, errmess);
}
return 0;
}
static int
float_from_pyobj(float* v, PyObject *obj, const char *errmess)
{
double d=0.0;
if (double_from_pyobj(&d,obj,errmess)) {
*v = (float)d;
return 1;
}
return 0;
}
static int
create_cb_arglist(PyObject* fun, PyTupleObject* xa , const int maxnofargs,
const int nofoptargs, int *nofargs, PyTupleObject **args,
const char *errmess)
{
PyObject *tmp = NULL;
PyObject *tmp_fun = NULL;
Py_ssize_t tot, opt, ext, siz, i, di = 0;
CFUNCSMESS("create_cb_arglist\n");
tot=opt=ext=siz=0;
/* Get the total number of arguments */
if (PyFunction_Check(fun)) {
tmp_fun = fun;
Py_INCREF(tmp_fun);
}
else {
di = 1;
if (PyObject_HasAttrString(fun,"im_func")) {
tmp_fun = PyObject_GetAttrString(fun,"im_func");
}
else if (PyObject_HasAttrString(fun,"__call__")) {
tmp = PyObject_GetAttrString(fun,"__call__");
if (PyObject_HasAttrString(tmp,"im_func"))
tmp_fun = PyObject_GetAttrString(tmp,"im_func");
else {
tmp_fun = fun; /* built-in function */
Py_INCREF(tmp_fun);
tot = maxnofargs;
if (PyCFunction_Check(fun)) {
/* In case the function has a co_argcount (like on PyPy) */
di = 0;
}
if (xa != NULL)
tot += PyTuple_Size((PyObject *)xa);
}
Py_XDECREF(tmp);
}
else if (PyFortran_Check(fun) || PyFortran_Check1(fun)) {
tot = maxnofargs;
if (xa != NULL)
tot += PyTuple_Size((PyObject *)xa);
tmp_fun = fun;
Py_INCREF(tmp_fun);
}
else if (F2PyCapsule_Check(fun)) {
tot = maxnofargs;
if (xa != NULL)
ext = PyTuple_Size((PyObject *)xa);
if(ext>0) {
fprintf(stderr,"extra arguments tuple cannot be used with CObject call-back\n");
goto capi_fail;
}
tmp_fun = fun;
Py_INCREF(tmp_fun);
}
}
if (tmp_fun == NULL) {
fprintf(stderr,
"Call-back argument must be function|instance|instance.__call__|f2py-function "
"but got %s.\n",
((fun == NULL) ? "NULL" : Py_TYPE(fun)->tp_name));
goto capi_fail;
}
if (PyObject_HasAttrString(tmp_fun,"__code__")) {
if (PyObject_HasAttrString(tmp = PyObject_GetAttrString(tmp_fun,"__code__"),"co_argcount")) {
PyObject *tmp_argcount = PyObject_GetAttrString(tmp,"co_argcount");
Py_DECREF(tmp);
if (tmp_argcount == NULL) {
goto capi_fail;
}
tot = PyLong_AsSsize_t(tmp_argcount) - di;
Py_DECREF(tmp_argcount);
}
}
/* Get the number of optional arguments */
if (PyObject_HasAttrString(tmp_fun,"__defaults__")) {
if (PyTuple_Check(tmp = PyObject_GetAttrString(tmp_fun,"__defaults__")))
opt = PyTuple_Size(tmp);
Py_XDECREF(tmp);
}
/* Get the number of extra arguments */
if (xa != NULL)
ext = PyTuple_Size((PyObject *)xa);
/* Calculate the size of call-backs argument list */
siz = MIN(maxnofargs+ext,tot);
*nofargs = MAX(0,siz-ext);
#ifdef DEBUGCFUNCS
fprintf(stderr,
"debug-capi:create_cb_arglist:maxnofargs(-nofoptargs),"
"tot,opt,ext,siz,nofargs = %d(-%d), %zd, %zd, %zd, %zd, %d\n",
maxnofargs, nofoptargs, tot, opt, ext, siz, *nofargs);
#endif
if (siz < tot-opt) {
fprintf(stderr,
"create_cb_arglist: Failed to build argument list "
"(siz) with enough arguments (tot-opt) required by "
"user-supplied function (siz,tot,opt=%zd, %zd, %zd).\n",
siz, tot, opt);
goto capi_fail;
}
/* Initialize argument list */
*args = (PyTupleObject *)PyTuple_New(siz);
for (i=0;i<*nofargs;i++) {
Py_INCREF(Py_None);
PyTuple_SET_ITEM((PyObject *)(*args),i,Py_None);
}
if (xa != NULL)
for (i=(*nofargs);i<siz;i++) {
tmp = PyTuple_GetItem((PyObject *)xa,i-(*nofargs));
Py_INCREF(tmp);
PyTuple_SET_ITEM(*args,i,tmp);
}
CFUNCSMESS("create_cb_arglist-end\n");
Py_DECREF(tmp_fun);
return 1;
capi_fail:
if (PyErr_Occurred() == NULL)
PyErr_SetString(_flapack_error, errmess);
Py_XDECREF(tmp_fun);
return 0;
}
static int
complex_float_from_pyobj(complex_float* v,PyObject *obj,const char *errmess)
{
complex_double cd={0.0,0.0};
if (complex_double_from_pyobj(&cd,obj,errmess)) {
(*v).r = (float)cd.r;
(*v).i = (float)cd.i;
return 1;
}
return 0;
}
/********************* See f2py2e/cfuncs.py: userincludes *********************/
/*need_userincludes*/
/********************* See f2py2e/capi_rules.py: usercode *********************/
/* start usercode multiline (0) */
#define F_INT int
/* end multiline (0)*/
/* See f2py2e/rules.py */
extern void F_FUNC(sgebal,SGEBAL)(char*,F_INT*,float*,F_INT*,F_INT*,F_INT*,float*,F_INT* );
extern void F_FUNC(dgebal,DGEBAL)(char*,F_INT*,double*,F_INT*,F_INT*,F_INT*,double*,F_INT* );
extern void F_FUNC(cgebal,CGEBAL)(char*,F_INT*,complex_float*,F_INT*,F_INT*,F_INT*,float*,F_INT* );
extern void F_FUNC(zgebal,ZGEBAL)(char*,F_INT*,complex_double*,F_INT*,F_INT*,F_INT*,double*,F_INT* );
extern void F_FUNC(sgehrd,SGEHRD)(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgehrd,DGEHRD)(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgehrd,CGEHRD)(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zgehrd,ZGEHRD)(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sgehrd ,SGEHRD )(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgehrd ,DGEHRD )(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgehrd ,CGEHRD )(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zgehrd ,ZGEHRD )(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sgesv,SGESV)(F_INT*,F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgesv,DGESV)(F_INT*,F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgesv,CGESV)(F_INT*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zgesv,ZGESV)(F_INT*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sgesvx,SGESVX)(char*,char*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,char*,float*,float*,float*,F_INT*,float*,F_INT*,float*,float*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgesvx,DGESVX)(char*,char*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,char*,double*,double*,double*,F_INT*,double*,F_INT*,double*,double*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgesvx,CGESVX)(char*,char*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT*,char*,float*,float*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float*,float*,complex_float*,float*,F_INT* );
extern void F_FUNC(zgesvx,ZGESVX)(char*,char*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT*,char*,double*,double*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double*,double*,complex_double*,double*,F_INT* );
extern void F_FUNC(sgecon,SGECON)(char*,F_INT*,float*,F_INT*,float*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgecon,DGECON)(char*,F_INT*,double*,F_INT*,double*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgecon,CGECON)(char*,F_INT*,complex_float*,F_INT*,float*,float*,complex_float*,float*,F_INT* );
extern void F_FUNC(zgecon,ZGECON)(char*,F_INT*,complex_double*,F_INT*,double*,double*,complex_double*,double*,F_INT* );
extern void F_FUNC(sgetrf,SGETRF)(F_INT*,F_INT*,float*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dgetrf,DGETRF)(F_INT*,F_INT*,double*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(cgetrf,CGETRF)(F_INT*,F_INT*,complex_float*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(zgetrf,ZGETRF)(F_INT*,F_INT*,complex_double*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(sgetrs,SGETRS)(char*,F_INT*,F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgetrs,DGETRS)(char*,F_INT*,F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgetrs,CGETRS)(char*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zgetrs,ZGETRS)(char*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sgetc2,SGETC2)(F_INT*,float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dgetc2,DGETC2)(F_INT*,double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(cgetc2,CGETC2)(F_INT*,complex_float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(zgetc2,ZGETC2)(F_INT*,complex_double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(sgesc2,SGESC2)(F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,float* );
extern void F_FUNC(dgesc2,DGESC2)(F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,double* );
extern void F_FUNC(cgesc2,CGESC2)(F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT*,float* );
extern void F_FUNC(zgesc2,ZGESC2)(F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT*,double* );
extern void F_FUNC(sgetri,SGETRI)(F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgetri,DGETRI)(F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgetri,CGETRI)(F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zgetri,ZGETRI)(F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sgetri ,SGETRI )(F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgetri ,DGETRI )(F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgetri ,CGETRI )(F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zgetri ,ZGETRI )(F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sgesdd,SGESDD)(char*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dgesdd,DGESDD)(char*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(sgesdd ,SGESDD )(char*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dgesdd ,DGESDD )(char*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(cgesdd,CGESDD)(char*,F_INT*,F_INT*,complex_float*,F_INT*,float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(zgesdd,ZGESDD)(char*,F_INT*,F_INT*,complex_double*,F_INT*,double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgesdd ,CGESDD )(char*,F_INT*,F_INT*,complex_float*,F_INT*,float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(zgesdd ,ZGESDD )(char*,F_INT*,F_INT*,complex_double*,F_INT*,double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(sgesvd,SGESVD)(char*,char*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgesvd,DGESVD)(char*,char*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(sgesvd ,SGESVD )(char*,char*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgesvd ,DGESVD )(char*,char*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgesvd,CGESVD)(char*,char*,F_INT*,F_INT*,complex_float*,F_INT*,float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT* );
extern void F_FUNC(zgesvd,ZGESVD)(char*,char*,F_INT*,F_INT*,complex_double*,F_INT*,double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT* );
extern void F_FUNC(cgesvd ,CGESVD )(char*,char*,F_INT*,F_INT*,complex_float*,F_INT*,float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT* );
extern void F_FUNC(zgesvd ,ZGESVD )(char*,char*,F_INT*,F_INT*,complex_double*,F_INT*,double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT* );
extern void F_FUNC(sgels,SGELS)(char*,F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgels,DGELS)(char*,F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgels,CGELS)(char*,F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zgels,ZGELS)(char*,F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sgels ,SGELS )(char*,F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgels ,DGELS )(char*,F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgels ,CGELS )(char*,F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zgels ,ZGELS )(char*,F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sgelss,SGELSS)(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgelss,DGELSS)(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(sgelss ,SGELSS )(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgelss ,DGELSS )(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgelss,CGELSS)(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float*,F_INT*,complex_float*,F_INT*,float*,F_INT* );
extern void F_FUNC(zgelss,ZGELSS)(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double*,F_INT*,complex_double*,F_INT*,double*,F_INT* );
extern void F_FUNC(cgelss ,CGELSS )(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float*,F_INT*,complex_float*,F_INT*,float*,F_INT* );
extern void F_FUNC(zgelss ,ZGELSS )(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double*,F_INT*,complex_double*,F_INT*,double*,F_INT* );
extern void F_FUNC(sgelsy,SGELSY)(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgelsy,DGELSY)(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(sgelsy ,SGELSY )(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgelsy ,DGELSY )(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgelsy,CGELSY)(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT*,float*,F_INT*,complex_float*,F_INT*,float*,F_INT* );
extern void F_FUNC(zgelsy,ZGELSY)(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT*,double*,F_INT*,complex_double*,F_INT*,double*,F_INT* );
extern void F_FUNC(cgelsy ,CGELSY )(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT*,float*,F_INT*,complex_float*,F_INT*,float*,F_INT* );
extern void F_FUNC(zgelsy ,ZGELSY )(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT*,double*,F_INT*,complex_double*,F_INT*,double*,F_INT* );
extern void F_FUNC(sgelsd,SGELSD)(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dgelsd,DGELSD)(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(sgelsd ,SGELSD )(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dgelsd ,DGELSD )(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(cgelsd,CGELSD)(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float*,F_INT*, complex_float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(zgelsd,ZGELSD)(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double*,F_INT*, complex_double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgelsd ,CGELSD )(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float*,F_INT*, complex_float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(zgelsd ,ZGELSD )(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double*,F_INT*, complex_double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(sgeqp3,SGEQP3)(F_INT*,F_INT*,float*,F_INT*,F_INT*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgeqp3,DGEQP3)(F_INT*,F_INT*,double*,F_INT*,F_INT*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgeqp3,CGEQP3)(F_INT*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,complex_float*,F_INT*,float*,F_INT* );
extern void F_FUNC(zgeqp3,ZGEQP3)(F_INT*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,complex_double*,F_INT*,double*,F_INT* );
extern void F_FUNC(sgeqrf,SGEQRF)(F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgeqrf,DGEQRF)(F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgeqrf,CGEQRF)(F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zgeqrf,ZGEQRF)(F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sgeqrf ,SGEQRF )(F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgeqrf ,DGEQRF )(F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgeqrf ,CGEQRF )(F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zgeqrf ,ZGEQRF )(F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sgeqrfp,SGEQRFP)(F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgeqrfp,DGEQRFP)(F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgeqrfp,CGEQRFP)(F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zgeqrfp,ZGEQRFP)(F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sgeqrfp ,SGEQRFP )(F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgeqrfp ,DGEQRFP )(F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgeqrfp ,CGEQRFP )(F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zgeqrfp ,ZGEQRFP )(F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sgerqf,SGERQF)(F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgerqf,DGERQF)(F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgerqf,CGERQF)(F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zgerqf,ZGERQF)(F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sgeev,SGEEV)(char*,char*,F_INT*,float*,F_INT*,float*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgeev,DGEEV)(char*,char*,F_INT*,double*,F_INT*,double*,double*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(sgeev ,SGEEV )(char*,char*,F_INT*,float*,F_INT*,float*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgeev ,DGEEV )(char*,char*,F_INT*,double*,F_INT*,double*,double*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgeev,CGEEV)(char*,char*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT* );
extern void F_FUNC(zgeev,ZGEEV)(char*,char*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT* );
extern void F_FUNC(cgeev ,CGEEV )(char*,char*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT* );
extern void F_FUNC(zgeev ,ZGEEV )(char*,char*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT* );
extern void F_FUNC(sgegv,SGEGV)(char*,char*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgegv,DGEGV)(char*,char*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,double*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgegv,CGEGV)(char*,char*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT* );
extern void F_FUNC(zgegv,ZGEGV)(char*,char*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT* );
extern void F_FUNC(cgees,CGEES)(char*,char*,F_INT(*)(complex_float*),F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT*,F_INT*,F_INT,F_INT );
extern void F_FUNC(zgees,ZGEES)(char*,char*,F_INT(*)(complex_double*),F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT*,F_INT*,F_INT,F_INT );
extern void F_FUNC(sgees,SGEES)(char*,char*,F_INT(*)(float*,float*),F_INT*,float*,F_INT*,F_INT*,float*,float*,float*,F_INT*,float*,F_INT*,F_INT*,F_INT*,F_INT,F_INT );
extern void F_FUNC(dgees,DGEES)(char*,char*,F_INT(*)(double*,double*),F_INT*,double*,F_INT*,F_INT*,double*,double*,double*,F_INT*,double*,F_INT*,F_INT*,F_INT*,F_INT,F_INT );
extern void F_FUNC(sgges,SGGES)(char*,char*,char*,F_INT(*)(float*,float*,float*),F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,float*,float*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dgges,DGGES)(char*,char*,char*,F_INT(*)(double*,double*,double*),F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,double*,double*,double*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(cgges,CGGES)(char*,char*,char*,F_INT(*)(complex_float*,complex_float*),F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,complex_float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(zgges,ZGGES)(char*,char*,char*,F_INT(*)(complex_double*,complex_double*),F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,complex_double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(sggev,SGGEV)(char*,char*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dggev,DGGEV)(char*,char*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,double*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cggev,CGGEV)(char*,char*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT* );
extern void F_FUNC(zggev,ZGGEV)(char*,char*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT* );
extern void F_FUNC(sgeequ,SGEEQU)(F_INT*,F_INT*,float*,F_INT*,float*,float*,float*,float*,float*,F_INT* );
extern void F_FUNC(dgeequ,DGEEQU)(F_INT*,F_INT*,double*,F_INT*,double*,double*,double*,double*,double*,F_INT* );
extern void F_FUNC(cgeequ,CGEEQU)(F_INT*,F_INT*,complex_float*,F_INT*,float*,float*,float*,float*,float*,F_INT* );
extern void F_FUNC(zgeequ,ZGEEQU)(F_INT*,F_INT*,complex_double*,F_INT*,double*,double*,double*,double*,double*,F_INT* );
extern void F_FUNC(sgeequb,SGEEQUB)(F_INT*,F_INT*,float*,F_INT*,float*,float*,float*,float*,float*,F_INT* );
extern void F_FUNC(dgeequb,DGEEQUB)(F_INT*,F_INT*,double*,F_INT*,double*,double*,double*,double*,double*,F_INT* );
extern void F_FUNC(cgeequb,CGEEQUB)(F_INT*,F_INT*,complex_float*,F_INT*,float*,float*,float*,float*,float*,F_INT* );
extern void F_FUNC(zgeequb,ZGEEQUB)(F_INT*,F_INT*,complex_double*,F_INT*,double*,double*,double*,double*,double*,F_INT* );
extern void F_FUNC(sgbsv,SGBSV)(F_INT*,F_INT*,F_INT*,F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgbsv,DGBSV)(F_INT*,F_INT*,F_INT*,F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgbsv,CGBSV)(F_INT*,F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zgbsv,ZGBSV)(F_INT*,F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sgbtrf,SGBTRF)(F_INT*,F_INT*,F_INT*,F_INT*,float*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dgbtrf,DGBTRF)(F_INT*,F_INT*,F_INT*,F_INT*,double*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(cgbtrf,CGBTRF)(F_INT*,F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(zgbtrf,ZGBTRF)(F_INT*,F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(sgbtrs,SGBTRS)(char*,F_INT*,F_INT *,F_INT*,F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgbtrs,DGBTRS)(char*,F_INT*,F_INT *,F_INT*,F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgbtrs,CGBTRS)(char*,F_INT*,F_INT *,F_INT*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zgbtrs,ZGBTRS)(char*,F_INT*,F_INT *,F_INT*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sgtsv,SGTSV)(F_INT*, F_INT*, float*, float*, float*, float*, F_INT*, F_INT* );
extern void F_FUNC(dgtsv,DGTSV)(F_INT*, F_INT*, double*, double*, double*, double*, F_INT*, F_INT* );
extern void F_FUNC(cgtsv,CGTSV)(F_INT*, F_INT*, complex_float*, complex_float*, complex_float*, complex_float*, F_INT*, F_INT* );
extern void F_FUNC(zgtsv,ZGTSV)(F_INT*, F_INT*, complex_double*, complex_double*, complex_double*, complex_double*, F_INT*, F_INT* );
extern void F_FUNC(sgttrf,SGTTRF)(F_INT*, float*, float*, float*, float*, F_INT*, F_INT* );
extern void F_FUNC(dgttrf,DGTTRF)(F_INT*, double*, double*, double*, double*, F_INT*, F_INT* );
extern void F_FUNC(cgttrf,CGTTRF)(F_INT*, complex_float*, complex_float*, complex_float*, complex_float*, F_INT*, F_INT* );
extern void F_FUNC(zgttrf,ZGTTRF)(F_INT*, complex_double*, complex_double*, complex_double*, complex_double*, F_INT*, F_INT* );
extern void F_FUNC(sgttrs,SGTTRS)(char*, F_INT*, F_INT*, float*, float*, float*, float*, F_INT*, float*, F_INT*, F_INT* );
extern void F_FUNC(dgttrs,DGTTRS)(char*, F_INT*, F_INT*, double*, double*, double*, double*, F_INT*, double*, F_INT*, F_INT* );
extern void F_FUNC(cgttrs,CGTTRS)(char*, F_INT*, F_INT*, complex_float*, complex_float*, complex_float*, complex_float*, F_INT*, complex_float*, F_INT*, F_INT* );
extern void F_FUNC(zgttrs,ZGTTRS)(char*, F_INT*, F_INT*, complex_double*, complex_double*, complex_double*, complex_double*, F_INT*, complex_double*, F_INT*, F_INT* );
extern void F_FUNC(sgtsvx,SGTSVX)(char*,char*,F_INT*,F_INT*,float*,float*,float*,float*,float*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgtsvx,DGTSVX)(char*,char*,F_INT*,F_INT*,double*,double*,double*,double*,double*,double*,double*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgtsvx,CGTSVX)(char*,char*,F_INT*,F_INT*,complex_float*,complex_float*,complex_float*,complex_float*,complex_float*,complex_float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float*,float*,complex_float*,float*,F_INT* );
extern void F_FUNC(zgtsvx,ZGTSVX)(char*,char*,F_INT*,F_INT*,complex_double*,complex_double*,complex_double*,complex_double*,complex_double*,complex_double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double*,double*,complex_double*,double*,F_INT* );
extern void F_FUNC(ssyev,SSYEV)(char*,char*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dsyev,DSYEV)(char*,char*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(ssyev ,SSYEV )(char*,char*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dsyev ,DSYEV )(char*,char*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(cheev,CHEEV)(char*,char*,F_INT*,complex_float*,F_INT*,float*,complex_float*,F_INT*,float*,F_INT* );
extern void F_FUNC(zheev,ZHEEV)(char*,char*,F_INT*,complex_double*,F_INT*,double*,complex_double*,F_INT*,double*,F_INT* );
extern void F_FUNC(cheev ,CHEEV )(char*,char*,F_INT*,complex_float*,F_INT*,float*,complex_float*,F_INT*,float*,F_INT* );
extern void F_FUNC(zheev ,ZHEEV )(char*,char*,F_INT*,complex_double*,F_INT*,double*,complex_double*,F_INT*,double*,F_INT* );
extern void F_FUNC(ssyevd,SSYEVD)(char*,char*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dsyevd,DSYEVD)(char*,char*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(ssyevd ,SSYEVD )(char*,char*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dsyevd ,DSYEVD )(char*,char*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(cheevd,CHEEVD)(char*,char*,F_INT*,complex_float*,F_INT*,float*,complex_float*,F_INT*,float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(zheevd,ZHEEVD)(char*,char*,F_INT*,complex_double*,F_INT*,double*,complex_double*,F_INT*,double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(cheevd ,CHEEVD )(char*,char*,F_INT*,complex_float*,F_INT*,float*,complex_float*,F_INT*,float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(zheevd ,ZHEEVD )(char*,char*,F_INT*,complex_double*,F_INT*,double*,complex_double*,F_INT*,double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(ssytf2,SSYTF2)(char*,F_INT*,float*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dsytf2,DSYTF2)(char*,F_INT*,double*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(csytf2,CSYTF2)(char*,F_INT*,complex_float*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(zsytf2,ZSYTF2)(char*,F_INT*,complex_double*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(ssygst,SSYGST)(F_INT*,char*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dsygst,DSYGST)(F_INT*,char*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(ssytrf,SSYTRF)(char*,F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dsytrf,DSYTRF)(char*,F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(csytrf,CSYTRF)(char*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zsytrf,ZSYTRF)(char*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(ssytrf ,SSYTRF )(char*,F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dsytrf ,DSYTRF )(char*,F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(csytrf ,CSYTRF )(char*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zsytrf ,ZSYTRF )(char*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(ssysv,SSYSV)(char*,F_INT*,F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dsysv,DSYSV)(char*,F_INT*,F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(csysv,CSYSV)(char*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zsysv,ZSYSV)(char*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(ssysv ,SSYSV )(char*,F_INT*,F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dsysv ,DSYSV )(char*,F_INT*,F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(csysv ,CSYSV )(char*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zsysv ,ZSYSV )(char*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(ssysvx,SSYSVX)(char*,char*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,float*,float*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dsysvx,DSYSVX)(char*,char*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,double*,double*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(csysvx,CSYSVX)(char*,char*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float*,float*,complex_float*,F_INT*,float*,F_INT* );
extern void F_FUNC(zsysvx,ZSYSVX)(char*,char*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double*,double*,complex_double*,F_INT*,double*,F_INT* );
extern void F_FUNC(ssysvx ,SSYSVX )(char*,char*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,float*,float*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dsysvx ,DSYSVX )(char*,char*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,double*,double*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(csysvx ,CSYSVX )(char*,char*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float*,float*,complex_float*,F_INT*,float*,F_INT* );
extern void F_FUNC(zsysvx ,ZSYSVX )(char*,char*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double*,double*,complex_double*,F_INT*,double*,F_INT* );
extern void F_FUNC(ssycon,SSYCON)(char*,F_INT*,float*,F_INT*,F_INT*,float*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dsycon,DSYCON)(char*,F_INT*,double*,F_INT*,F_INT*,double*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(csycon,CSYCON)(char*,F_INT*,complex_float*,F_INT*,F_INT*,float*,float*,complex_float*,F_INT* );
extern void F_FUNC(zsycon,ZSYCON)(char*,F_INT*,complex_double*,F_INT*,F_INT*,double*,double*,complex_double*,F_INT* );
extern void F_FUNC(checon,CHECON)(char*,F_INT*,complex_float*,F_INT*,F_INT*,float*,float*,complex_float*,F_INT* );
extern void F_FUNC(zhecon,ZHECON)(char*,F_INT*,complex_double*,F_INT*,F_INT*,double*,double*,complex_double*,F_INT* );
extern void F_FUNC(ssyconv,SSYCONV)(char*,char*,F_INT*,float*,F_INT*,F_INT*,float*,F_INT* );
extern void F_FUNC(dsyconv,DSYCONV)(char*,char*,F_INT*,double*,F_INT*,F_INT*,double*,F_INT* );
extern void F_FUNC(csyconv,CSYCONV)(char*,char*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT* );
extern void F_FUNC(zsyconv,ZSYCONV)(char*,char*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT* );
extern void F_FUNC(chegst,CHEGST)(F_INT*,char*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zhegst,ZHEGST)(F_INT*,char*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(chetrf,CHETRF)(char*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zhetrf,ZHETRF)(char*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(chetrf ,CHETRF )(char*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zhetrf ,ZHETRF )(char*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(chesv,CHESV)(char*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zhesv,ZHESV)(char*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(chesv ,CHESV )(char*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zhesv ,ZHESV )(char*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(chesvx,CHESVX)(char*,char*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float*,float*,complex_float*,F_INT*,float*,F_INT* );
extern void F_FUNC(zhesvx,ZHESVX)(char*,char*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double*,double*,complex_double*,F_INT*,double*,F_INT* );
extern void F_FUNC(chesvx ,CHESVX )(char*,char*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float*,float*,complex_float*,F_INT*,float*,F_INT* );
extern void F_FUNC(zhesvx ,ZHESVX )(char*,char*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double*,double*,complex_double*,F_INT*,double*,F_INT* );
extern void F_FUNC(ssytrd,SSYTRD)(char*,F_INT*,float*,F_INT*,float*,float*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dsytrd,DSYTRD)(char*,F_INT*,double*,F_INT*,double*,double*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(ssytrd ,SSYTRD )(char*,F_INT*,float*,F_INT*,float*,float*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dsytrd ,DSYTRD )(char*,F_INT*,double*,F_INT*,double*,double*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(chetrd,CHETRD)(char*,F_INT*,complex_float*,F_INT*,float*,float*,complex_float*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zhetrd,ZHETRD)(char*,F_INT*,complex_double*,F_INT*,double*,double*,complex_double*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(chetrd ,CHETRD )(char*,F_INT*,complex_float*,F_INT*,float*,float*,complex_float*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zhetrd ,ZHETRD )(char*,F_INT*,complex_double*,F_INT*,double*,double*,complex_double*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(ssyevr,SSYEVR)(char*,char*,char*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT*,float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dsyevr,DSYEVR)(char*,char*,char*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT*,double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(ssyevr ,SSYEVR )(char*,char*,char*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT*,float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dsyevr ,DSYEVR )(char*,char*,char*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT*,double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(cheevr,CHEEVR)(char*,char*,char*,F_INT*,complex_float*,F_INT*,float*,float*,F_INT*,F_INT*,float*,F_INT*,float*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(zheevr,ZHEEVR)(char*,char*,char*,F_INT*,complex_double*,F_INT*,double*,double*,F_INT*,F_INT*,double*,F_INT*,double*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(cheevr ,CHEEVR )(char*,char*,char*,F_INT*,complex_float*,F_INT*,float*,float*,F_INT*,F_INT*,float*,F_INT*,float*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(zheevr ,ZHEEVR )(char*,char*,char*,F_INT*,complex_double*,F_INT*,double*,double*,F_INT*,F_INT*,double*,F_INT*,double*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(ssyevx,SSYEVX)(char*,char*,char*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dsyevx,DSYEVX)(char*,char*,char*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(ssyevx ,SSYEVX )(char*,char*,char*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dsyevx ,DSYEVX )(char*,char*,char*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(cheevx,CHEEVX)(char*,char*,char*,F_INT*,complex_float*,F_INT*,float*,float*,F_INT*,F_INT*,float*,F_INT*,float*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(zheevx,ZHEEVX)(char*,char*,char*,F_INT*,complex_double*,F_INT*,double*,double*,F_INT*,F_INT*,double*,F_INT*,double*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(cheevx ,CHEEVX )(char*,char*,char*,F_INT*,complex_float*,F_INT*,float*,float*,F_INT*,F_INT*,float*,F_INT*,float*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(zheevx ,ZHEEVX )(char*,char*,char*,F_INT*,complex_double*,F_INT*,double*,double*,F_INT*,F_INT*,double*,F_INT*,double*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(ssygv,SSYGV)(F_INT*,char*,char*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dsygv,DSYGV)(F_INT*,char*,char*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(ssygv ,SSYGV )(F_INT*,char*,char*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dsygv ,DSYGV )(F_INT*,char*,char*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(chegv,CHEGV)(F_INT*,char*,char*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,complex_float*,F_INT*,float*,F_INT* );
extern void F_FUNC(zhegv,ZHEGV)(F_INT*,char*,char*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,complex_double*,F_INT*,double*,F_INT* );
extern void F_FUNC(chegv ,CHEGV )(F_INT*,char*,char*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,complex_float*,F_INT*,float*,F_INT* );
extern void F_FUNC(zhegv ,ZHEGV )(F_INT*,char*,char*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,complex_double*,F_INT*,double*,F_INT* );
extern void F_FUNC(ssygvd,SSYGVD)(F_INT*,char*,char*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dsygvd,DSYGVD)(F_INT*,char*,char*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(chegvd,CHEGVD)(F_INT*,char*,char*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,complex_float*,F_INT*,float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(zhegvd,ZHEGVD)(F_INT*,char*,char*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,complex_double*,F_INT*,double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(ssygvx,SSYGVX)(F_INT*,char*,char*,char*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dsygvx,DSYGVX)(F_INT*,char*,char*,char*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(ssygvx ,SSYGVX )(F_INT*,char*,char*,char*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dsygvx ,DSYGVX )(F_INT*,char*,char*,char*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(chegvx,CHEGVX)(F_INT*,char*,char*,char*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float*,F_INT*,F_INT*,float*,F_INT*,float*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(zhegvx,ZHEGVX)(F_INT*,char*,char*,char*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double*,F_INT*,F_INT*,double*,F_INT*,double*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(chegvx ,CHEGVX )(F_INT*,char*,char*,char*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float*,F_INT*,F_INT*,float*,F_INT*,float*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(zhegvx ,ZHEGVX )(F_INT*,char*,char*,char*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double*,F_INT*,F_INT*,double*,F_INT*,double*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(ssyequb,SSYEQUB)(char*,F_INT*,float*,F_INT*,float*,float*,float*,float*,F_INT* );
extern void F_FUNC(dsyequb,DSYEQUB)(char*,F_INT*,double*,F_INT*,double*,double*,double*,double*,F_INT* );
extern void F_FUNC(csyequb,CSYEQUB)(char*,F_INT*,complex_float*,F_INT*,float*,float*,float*,complex_float*,F_INT* );
extern void F_FUNC(zsyequb,ZSYEQUB)(char*,F_INT*,complex_double*,F_INT*,double*,double*,double*,complex_double*,F_INT* );
extern void F_FUNC(cheequb,CHEEQUB)(char*,F_INT*,complex_float*,F_INT*,float*,float*,float*,complex_float*,F_INT* );
extern void F_FUNC(zheequb,ZHEEQUB)(char*,F_INT*,complex_double*,F_INT*,double*,double*,double*,complex_double*,F_INT* );
extern void F_FUNC(spstrf,SPSTRF)(char*,F_INT*,float*,F_INT*,F_INT*,F_INT*,float*,float*,F_INT* );
extern void F_FUNC(dpstrf,DPSTRF)(char*,F_INT*,double*,F_INT*,F_INT*,F_INT*,double*,double*,F_INT* );
extern void F_FUNC(cpstrf,CPSTRF)(char*,F_INT*,complex_float*,F_INT*,F_INT*,F_INT*,float*,float*,F_INT* );
extern void F_FUNC(zpstrf,ZPSTRF)(char*,F_INT*,complex_double*,F_INT*,F_INT*,F_INT*,double*,double*,F_INT* );
extern void F_FUNC(spstf2,SPSTF2)(char*,F_INT*,float*,F_INT*,F_INT*,F_INT*,float*,float*,F_INT* );
extern void F_FUNC(dpstf2,DPSTF2)(char*,F_INT*,double*,F_INT*,F_INT*,F_INT*,double*,double*,F_INT* );
extern void F_FUNC(cpstf2,CPSTF2)(char*,F_INT*,complex_float*,F_INT*,F_INT*,F_INT*,float*,float*,F_INT* );
extern void F_FUNC(zpstf2,ZPSTF2)(char*,F_INT*,complex_double*,F_INT*,F_INT*,F_INT*,double*,double*,F_INT* );
extern void F_FUNC(sposv,SPOSV)(char*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dposv,DPOSV)(char*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cposv,CPOSV)(char*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zposv,ZPOSV)(char*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sposvx,SPOSVX)(char*,char*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,char*,float*,float*,F_INT*,float*,F_INT*,float*,float*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dposvx,DPOSVX)(char*,char*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,char*,double*,double*,F_INT*,double*,F_INT*,double*,double*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(cposvx,CPOSVX)(char*,char*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,char*,float*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float*,float*,complex_float*,float*,F_INT* );
extern void F_FUNC(zposvx,ZPOSVX)(char*,char*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,char*,double*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double*,double*,complex_double*,double*,F_INT* );
extern void F_FUNC(spocon,SPOCON)(char*,F_INT*,float*,F_INT*,float*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dpocon,DPOCON)(char*,F_INT*,double*,F_INT*,double*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(cpocon,CPOCON)(char*,F_INT*,complex_float*,F_INT*,float*,float*,complex_float*,float*,F_INT* );
extern void F_FUNC(zpocon,ZPOCON)(char*,F_INT*,complex_double*,F_INT*,double*,double*,complex_double*,double*,F_INT* );
extern void F_FUNC(spotrf,SPOTRF)(char*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dpotrf,DPOTRF)(char*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cpotrf,CPOTRF)(char*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zpotrf,ZPOTRF)(char*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(spotrs,SPOTRS)(char*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dpotrs,DPOTRS)(char*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cpotrs,CPOTRS)(char*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zpotrs,ZPOTRS)(char*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(spotri,SPOTRI)(char*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dpotri,DPOTRI)(char*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cpotri,CPOTRI)(char*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zpotri,ZPOTRI)(char*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sptsv,SPTSV)(F_INT*, F_INT*, float*, float*, float*, F_INT*, F_INT* );
extern void F_FUNC(dptsv,DPTSV)(F_INT*, F_INT*, double*, double*, double*, F_INT*, F_INT* );
extern void F_FUNC(cptsv,CPTSV)(F_INT*, F_INT*, float*, complex_float*, complex_float*, F_INT*, F_INT* );
extern void F_FUNC(zptsv,ZPTSV)(F_INT*, F_INT*, double*, complex_double*, complex_double*, F_INT*, F_INT* );
extern void F_FUNC(spttrf,SPTTRF)(F_INT*, float*, float*, F_INT* );
extern void F_FUNC(dpttrf,DPTTRF)(F_INT*, double*, double*, F_INT* );
extern void F_FUNC(cpttrf,CPTTRF)(F_INT*, float*, complex_float*, F_INT* );
extern void F_FUNC(zpttrf,ZPTTRF)(F_INT*, double*, complex_double*, F_INT* );
extern void F_FUNC(spttrs,SPTTRS)(F_INT*, F_INT*, float*, float*, float*, F_INT*, F_INT* );
extern void F_FUNC(dpttrs,DPTTRS)(F_INT*, F_INT*, double*, double*, double*, F_INT*, F_INT* );
extern void F_FUNC(cpttrs,CPTTRS)(char*, F_INT*, F_INT*, float*, complex_float*, complex_float*, F_INT*, F_INT* );
extern void F_FUNC(zpttrs,ZPTTRS)(char*, F_INT*, F_INT*, double*, complex_double*, complex_double*, F_INT*, F_INT* );
extern void F_FUNC(spteqr,SPTEQR)(char*, F_INT*, float*, float*, float*, F_INT*, float*, F_INT* );
extern void F_FUNC(dpteqr,DPTEQR)(char*, F_INT*, double*, double*, double*, F_INT*, double*, F_INT* );
extern void F_FUNC(cpteqr,CPTEQR)(char*, F_INT*, float*, float*, complex_float*, F_INT*, float*, F_INT* );
extern void F_FUNC(zpteqr,ZPTEQR)(char*, F_INT*, double*, double*, complex_double*, F_INT*, double*, F_INT* );
extern void F_FUNC(sptsvx,SPTSVX)(char*, F_INT*, F_INT*, float*, float*, float*, float*, float*, F_INT*, float*, F_INT*, float*, float*, float*, float*, F_INT* );
extern void F_FUNC(dptsvx,DPTSVX)(char*, F_INT*, F_INT*, double*, double*, double*, double*, double*, F_INT*, double*, F_INT*, double*, double*, double*, double*, F_INT* );
extern void F_FUNC(cptsvx,CPTSVX)(char*, F_INT*, F_INT*, float*, complex_float*, float*, complex_float*, complex_float*, F_INT*, complex_float*, F_INT*, float*, float*, float*, complex_float*, float*, F_INT* );
extern void F_FUNC(zptsvx,ZPTSVX)(char*, F_INT*, F_INT*, double*, complex_double*, double*, complex_double*, complex_double*, F_INT*, complex_double*, F_INT*, double*, double*, double*, complex_double*, double*, F_INT* );
extern void F_FUNC(sgejsv,SGEJSV)(char*,char*,char*,char*,char*,char*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dgejsv,DGEJSV)(char*,char*,char*,char*,char*,char*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(stgexc,STGEXC)(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dtgexc,DTGEXC)(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(ctgexc,CTGEXC)(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(ztgexc,ZTGEXC)(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(stgsen,STGSEN)(F_INT*,F_INT*,F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,float*,float*,F_INT*,float*,F_INT*,F_INT*,float*,float*,float*,float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dtgsen,DTGSEN)(F_INT*,F_INT*,F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,double*,double*,F_INT*,double*,F_INT*,F_INT*,double*,double*,double*,double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(stgsen ,STGSEN )(F_INT*,F_INT*,F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,float*,float*,F_INT*,float*,F_INT*,F_INT*,float*,float*,float*,float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dtgsen ,DTGSEN )(F_INT*,F_INT*,F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,double*,double*,F_INT*,double*,F_INT*,F_INT*,double*,double*,double*,double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(ctgsen,CTGSEN)(F_INT*,F_INT*,F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT*,float*,float*,float*,complex_float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(ztgsen,ZTGSEN)(F_INT*,F_INT*,F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT*,double*,double*,double*,complex_double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(ctgsen ,CTGSEN )(F_INT*,F_INT*,F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT*,float*,float*,float*,complex_float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(ztgsen ,ZTGSEN )(F_INT*,F_INT*,F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT*,double*,double*,double*,complex_double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(spbtrf,SPBTRF)(char*,F_INT*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dpbtrf,DPBTRF)(char*,F_INT*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cpbtrf,CPBTRF)(char*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zpbtrf,ZPBTRF)(char*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(spbtrs,SPBTRS)(char*,F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dpbtrs,DPBTRS)(char*,F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cpbtrs,CPBTRS)(char*,F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zpbtrs,ZPBTRS)(char*,F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(strtrs,STRTRS)(char*,char*,char*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dtrtrs,DTRTRS)(char*,char*,char*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(ctrtrs,CTRTRS)(char*,char*,char*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(ztrtrs,ZTRTRS)(char*,char*,char*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(stbtrs,STBTRS)(char*,char*,char*,F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dtbtrs,DTBTRS)(char*,char*,char*,F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(ctbtrs,CTBTRS)(char*,char*,char*,F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(ztbtrs,ZTBTRS)(char*,char*,char*,F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(spbsv,SPBSV)(char*,F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dpbsv,DPBSV)(char*,F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cpbsv,CPBSV)(char*,F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zpbsv,ZPBSV)(char*,F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sorcsd,SORCSD)(char*,char*,char*,char*,char*,char*,F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dorcsd,DORCSD)(char*,char*,char*,char*,char*,char*,F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(sorcsd ,SORCSD )(char*,char*,char*,char*,char*,char*,F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dorcsd ,DORCSD )(char*,char*,char*,char*,char*,char*,F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(cuncsd,CUNCSD)(char*,char*,char*,char*,char*,char*,F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(zuncsd,ZUNCSD)(char*,char*,char*,char*,char*,char*,F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(cuncsd ,CUNCSD )(char*,char*,char*,char*,char*,char*,F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(zuncsd ,ZUNCSD )(char*,char*,char*,char*,char*,char*,F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(sorghr,SORGHR)(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dorghr,DORGHR)(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(sorghr ,SORGHR )(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dorghr ,DORGHR )(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(cunghr,CUNGHR)(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zunghr,ZUNGHR)(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(cunghr ,CUNGHR )(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zunghr ,ZUNGHR )(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sorgqr,SORGQR)(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dorgqr,DORGQR)(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(cungqr,CUNGQR)(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zungqr,ZUNGQR)(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sormqr,SORMQR)(char*,char*,F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dormqr,DORMQR)(char*,char*,F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cunmqr,CUNMQR)(char*,char*,F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zunmqr,ZUNMQR)(char*,char*,F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sgeqrt,SGEQRT)(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT* );
extern void F_FUNC(dgeqrt,DGEQRT)(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT* );
extern void F_FUNC(cgeqrt,CGEQRT)(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT* );
extern void F_FUNC(zgeqrt,ZGEQRT)(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT* );
extern void F_FUNC(sgemqrt,SGEMQRT)(char*,char*,F_INT*,F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT* );
extern void F_FUNC(dgemqrt,DGEMQRT)(char*,char*,F_INT*,F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT* );
extern void F_FUNC(cgemqrt,CGEMQRT)(char*,char*,F_INT*,F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT* );
extern void F_FUNC(zgemqrt,ZGEMQRT)(char*,char*,F_INT*,F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT* );
extern void F_FUNC(stpqrt,STPQRT)(F_INT*,F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT* );
extern void F_FUNC(dtpqrt,DTPQRT)(F_INT*,F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT* );
extern void F_FUNC(ctpqrt,CTPQRT)(F_INT*,F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT* );
extern void F_FUNC(ztpqrt,ZTPQRT)(F_INT*,F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT* );
extern void F_FUNC(stpmqrt,STPMQRT)(char*,char*,F_INT*,F_INT*,F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT* );
extern void F_FUNC(dtpmqrt,DTPMQRT)(char*,char*,F_INT*,F_INT*,F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT* );
extern void F_FUNC(ctpmqrt,CTPMQRT)(char*,char*,F_INT*,F_INT*,F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT* );
extern void F_FUNC(ztpmqrt,ZTPMQRT)(char*,char*,F_INT*,F_INT*,F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT* );
extern void F_FUNC(sormrz,SORMRZ)(char*,char*,F_INT*,F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dormrz,DORMRZ)(char*,char*,F_INT*,F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cunmrz,CUNMRZ)(char*,char*,F_INT*,F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zunmrz,ZUNMRZ)(char*,char*,F_INT*,F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sormrz ,SORMRZ )(char*,char*,F_INT*,F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dormrz ,DORMRZ )(char*,char*,F_INT*,F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(cunmrz ,CUNMRZ )(char*,char*,F_INT*,F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zunmrz ,ZUNMRZ )(char*,char*,F_INT*,F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sorgrq,SORGRQ)(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dorgrq,DORGRQ)(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(cungrq,CUNGRQ)(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zungrq,ZUNGRQ)(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(strtri,STRTRI)(char*,char*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dtrtri,DTRTRI)(char*,char*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(ctrtri,CTRTRI)(char*,char*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(ztrtri,ZTRTRI)(char*,char*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(strsyl,STRSYL)(char*,char*,F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT* );
extern void F_FUNC(dtrsyl,DTRSYL)(char*,char*,F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT* );
extern void F_FUNC(ctrsyl,CTRSYL)(char*,char*,F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT* );
extern void F_FUNC(ztrsyl,ZTRSYL)(char*,char*,F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT* );
extern void F_FUNC(chbevd,CHBEVD)(char*,char*,F_INT*,F_INT*,complex_float*,F_INT*,float*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(zhbevd,ZHBEVD)(char*,char*,F_INT*,F_INT*,complex_double*,F_INT*,double*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(chbevx,CHBEVX)(char*,char*,char*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float*,F_INT*,F_INT*,float*,F_INT*,float*,complex_float*,F_INT*,complex_float*,float*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(zhbevx,ZHBEVX)(char*,char*,char*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double*,F_INT*,F_INT*,double*,F_INT*,double*,complex_double*,F_INT*,complex_double*,double*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(sgglse,SGGLSE)(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgglse,DGGLSE)(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgglse,CGGLSE)(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,complex_float*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zgglse,ZGGLSE)(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,complex_double*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sgglse ,SGGLSE )(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dgglse ,DGGLSE )(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(cgglse ,CGGLSE )(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,complex_float*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zgglse ,ZGGLSE )(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,complex_double*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(sppcon,SPPCON)(char*,F_INT*,float*,float*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dppcon,DPPCON)(char*,F_INT*,double*,double*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(cppcon,CPPCON)(char*,F_INT*,complex_float*,float*,float*,complex_float*,float*,F_INT* );
extern void F_FUNC(zppcon,ZPPCON)(char*,F_INT*,complex_double*,double*,double*,complex_double*,double*,F_INT* );
extern void F_FUNC(sppsv,SPPSV)(char*,F_INT*,F_INT*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dppsv,DPPSV)(char*,F_INT*,F_INT*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(cppsv,CPPSV)(char*,F_INT*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zppsv,ZPPSV)(char*,F_INT*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(spptrf,SPPTRF)(char*,F_INT*,float*,F_INT* );
extern void F_FUNC(dpptrf,DPPTRF)(char*,F_INT*,double*,F_INT* );
extern void F_FUNC(cpptrf,CPPTRF)(char*,F_INT*,complex_float*,F_INT* );
extern void F_FUNC(zpptrf,ZPPTRF)(char*,F_INT*,complex_double*,F_INT* );
extern void F_FUNC(spptri,SPPTRI)(char*,F_INT*,float*,F_INT* );
extern void F_FUNC(dpptri,DPPTRI)(char*,F_INT*,double*,F_INT* );
extern void F_FUNC(cpptri,CPPTRI)(char*,F_INT*,complex_float*,F_INT* );
extern void F_FUNC(zpptri,ZPPTRI)(char*,F_INT*,complex_double*,F_INT* );
extern void F_FUNC(spptrs,SPPTRS)(char*,F_INT*,F_INT*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dpptrs,DPPTRS)(char*,F_INT*,F_INT*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(cpptrs,CPPTRS)(char*,F_INT*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zpptrs,ZPPTRS)(char*,F_INT*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(ssbev,SSBEV)(char*,char*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT* );
extern void F_FUNC(dsbev,DSBEV)(char*,char*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT* );
extern void F_FUNC(ssbevd,SSBEVD)(char*,char*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dsbevd,DSBEVD)(char*,char*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(ssbevx,SSBEVX)(char*,char*,char*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*, F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dsbevx,DSBEVX)(char*,char*,char*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*, F_INT*,F_INT*,F_INT* );
extern void F_FUNC(sstebz,SSTEBZ)(char*,char*,F_INT*,float*,float*,F_INT*,F_INT*,float*,float*,float*,F_INT*,F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dstebz,DSTEBZ)(char*,char*,F_INT*,double*,double*,F_INT*,F_INT*,double*,double*,double*,F_INT*,F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(ssterf,SSTERF)(F_INT*,float*,float*,F_INT* );
extern void F_FUNC(dsterf,DSTERF)(F_INT*,double*,double*,F_INT* );
extern void F_FUNC(sstein,SSTEIN)(F_INT*,float*,float*,F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dstein,DSTEIN)(F_INT*,double*,double*,F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(sstemr,SSTEMR)(char*,char*,F_INT*,float*,float*,float*,float*,F_INT*,F_INT*,F_INT*,float*,float*,F_INT*,F_INT*,F_INT*,F_INT*,float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dstemr,DSTEMR)(char*,char*,F_INT*,double*,double*,double*,double*,F_INT*,F_INT*,F_INT*,double*,double*,F_INT*,F_INT*,F_INT*,F_INT*,double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(cstemr ,CSTEMR )(char*,char*,F_INT*,float*,float*,float*,float*,F_INT*,F_INT*,F_INT*,float*,float*,F_INT*,F_INT*,F_INT*,F_INT*,float*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(zstemr ,ZSTEMR )(char*,char*,F_INT*,double*,double*,double*,double*,F_INT*,F_INT*,F_INT*,double*,double*,F_INT*,F_INT*,F_INT*,F_INT*,double*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(sstev,SSTEV)(char*,F_INT*,float*,float*,float*,F_INT*,float*,F_INT* );
extern void F_FUNC(dstev,DSTEV)(char*,F_INT*,double*,double*,double*,F_INT*,double*,F_INT* );
extern void F_FUNC(ssfrk,SSFRK)(char*,char*,char*,F_INT*,F_INT*,float*,float*,F_INT*,float*,float* );
extern void F_FUNC(dsfrk,DSFRK)(char*,char*,char*,F_INT*,F_INT*,double*,double*,F_INT*,double*,double* );
extern void F_FUNC(chfrk,CHFRK)(char*,char*,char*,F_INT*,F_INT*,float*,complex_float*,F_INT*,float*,complex_float* );
extern void F_FUNC(zhfrk,ZHFRK)(char*,char*,char*,F_INT*,F_INT*,double*,complex_double*,F_INT*,double*,complex_double* );
extern void F_FUNC(stpttf,STPTTF)(char*,char*,F_INT*,float*,float*,F_INT* );
extern void F_FUNC(dtpttf,DTPTTF)(char*,char*,F_INT*,double*,double*,F_INT* );
extern void F_FUNC(ctpttf,CTPTTF)(char*,char*,F_INT*,complex_float*,complex_float*,F_INT* );
extern void F_FUNC(ztpttf,ZTPTTF)(char*,char*,F_INT*,complex_double*,complex_double*,F_INT* );
extern void F_FUNC(stpttr,STPTTR)(char*,F_INT*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dtpttr,DTPTTR)(char*,F_INT*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(ctpttr,CTPTTR)(char*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(ztpttr,ZTPTTR)(char*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(stfttp,STFTTP)(char*,char*,F_INT*,float*,float*,F_INT* );
extern void F_FUNC(dtfttp,DTFTTP)(char*,char*,F_INT*,double*,double*,F_INT* );
extern void F_FUNC(ctfttp,CTFTTP)(char*,char*,F_INT*,complex_float*,complex_float*,F_INT* );
extern void F_FUNC(ztfttp,ZTFTTP)(char*,char*,F_INT*,complex_double*,complex_double*,F_INT* );
extern void F_FUNC(stfttr,STFTTR)(char*,char*,F_INT*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dtfttr,DTFTTR)(char*,char*,F_INT*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(ctfttr,CTFTTR)(char*,char*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(ztfttr,ZTFTTR)(char*,char*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(strttf,STRTTF)(char*,char*,F_INT*,float*,F_INT*,float*,F_INT* );
extern void F_FUNC(dtrttf,DTRTTF)(char*,char*,F_INT*,double*,F_INT*,double*,F_INT* );
extern void F_FUNC(ctrttf,CTRTTF)(char*,char*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT* );
extern void F_FUNC(ztrttf,ZTRTTF)(char*,char*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT* );
extern void F_FUNC(strttp,STRTTP)(char*,F_INT*,float*,F_INT*,float*,F_INT* );
extern void F_FUNC(dtrttp,DTRTTP)(char*,F_INT*,double*,F_INT*,double*,F_INT* );
extern void F_FUNC(ctrttp,CTRTTP)(char*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT* );
extern void F_FUNC(ztrttp,ZTRTTP)(char*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT* );
extern void F_FUNC(stfsm,STFSM)(char*,char*,char*,char*,char*,F_INT*,F_INT*,float*,float*,float*,F_INT* );
extern void F_FUNC(dtfsm,DTFSM)(char*,char*,char*,char*,char*,F_INT*,F_INT*,double*,double*,double*,F_INT* );
extern void F_FUNC(ctfsm,CTFSM)(char*,char*,char*,char*,char*,F_INT*,F_INT*,complex_float*,complex_float*,complex_float*,F_INT* );
extern void F_FUNC(ztfsm,ZTFSM)(char*,char*,char*,char*,char*,F_INT*,F_INT*,complex_double*,complex_double*,complex_double*,F_INT* );
extern void F_FUNC(spftrf,SPFTRF)(char*,char*,F_INT*,float*,F_INT* );
extern void F_FUNC(dpftrf,DPFTRF)(char*,char*,F_INT*,double*,F_INT* );
extern void F_FUNC(cpftrf,CPFTRF)(char*,char*,F_INT*,complex_float*,F_INT* );
extern void F_FUNC(zpftrf,ZPFTRF)(char*,char*,F_INT*,complex_double*,F_INT* );
extern void F_FUNC(spftri,SPFTRI)(char*,char*,F_INT*,float*,F_INT* );
extern void F_FUNC(dpftri,DPFTRI)(char*,char*,F_INT*,double*,F_INT* );
extern void F_FUNC(cpftri,CPFTRI)(char*,char*,F_INT*,complex_float*,F_INT* );
extern void F_FUNC(zpftri,ZPFTRI)(char*,char*,F_INT*,complex_double*,F_INT* );
extern void F_FUNC(spftrs,SPFTRS)(char*,char*,F_INT*,F_INT*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dpftrs,DPFTRS)(char*,char*,F_INT*,F_INT*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(cpftrs,CPFTRS)(char*,char*,F_INT*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zpftrs,ZPFTRS)(char*,char*,F_INT*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(stzrzf,STZRZF)(F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dtzrzf,DTZRZF)(F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(ctzrzf,CTZRZF)(F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(ztzrzf,ZTZRZF)(F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(stzrzf ,STZRZF )(F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* );
extern void F_FUNC(dtzrzf ,DTZRZF )(F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* );
extern void F_FUNC(ctzrzf ,CTZRZF )(F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(ztzrzf ,ZTZRZF )(F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(slasd4,SLASD4)(F_INT*, F_INT*, float*, float*, float*, float*, float*, float*, F_INT* );
extern void F_FUNC(dlasd4,DLASD4)(F_INT*, F_INT*, double*, double*, double*, double*, double*, double*, F_INT* );
extern void F_FUNC(slauum,SLAUUM)(char*,F_INT*,float*,F_INT*,F_INT* );
extern void F_FUNC(dlauum,DLAUUM)(char*,F_INT*,double*,F_INT*,F_INT* );
extern void F_FUNC(clauum,CLAUUM)(char*,F_INT*,complex_float*,F_INT*,F_INT* );
extern void F_FUNC(zlauum,ZLAUUM)(char*,F_INT*,complex_double*,F_INT*,F_INT* );
extern void F_FUNC(slaswp,SLASWP)(F_INT*,float*,F_INT*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(dlaswp,DLASWP)(F_INT*,double*,F_INT*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(claswp,CLASWP)(F_INT*,complex_float*,F_INT*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_FUNC(zlaswp,ZLASWP)(F_INT*,complex_double*,F_INT*,F_INT*,F_INT*,F_INT*,F_INT* );
extern void F_WRAPPEDFUNC(dlamch,DLAMCH)(double*,string,size_t);
extern void F_WRAPPEDFUNC(slamch,SLAMCH)(float*,string,size_t);
extern void F_WRAPPEDFUNC(slange,SLANGE)(float*,char*,F_INT*,F_INT*,float*,F_INT*,float* );
extern void F_WRAPPEDFUNC(dlange,DLANGE)(double*,char*,F_INT*,F_INT*,double*,F_INT*,double* );
extern void F_WRAPPEDFUNC(clange,CLANGE)(float*,char*,F_INT*,F_INT*,complex_float*,F_INT*,float* );
extern void F_WRAPPEDFUNC(zlange,ZLANGE)(double*,char*,F_INT*,F_INT*,complex_double*,F_INT*,double* );
extern void F_FUNC(slarfg,SLARFG)(int*,float*,float*,int*,float*,int*);
extern void F_FUNC(dlarfg,DLARFG)(int*,double*,double*,int*,double*,int*);
extern void F_FUNC(clarfg,CLARFG)(int*,complex_float*,complex_float*,int*,complex_float*,int*);
extern void F_FUNC(zlarfg,ZLARFG)(int*,complex_double*,complex_double*,int*,complex_double*,int*);
extern void F_FUNC(slarf,SLARF)(string,int*,int*,float*,int*,float*,float*,int*,float*,int*,size_t);
extern void F_FUNC(dlarf,DLARF)(string,int*,int*,double*,int*,double*,double*,int*,double*,int*,size_t);
extern void F_FUNC(clarf,CLARF)(string,int*,int*,complex_float*,int*,complex_float*,complex_float*,int*,complex_float*,int*,size_t);
extern void F_FUNC(zlarf,ZLARF)(string,int*,int*,complex_double*,int*,complex_double*,complex_double*,int*,complex_double*,int*,size_t);
extern void F_FUNC(slartg,SLARTG)(float*,float*,float*,float*,float*);
extern void F_FUNC(dlartg,DLARTG)(double*,double*,double*,double*,double*);
extern void F_FUNC(clartg,CLARTG)(complex_float*,complex_float*,float*,complex_float*,complex_float*);
extern void F_FUNC(zlartg,ZLARTG)(complex_double*,complex_double*,double*,complex_double*,complex_double*);
extern void F_FUNC(crot,CROT)(F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,complex_float* );
extern void F_FUNC(zrot,ZROT)(F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,complex_double* );
extern void F_FUNC(ilaver,ILAVER)(int*,int*,int*);
/*eof externroutines*/
/******************** See f2py2e/capi_rules.py: usercode1 ********************/
/******************* See f2py2e/cb_rules.py: buildcallback *******************/
/********************* cb_cselect_in_gees__user__routines *********************/
typedef struct {
PyObject *capi;
PyTupleObject *args_capi;
int nofargs;
jmp_buf jmpbuf;
} cb_cselect_in_gees__user__routines_t;
#if defined(F2PY_THREAD_LOCAL_DECL) && !defined(F2PY_USE_PYTHON_TLS)
static F2PY_THREAD_LOCAL_DECL cb_cselect_in_gees__user__routines_t *_active_cb_cselect_in_gees__user__routines = NULL;
static cb_cselect_in_gees__user__routines_t *swap_active_cb_cselect_in_gees__user__routines(cb_cselect_in_gees__user__routines_t *ptr) {
cb_cselect_in_gees__user__routines_t *prev = _active_cb_cselect_in_gees__user__routines;
_active_cb_cselect_in_gees__user__routines = ptr;
return prev;
}
static cb_cselect_in_gees__user__routines_t *get_active_cb_cselect_in_gees__user__routines(void) {
return _active_cb_cselect_in_gees__user__routines;
}
#else
static cb_cselect_in_gees__user__routines_t *swap_active_cb_cselect_in_gees__user__routines(cb_cselect_in_gees__user__routines_t *ptr) {
char *key = "__f2py_cb_cb_cselect_in_gees__user__routines";
return (cb_cselect_in_gees__user__routines_t *)F2PySwapThreadLocalCallbackPtr(key, ptr);
}
static cb_cselect_in_gees__user__routines_t *get_active_cb_cselect_in_gees__user__routines(void) {
char *key = "__f2py_cb_cb_cselect_in_gees__user__routines";
return (cb_cselect_in_gees__user__routines_t *)F2PyGetThreadLocalCallbackPtr(key);
}
#endif
/*typedef int(*cb_cselect_in_gees__user__routines_typedef)(complex_float *);*/
static int cb_cselect_in_gees__user__routines (complex_float *arg_cb_capi) {
cb_cselect_in_gees__user__routines_t cb_local = { NULL, NULL, 0 };
cb_cselect_in_gees__user__routines_t *cb = NULL;
PyTupleObject *capi_arglist = NULL;
PyObject *capi_return = NULL;
PyObject *capi_tmp = NULL;
PyObject *capi_arglist_list = NULL;
int capi_j,capi_i = 0;
int capi_longjmp_ok = 1;
/*decl*/
int return_value;
complex_float arg=(*arg_cb_capi);
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_start_clock();
#endif
cb = get_active_cb_cselect_in_gees__user__routines();
if (cb == NULL) {
capi_longjmp_ok = 0;
cb = &cb_local;
}
capi_arglist = cb->args_capi;
CFUNCSMESS("cb:Call-back function cb_cselect_in_gees__user__routines (maxnofargs=1(-0))\n");
CFUNCSMESSPY("cb:cb_cselect_in_gees__user__routines_capi=",cb->capi);
if (cb->capi==NULL) {
capi_longjmp_ok = 0;
cb->capi = PyObject_GetAttrString(_flapack_module,"cselect");
CFUNCSMESSPY("cb:cb_cselect_in_gees__user__routines_capi=",cb->capi);
}
if (cb->capi==NULL) {
PyErr_SetString(_flapack_error,"cb: Callback cselect not defined (as an argument or module _flapack attribute).\n");
goto capi_fail;
}
if (F2PyCapsule_Check(cb->capi)) {
cb_cselect_in_gees__user__routines_typedef cb_cselect_in_gees__user__routines_cptr;
cb_cselect_in_gees__user__routines_cptr = F2PyCapsule_AsVoidPtr(cb->capi);
return_value=(*cb_cselect_in_gees__user__routines_cptr)(arg_cb_capi);
return return_value;
}
if (capi_arglist==NULL) {
capi_longjmp_ok = 0;
capi_tmp = PyObject_GetAttrString(_flapack_module,"cselect_extra_args");
if (capi_tmp) {
capi_arglist = (PyTupleObject *)PySequence_Tuple(capi_tmp);
Py_DECREF(capi_tmp);
if (capi_arglist==NULL) {
PyErr_SetString(_flapack_error,"Failed to convert _flapack.cselect_extra_args to tuple.\n");
goto capi_fail;
}
} else {
PyErr_Clear();
capi_arglist = (PyTupleObject *)Py_BuildValue("()");
}
}
if (capi_arglist == NULL) {
PyErr_SetString(_flapack_error,"Callback cselect argument list is not set.\n");
goto capi_fail;
}
/*setdims*/
#ifdef PYPY_VERSION
#define CAPI_ARGLIST_SETITEM(idx, value) PyList_SetItem((PyObject *)capi_arglist_list, idx, value)
capi_arglist_list = PySequence_List(capi_arglist);
if (capi_arglist_list == NULL) goto capi_fail;
#else
#define CAPI_ARGLIST_SETITEM(idx, value) PyTuple_SetItem((PyObject *)capi_arglist, idx, value)
#endif
/*pyobjfrom*/
if (cb->nofargs>capi_i)
if (CAPI_ARGLIST_SETITEM(capi_i++,pyobj_from_complex_float1(arg)))
goto capi_fail;
#undef CAPI_ARGLIST_SETITEM
#ifdef PYPY_VERSION
CFUNCSMESSPY("cb:capi_arglist=",capi_arglist_list);
#else
CFUNCSMESSPY("cb:capi_arglist=",capi_arglist);
#endif
CFUNCSMESS("cb:Call-back calling Python function cselect.\n");
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_start_call_clock();
#endif
#ifdef PYPY_VERSION
capi_return = PyObject_CallObject(cb->capi,(PyObject *)capi_arglist_list);
Py_DECREF(capi_arglist_list);
capi_arglist_list = NULL;
#else
capi_return = PyObject_CallObject(cb->capi,(PyObject *)capi_arglist);
#endif
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_stop_call_clock();
#endif
CFUNCSMESSPY("cb:capi_return=",capi_return);
if (capi_return == NULL) {
fprintf(stderr,"capi_return is NULL\n");
goto capi_fail;
}
if (capi_return == Py_None) {
Py_DECREF(capi_return);
capi_return = Py_BuildValue("()");
}
else if (!PyTuple_Check(capi_return)) {
capi_return = Py_BuildValue("(N)",capi_return);
}
capi_j = PyTuple_Size(capi_return);
capi_i = 0;
/*frompyobj*/
if (capi_j>capi_i)
GETSCALARFROMPYTUPLE(capi_return,capi_i++,&return_value,int,"int_from_pyobj failed in converting return_value of call-back function cb_cselect_in_gees__user__routines to C int\n");
CFUNCSMESS("cb:cb_cselect_in_gees__user__routines:successful\n");
Py_DECREF(capi_return);
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_stop_clock();
#endif
goto capi_return_pt;
capi_fail:
fprintf(stderr,"Call-back cb_cselect_in_gees__user__routines failed.\n");
Py_XDECREF(capi_return);
Py_XDECREF(capi_arglist_list);
if (capi_longjmp_ok) {
longjmp(cb->jmpbuf,-1);
}
capi_return_pt:
;
return return_value;
}
/***************** end of cb_cselect_in_gees__user__routines *****************/
/********************* cb_zselect_in_gees__user__routines *********************/
typedef struct {
PyObject *capi;
PyTupleObject *args_capi;
int nofargs;
jmp_buf jmpbuf;
} cb_zselect_in_gees__user__routines_t;
#if defined(F2PY_THREAD_LOCAL_DECL) && !defined(F2PY_USE_PYTHON_TLS)
static F2PY_THREAD_LOCAL_DECL cb_zselect_in_gees__user__routines_t *_active_cb_zselect_in_gees__user__routines = NULL;
static cb_zselect_in_gees__user__routines_t *swap_active_cb_zselect_in_gees__user__routines(cb_zselect_in_gees__user__routines_t *ptr) {
cb_zselect_in_gees__user__routines_t *prev = _active_cb_zselect_in_gees__user__routines;
_active_cb_zselect_in_gees__user__routines = ptr;
return prev;
}
static cb_zselect_in_gees__user__routines_t *get_active_cb_zselect_in_gees__user__routines(void) {
return _active_cb_zselect_in_gees__user__routines;
}
#else
static cb_zselect_in_gees__user__routines_t *swap_active_cb_zselect_in_gees__user__routines(cb_zselect_in_gees__user__routines_t *ptr) {
char *key = "__f2py_cb_cb_zselect_in_gees__user__routines";
return (cb_zselect_in_gees__user__routines_t *)F2PySwapThreadLocalCallbackPtr(key, ptr);
}
static cb_zselect_in_gees__user__routines_t *get_active_cb_zselect_in_gees__user__routines(void) {
char *key = "__f2py_cb_cb_zselect_in_gees__user__routines";
return (cb_zselect_in_gees__user__routines_t *)F2PyGetThreadLocalCallbackPtr(key);
}
#endif
/*typedef int(*cb_zselect_in_gees__user__routines_typedef)(complex_double *);*/
static int cb_zselect_in_gees__user__routines (complex_double *arg_cb_capi) {
cb_zselect_in_gees__user__routines_t cb_local = { NULL, NULL, 0 };
cb_zselect_in_gees__user__routines_t *cb = NULL;
PyTupleObject *capi_arglist = NULL;
PyObject *capi_return = NULL;
PyObject *capi_tmp = NULL;
PyObject *capi_arglist_list = NULL;
int capi_j,capi_i = 0;
int capi_longjmp_ok = 1;
/*decl*/
int return_value;
complex_double arg=(*arg_cb_capi);
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_start_clock();
#endif
cb = get_active_cb_zselect_in_gees__user__routines();
if (cb == NULL) {
capi_longjmp_ok = 0;
cb = &cb_local;
}
capi_arglist = cb->args_capi;
CFUNCSMESS("cb:Call-back function cb_zselect_in_gees__user__routines (maxnofargs=1(-0))\n");
CFUNCSMESSPY("cb:cb_zselect_in_gees__user__routines_capi=",cb->capi);
if (cb->capi==NULL) {
capi_longjmp_ok = 0;
cb->capi = PyObject_GetAttrString(_flapack_module,"zselect");
CFUNCSMESSPY("cb:cb_zselect_in_gees__user__routines_capi=",cb->capi);
}
if (cb->capi==NULL) {
PyErr_SetString(_flapack_error,"cb: Callback zselect not defined (as an argument or module _flapack attribute).\n");
goto capi_fail;
}
if (F2PyCapsule_Check(cb->capi)) {
cb_zselect_in_gees__user__routines_typedef cb_zselect_in_gees__user__routines_cptr;
cb_zselect_in_gees__user__routines_cptr = F2PyCapsule_AsVoidPtr(cb->capi);
return_value=(*cb_zselect_in_gees__user__routines_cptr)(arg_cb_capi);
return return_value;
}
if (capi_arglist==NULL) {
capi_longjmp_ok = 0;
capi_tmp = PyObject_GetAttrString(_flapack_module,"zselect_extra_args");
if (capi_tmp) {
capi_arglist = (PyTupleObject *)PySequence_Tuple(capi_tmp);
Py_DECREF(capi_tmp);
if (capi_arglist==NULL) {
PyErr_SetString(_flapack_error,"Failed to convert _flapack.zselect_extra_args to tuple.\n");
goto capi_fail;
}
} else {
PyErr_Clear();
capi_arglist = (PyTupleObject *)Py_BuildValue("()");
}
}
if (capi_arglist == NULL) {
PyErr_SetString(_flapack_error,"Callback zselect argument list is not set.\n");
goto capi_fail;
}
/*setdims*/
#ifdef PYPY_VERSION
#define CAPI_ARGLIST_SETITEM(idx, value) PyList_SetItem((PyObject *)capi_arglist_list, idx, value)
capi_arglist_list = PySequence_List(capi_arglist);
if (capi_arglist_list == NULL) goto capi_fail;
#else
#define CAPI_ARGLIST_SETITEM(idx, value) PyTuple_SetItem((PyObject *)capi_arglist, idx, value)
#endif
/*pyobjfrom*/
if (cb->nofargs>capi_i)
if (CAPI_ARGLIST_SETITEM(capi_i++,pyobj_from_complex_double1(arg)))
goto capi_fail;
#undef CAPI_ARGLIST_SETITEM
#ifdef PYPY_VERSION
CFUNCSMESSPY("cb:capi_arglist=",capi_arglist_list);
#else
CFUNCSMESSPY("cb:capi_arglist=",capi_arglist);
#endif
CFUNCSMESS("cb:Call-back calling Python function zselect.\n");
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_start_call_clock();
#endif
#ifdef PYPY_VERSION
capi_return = PyObject_CallObject(cb->capi,(PyObject *)capi_arglist_list);
Py_DECREF(capi_arglist_list);
capi_arglist_list = NULL;
#else
capi_return = PyObject_CallObject(cb->capi,(PyObject *)capi_arglist);
#endif
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_stop_call_clock();
#endif
CFUNCSMESSPY("cb:capi_return=",capi_return);
if (capi_return == NULL) {
fprintf(stderr,"capi_return is NULL\n");
goto capi_fail;
}
if (capi_return == Py_None) {
Py_DECREF(capi_return);
capi_return = Py_BuildValue("()");
}
else if (!PyTuple_Check(capi_return)) {
capi_return = Py_BuildValue("(N)",capi_return);
}
capi_j = PyTuple_Size(capi_return);
capi_i = 0;
/*frompyobj*/
if (capi_j>capi_i)
GETSCALARFROMPYTUPLE(capi_return,capi_i++,&return_value,int,"int_from_pyobj failed in converting return_value of call-back function cb_zselect_in_gees__user__routines to C int\n");
CFUNCSMESS("cb:cb_zselect_in_gees__user__routines:successful\n");
Py_DECREF(capi_return);
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_stop_clock();
#endif
goto capi_return_pt;
capi_fail:
fprintf(stderr,"Call-back cb_zselect_in_gees__user__routines failed.\n");
Py_XDECREF(capi_return);
Py_XDECREF(capi_arglist_list);
if (capi_longjmp_ok) {
longjmp(cb->jmpbuf,-1);
}
capi_return_pt:
;
return return_value;
}
/***************** end of cb_zselect_in_gees__user__routines *****************/
/********************* cb_sselect_in_gees__user__routines *********************/
typedef struct {
PyObject *capi;
PyTupleObject *args_capi;
int nofargs;
jmp_buf jmpbuf;
} cb_sselect_in_gees__user__routines_t;
#if defined(F2PY_THREAD_LOCAL_DECL) && !defined(F2PY_USE_PYTHON_TLS)
static F2PY_THREAD_LOCAL_DECL cb_sselect_in_gees__user__routines_t *_active_cb_sselect_in_gees__user__routines = NULL;
static cb_sselect_in_gees__user__routines_t *swap_active_cb_sselect_in_gees__user__routines(cb_sselect_in_gees__user__routines_t *ptr) {
cb_sselect_in_gees__user__routines_t *prev = _active_cb_sselect_in_gees__user__routines;
_active_cb_sselect_in_gees__user__routines = ptr;
return prev;
}
static cb_sselect_in_gees__user__routines_t *get_active_cb_sselect_in_gees__user__routines(void) {
return _active_cb_sselect_in_gees__user__routines;
}
#else
static cb_sselect_in_gees__user__routines_t *swap_active_cb_sselect_in_gees__user__routines(cb_sselect_in_gees__user__routines_t *ptr) {
char *key = "__f2py_cb_cb_sselect_in_gees__user__routines";
return (cb_sselect_in_gees__user__routines_t *)F2PySwapThreadLocalCallbackPtr(key, ptr);
}
static cb_sselect_in_gees__user__routines_t *get_active_cb_sselect_in_gees__user__routines(void) {
char *key = "__f2py_cb_cb_sselect_in_gees__user__routines";
return (cb_sselect_in_gees__user__routines_t *)F2PyGetThreadLocalCallbackPtr(key);
}
#endif
/*typedef int(*cb_sselect_in_gees__user__routines_typedef)(float *,float *);*/
static int cb_sselect_in_gees__user__routines (float *arg1_cb_capi,float *arg2_cb_capi) {
cb_sselect_in_gees__user__routines_t cb_local = { NULL, NULL, 0 };
cb_sselect_in_gees__user__routines_t *cb = NULL;
PyTupleObject *capi_arglist = NULL;
PyObject *capi_return = NULL;
PyObject *capi_tmp = NULL;
PyObject *capi_arglist_list = NULL;
int capi_j,capi_i = 0;
int capi_longjmp_ok = 1;
/*decl*/
int return_value;
float arg1=(*arg1_cb_capi);
float arg2=(*arg2_cb_capi);
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_start_clock();
#endif
cb = get_active_cb_sselect_in_gees__user__routines();
if (cb == NULL) {
capi_longjmp_ok = 0;
cb = &cb_local;
}
capi_arglist = cb->args_capi;
CFUNCSMESS("cb:Call-back function cb_sselect_in_gees__user__routines (maxnofargs=2(-0))\n");
CFUNCSMESSPY("cb:cb_sselect_in_gees__user__routines_capi=",cb->capi);
if (cb->capi==NULL) {
capi_longjmp_ok = 0;
cb->capi = PyObject_GetAttrString(_flapack_module,"sselect");
CFUNCSMESSPY("cb:cb_sselect_in_gees__user__routines_capi=",cb->capi);
}
if (cb->capi==NULL) {
PyErr_SetString(_flapack_error,"cb: Callback sselect not defined (as an argument or module _flapack attribute).\n");
goto capi_fail;
}
if (F2PyCapsule_Check(cb->capi)) {
cb_sselect_in_gees__user__routines_typedef cb_sselect_in_gees__user__routines_cptr;
cb_sselect_in_gees__user__routines_cptr = F2PyCapsule_AsVoidPtr(cb->capi);
return_value=(*cb_sselect_in_gees__user__routines_cptr)(arg1_cb_capi,arg2_cb_capi);
return return_value;
}
if (capi_arglist==NULL) {
capi_longjmp_ok = 0;
capi_tmp = PyObject_GetAttrString(_flapack_module,"sselect_extra_args");
if (capi_tmp) {
capi_arglist = (PyTupleObject *)PySequence_Tuple(capi_tmp);
Py_DECREF(capi_tmp);
if (capi_arglist==NULL) {
PyErr_SetString(_flapack_error,"Failed to convert _flapack.sselect_extra_args to tuple.\n");
goto capi_fail;
}
} else {
PyErr_Clear();
capi_arglist = (PyTupleObject *)Py_BuildValue("()");
}
}
if (capi_arglist == NULL) {
PyErr_SetString(_flapack_error,"Callback sselect argument list is not set.\n");
goto capi_fail;
}
/*setdims*/
#ifdef PYPY_VERSION
#define CAPI_ARGLIST_SETITEM(idx, value) PyList_SetItem((PyObject *)capi_arglist_list, idx, value)
capi_arglist_list = PySequence_List(capi_arglist);
if (capi_arglist_list == NULL) goto capi_fail;
#else
#define CAPI_ARGLIST_SETITEM(idx, value) PyTuple_SetItem((PyObject *)capi_arglist, idx, value)
#endif
/*pyobjfrom*/
if (cb->nofargs>capi_i)
if (CAPI_ARGLIST_SETITEM(capi_i++,pyobj_from_float1(arg1)))
goto capi_fail;
if (cb->nofargs>capi_i)
if (CAPI_ARGLIST_SETITEM(capi_i++,pyobj_from_float1(arg2)))
goto capi_fail;
#undef CAPI_ARGLIST_SETITEM
#ifdef PYPY_VERSION
CFUNCSMESSPY("cb:capi_arglist=",capi_arglist_list);
#else
CFUNCSMESSPY("cb:capi_arglist=",capi_arglist);
#endif
CFUNCSMESS("cb:Call-back calling Python function sselect.\n");
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_start_call_clock();
#endif
#ifdef PYPY_VERSION
capi_return = PyObject_CallObject(cb->capi,(PyObject *)capi_arglist_list);
Py_DECREF(capi_arglist_list);
capi_arglist_list = NULL;
#else
capi_return = PyObject_CallObject(cb->capi,(PyObject *)capi_arglist);
#endif
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_stop_call_clock();
#endif
CFUNCSMESSPY("cb:capi_return=",capi_return);
if (capi_return == NULL) {
fprintf(stderr,"capi_return is NULL\n");
goto capi_fail;
}
if (capi_return == Py_None) {
Py_DECREF(capi_return);
capi_return = Py_BuildValue("()");
}
else if (!PyTuple_Check(capi_return)) {
capi_return = Py_BuildValue("(N)",capi_return);
}
capi_j = PyTuple_Size(capi_return);
capi_i = 0;
/*frompyobj*/
if (capi_j>capi_i)
GETSCALARFROMPYTUPLE(capi_return,capi_i++,&return_value,int,"int_from_pyobj failed in converting return_value of call-back function cb_sselect_in_gees__user__routines to C int\n");
CFUNCSMESS("cb:cb_sselect_in_gees__user__routines:successful\n");
Py_DECREF(capi_return);
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_stop_clock();
#endif
goto capi_return_pt;
capi_fail:
fprintf(stderr,"Call-back cb_sselect_in_gees__user__routines failed.\n");
Py_XDECREF(capi_return);
Py_XDECREF(capi_arglist_list);
if (capi_longjmp_ok) {
longjmp(cb->jmpbuf,-1);
}
capi_return_pt:
;
return return_value;
}
/***************** end of cb_sselect_in_gees__user__routines *****************/
/********************* cb_dselect_in_gees__user__routines *********************/
typedef struct {
PyObject *capi;
PyTupleObject *args_capi;
int nofargs;
jmp_buf jmpbuf;
} cb_dselect_in_gees__user__routines_t;
#if defined(F2PY_THREAD_LOCAL_DECL) && !defined(F2PY_USE_PYTHON_TLS)
static F2PY_THREAD_LOCAL_DECL cb_dselect_in_gees__user__routines_t *_active_cb_dselect_in_gees__user__routines = NULL;
static cb_dselect_in_gees__user__routines_t *swap_active_cb_dselect_in_gees__user__routines(cb_dselect_in_gees__user__routines_t *ptr) {
cb_dselect_in_gees__user__routines_t *prev = _active_cb_dselect_in_gees__user__routines;
_active_cb_dselect_in_gees__user__routines = ptr;
return prev;
}
static cb_dselect_in_gees__user__routines_t *get_active_cb_dselect_in_gees__user__routines(void) {
return _active_cb_dselect_in_gees__user__routines;
}
#else
static cb_dselect_in_gees__user__routines_t *swap_active_cb_dselect_in_gees__user__routines(cb_dselect_in_gees__user__routines_t *ptr) {
char *key = "__f2py_cb_cb_dselect_in_gees__user__routines";
return (cb_dselect_in_gees__user__routines_t *)F2PySwapThreadLocalCallbackPtr(key, ptr);
}
static cb_dselect_in_gees__user__routines_t *get_active_cb_dselect_in_gees__user__routines(void) {
char *key = "__f2py_cb_cb_dselect_in_gees__user__routines";
return (cb_dselect_in_gees__user__routines_t *)F2PyGetThreadLocalCallbackPtr(key);
}
#endif
/*typedef int(*cb_dselect_in_gees__user__routines_typedef)(double *,double *);*/
static int cb_dselect_in_gees__user__routines (double *arg1_cb_capi,double *arg2_cb_capi) {
cb_dselect_in_gees__user__routines_t cb_local = { NULL, NULL, 0 };
cb_dselect_in_gees__user__routines_t *cb = NULL;
PyTupleObject *capi_arglist = NULL;
PyObject *capi_return = NULL;
PyObject *capi_tmp = NULL;
PyObject *capi_arglist_list = NULL;
int capi_j,capi_i = 0;
int capi_longjmp_ok = 1;
/*decl*/
int return_value;
double arg1=(*arg1_cb_capi);
double arg2=(*arg2_cb_capi);
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_start_clock();
#endif
cb = get_active_cb_dselect_in_gees__user__routines();
if (cb == NULL) {
capi_longjmp_ok = 0;
cb = &cb_local;
}
capi_arglist = cb->args_capi;
CFUNCSMESS("cb:Call-back function cb_dselect_in_gees__user__routines (maxnofargs=2(-0))\n");
CFUNCSMESSPY("cb:cb_dselect_in_gees__user__routines_capi=",cb->capi);
if (cb->capi==NULL) {
capi_longjmp_ok = 0;
cb->capi = PyObject_GetAttrString(_flapack_module,"dselect");
CFUNCSMESSPY("cb:cb_dselect_in_gees__user__routines_capi=",cb->capi);
}
if (cb->capi==NULL) {
PyErr_SetString(_flapack_error,"cb: Callback dselect not defined (as an argument or module _flapack attribute).\n");
goto capi_fail;
}
if (F2PyCapsule_Check(cb->capi)) {
cb_dselect_in_gees__user__routines_typedef cb_dselect_in_gees__user__routines_cptr;
cb_dselect_in_gees__user__routines_cptr = F2PyCapsule_AsVoidPtr(cb->capi);
return_value=(*cb_dselect_in_gees__user__routines_cptr)(arg1_cb_capi,arg2_cb_capi);
return return_value;
}
if (capi_arglist==NULL) {
capi_longjmp_ok = 0;
capi_tmp = PyObject_GetAttrString(_flapack_module,"dselect_extra_args");
if (capi_tmp) {
capi_arglist = (PyTupleObject *)PySequence_Tuple(capi_tmp);
Py_DECREF(capi_tmp);
if (capi_arglist==NULL) {
PyErr_SetString(_flapack_error,"Failed to convert _flapack.dselect_extra_args to tuple.\n");
goto capi_fail;
}
} else {
PyErr_Clear();
capi_arglist = (PyTupleObject *)Py_BuildValue("()");
}
}
if (capi_arglist == NULL) {
PyErr_SetString(_flapack_error,"Callback dselect argument list is not set.\n");
goto capi_fail;
}
/*setdims*/
#ifdef PYPY_VERSION
#define CAPI_ARGLIST_SETITEM(idx, value) PyList_SetItem((PyObject *)capi_arglist_list, idx, value)
capi_arglist_list = PySequence_List(capi_arglist);
if (capi_arglist_list == NULL) goto capi_fail;
#else
#define CAPI_ARGLIST_SETITEM(idx, value) PyTuple_SetItem((PyObject *)capi_arglist, idx, value)
#endif
/*pyobjfrom*/
if (cb->nofargs>capi_i)
if (CAPI_ARGLIST_SETITEM(capi_i++,pyobj_from_double1(arg1)))
goto capi_fail;
if (cb->nofargs>capi_i)
if (CAPI_ARGLIST_SETITEM(capi_i++,pyobj_from_double1(arg2)))
goto capi_fail;
#undef CAPI_ARGLIST_SETITEM
#ifdef PYPY_VERSION
CFUNCSMESSPY("cb:capi_arglist=",capi_arglist_list);
#else
CFUNCSMESSPY("cb:capi_arglist=",capi_arglist);
#endif
CFUNCSMESS("cb:Call-back calling Python function dselect.\n");
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_start_call_clock();
#endif
#ifdef PYPY_VERSION
capi_return = PyObject_CallObject(cb->capi,(PyObject *)capi_arglist_list);
Py_DECREF(capi_arglist_list);
capi_arglist_list = NULL;
#else
capi_return = PyObject_CallObject(cb->capi,(PyObject *)capi_arglist);
#endif
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_stop_call_clock();
#endif
CFUNCSMESSPY("cb:capi_return=",capi_return);
if (capi_return == NULL) {
fprintf(stderr,"capi_return is NULL\n");
goto capi_fail;
}
if (capi_return == Py_None) {
Py_DECREF(capi_return);
capi_return = Py_BuildValue("()");
}
else if (!PyTuple_Check(capi_return)) {
capi_return = Py_BuildValue("(N)",capi_return);
}
capi_j = PyTuple_Size(capi_return);
capi_i = 0;
/*frompyobj*/
if (capi_j>capi_i)
GETSCALARFROMPYTUPLE(capi_return,capi_i++,&return_value,int,"int_from_pyobj failed in converting return_value of call-back function cb_dselect_in_gees__user__routines to C int\n");
CFUNCSMESS("cb:cb_dselect_in_gees__user__routines:successful\n");
Py_DECREF(capi_return);
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_stop_clock();
#endif
goto capi_return_pt;
capi_fail:
fprintf(stderr,"Call-back cb_dselect_in_gees__user__routines failed.\n");
Py_XDECREF(capi_return);
Py_XDECREF(capi_arglist_list);
if (capi_longjmp_ok) {
longjmp(cb->jmpbuf,-1);
}
capi_return_pt:
;
return return_value;
}
/***************** end of cb_dselect_in_gees__user__routines *****************/
/********************* cb_sselect_in_gges__user__routines *********************/
typedef struct {
PyObject *capi;
PyTupleObject *args_capi;
int nofargs;
jmp_buf jmpbuf;
} cb_sselect_in_gges__user__routines_t;
#if defined(F2PY_THREAD_LOCAL_DECL) && !defined(F2PY_USE_PYTHON_TLS)
static F2PY_THREAD_LOCAL_DECL cb_sselect_in_gges__user__routines_t *_active_cb_sselect_in_gges__user__routines = NULL;
static cb_sselect_in_gges__user__routines_t *swap_active_cb_sselect_in_gges__user__routines(cb_sselect_in_gges__user__routines_t *ptr) {
cb_sselect_in_gges__user__routines_t *prev = _active_cb_sselect_in_gges__user__routines;
_active_cb_sselect_in_gges__user__routines = ptr;
return prev;
}
static cb_sselect_in_gges__user__routines_t *get_active_cb_sselect_in_gges__user__routines(void) {
return _active_cb_sselect_in_gges__user__routines;
}
#else
static cb_sselect_in_gges__user__routines_t *swap_active_cb_sselect_in_gges__user__routines(cb_sselect_in_gges__user__routines_t *ptr) {
char *key = "__f2py_cb_cb_sselect_in_gges__user__routines";
return (cb_sselect_in_gges__user__routines_t *)F2PySwapThreadLocalCallbackPtr(key, ptr);
}
static cb_sselect_in_gges__user__routines_t *get_active_cb_sselect_in_gges__user__routines(void) {
char *key = "__f2py_cb_cb_sselect_in_gges__user__routines";
return (cb_sselect_in_gges__user__routines_t *)F2PyGetThreadLocalCallbackPtr(key);
}
#endif
/*typedef int(*cb_sselect_in_gges__user__routines_typedef)(float *,float *,float *);*/
static int cb_sselect_in_gges__user__routines (float *alphar_cb_capi,float *alphai_cb_capi,float *beta_cb_capi) {
cb_sselect_in_gges__user__routines_t cb_local = { NULL, NULL, 0 };
cb_sselect_in_gges__user__routines_t *cb = NULL;
PyTupleObject *capi_arglist = NULL;
PyObject *capi_return = NULL;
PyObject *capi_tmp = NULL;
PyObject *capi_arglist_list = NULL;
int capi_j,capi_i = 0;
int capi_longjmp_ok = 1;
/*decl*/
int return_value;
float alphar=(*alphar_cb_capi);
float alphai=(*alphai_cb_capi);
float beta=(*beta_cb_capi);
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_start_clock();
#endif
cb = get_active_cb_sselect_in_gges__user__routines();
if (cb == NULL) {
capi_longjmp_ok = 0;
cb = &cb_local;
}
capi_arglist = cb->args_capi;
CFUNCSMESS("cb:Call-back function cb_sselect_in_gges__user__routines (maxnofargs=3(-0))\n");
CFUNCSMESSPY("cb:cb_sselect_in_gges__user__routines_capi=",cb->capi);
if (cb->capi==NULL) {
capi_longjmp_ok = 0;
cb->capi = PyObject_GetAttrString(_flapack_module,"sselect");
CFUNCSMESSPY("cb:cb_sselect_in_gges__user__routines_capi=",cb->capi);
}
if (cb->capi==NULL) {
PyErr_SetString(_flapack_error,"cb: Callback sselect not defined (as an argument or module _flapack attribute).\n");
goto capi_fail;
}
if (F2PyCapsule_Check(cb->capi)) {
cb_sselect_in_gges__user__routines_typedef cb_sselect_in_gges__user__routines_cptr;
cb_sselect_in_gges__user__routines_cptr = F2PyCapsule_AsVoidPtr(cb->capi);
return_value=(*cb_sselect_in_gges__user__routines_cptr)(alphar_cb_capi,alphai_cb_capi,beta_cb_capi);
return return_value;
}
if (capi_arglist==NULL) {
capi_longjmp_ok = 0;
capi_tmp = PyObject_GetAttrString(_flapack_module,"sselect_extra_args");
if (capi_tmp) {
capi_arglist = (PyTupleObject *)PySequence_Tuple(capi_tmp);
Py_DECREF(capi_tmp);
if (capi_arglist==NULL) {
PyErr_SetString(_flapack_error,"Failed to convert _flapack.sselect_extra_args to tuple.\n");
goto capi_fail;
}
} else {
PyErr_Clear();
capi_arglist = (PyTupleObject *)Py_BuildValue("()");
}
}
if (capi_arglist == NULL) {
PyErr_SetString(_flapack_error,"Callback sselect argument list is not set.\n");
goto capi_fail;
}
/*setdims*/
#ifdef PYPY_VERSION
#define CAPI_ARGLIST_SETITEM(idx, value) PyList_SetItem((PyObject *)capi_arglist_list, idx, value)
capi_arglist_list = PySequence_List(capi_arglist);
if (capi_arglist_list == NULL) goto capi_fail;
#else
#define CAPI_ARGLIST_SETITEM(idx, value) PyTuple_SetItem((PyObject *)capi_arglist, idx, value)
#endif
/*pyobjfrom*/
if (cb->nofargs>capi_i)
if (CAPI_ARGLIST_SETITEM(capi_i++,pyobj_from_float1(alphar)))
goto capi_fail;
if (cb->nofargs>capi_i)
if (CAPI_ARGLIST_SETITEM(capi_i++,pyobj_from_float1(alphai)))
goto capi_fail;
if (cb->nofargs>capi_i)
if (CAPI_ARGLIST_SETITEM(capi_i++,pyobj_from_float1(beta)))
goto capi_fail;
#undef CAPI_ARGLIST_SETITEM
#ifdef PYPY_VERSION
CFUNCSMESSPY("cb:capi_arglist=",capi_arglist_list);
#else
CFUNCSMESSPY("cb:capi_arglist=",capi_arglist);
#endif
CFUNCSMESS("cb:Call-back calling Python function sselect.\n");
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_start_call_clock();
#endif
#ifdef PYPY_VERSION
capi_return = PyObject_CallObject(cb->capi,(PyObject *)capi_arglist_list);
Py_DECREF(capi_arglist_list);
capi_arglist_list = NULL;
#else
capi_return = PyObject_CallObject(cb->capi,(PyObject *)capi_arglist);
#endif
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_stop_call_clock();
#endif
CFUNCSMESSPY("cb:capi_return=",capi_return);
if (capi_return == NULL) {
fprintf(stderr,"capi_return is NULL\n");
goto capi_fail;
}
if (capi_return == Py_None) {
Py_DECREF(capi_return);
capi_return = Py_BuildValue("()");
}
else if (!PyTuple_Check(capi_return)) {
capi_return = Py_BuildValue("(N)",capi_return);
}
capi_j = PyTuple_Size(capi_return);
capi_i = 0;
/*frompyobj*/
if (capi_j>capi_i)
GETSCALARFROMPYTUPLE(capi_return,capi_i++,&return_value,int,"int_from_pyobj failed in converting return_value of call-back function cb_sselect_in_gges__user__routines to C int\n");
CFUNCSMESS("cb:cb_sselect_in_gges__user__routines:successful\n");
Py_DECREF(capi_return);
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_stop_clock();
#endif
goto capi_return_pt;
capi_fail:
fprintf(stderr,"Call-back cb_sselect_in_gges__user__routines failed.\n");
Py_XDECREF(capi_return);
Py_XDECREF(capi_arglist_list);
if (capi_longjmp_ok) {
longjmp(cb->jmpbuf,-1);
}
capi_return_pt:
;
return return_value;
}
/***************** end of cb_sselect_in_gges__user__routines *****************/
/********************* cb_dselect_in_gges__user__routines *********************/
typedef struct {
PyObject *capi;
PyTupleObject *args_capi;
int nofargs;
jmp_buf jmpbuf;
} cb_dselect_in_gges__user__routines_t;
#if defined(F2PY_THREAD_LOCAL_DECL) && !defined(F2PY_USE_PYTHON_TLS)
static F2PY_THREAD_LOCAL_DECL cb_dselect_in_gges__user__routines_t *_active_cb_dselect_in_gges__user__routines = NULL;
static cb_dselect_in_gges__user__routines_t *swap_active_cb_dselect_in_gges__user__routines(cb_dselect_in_gges__user__routines_t *ptr) {
cb_dselect_in_gges__user__routines_t *prev = _active_cb_dselect_in_gges__user__routines;
_active_cb_dselect_in_gges__user__routines = ptr;
return prev;
}
static cb_dselect_in_gges__user__routines_t *get_active_cb_dselect_in_gges__user__routines(void) {
return _active_cb_dselect_in_gges__user__routines;
}
#else
static cb_dselect_in_gges__user__routines_t *swap_active_cb_dselect_in_gges__user__routines(cb_dselect_in_gges__user__routines_t *ptr) {
char *key = "__f2py_cb_cb_dselect_in_gges__user__routines";
return (cb_dselect_in_gges__user__routines_t *)F2PySwapThreadLocalCallbackPtr(key, ptr);
}
static cb_dselect_in_gges__user__routines_t *get_active_cb_dselect_in_gges__user__routines(void) {
char *key = "__f2py_cb_cb_dselect_in_gges__user__routines";
return (cb_dselect_in_gges__user__routines_t *)F2PyGetThreadLocalCallbackPtr(key);
}
#endif
/*typedef int(*cb_dselect_in_gges__user__routines_typedef)(double *,double *,double *);*/
static int cb_dselect_in_gges__user__routines (double *alphar_cb_capi,double *alphai_cb_capi,double *beta_cb_capi) {
cb_dselect_in_gges__user__routines_t cb_local = { NULL, NULL, 0 };
cb_dselect_in_gges__user__routines_t *cb = NULL;
PyTupleObject *capi_arglist = NULL;
PyObject *capi_return = NULL;
PyObject *capi_tmp = NULL;
PyObject *capi_arglist_list = NULL;
int capi_j,capi_i = 0;
int capi_longjmp_ok = 1;
/*decl*/
int return_value;
double alphar=(*alphar_cb_capi);
double alphai=(*alphai_cb_capi);
double beta=(*beta_cb_capi);
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_start_clock();
#endif
cb = get_active_cb_dselect_in_gges__user__routines();
if (cb == NULL) {
capi_longjmp_ok = 0;
cb = &cb_local;
}
capi_arglist = cb->args_capi;
CFUNCSMESS("cb:Call-back function cb_dselect_in_gges__user__routines (maxnofargs=3(-0))\n");
CFUNCSMESSPY("cb:cb_dselect_in_gges__user__routines_capi=",cb->capi);
if (cb->capi==NULL) {
capi_longjmp_ok = 0;
cb->capi = PyObject_GetAttrString(_flapack_module,"dselect");
CFUNCSMESSPY("cb:cb_dselect_in_gges__user__routines_capi=",cb->capi);
}
if (cb->capi==NULL) {
PyErr_SetString(_flapack_error,"cb: Callback dselect not defined (as an argument or module _flapack attribute).\n");
goto capi_fail;
}
if (F2PyCapsule_Check(cb->capi)) {
cb_dselect_in_gges__user__routines_typedef cb_dselect_in_gges__user__routines_cptr;
cb_dselect_in_gges__user__routines_cptr = F2PyCapsule_AsVoidPtr(cb->capi);
return_value=(*cb_dselect_in_gges__user__routines_cptr)(alphar_cb_capi,alphai_cb_capi,beta_cb_capi);
return return_value;
}
if (capi_arglist==NULL) {
capi_longjmp_ok = 0;
capi_tmp = PyObject_GetAttrString(_flapack_module,"dselect_extra_args");
if (capi_tmp) {
capi_arglist = (PyTupleObject *)PySequence_Tuple(capi_tmp);
Py_DECREF(capi_tmp);
if (capi_arglist==NULL) {
PyErr_SetString(_flapack_error,"Failed to convert _flapack.dselect_extra_args to tuple.\n");
goto capi_fail;
}
} else {
PyErr_Clear();
capi_arglist = (PyTupleObject *)Py_BuildValue("()");
}
}
if (capi_arglist == NULL) {
PyErr_SetString(_flapack_error,"Callback dselect argument list is not set.\n");
goto capi_fail;
}
/*setdims*/
#ifdef PYPY_VERSION
#define CAPI_ARGLIST_SETITEM(idx, value) PyList_SetItem((PyObject *)capi_arglist_list, idx, value)
capi_arglist_list = PySequence_List(capi_arglist);
if (capi_arglist_list == NULL) goto capi_fail;
#else
#define CAPI_ARGLIST_SETITEM(idx, value) PyTuple_SetItem((PyObject *)capi_arglist, idx, value)
#endif
/*pyobjfrom*/
if (cb->nofargs>capi_i)
if (CAPI_ARGLIST_SETITEM(capi_i++,pyobj_from_double1(alphar)))
goto capi_fail;
if (cb->nofargs>capi_i)
if (CAPI_ARGLIST_SETITEM(capi_i++,pyobj_from_double1(alphai)))
goto capi_fail;
if (cb->nofargs>capi_i)
if (CAPI_ARGLIST_SETITEM(capi_i++,pyobj_from_double1(beta)))
goto capi_fail;
#undef CAPI_ARGLIST_SETITEM
#ifdef PYPY_VERSION
CFUNCSMESSPY("cb:capi_arglist=",capi_arglist_list);
#else
CFUNCSMESSPY("cb:capi_arglist=",capi_arglist);
#endif
CFUNCSMESS("cb:Call-back calling Python function dselect.\n");
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_start_call_clock();
#endif
#ifdef PYPY_VERSION
capi_return = PyObject_CallObject(cb->capi,(PyObject *)capi_arglist_list);
Py_DECREF(capi_arglist_list);
capi_arglist_list = NULL;
#else
capi_return = PyObject_CallObject(cb->capi,(PyObject *)capi_arglist);
#endif
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_stop_call_clock();
#endif
CFUNCSMESSPY("cb:capi_return=",capi_return);
if (capi_return == NULL) {
fprintf(stderr,"capi_return is NULL\n");
goto capi_fail;
}
if (capi_return == Py_None) {
Py_DECREF(capi_return);
capi_return = Py_BuildValue("()");
}
else if (!PyTuple_Check(capi_return)) {
capi_return = Py_BuildValue("(N)",capi_return);
}
capi_j = PyTuple_Size(capi_return);
capi_i = 0;
/*frompyobj*/
if (capi_j>capi_i)
GETSCALARFROMPYTUPLE(capi_return,capi_i++,&return_value,int,"int_from_pyobj failed in converting return_value of call-back function cb_dselect_in_gges__user__routines to C int\n");
CFUNCSMESS("cb:cb_dselect_in_gges__user__routines:successful\n");
Py_DECREF(capi_return);
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_stop_clock();
#endif
goto capi_return_pt;
capi_fail:
fprintf(stderr,"Call-back cb_dselect_in_gges__user__routines failed.\n");
Py_XDECREF(capi_return);
Py_XDECREF(capi_arglist_list);
if (capi_longjmp_ok) {
longjmp(cb->jmpbuf,-1);
}
capi_return_pt:
;
return return_value;
}
/***************** end of cb_dselect_in_gges__user__routines *****************/
/********************* cb_cselect_in_gges__user__routines *********************/
typedef struct {
PyObject *capi;
PyTupleObject *args_capi;
int nofargs;
jmp_buf jmpbuf;
} cb_cselect_in_gges__user__routines_t;
#if defined(F2PY_THREAD_LOCAL_DECL) && !defined(F2PY_USE_PYTHON_TLS)
static F2PY_THREAD_LOCAL_DECL cb_cselect_in_gges__user__routines_t *_active_cb_cselect_in_gges__user__routines = NULL;
static cb_cselect_in_gges__user__routines_t *swap_active_cb_cselect_in_gges__user__routines(cb_cselect_in_gges__user__routines_t *ptr) {
cb_cselect_in_gges__user__routines_t *prev = _active_cb_cselect_in_gges__user__routines;
_active_cb_cselect_in_gges__user__routines = ptr;
return prev;
}
static cb_cselect_in_gges__user__routines_t *get_active_cb_cselect_in_gges__user__routines(void) {
return _active_cb_cselect_in_gges__user__routines;
}
#else
static cb_cselect_in_gges__user__routines_t *swap_active_cb_cselect_in_gges__user__routines(cb_cselect_in_gges__user__routines_t *ptr) {
char *key = "__f2py_cb_cb_cselect_in_gges__user__routines";
return (cb_cselect_in_gges__user__routines_t *)F2PySwapThreadLocalCallbackPtr(key, ptr);
}
static cb_cselect_in_gges__user__routines_t *get_active_cb_cselect_in_gges__user__routines(void) {
char *key = "__f2py_cb_cb_cselect_in_gges__user__routines";
return (cb_cselect_in_gges__user__routines_t *)F2PyGetThreadLocalCallbackPtr(key);
}
#endif
/*typedef int(*cb_cselect_in_gges__user__routines_typedef)(complex_float *,complex_float *);*/
static int cb_cselect_in_gges__user__routines (complex_float *alpha_cb_capi,complex_float *beta_cb_capi) {
cb_cselect_in_gges__user__routines_t cb_local = { NULL, NULL, 0 };
cb_cselect_in_gges__user__routines_t *cb = NULL;
PyTupleObject *capi_arglist = NULL;
PyObject *capi_return = NULL;
PyObject *capi_tmp = NULL;
PyObject *capi_arglist_list = NULL;
int capi_j,capi_i = 0;
int capi_longjmp_ok = 1;
/*decl*/
int return_value;
complex_float alpha=(*alpha_cb_capi);
complex_float beta=(*beta_cb_capi);
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_start_clock();
#endif
cb = get_active_cb_cselect_in_gges__user__routines();
if (cb == NULL) {
capi_longjmp_ok = 0;
cb = &cb_local;
}
capi_arglist = cb->args_capi;
CFUNCSMESS("cb:Call-back function cb_cselect_in_gges__user__routines (maxnofargs=2(-0))\n");
CFUNCSMESSPY("cb:cb_cselect_in_gges__user__routines_capi=",cb->capi);
if (cb->capi==NULL) {
capi_longjmp_ok = 0;
cb->capi = PyObject_GetAttrString(_flapack_module,"cselect");
CFUNCSMESSPY("cb:cb_cselect_in_gges__user__routines_capi=",cb->capi);
}
if (cb->capi==NULL) {
PyErr_SetString(_flapack_error,"cb: Callback cselect not defined (as an argument or module _flapack attribute).\n");
goto capi_fail;
}
if (F2PyCapsule_Check(cb->capi)) {
cb_cselect_in_gges__user__routines_typedef cb_cselect_in_gges__user__routines_cptr;
cb_cselect_in_gges__user__routines_cptr = F2PyCapsule_AsVoidPtr(cb->capi);
return_value=(*cb_cselect_in_gges__user__routines_cptr)(alpha_cb_capi,beta_cb_capi);
return return_value;
}
if (capi_arglist==NULL) {
capi_longjmp_ok = 0;
capi_tmp = PyObject_GetAttrString(_flapack_module,"cselect_extra_args");
if (capi_tmp) {
capi_arglist = (PyTupleObject *)PySequence_Tuple(capi_tmp);
Py_DECREF(capi_tmp);
if (capi_arglist==NULL) {
PyErr_SetString(_flapack_error,"Failed to convert _flapack.cselect_extra_args to tuple.\n");
goto capi_fail;
}
} else {
PyErr_Clear();
capi_arglist = (PyTupleObject *)Py_BuildValue("()");
}
}
if (capi_arglist == NULL) {
PyErr_SetString(_flapack_error,"Callback cselect argument list is not set.\n");
goto capi_fail;
}
/*setdims*/
#ifdef PYPY_VERSION
#define CAPI_ARGLIST_SETITEM(idx, value) PyList_SetItem((PyObject *)capi_arglist_list, idx, value)
capi_arglist_list = PySequence_List(capi_arglist);
if (capi_arglist_list == NULL) goto capi_fail;
#else
#define CAPI_ARGLIST_SETITEM(idx, value) PyTuple_SetItem((PyObject *)capi_arglist, idx, value)
#endif
/*pyobjfrom*/
if (cb->nofargs>capi_i)
if (CAPI_ARGLIST_SETITEM(capi_i++,pyobj_from_complex_float1(alpha)))
goto capi_fail;
if (cb->nofargs>capi_i)
if (CAPI_ARGLIST_SETITEM(capi_i++,pyobj_from_complex_float1(beta)))
goto capi_fail;
#undef CAPI_ARGLIST_SETITEM
#ifdef PYPY_VERSION
CFUNCSMESSPY("cb:capi_arglist=",capi_arglist_list);
#else
CFUNCSMESSPY("cb:capi_arglist=",capi_arglist);
#endif
CFUNCSMESS("cb:Call-back calling Python function cselect.\n");
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_start_call_clock();
#endif
#ifdef PYPY_VERSION
capi_return = PyObject_CallObject(cb->capi,(PyObject *)capi_arglist_list);
Py_DECREF(capi_arglist_list);
capi_arglist_list = NULL;
#else
capi_return = PyObject_CallObject(cb->capi,(PyObject *)capi_arglist);
#endif
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_stop_call_clock();
#endif
CFUNCSMESSPY("cb:capi_return=",capi_return);
if (capi_return == NULL) {
fprintf(stderr,"capi_return is NULL\n");
goto capi_fail;
}
if (capi_return == Py_None) {
Py_DECREF(capi_return);
capi_return = Py_BuildValue("()");
}
else if (!PyTuple_Check(capi_return)) {
capi_return = Py_BuildValue("(N)",capi_return);
}
capi_j = PyTuple_Size(capi_return);
capi_i = 0;
/*frompyobj*/
if (capi_j>capi_i)
GETSCALARFROMPYTUPLE(capi_return,capi_i++,&return_value,int,"int_from_pyobj failed in converting return_value of call-back function cb_cselect_in_gges__user__routines to C int\n");
CFUNCSMESS("cb:cb_cselect_in_gges__user__routines:successful\n");
Py_DECREF(capi_return);
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_stop_clock();
#endif
goto capi_return_pt;
capi_fail:
fprintf(stderr,"Call-back cb_cselect_in_gges__user__routines failed.\n");
Py_XDECREF(capi_return);
Py_XDECREF(capi_arglist_list);
if (capi_longjmp_ok) {
longjmp(cb->jmpbuf,-1);
}
capi_return_pt:
;
return return_value;
}
/***************** end of cb_cselect_in_gges__user__routines *****************/
/********************* cb_zselect_in_gges__user__routines *********************/
typedef struct {
PyObject *capi;
PyTupleObject *args_capi;
int nofargs;
jmp_buf jmpbuf;
} cb_zselect_in_gges__user__routines_t;
#if defined(F2PY_THREAD_LOCAL_DECL) && !defined(F2PY_USE_PYTHON_TLS)
static F2PY_THREAD_LOCAL_DECL cb_zselect_in_gges__user__routines_t *_active_cb_zselect_in_gges__user__routines = NULL;
static cb_zselect_in_gges__user__routines_t *swap_active_cb_zselect_in_gges__user__routines(cb_zselect_in_gges__user__routines_t *ptr) {
cb_zselect_in_gges__user__routines_t *prev = _active_cb_zselect_in_gges__user__routines;
_active_cb_zselect_in_gges__user__routines = ptr;
return prev;
}
static cb_zselect_in_gges__user__routines_t *get_active_cb_zselect_in_gges__user__routines(void) {
return _active_cb_zselect_in_gges__user__routines;
}
#else
static cb_zselect_in_gges__user__routines_t *swap_active_cb_zselect_in_gges__user__routines(cb_zselect_in_gges__user__routines_t *ptr) {
char *key = "__f2py_cb_cb_zselect_in_gges__user__routines";
return (cb_zselect_in_gges__user__routines_t *)F2PySwapThreadLocalCallbackPtr(key, ptr);
}
static cb_zselect_in_gges__user__routines_t *get_active_cb_zselect_in_gges__user__routines(void) {
char *key = "__f2py_cb_cb_zselect_in_gges__user__routines";
return (cb_zselect_in_gges__user__routines_t *)F2PyGetThreadLocalCallbackPtr(key);
}
#endif
/*typedef int(*cb_zselect_in_gges__user__routines_typedef)(complex_double *,complex_double *);*/
static int cb_zselect_in_gges__user__routines (complex_double *alpha_cb_capi,complex_double *beta_cb_capi) {
cb_zselect_in_gges__user__routines_t cb_local = { NULL, NULL, 0 };
cb_zselect_in_gges__user__routines_t *cb = NULL;
PyTupleObject *capi_arglist = NULL;
PyObject *capi_return = NULL;
PyObject *capi_tmp = NULL;
PyObject *capi_arglist_list = NULL;
int capi_j,capi_i = 0;
int capi_longjmp_ok = 1;
/*decl*/
int return_value;
complex_double alpha=(*alpha_cb_capi);
complex_double beta=(*beta_cb_capi);
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_start_clock();
#endif
cb = get_active_cb_zselect_in_gges__user__routines();
if (cb == NULL) {
capi_longjmp_ok = 0;
cb = &cb_local;
}
capi_arglist = cb->args_capi;
CFUNCSMESS("cb:Call-back function cb_zselect_in_gges__user__routines (maxnofargs=2(-0))\n");
CFUNCSMESSPY("cb:cb_zselect_in_gges__user__routines_capi=",cb->capi);
if (cb->capi==NULL) {
capi_longjmp_ok = 0;
cb->capi = PyObject_GetAttrString(_flapack_module,"zselect");
CFUNCSMESSPY("cb:cb_zselect_in_gges__user__routines_capi=",cb->capi);
}
if (cb->capi==NULL) {
PyErr_SetString(_flapack_error,"cb: Callback zselect not defined (as an argument or module _flapack attribute).\n");
goto capi_fail;
}
if (F2PyCapsule_Check(cb->capi)) {
cb_zselect_in_gges__user__routines_typedef cb_zselect_in_gges__user__routines_cptr;
cb_zselect_in_gges__user__routines_cptr = F2PyCapsule_AsVoidPtr(cb->capi);
return_value=(*cb_zselect_in_gges__user__routines_cptr)(alpha_cb_capi,beta_cb_capi);
return return_value;
}
if (capi_arglist==NULL) {
capi_longjmp_ok = 0;
capi_tmp = PyObject_GetAttrString(_flapack_module,"zselect_extra_args");
if (capi_tmp) {
capi_arglist = (PyTupleObject *)PySequence_Tuple(capi_tmp);
Py_DECREF(capi_tmp);
if (capi_arglist==NULL) {
PyErr_SetString(_flapack_error,"Failed to convert _flapack.zselect_extra_args to tuple.\n");
goto capi_fail;
}
} else {
PyErr_Clear();
capi_arglist = (PyTupleObject *)Py_BuildValue("()");
}
}
if (capi_arglist == NULL) {
PyErr_SetString(_flapack_error,"Callback zselect argument list is not set.\n");
goto capi_fail;
}
/*setdims*/
#ifdef PYPY_VERSION
#define CAPI_ARGLIST_SETITEM(idx, value) PyList_SetItem((PyObject *)capi_arglist_list, idx, value)
capi_arglist_list = PySequence_List(capi_arglist);
if (capi_arglist_list == NULL) goto capi_fail;
#else
#define CAPI_ARGLIST_SETITEM(idx, value) PyTuple_SetItem((PyObject *)capi_arglist, idx, value)
#endif
/*pyobjfrom*/
if (cb->nofargs>capi_i)
if (CAPI_ARGLIST_SETITEM(capi_i++,pyobj_from_complex_double1(alpha)))
goto capi_fail;
if (cb->nofargs>capi_i)
if (CAPI_ARGLIST_SETITEM(capi_i++,pyobj_from_complex_double1(beta)))
goto capi_fail;
#undef CAPI_ARGLIST_SETITEM
#ifdef PYPY_VERSION
CFUNCSMESSPY("cb:capi_arglist=",capi_arglist_list);
#else
CFUNCSMESSPY("cb:capi_arglist=",capi_arglist);
#endif
CFUNCSMESS("cb:Call-back calling Python function zselect.\n");
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_start_call_clock();
#endif
#ifdef PYPY_VERSION
capi_return = PyObject_CallObject(cb->capi,(PyObject *)capi_arglist_list);
Py_DECREF(capi_arglist_list);
capi_arglist_list = NULL;
#else
capi_return = PyObject_CallObject(cb->capi,(PyObject *)capi_arglist);
#endif
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_stop_call_clock();
#endif
CFUNCSMESSPY("cb:capi_return=",capi_return);
if (capi_return == NULL) {
fprintf(stderr,"capi_return is NULL\n");
goto capi_fail;
}
if (capi_return == Py_None) {
Py_DECREF(capi_return);
capi_return = Py_BuildValue("()");
}
else if (!PyTuple_Check(capi_return)) {
capi_return = Py_BuildValue("(N)",capi_return);
}
capi_j = PyTuple_Size(capi_return);
capi_i = 0;
/*frompyobj*/
if (capi_j>capi_i)
GETSCALARFROMPYTUPLE(capi_return,capi_i++,&return_value,int,"int_from_pyobj failed in converting return_value of call-back function cb_zselect_in_gges__user__routines to C int\n");
CFUNCSMESS("cb:cb_zselect_in_gges__user__routines:successful\n");
Py_DECREF(capi_return);
#ifdef F2PY_REPORT_ATEXIT
f2py_cb_stop_clock();
#endif
goto capi_return_pt;
capi_fail:
fprintf(stderr,"Call-back cb_zselect_in_gges__user__routines failed.\n");
Py_XDECREF(capi_return);
Py_XDECREF(capi_arglist_list);
if (capi_longjmp_ok) {
longjmp(cb->jmpbuf,-1);
}
capi_return_pt:
;
return return_value;
}
/***************** end of cb_zselect_in_gges__user__routines *****************/
/*********************** See f2py2e/rules.py: buildapi ***********************/
/*********************************** sgebal ***********************************/
static char doc_f2py_rout__flapack_sgebal[] = "\
ba,lo,hi,pivscale,info = sgebal(a,[scale,permute,overwrite_a])\n\nWrapper for ``sgebal``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('f') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"scale : input int, optional\n Default: 0\n"
"permute : input int, optional\n Default: 0\n"
"overwrite_a : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"ba : rank-2 array('f') with bounds (m,n) and a storage\n"
"lo : int\n"
"hi : int\n"
"pivscale : rank-1 array('f') with bounds (n)\n"
"info : int";
/* extern void F_FUNC(sgebal,SGEBAL)(char*,F_INT*,float*,F_INT*,F_INT*,F_INT*,float*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgebal(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,float*,F_INT*,F_INT*,F_INT*,float*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int scale = 0;
PyObject *scale_capi = Py_None;
int permute = 0;
PyObject *permute_capi = Py_None;
int n = 0;
float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int m = 0;
int lo = 0;
int hi = 0;
float *pivscale = NULL;
npy_intp pivscale_Dims[1] = {-1};
const int pivscale_Rank = 1;
PyArrayObject *capi_pivscale_tmp = NULL;
int capi_pivscale_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","scale","permute","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|OOi:_flapack.sgebal",\
capi_kwlist,&a_capi,&scale_capi,&permute_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable permute */
if (permute_capi == Py_None) permute = 0; else
f2py_success = int_from_pyobj(&permute,permute_capi,"_flapack.sgebal() 2nd keyword (permute) can't be converted to int");
if (f2py_success) {
/* Processing variable scale */
if (scale_capi == Py_None) scale = 0; else
f2py_success = int_from_pyobj(&scale,scale_capi,"_flapack.sgebal() 1st keyword (scale) can't be converted to int");
if (f2py_success) {
/* Processing variable hi */
/* Processing variable lo */
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.sgebal to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (float *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable n */
n = shape(a,1);
/* Processing variable pivscale */
pivscale_Dims[0]=n;
capi_pivscale_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_pivscale_tmp = array_from_pyobj(NPY_FLOAT,pivscale_Dims,pivscale_Rank,capi_pivscale_intent,Py_None);
if (capi_pivscale_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `pivscale' of _flapack.sgebal to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
pivscale = (float *)(PyArray_DATA(capi_pivscale_tmp));
/* Processing variable m */
m = shape(a,0);
CHECKSCALAR(m>=n,"m>=n","hidden m","sgebal:m=%d",m) {
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
{ (*f2py_func)((permute?(scale?"B":"P"):(scale?"S":"N")),&n,a,&m,&lo,&hi,pivscale,&info); hi--; lo--; } ;
/*(*f2py_func)(&scale,&permute,&n,a,&m,&lo,&hi,pivscale,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NiiNi",capi_a_tmp,lo,hi,capi_pivscale_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*CHECKSCALAR(m>=n)*/
/* End of cleaning variable m */
} /*if (capi_pivscale_tmp == NULL) ... else of pivscale*/
/* End of cleaning variable pivscale */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/* End of cleaning variable lo */
/* End of cleaning variable hi */
} /*if (f2py_success) of scale*/
/* End of cleaning variable scale */
} /*if (f2py_success) of permute*/
/* End of cleaning variable permute */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of sgebal *******************************/
/*********************************** dgebal ***********************************/
static char doc_f2py_rout__flapack_dgebal[] = "\
ba,lo,hi,pivscale,info = dgebal(a,[scale,permute,overwrite_a])\n\nWrapper for ``dgebal``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('d') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"scale : input int, optional\n Default: 0\n"
"permute : input int, optional\n Default: 0\n"
"overwrite_a : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"ba : rank-2 array('d') with bounds (m,n) and a storage\n"
"lo : int\n"
"hi : int\n"
"pivscale : rank-1 array('d') with bounds (n)\n"
"info : int";
/* extern void F_FUNC(dgebal,DGEBAL)(char*,F_INT*,double*,F_INT*,F_INT*,F_INT*,double*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgebal(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,double*,F_INT*,F_INT*,F_INT*,double*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int scale = 0;
PyObject *scale_capi = Py_None;
int permute = 0;
PyObject *permute_capi = Py_None;
int n = 0;
double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int m = 0;
int lo = 0;
int hi = 0;
double *pivscale = NULL;
npy_intp pivscale_Dims[1] = {-1};
const int pivscale_Rank = 1;
PyArrayObject *capi_pivscale_tmp = NULL;
int capi_pivscale_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","scale","permute","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|OOi:_flapack.dgebal",\
capi_kwlist,&a_capi,&scale_capi,&permute_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable permute */
if (permute_capi == Py_None) permute = 0; else
f2py_success = int_from_pyobj(&permute,permute_capi,"_flapack.dgebal() 2nd keyword (permute) can't be converted to int");
if (f2py_success) {
/* Processing variable scale */
if (scale_capi == Py_None) scale = 0; else
f2py_success = int_from_pyobj(&scale,scale_capi,"_flapack.dgebal() 1st keyword (scale) can't be converted to int");
if (f2py_success) {
/* Processing variable hi */
/* Processing variable lo */
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.dgebal to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (double *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable n */
n = shape(a,1);
/* Processing variable pivscale */
pivscale_Dims[0]=n;
capi_pivscale_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_pivscale_tmp = array_from_pyobj(NPY_DOUBLE,pivscale_Dims,pivscale_Rank,capi_pivscale_intent,Py_None);
if (capi_pivscale_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `pivscale' of _flapack.dgebal to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
pivscale = (double *)(PyArray_DATA(capi_pivscale_tmp));
/* Processing variable m */
m = shape(a,0);
CHECKSCALAR(m>=n,"m>=n","hidden m","dgebal:m=%d",m) {
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
{ (*f2py_func)((permute?(scale?"B":"P"):(scale?"S":"N")),&n,a,&m,&lo,&hi,pivscale,&info); hi--; lo--; } ;
/*(*f2py_func)(&scale,&permute,&n,a,&m,&lo,&hi,pivscale,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NiiNi",capi_a_tmp,lo,hi,capi_pivscale_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*CHECKSCALAR(m>=n)*/
/* End of cleaning variable m */
} /*if (capi_pivscale_tmp == NULL) ... else of pivscale*/
/* End of cleaning variable pivscale */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/* End of cleaning variable lo */
/* End of cleaning variable hi */
} /*if (f2py_success) of scale*/
/* End of cleaning variable scale */
} /*if (f2py_success) of permute*/
/* End of cleaning variable permute */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of dgebal *******************************/
/*********************************** cgebal ***********************************/
static char doc_f2py_rout__flapack_cgebal[] = "\
ba,lo,hi,pivscale,info = cgebal(a,[scale,permute,overwrite_a])\n\nWrapper for ``cgebal``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('F') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"scale : input int, optional\n Default: 0\n"
"permute : input int, optional\n Default: 0\n"
"overwrite_a : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"ba : rank-2 array('F') with bounds (m,n) and a storage\n"
"lo : int\n"
"hi : int\n"
"pivscale : rank-1 array('f') with bounds (n)\n"
"info : int";
/* extern void F_FUNC(cgebal,CGEBAL)(char*,F_INT*,complex_float*,F_INT*,F_INT*,F_INT*,float*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgebal(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,complex_float*,F_INT*,F_INT*,F_INT*,float*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int scale = 0;
PyObject *scale_capi = Py_None;
int permute = 0;
PyObject *permute_capi = Py_None;
int n = 0;
complex_float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int m = 0;
int lo = 0;
int hi = 0;
float *pivscale = NULL;
npy_intp pivscale_Dims[1] = {-1};
const int pivscale_Rank = 1;
PyArrayObject *capi_pivscale_tmp = NULL;
int capi_pivscale_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","scale","permute","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|OOi:_flapack.cgebal",\
capi_kwlist,&a_capi,&scale_capi,&permute_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable permute */
if (permute_capi == Py_None) permute = 0; else
f2py_success = int_from_pyobj(&permute,permute_capi,"_flapack.cgebal() 2nd keyword (permute) can't be converted to int");
if (f2py_success) {
/* Processing variable scale */
if (scale_capi == Py_None) scale = 0; else
f2py_success = int_from_pyobj(&scale,scale_capi,"_flapack.cgebal() 1st keyword (scale) can't be converted to int");
if (f2py_success) {
/* Processing variable hi */
/* Processing variable lo */
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.cgebal to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_float *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable n */
n = shape(a,1);
/* Processing variable pivscale */
pivscale_Dims[0]=n;
capi_pivscale_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_pivscale_tmp = array_from_pyobj(NPY_FLOAT,pivscale_Dims,pivscale_Rank,capi_pivscale_intent,Py_None);
if (capi_pivscale_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `pivscale' of _flapack.cgebal to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
pivscale = (float *)(PyArray_DATA(capi_pivscale_tmp));
/* Processing variable m */
m = shape(a,0);
CHECKSCALAR(m>=n,"m>=n","hidden m","cgebal:m=%d",m) {
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
{ (*f2py_func)((permute?(scale?"B":"P"):(scale?"S":"N")),&n,a,&m,&lo,&hi,pivscale,&info); hi--; lo--; } ;
/*(*f2py_func)(&scale,&permute,&n,a,&m,&lo,&hi,pivscale,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NiiNi",capi_a_tmp,lo,hi,capi_pivscale_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*CHECKSCALAR(m>=n)*/
/* End of cleaning variable m */
} /*if (capi_pivscale_tmp == NULL) ... else of pivscale*/
/* End of cleaning variable pivscale */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/* End of cleaning variable lo */
/* End of cleaning variable hi */
} /*if (f2py_success) of scale*/
/* End of cleaning variable scale */
} /*if (f2py_success) of permute*/
/* End of cleaning variable permute */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of cgebal *******************************/
/*********************************** zgebal ***********************************/
static char doc_f2py_rout__flapack_zgebal[] = "\
ba,lo,hi,pivscale,info = zgebal(a,[scale,permute,overwrite_a])\n\nWrapper for ``zgebal``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('D') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"scale : input int, optional\n Default: 0\n"
"permute : input int, optional\n Default: 0\n"
"overwrite_a : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"ba : rank-2 array('D') with bounds (m,n) and a storage\n"
"lo : int\n"
"hi : int\n"
"pivscale : rank-1 array('d') with bounds (n)\n"
"info : int";
/* extern void F_FUNC(zgebal,ZGEBAL)(char*,F_INT*,complex_double*,F_INT*,F_INT*,F_INT*,double*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgebal(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,complex_double*,F_INT*,F_INT*,F_INT*,double*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int scale = 0;
PyObject *scale_capi = Py_None;
int permute = 0;
PyObject *permute_capi = Py_None;
int n = 0;
complex_double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int m = 0;
int lo = 0;
int hi = 0;
double *pivscale = NULL;
npy_intp pivscale_Dims[1] = {-1};
const int pivscale_Rank = 1;
PyArrayObject *capi_pivscale_tmp = NULL;
int capi_pivscale_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","scale","permute","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|OOi:_flapack.zgebal",\
capi_kwlist,&a_capi,&scale_capi,&permute_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable permute */
if (permute_capi == Py_None) permute = 0; else
f2py_success = int_from_pyobj(&permute,permute_capi,"_flapack.zgebal() 2nd keyword (permute) can't be converted to int");
if (f2py_success) {
/* Processing variable scale */
if (scale_capi == Py_None) scale = 0; else
f2py_success = int_from_pyobj(&scale,scale_capi,"_flapack.zgebal() 1st keyword (scale) can't be converted to int");
if (f2py_success) {
/* Processing variable hi */
/* Processing variable lo */
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.zgebal to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_double *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable n */
n = shape(a,1);
/* Processing variable pivscale */
pivscale_Dims[0]=n;
capi_pivscale_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_pivscale_tmp = array_from_pyobj(NPY_DOUBLE,pivscale_Dims,pivscale_Rank,capi_pivscale_intent,Py_None);
if (capi_pivscale_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `pivscale' of _flapack.zgebal to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
pivscale = (double *)(PyArray_DATA(capi_pivscale_tmp));
/* Processing variable m */
m = shape(a,0);
CHECKSCALAR(m>=n,"m>=n","hidden m","zgebal:m=%d",m) {
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
{ (*f2py_func)((permute?(scale?"B":"P"):(scale?"S":"N")),&n,a,&m,&lo,&hi,pivscale,&info); hi--; lo--; } ;
/*(*f2py_func)(&scale,&permute,&n,a,&m,&lo,&hi,pivscale,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NiiNi",capi_a_tmp,lo,hi,capi_pivscale_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*CHECKSCALAR(m>=n)*/
/* End of cleaning variable m */
} /*if (capi_pivscale_tmp == NULL) ... else of pivscale*/
/* End of cleaning variable pivscale */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/* End of cleaning variable lo */
/* End of cleaning variable hi */
} /*if (f2py_success) of scale*/
/* End of cleaning variable scale */
} /*if (f2py_success) of permute*/
/* End of cleaning variable permute */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of zgebal *******************************/
/*********************************** sgehrd ***********************************/
static char doc_f2py_rout__flapack_sgehrd[] = "\
ht,tau,info = sgehrd(a,[lo,hi,lwork,overwrite_a])\n\nWrapper for ``sgehrd``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('f') with bounds (n,n)\n"
"\nOther Parameters\n----------------\n"
"lo : input int, optional\n Default: 0\n"
"hi : input int, optional\n Default: n-1\n"
"overwrite_a : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: MAX(n,1)\n"
"\nReturns\n-------\n"
"ht : rank-2 array('f') with bounds (n,n) and a storage\n"
"tau : rank-1 array('f') with bounds (n - 1)\n"
"info : int";
/* extern void F_FUNC(sgehrd,SGEHRD)(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgehrd(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
int lo = 0;
PyObject *lo_capi = Py_None;
int hi = 0;
PyObject *hi_capi = Py_None;
float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
float *tau = NULL;
npy_intp tau_Dims[1] = {-1};
const int tau_Rank = 1;
PyArrayObject *capi_tau_tmp = NULL;
int capi_tau_intent = 0;
float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","lo","hi","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|OOOi:_flapack.sgehrd",\
capi_kwlist,&a_capi,&lo_capi,&hi_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_INTENT_ALIGNED8;
capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.sgehrd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (float *)(PyArray_DATA(capi_a_tmp));
CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a") {
/* Processing variable lo */
if (lo_capi == Py_None) lo = 0; else
f2py_success = int_from_pyobj(&lo,lo_capi,"_flapack.sgehrd() 1st keyword (lo) can't be converted to int");
if (f2py_success) {
/* Processing variable info */
/* Processing variable n */
n = shape(a,0);
/* Processing variable hi */
if (hi_capi == Py_None) hi = n-1; else
f2py_success = int_from_pyobj(&hi,hi_capi,"_flapack.sgehrd() 2nd keyword (hi) can't be converted to int");
if (f2py_success) {
/* Processing variable tau */
tau_Dims[0]=n - 1;
capi_tau_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_tau_tmp = array_from_pyobj(NPY_FLOAT,tau_Dims,tau_Rank,capi_tau_intent,Py_None);
if (capi_tau_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `tau' of _flapack.sgehrd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
tau = (float *)(PyArray_DATA(capi_tau_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = MAX(n,1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.sgehrd() 3rd keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=MAX(n,1),"lwork>=MAX(n,1)","3rd keyword lwork","sgehrd:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_FLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.sgehrd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (float *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
{ hi++; lo++; (*f2py_func)(&n,&lo,&hi,a,&n,tau,work,&lwork,&info); } ;
/*(*f2py_func)(&n,&lo,&hi,a,tau,work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNi",capi_a_tmp,capi_tau_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=MAX(n,1))*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
} /*if (capi_tau_tmp == NULL) ... else of tau*/
/* End of cleaning variable tau */
} /*if (f2py_success) of hi*/
/* End of cleaning variable hi */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*if (f2py_success) of lo*/
/* End of cleaning variable lo */
} /*CHECKARRAY(shape(a,0)==shape(a,1))*/
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of sgehrd *******************************/
/*********************************** dgehrd ***********************************/
static char doc_f2py_rout__flapack_dgehrd[] = "\
ht,tau,info = dgehrd(a,[lo,hi,lwork,overwrite_a])\n\nWrapper for ``dgehrd``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('d') with bounds (n,n)\n"
"\nOther Parameters\n----------------\n"
"lo : input int, optional\n Default: 0\n"
"hi : input int, optional\n Default: n-1\n"
"overwrite_a : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: MAX(n,1)\n"
"\nReturns\n-------\n"
"ht : rank-2 array('d') with bounds (n,n) and a storage\n"
"tau : rank-1 array('d') with bounds (n - 1)\n"
"info : int";
/* extern void F_FUNC(dgehrd,DGEHRD)(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgehrd(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
int lo = 0;
PyObject *lo_capi = Py_None;
int hi = 0;
PyObject *hi_capi = Py_None;
double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
double *tau = NULL;
npy_intp tau_Dims[1] = {-1};
const int tau_Rank = 1;
PyArrayObject *capi_tau_tmp = NULL;
int capi_tau_intent = 0;
double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","lo","hi","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|OOOi:_flapack.dgehrd",\
capi_kwlist,&a_capi,&lo_capi,&hi_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_INTENT_ALIGNED8;
capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.dgehrd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (double *)(PyArray_DATA(capi_a_tmp));
CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a") {
/* Processing variable lo */
if (lo_capi == Py_None) lo = 0; else
f2py_success = int_from_pyobj(&lo,lo_capi,"_flapack.dgehrd() 1st keyword (lo) can't be converted to int");
if (f2py_success) {
/* Processing variable info */
/* Processing variable n */
n = shape(a,0);
/* Processing variable hi */
if (hi_capi == Py_None) hi = n-1; else
f2py_success = int_from_pyobj(&hi,hi_capi,"_flapack.dgehrd() 2nd keyword (hi) can't be converted to int");
if (f2py_success) {
/* Processing variable tau */
tau_Dims[0]=n - 1;
capi_tau_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_tau_tmp = array_from_pyobj(NPY_DOUBLE,tau_Dims,tau_Rank,capi_tau_intent,Py_None);
if (capi_tau_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `tau' of _flapack.dgehrd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
tau = (double *)(PyArray_DATA(capi_tau_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = MAX(n,1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.dgehrd() 3rd keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=MAX(n,1),"lwork>=MAX(n,1)","3rd keyword lwork","dgehrd:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_DOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.dgehrd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (double *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
{ hi++; lo++; (*f2py_func)(&n,&lo,&hi,a,&n,tau,work,&lwork,&info); } ;
/*(*f2py_func)(&n,&lo,&hi,a,tau,work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNi",capi_a_tmp,capi_tau_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=MAX(n,1))*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
} /*if (capi_tau_tmp == NULL) ... else of tau*/
/* End of cleaning variable tau */
} /*if (f2py_success) of hi*/
/* End of cleaning variable hi */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*if (f2py_success) of lo*/
/* End of cleaning variable lo */
} /*CHECKARRAY(shape(a,0)==shape(a,1))*/
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of dgehrd *******************************/
/*********************************** cgehrd ***********************************/
static char doc_f2py_rout__flapack_cgehrd[] = "\
ht,tau,info = cgehrd(a,[lo,hi,lwork,overwrite_a])\n\nWrapper for ``cgehrd``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('F') with bounds (n,n)\n"
"\nOther Parameters\n----------------\n"
"lo : input int, optional\n Default: 0\n"
"hi : input int, optional\n Default: n-1\n"
"overwrite_a : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: MAX(n,1)\n"
"\nReturns\n-------\n"
"ht : rank-2 array('F') with bounds (n,n) and a storage\n"
"tau : rank-1 array('F') with bounds (n - 1)\n"
"info : int";
/* extern void F_FUNC(cgehrd,CGEHRD)(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgehrd(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
int lo = 0;
PyObject *lo_capi = Py_None;
int hi = 0;
PyObject *hi_capi = Py_None;
complex_float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
complex_float *tau = NULL;
npy_intp tau_Dims[1] = {-1};
const int tau_Rank = 1;
PyArrayObject *capi_tau_tmp = NULL;
int capi_tau_intent = 0;
complex_float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","lo","hi","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|OOOi:_flapack.cgehrd",\
capi_kwlist,&a_capi,&lo_capi,&hi_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_INTENT_ALIGNED8;
capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.cgehrd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_float *)(PyArray_DATA(capi_a_tmp));
CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a") {
/* Processing variable lo */
if (lo_capi == Py_None) lo = 0; else
f2py_success = int_from_pyobj(&lo,lo_capi,"_flapack.cgehrd() 1st keyword (lo) can't be converted to int");
if (f2py_success) {
/* Processing variable info */
/* Processing variable n */
n = shape(a,0);
/* Processing variable hi */
if (hi_capi == Py_None) hi = n-1; else
f2py_success = int_from_pyobj(&hi,hi_capi,"_flapack.cgehrd() 2nd keyword (hi) can't be converted to int");
if (f2py_success) {
/* Processing variable tau */
tau_Dims[0]=n - 1;
capi_tau_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_tau_tmp = array_from_pyobj(NPY_CFLOAT,tau_Dims,tau_Rank,capi_tau_intent,Py_None);
if (capi_tau_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `tau' of _flapack.cgehrd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
tau = (complex_float *)(PyArray_DATA(capi_tau_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = MAX(n,1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.cgehrd() 3rd keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=MAX(n,1),"lwork>=MAX(n,1)","3rd keyword lwork","cgehrd:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_CFLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.cgehrd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_float *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
{ hi++; lo++; (*f2py_func)(&n,&lo,&hi,a,&n,tau,work,&lwork,&info); } ;
/*(*f2py_func)(&n,&lo,&hi,a,tau,work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNi",capi_a_tmp,capi_tau_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=MAX(n,1))*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
} /*if (capi_tau_tmp == NULL) ... else of tau*/
/* End of cleaning variable tau */
} /*if (f2py_success) of hi*/
/* End of cleaning variable hi */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*if (f2py_success) of lo*/
/* End of cleaning variable lo */
} /*CHECKARRAY(shape(a,0)==shape(a,1))*/
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of cgehrd *******************************/
/*********************************** zgehrd ***********************************/
static char doc_f2py_rout__flapack_zgehrd[] = "\
ht,tau,info = zgehrd(a,[lo,hi,lwork,overwrite_a])\n\nWrapper for ``zgehrd``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('D') with bounds (n,n)\n"
"\nOther Parameters\n----------------\n"
"lo : input int, optional\n Default: 0\n"
"hi : input int, optional\n Default: n-1\n"
"overwrite_a : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: MAX(n,1)\n"
"\nReturns\n-------\n"
"ht : rank-2 array('D') with bounds (n,n) and a storage\n"
"tau : rank-1 array('D') with bounds (n - 1)\n"
"info : int";
/* extern void F_FUNC(zgehrd,ZGEHRD)(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgehrd(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
int lo = 0;
PyObject *lo_capi = Py_None;
int hi = 0;
PyObject *hi_capi = Py_None;
complex_double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
complex_double *tau = NULL;
npy_intp tau_Dims[1] = {-1};
const int tau_Rank = 1;
PyArrayObject *capi_tau_tmp = NULL;
int capi_tau_intent = 0;
complex_double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","lo","hi","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|OOOi:_flapack.zgehrd",\
capi_kwlist,&a_capi,&lo_capi,&hi_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_INTENT_ALIGNED8;
capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.zgehrd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_double *)(PyArray_DATA(capi_a_tmp));
CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a") {
/* Processing variable lo */
if (lo_capi == Py_None) lo = 0; else
f2py_success = int_from_pyobj(&lo,lo_capi,"_flapack.zgehrd() 1st keyword (lo) can't be converted to int");
if (f2py_success) {
/* Processing variable info */
/* Processing variable n */
n = shape(a,0);
/* Processing variable hi */
if (hi_capi == Py_None) hi = n-1; else
f2py_success = int_from_pyobj(&hi,hi_capi,"_flapack.zgehrd() 2nd keyword (hi) can't be converted to int");
if (f2py_success) {
/* Processing variable tau */
tau_Dims[0]=n - 1;
capi_tau_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_tau_tmp = array_from_pyobj(NPY_CDOUBLE,tau_Dims,tau_Rank,capi_tau_intent,Py_None);
if (capi_tau_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `tau' of _flapack.zgehrd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
tau = (complex_double *)(PyArray_DATA(capi_tau_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = MAX(n,1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.zgehrd() 3rd keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=MAX(n,1),"lwork>=MAX(n,1)","3rd keyword lwork","zgehrd:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_CDOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.zgehrd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_double *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
{ hi++; lo++; (*f2py_func)(&n,&lo,&hi,a,&n,tau,work,&lwork,&info); } ;
/*(*f2py_func)(&n,&lo,&hi,a,tau,work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNi",capi_a_tmp,capi_tau_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=MAX(n,1))*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
} /*if (capi_tau_tmp == NULL) ... else of tau*/
/* End of cleaning variable tau */
} /*if (f2py_success) of hi*/
/* End of cleaning variable hi */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*if (f2py_success) of lo*/
/* End of cleaning variable lo */
} /*CHECKARRAY(shape(a,0)==shape(a,1))*/
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of zgehrd *******************************/
/******************************** sgehrd_lwork ********************************/
static char doc_f2py_rout__flapack_sgehrd_lwork[] = "\
work,info = sgehrd_lwork(n,[lo,hi])\n\nWrapper for ``sgehrd_lwork``.\
\n\nParameters\n----------\n"
"n : input int\n"
"\nOther Parameters\n----------------\n"
"lo : input int, optional\n Default: 0\n"
"hi : input int, optional\n Default: n-1\n"
"\nReturns\n-------\n"
"work : float\n"
"info : int";
/* extern void F_FUNC(sgehrd ,SGEHRD )(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgehrd_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
PyObject *n_capi = Py_None;
int lo = 0;
PyObject *lo_capi = Py_None;
int hi = 0;
PyObject *hi_capi = Py_None;
float a = 0;
float tau = 0;
float work = 0;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"n","lo","hi",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|OO:_flapack.sgehrd_lwork",\
capi_kwlist,&n_capi,&lo_capi,&hi_capi))
return NULL;
/*frompyobj*/
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.sgehrd_lwork() 1st argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable a */
/* Processing variable lo */
if (lo_capi == Py_None) lo = 0; else
f2py_success = int_from_pyobj(&lo,lo_capi,"_flapack.sgehrd_lwork() 1st keyword (lo) can't be converted to int");
if (f2py_success) {
/* Processing variable tau */
/* Processing variable work */
/* Processing variable lwork */
lwork = -1;
/* Processing variable info */
/* Processing variable hi */
if (hi_capi == Py_None) hi = n-1; else
f2py_success = int_from_pyobj(&hi,hi_capi,"_flapack.sgehrd_lwork() 2nd keyword (hi) can't be converted to int");
if (f2py_success) {
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
{ hi++; lo++; (*f2py_func)(&n,&lo,&hi,&a,&n,&tau,&work,&lwork,&info); } ;
/*(*f2py_func)(&n,&lo,&hi,&a,&tau,&work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("fi",work,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (f2py_success) of hi*/
/* End of cleaning variable hi */
/* End of cleaning variable info */
/* End of cleaning variable lwork */
/* End of cleaning variable work */
/* End of cleaning variable tau */
} /*if (f2py_success) of lo*/
/* End of cleaning variable lo */
/* End of cleaning variable a */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of sgehrd_lwork ****************************/
/******************************** dgehrd_lwork ********************************/
static char doc_f2py_rout__flapack_dgehrd_lwork[] = "\
work,info = dgehrd_lwork(n,[lo,hi])\n\nWrapper for ``dgehrd_lwork``.\
\n\nParameters\n----------\n"
"n : input int\n"
"\nOther Parameters\n----------------\n"
"lo : input int, optional\n Default: 0\n"
"hi : input int, optional\n Default: n-1\n"
"\nReturns\n-------\n"
"work : float\n"
"info : int";
/* extern void F_FUNC(dgehrd ,DGEHRD )(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgehrd_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
PyObject *n_capi = Py_None;
int lo = 0;
PyObject *lo_capi = Py_None;
int hi = 0;
PyObject *hi_capi = Py_None;
double a = 0;
double tau = 0;
double work = 0;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"n","lo","hi",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|OO:_flapack.dgehrd_lwork",\
capi_kwlist,&n_capi,&lo_capi,&hi_capi))
return NULL;
/*frompyobj*/
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.dgehrd_lwork() 1st argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable a */
/* Processing variable lo */
if (lo_capi == Py_None) lo = 0; else
f2py_success = int_from_pyobj(&lo,lo_capi,"_flapack.dgehrd_lwork() 1st keyword (lo) can't be converted to int");
if (f2py_success) {
/* Processing variable tau */
/* Processing variable work */
/* Processing variable lwork */
lwork = -1;
/* Processing variable info */
/* Processing variable hi */
if (hi_capi == Py_None) hi = n-1; else
f2py_success = int_from_pyobj(&hi,hi_capi,"_flapack.dgehrd_lwork() 2nd keyword (hi) can't be converted to int");
if (f2py_success) {
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
{ hi++; lo++; (*f2py_func)(&n,&lo,&hi,&a,&n,&tau,&work,&lwork,&info); } ;
/*(*f2py_func)(&n,&lo,&hi,&a,&tau,&work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("di",work,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (f2py_success) of hi*/
/* End of cleaning variable hi */
/* End of cleaning variable info */
/* End of cleaning variable lwork */
/* End of cleaning variable work */
/* End of cleaning variable tau */
} /*if (f2py_success) of lo*/
/* End of cleaning variable lo */
/* End of cleaning variable a */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of dgehrd_lwork ****************************/
/******************************** cgehrd_lwork ********************************/
static char doc_f2py_rout__flapack_cgehrd_lwork[] = "\
work,info = cgehrd_lwork(n,[lo,hi])\n\nWrapper for ``cgehrd_lwork``.\
\n\nParameters\n----------\n"
"n : input int\n"
"\nOther Parameters\n----------------\n"
"lo : input int, optional\n Default: 0\n"
"hi : input int, optional\n Default: n-1\n"
"\nReturns\n-------\n"
"work : complex\n"
"info : int";
/* extern void F_FUNC(cgehrd ,CGEHRD )(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgehrd_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
PyObject *n_capi = Py_None;
int lo = 0;
PyObject *lo_capi = Py_None;
int hi = 0;
PyObject *hi_capi = Py_None;
complex_float a;
complex_float tau;
complex_float work;
PyObject *work_capi = Py_None;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"n","lo","hi",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|OO:_flapack.cgehrd_lwork",\
capi_kwlist,&n_capi,&lo_capi,&hi_capi))
return NULL;
/*frompyobj*/
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.cgehrd_lwork() 1st argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable a */
/* Processing variable lo */
if (lo_capi == Py_None) lo = 0; else
f2py_success = int_from_pyobj(&lo,lo_capi,"_flapack.cgehrd_lwork() 1st keyword (lo) can't be converted to int");
if (f2py_success) {
/* Processing variable tau */
/* Processing variable work */
/* Processing variable lwork */
lwork = -1;
/* Processing variable info */
/* Processing variable hi */
if (hi_capi == Py_None) hi = n-1; else
f2py_success = int_from_pyobj(&hi,hi_capi,"_flapack.cgehrd_lwork() 2nd keyword (hi) can't be converted to int");
if (f2py_success) {
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
{ hi++; lo++; (*f2py_func)(&n,&lo,&hi,&a,&n,&tau,&work,&lwork,&info); } ;
/*(*f2py_func)(&n,&lo,&hi,&a,&tau,&work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
work_capi = pyobj_from_complex_float1(work);
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",work_capi,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (f2py_success) of hi*/
/* End of cleaning variable hi */
/* End of cleaning variable info */
/* End of cleaning variable lwork */
/* End of cleaning variable work */
/* End of cleaning variable tau */
} /*if (f2py_success) of lo*/
/* End of cleaning variable lo */
/* End of cleaning variable a */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of cgehrd_lwork ****************************/
/******************************** zgehrd_lwork ********************************/
static char doc_f2py_rout__flapack_zgehrd_lwork[] = "\
work,info = zgehrd_lwork(n,[lo,hi])\n\nWrapper for ``zgehrd_lwork``.\
\n\nParameters\n----------\n"
"n : input int\n"
"\nOther Parameters\n----------------\n"
"lo : input int, optional\n Default: 0\n"
"hi : input int, optional\n Default: n-1\n"
"\nReturns\n-------\n"
"work : complex\n"
"info : int";
/* extern void F_FUNC(zgehrd ,ZGEHRD )(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgehrd_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
PyObject *n_capi = Py_None;
int lo = 0;
PyObject *lo_capi = Py_None;
int hi = 0;
PyObject *hi_capi = Py_None;
complex_double a;
complex_double tau;
complex_double work;
PyObject *work_capi = Py_None;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"n","lo","hi",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|OO:_flapack.zgehrd_lwork",\
capi_kwlist,&n_capi,&lo_capi,&hi_capi))
return NULL;
/*frompyobj*/
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.zgehrd_lwork() 1st argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable a */
/* Processing variable lo */
if (lo_capi == Py_None) lo = 0; else
f2py_success = int_from_pyobj(&lo,lo_capi,"_flapack.zgehrd_lwork() 1st keyword (lo) can't be converted to int");
if (f2py_success) {
/* Processing variable tau */
/* Processing variable work */
/* Processing variable lwork */
lwork = -1;
/* Processing variable info */
/* Processing variable hi */
if (hi_capi == Py_None) hi = n-1; else
f2py_success = int_from_pyobj(&hi,hi_capi,"_flapack.zgehrd_lwork() 2nd keyword (hi) can't be converted to int");
if (f2py_success) {
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
{ hi++; lo++; (*f2py_func)(&n,&lo,&hi,&a,&n,&tau,&work,&lwork,&info); } ;
/*(*f2py_func)(&n,&lo,&hi,&a,&tau,&work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
work_capi = pyobj_from_complex_double1(work);
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",work_capi,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (f2py_success) of hi*/
/* End of cleaning variable hi */
/* End of cleaning variable info */
/* End of cleaning variable lwork */
/* End of cleaning variable work */
/* End of cleaning variable tau */
} /*if (f2py_success) of lo*/
/* End of cleaning variable lo */
/* End of cleaning variable a */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of zgehrd_lwork ****************************/
/*********************************** sgesv ***********************************/
static char doc_f2py_rout__flapack_sgesv[] = "\
lu,piv,x,info = sgesv(a,b,[overwrite_a,overwrite_b])\n\nWrapper for ``sgesv``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('f') with bounds (n,n)\n"
"b : input rank-2 array('f') with bounds (n,nrhs)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"overwrite_b : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"lu : rank-2 array('f') with bounds (n,n) and a storage\n"
"piv : rank-1 array('i') with bounds (n)\n"
"x : rank-2 array('f') with bounds (n,nrhs) and b storage\n"
"info : int";
/* extern void F_FUNC(sgesv,SGESV)(F_INT*,F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgesv(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
int nrhs = 0;
float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int *piv = NULL;
npy_intp piv_Dims[1] = {-1};
const int piv_Rank = 1;
PyArrayObject *capi_piv_tmp = NULL;
int capi_piv_intent = 0;
float *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","b","overwrite_a","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|ii:_flapack.sgesv",\
capi_kwlist,&a_capi,&b_capi,&capi_overwrite_a,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.sgesv to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (float *)(PyArray_DATA(capi_a_tmp));
CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a") {
/* Processing variable info */
/* Processing variable n */
n = shape(a,0);
/* Processing variable piv */
piv_Dims[0]=n;
capi_piv_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_piv_tmp = array_from_pyobj(NPY_INT,piv_Dims,piv_Rank,capi_piv_intent,Py_None);
if (capi_piv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `piv' of _flapack.sgesv to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
piv = (int *)(PyArray_DATA(capi_piv_tmp));
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=n;
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_FLOAT,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `b' of _flapack.sgesv to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (float *)(PyArray_DATA(capi_b_tmp));
CHECKARRAY(shape(a,0)==shape(b,0),"shape(a,0)==shape(b,0)","2nd argument b") {
/* Processing variable nrhs */
nrhs = shape(b,1);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
{F_INT i;(*f2py_func)(&n,&nrhs,a,&n,piv,b,&n,&info);for(i=0;i<n;--piv[i++]);} ;
/*(*f2py_func)(&n,&nrhs,a,piv,b,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNi",capi_a_tmp,capi_piv_tmp,capi_b_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable nrhs */
} /*CHECKARRAY(shape(a,0)==shape(b,0))*/
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
} /*if (capi_piv_tmp == NULL) ... else of piv*/
/* End of cleaning variable piv */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*CHECKARRAY(shape(a,0)==shape(a,1))*/
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************** end of sgesv ********************************/
/*********************************** dgesv ***********************************/
static char doc_f2py_rout__flapack_dgesv[] = "\
lu,piv,x,info = dgesv(a,b,[overwrite_a,overwrite_b])\n\nWrapper for ``dgesv``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('d') with bounds (n,n)\n"
"b : input rank-2 array('d') with bounds (n,nrhs)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"overwrite_b : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"lu : rank-2 array('d') with bounds (n,n) and a storage\n"
"piv : rank-1 array('i') with bounds (n)\n"
"x : rank-2 array('d') with bounds (n,nrhs) and b storage\n"
"info : int";
/* extern void F_FUNC(dgesv,DGESV)(F_INT*,F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgesv(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
int nrhs = 0;
double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int *piv = NULL;
npy_intp piv_Dims[1] = {-1};
const int piv_Rank = 1;
PyArrayObject *capi_piv_tmp = NULL;
int capi_piv_intent = 0;
double *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","b","overwrite_a","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|ii:_flapack.dgesv",\
capi_kwlist,&a_capi,&b_capi,&capi_overwrite_a,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.dgesv to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (double *)(PyArray_DATA(capi_a_tmp));
CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a") {
/* Processing variable info */
/* Processing variable n */
n = shape(a,0);
/* Processing variable piv */
piv_Dims[0]=n;
capi_piv_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_piv_tmp = array_from_pyobj(NPY_INT,piv_Dims,piv_Rank,capi_piv_intent,Py_None);
if (capi_piv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `piv' of _flapack.dgesv to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
piv = (int *)(PyArray_DATA(capi_piv_tmp));
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=n;
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_DOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `b' of _flapack.dgesv to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (double *)(PyArray_DATA(capi_b_tmp));
CHECKARRAY(shape(a,0)==shape(b,0),"shape(a,0)==shape(b,0)","2nd argument b") {
/* Processing variable nrhs */
nrhs = shape(b,1);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
{F_INT i;(*f2py_func)(&n,&nrhs,a,&n,piv,b,&n,&info);for(i=0;i<n;--piv[i++]);} ;
/*(*f2py_func)(&n,&nrhs,a,piv,b,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNi",capi_a_tmp,capi_piv_tmp,capi_b_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable nrhs */
} /*CHECKARRAY(shape(a,0)==shape(b,0))*/
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
} /*if (capi_piv_tmp == NULL) ... else of piv*/
/* End of cleaning variable piv */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*CHECKARRAY(shape(a,0)==shape(a,1))*/
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************** end of dgesv ********************************/
/*********************************** cgesv ***********************************/
static char doc_f2py_rout__flapack_cgesv[] = "\
lu,piv,x,info = cgesv(a,b,[overwrite_a,overwrite_b])\n\nWrapper for ``cgesv``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('F') with bounds (n,n)\n"
"b : input rank-2 array('F') with bounds (n,nrhs)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"overwrite_b : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"lu : rank-2 array('F') with bounds (n,n) and a storage\n"
"piv : rank-1 array('i') with bounds (n)\n"
"x : rank-2 array('F') with bounds (n,nrhs) and b storage\n"
"info : int";
/* extern void F_FUNC(cgesv,CGESV)(F_INT*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgesv(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
int nrhs = 0;
complex_float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int *piv = NULL;
npy_intp piv_Dims[1] = {-1};
const int piv_Rank = 1;
PyArrayObject *capi_piv_tmp = NULL;
int capi_piv_intent = 0;
complex_float *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","b","overwrite_a","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|ii:_flapack.cgesv",\
capi_kwlist,&a_capi,&b_capi,&capi_overwrite_a,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.cgesv to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_float *)(PyArray_DATA(capi_a_tmp));
CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a") {
/* Processing variable info */
/* Processing variable n */
n = shape(a,0);
/* Processing variable piv */
piv_Dims[0]=n;
capi_piv_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_piv_tmp = array_from_pyobj(NPY_INT,piv_Dims,piv_Rank,capi_piv_intent,Py_None);
if (capi_piv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `piv' of _flapack.cgesv to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
piv = (int *)(PyArray_DATA(capi_piv_tmp));
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=n;
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_CFLOAT,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `b' of _flapack.cgesv to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (complex_float *)(PyArray_DATA(capi_b_tmp));
CHECKARRAY(shape(a,0)==shape(b,0),"shape(a,0)==shape(b,0)","2nd argument b") {
/* Processing variable nrhs */
nrhs = shape(b,1);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
{F_INT i;(*f2py_func)(&n,&nrhs,a,&n,piv,b,&n,&info);for(i=0;i<n;--piv[i++]);} ;
/*(*f2py_func)(&n,&nrhs,a,piv,b,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNi",capi_a_tmp,capi_piv_tmp,capi_b_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable nrhs */
} /*CHECKARRAY(shape(a,0)==shape(b,0))*/
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
} /*if (capi_piv_tmp == NULL) ... else of piv*/
/* End of cleaning variable piv */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*CHECKARRAY(shape(a,0)==shape(a,1))*/
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************** end of cgesv ********************************/
/*********************************** zgesv ***********************************/
static char doc_f2py_rout__flapack_zgesv[] = "\
lu,piv,x,info = zgesv(a,b,[overwrite_a,overwrite_b])\n\nWrapper for ``zgesv``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('D') with bounds (n,n)\n"
"b : input rank-2 array('D') with bounds (n,nrhs)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"overwrite_b : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"lu : rank-2 array('D') with bounds (n,n) and a storage\n"
"piv : rank-1 array('i') with bounds (n)\n"
"x : rank-2 array('D') with bounds (n,nrhs) and b storage\n"
"info : int";
/* extern void F_FUNC(zgesv,ZGESV)(F_INT*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgesv(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
int nrhs = 0;
complex_double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int *piv = NULL;
npy_intp piv_Dims[1] = {-1};
const int piv_Rank = 1;
PyArrayObject *capi_piv_tmp = NULL;
int capi_piv_intent = 0;
complex_double *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","b","overwrite_a","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|ii:_flapack.zgesv",\
capi_kwlist,&a_capi,&b_capi,&capi_overwrite_a,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.zgesv to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_double *)(PyArray_DATA(capi_a_tmp));
CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a") {
/* Processing variable info */
/* Processing variable n */
n = shape(a,0);
/* Processing variable piv */
piv_Dims[0]=n;
capi_piv_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_piv_tmp = array_from_pyobj(NPY_INT,piv_Dims,piv_Rank,capi_piv_intent,Py_None);
if (capi_piv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `piv' of _flapack.zgesv to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
piv = (int *)(PyArray_DATA(capi_piv_tmp));
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=n;
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_CDOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `b' of _flapack.zgesv to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (complex_double *)(PyArray_DATA(capi_b_tmp));
CHECKARRAY(shape(a,0)==shape(b,0),"shape(a,0)==shape(b,0)","2nd argument b") {
/* Processing variable nrhs */
nrhs = shape(b,1);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
{F_INT i;(*f2py_func)(&n,&nrhs,a,&n,piv,b,&n,&info);for(i=0;i<n;--piv[i++]);} ;
/*(*f2py_func)(&n,&nrhs,a,piv,b,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNi",capi_a_tmp,capi_piv_tmp,capi_b_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable nrhs */
} /*CHECKARRAY(shape(a,0)==shape(b,0))*/
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
} /*if (capi_piv_tmp == NULL) ... else of piv*/
/* End of cleaning variable piv */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*CHECKARRAY(shape(a,0)==shape(a,1))*/
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************** end of zgesv ********************************/
/*********************************** sgesvx ***********************************/
static char doc_f2py_rout__flapack_sgesvx[] = "\
as,lu,ipiv,equed,rs,cs,bs,x,rcond,ferr,berr,info = sgesvx(a,b,[fact,trans,af,ipiv,equed,r,c,overwrite_a,overwrite_b])\n\nWrapper for ``sgesvx``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('f') with bounds (n,n)\n"
"b : input rank-2 array('f') with bounds (n,nrhs)\n"
"\nOther Parameters\n----------------\n"
"fact : input string(len=1), optional\n Default: 'E'\n"
"trans : input string(len=1), optional\n Default: 'N'\n"
"overwrite_a : input int, optional\n Default: 0\n"
"af : input rank-2 array('f') with bounds (n,n)\n"
"ipiv : input rank-1 array('i') with bounds (n)\n"
"equed : input string(len=1), optional\n Default: 'B'\n"
"r : input rank-1 array('f') with bounds (n)\n"
"c : input rank-1 array('f') with bounds (n)\n"
"overwrite_b : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"as : rank-2 array('f') with bounds (n,n) and a storage\n"
"lu : rank-2 array('f') with bounds (n,n) and af storage\n"
"ipiv : rank-1 array('i') with bounds (n)\n"
"equed : string(len=1)\n"
"rs : rank-1 array('f') with bounds (n) and r storage\n"
"cs : rank-1 array('f') with bounds (n) and c storage\n"
"bs : rank-2 array('f') with bounds (n,nrhs) and b storage\n"
"x : rank-2 array('f') with bounds (n,nrhs)\n"
"rcond : float\n"
"ferr : rank-1 array('f') with bounds (nrhs)\n"
"berr : rank-1 array('f') with bounds (nrhs)\n"
"info : int";
/* extern void F_FUNC(sgesvx,SGESVX)(char*,char*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,char*,float*,float*,float*,F_INT*,float*,F_INT*,float*,float*,float*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgesvx(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,char*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,char*,float*,float*,float*,F_INT*,float*,F_INT*,float*,float*,float*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
string fact = NULL;
int slen(fact);
PyObject *fact_capi = Py_None;
string trans = NULL;
int slen(trans);
PyObject *trans_capi = Py_None;
int n = 0;
int nrhs = 0;
float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int lda = 0;
float *af = NULL;
npy_intp af_Dims[2] = {-1, -1};
const int af_Rank = 2;
PyArrayObject *capi_af_tmp = NULL;
int capi_af_intent = 0;
PyObject *af_capi = Py_None;
int ldaf = 0;
int *ipiv = NULL;
npy_intp ipiv_Dims[1] = {-1};
const int ipiv_Rank = 1;
PyArrayObject *capi_ipiv_tmp = NULL;
int capi_ipiv_intent = 0;
PyObject *ipiv_capi = Py_None;
string equed = NULL;
int slen(equed);
PyObject *equed_capi = Py_None;
float *r = NULL;
npy_intp r_Dims[1] = {-1};
const int r_Rank = 1;
PyArrayObject *capi_r_tmp = NULL;
int capi_r_intent = 0;
PyObject *r_capi = Py_None;
float *c = NULL;
npy_intp c_Dims[1] = {-1};
const int c_Rank = 1;
PyArrayObject *capi_c_tmp = NULL;
int capi_c_intent = 0;
PyObject *c_capi = Py_None;
float *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
int ldb = 0;
float *x = NULL;
npy_intp x_Dims[2] = {-1, -1};
const int x_Rank = 2;
PyArrayObject *capi_x_tmp = NULL;
int capi_x_intent = 0;
int ldx = 0;
float rcond = 0;
float *ferr = NULL;
npy_intp ferr_Dims[1] = {-1};
const int ferr_Rank = 1;
PyArrayObject *capi_ferr_tmp = NULL;
int capi_ferr_intent = 0;
float *berr = NULL;
npy_intp berr_Dims[1] = {-1};
const int berr_Rank = 1;
PyArrayObject *capi_berr_tmp = NULL;
int capi_berr_intent = 0;
float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int *iwork = NULL;
npy_intp iwork_Dims[1] = {-1};
const int iwork_Rank = 1;
PyArrayObject *capi_iwork_tmp = NULL;
int capi_iwork_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","b","fact","trans","af","ipiv","equed","r","c","overwrite_a","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|OOOOOOOii:_flapack.sgesvx",\
capi_kwlist,&a_capi,&b_capi,&fact_capi,&trans_capi,&af_capi,&ipiv_capi,&equed_capi,&r_capi,&c_capi,&capi_overwrite_a,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable fact */
slen(fact) = 1;
f2py_success = string_from_pyobj(&fact,&slen(fact),"E",fact_capi,"string_from_pyobj failed in converting 1st keyword`fact' of _flapack.sgesvx to C string");
if (f2py_success) {
STRINGPADN(fact, slen(fact), '\0', ' ');
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.sgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (float *)(PyArray_DATA(capi_a_tmp));
CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a") {
/* Processing variable rcond */
/* Processing variable info */
/* Processing variable n */
n = shape(a,0);
/* Processing variable lda */
lda = shape(a,0);
/* Processing variable af */
af_Dims[0]=n,af_Dims[1]=n;
capi_af_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_OPTIONAL;
capi_af_tmp = array_from_pyobj(NPY_FLOAT,af_Dims,af_Rank,capi_af_intent,af_capi);
if (capi_af_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 3rd keyword `af' of _flapack.sgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
af = (float *)(PyArray_DATA(capi_af_tmp));
/* Processing variable ldaf */
ldaf = shape(af,0);
/* Processing variable ipiv */
ipiv_Dims[0]=n;
capi_ipiv_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_OPTIONAL;
capi_ipiv_tmp = array_from_pyobj(NPY_INT,ipiv_Dims,ipiv_Rank,capi_ipiv_intent,ipiv_capi);
if (capi_ipiv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 4th keyword `ipiv' of _flapack.sgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
ipiv = (int *)(PyArray_DATA(capi_ipiv_tmp));
/* Processing variable r */
r_Dims[0]=n;
capi_r_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_OPTIONAL;
capi_r_tmp = array_from_pyobj(NPY_FLOAT,r_Dims,r_Rank,capi_r_intent,r_capi);
if (capi_r_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 6th keyword `r' of _flapack.sgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
r = (float *)(PyArray_DATA(capi_r_tmp));
/* Processing variable c */
c_Dims[0]=n;
capi_c_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_OPTIONAL;
capi_c_tmp = array_from_pyobj(NPY_FLOAT,c_Dims,c_Rank,capi_c_intent,c_capi);
if (capi_c_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 7th keyword `c' of _flapack.sgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
c = (float *)(PyArray_DATA(capi_c_tmp));
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=n;
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_FLOAT,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `b' of _flapack.sgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (float *)(PyArray_DATA(capi_b_tmp));
/* Processing variable ldb */
ldb = shape(b,0);
/* Processing variable ldx */
ldx = n;
/* Processing variable work */
work_Dims[0]=4 * n;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_FLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.sgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (float *)(PyArray_DATA(capi_work_tmp));
/* Processing variable iwork */
iwork_Dims[0]=n;
capi_iwork_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_iwork_tmp = array_from_pyobj(NPY_INT,iwork_Dims,iwork_Rank,capi_iwork_intent,Py_None);
if (capi_iwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `iwork' of _flapack.sgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
iwork = (int *)(PyArray_DATA(capi_iwork_tmp));
/* Processing variable trans */
slen(trans) = 1;
f2py_success = string_from_pyobj(&trans,&slen(trans),"N",trans_capi,"string_from_pyobj failed in converting 2nd keyword`trans' of _flapack.sgesvx to C string");
if (f2py_success) {
STRINGPADN(trans, slen(trans), '\0', ' ');
/* Processing variable nrhs */
nrhs = shape(b,1);
/* Processing variable equed */
slen(equed) = 1;
f2py_success = string_from_pyobj(&equed,&slen(equed),"B",equed_capi,"string_from_pyobj failed in converting 5th keyword`equed' of _flapack.sgesvx to C string");
if (f2py_success) {
STRINGPADN(equed, slen(equed), '\0', ' ');
/* Processing variable x */
x_Dims[0]=n,x_Dims[1]=nrhs;
capi_x_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,Py_None);
if (capi_x_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `x' of _flapack.sgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
x = (float *)(PyArray_DATA(capi_x_tmp));
/* Processing variable ferr */
ferr_Dims[0]=nrhs;
capi_ferr_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_ferr_tmp = array_from_pyobj(NPY_FLOAT,ferr_Dims,ferr_Rank,capi_ferr_intent,Py_None);
if (capi_ferr_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `ferr' of _flapack.sgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
ferr = (float *)(PyArray_DATA(capi_ferr_tmp));
/* Processing variable berr */
berr_Dims[0]=nrhs;
capi_berr_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_berr_tmp = array_from_pyobj(NPY_FLOAT,berr_Dims,berr_Rank,capi_berr_intent,Py_None);
if (capi_berr_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `berr' of _flapack.sgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
berr = (float *)(PyArray_DATA(capi_berr_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
{F_INT i;(*f2py_func)(fact,trans,&n,&nrhs,a,&lda,af,&ldaf,ipiv,equed,r,c,b,&ldb,x,&ldx,&rcond,ferr,berr,work,iwork,&info);for(i=0;i<n;--ipiv[i++]);} ;
/*(*f2py_func)(fact,trans,&n,&nrhs,a,&lda,af,&ldaf,ipiv,equed,r,c,b,&ldb,x,&ldx,&rcond,ferr,berr,work,iwork,&info,slen(fact),slen(trans),slen(equed));*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
STRINGPADN(equed, slen(equed), ' ', '\0');
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNyNNNNfNNi",capi_a_tmp,capi_af_tmp,capi_ipiv_tmp,equed,capi_r_tmp,capi_c_tmp,capi_b_tmp,capi_x_tmp,rcond,capi_ferr_tmp,capi_berr_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_berr_tmp == NULL) ... else of berr*/
/* End of cleaning variable berr */
} /*if (capi_ferr_tmp == NULL) ... else of ferr*/
/* End of cleaning variable ferr */
} /*if (capi_x_tmp == NULL) ... else of x*/
/* End of cleaning variable x */
STRINGFREE(equed);
} /*if (f2py_success) of equed*/
/* End of cleaning variable equed */
/* End of cleaning variable nrhs */
STRINGFREE(trans);
} /*if (f2py_success) of trans*/
/* End of cleaning variable trans */
Py_XDECREF(capi_iwork_tmp);
} /*if (capi_iwork_tmp == NULL) ... else of iwork*/
/* End of cleaning variable iwork */
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
/* End of cleaning variable ldx */
/* End of cleaning variable ldb */
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
} /*if (capi_c_tmp == NULL) ... else of c*/
/* End of cleaning variable c */
} /*if (capi_r_tmp == NULL) ... else of r*/
/* End of cleaning variable r */
} /*if (capi_ipiv_tmp == NULL) ... else of ipiv*/
/* End of cleaning variable ipiv */
/* End of cleaning variable ldaf */
} /*if (capi_af_tmp == NULL) ... else of af*/
/* End of cleaning variable af */
/* End of cleaning variable lda */
/* End of cleaning variable n */
/* End of cleaning variable info */
/* End of cleaning variable rcond */
} /*CHECKARRAY(shape(a,0)==shape(a,1))*/
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
STRINGFREE(fact);
} /*if (f2py_success) of fact*/
/* End of cleaning variable fact */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of sgesvx *******************************/
/*********************************** dgesvx ***********************************/
static char doc_f2py_rout__flapack_dgesvx[] = "\
as,lu,ipiv,equed,rs,cs,bs,x,rcond,ferr,berr,info = dgesvx(a,b,[fact,trans,af,ipiv,equed,r,c,overwrite_a,overwrite_b])\n\nWrapper for ``dgesvx``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('d') with bounds (n,n)\n"
"b : input rank-2 array('d') with bounds (n,nrhs)\n"
"\nOther Parameters\n----------------\n"
"fact : input string(len=1), optional\n Default: 'E'\n"
"trans : input string(len=1), optional\n Default: 'N'\n"
"overwrite_a : input int, optional\n Default: 0\n"
"af : input rank-2 array('d') with bounds (n,n)\n"
"ipiv : input rank-1 array('i') with bounds (n)\n"
"equed : input string(len=1), optional\n Default: 'B'\n"
"r : input rank-1 array('d') with bounds (n)\n"
"c : input rank-1 array('d') with bounds (n)\n"
"overwrite_b : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"as : rank-2 array('d') with bounds (n,n) and a storage\n"
"lu : rank-2 array('d') with bounds (n,n) and af storage\n"
"ipiv : rank-1 array('i') with bounds (n)\n"
"equed : string(len=1)\n"
"rs : rank-1 array('d') with bounds (n) and r storage\n"
"cs : rank-1 array('d') with bounds (n) and c storage\n"
"bs : rank-2 array('d') with bounds (n,nrhs) and b storage\n"
"x : rank-2 array('d') with bounds (n,nrhs)\n"
"rcond : float\n"
"ferr : rank-1 array('d') with bounds (nrhs)\n"
"berr : rank-1 array('d') with bounds (nrhs)\n"
"info : int";
/* extern void F_FUNC(dgesvx,DGESVX)(char*,char*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,char*,double*,double*,double*,F_INT*,double*,F_INT*,double*,double*,double*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgesvx(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,char*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,char*,double*,double*,double*,F_INT*,double*,F_INT*,double*,double*,double*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
string fact = NULL;
int slen(fact);
PyObject *fact_capi = Py_None;
string trans = NULL;
int slen(trans);
PyObject *trans_capi = Py_None;
int n = 0;
int nrhs = 0;
double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int lda = 0;
double *af = NULL;
npy_intp af_Dims[2] = {-1, -1};
const int af_Rank = 2;
PyArrayObject *capi_af_tmp = NULL;
int capi_af_intent = 0;
PyObject *af_capi = Py_None;
int ldaf = 0;
int *ipiv = NULL;
npy_intp ipiv_Dims[1] = {-1};
const int ipiv_Rank = 1;
PyArrayObject *capi_ipiv_tmp = NULL;
int capi_ipiv_intent = 0;
PyObject *ipiv_capi = Py_None;
string equed = NULL;
int slen(equed);
PyObject *equed_capi = Py_None;
double *r = NULL;
npy_intp r_Dims[1] = {-1};
const int r_Rank = 1;
PyArrayObject *capi_r_tmp = NULL;
int capi_r_intent = 0;
PyObject *r_capi = Py_None;
double *c = NULL;
npy_intp c_Dims[1] = {-1};
const int c_Rank = 1;
PyArrayObject *capi_c_tmp = NULL;
int capi_c_intent = 0;
PyObject *c_capi = Py_None;
double *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
int ldb = 0;
double *x = NULL;
npy_intp x_Dims[2] = {-1, -1};
const int x_Rank = 2;
PyArrayObject *capi_x_tmp = NULL;
int capi_x_intent = 0;
int ldx = 0;
double rcond = 0;
double *ferr = NULL;
npy_intp ferr_Dims[1] = {-1};
const int ferr_Rank = 1;
PyArrayObject *capi_ferr_tmp = NULL;
int capi_ferr_intent = 0;
double *berr = NULL;
npy_intp berr_Dims[1] = {-1};
const int berr_Rank = 1;
PyArrayObject *capi_berr_tmp = NULL;
int capi_berr_intent = 0;
double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int *iwork = NULL;
npy_intp iwork_Dims[1] = {-1};
const int iwork_Rank = 1;
PyArrayObject *capi_iwork_tmp = NULL;
int capi_iwork_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","b","fact","trans","af","ipiv","equed","r","c","overwrite_a","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|OOOOOOOii:_flapack.dgesvx",\
capi_kwlist,&a_capi,&b_capi,&fact_capi,&trans_capi,&af_capi,&ipiv_capi,&equed_capi,&r_capi,&c_capi,&capi_overwrite_a,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable fact */
slen(fact) = 1;
f2py_success = string_from_pyobj(&fact,&slen(fact),"E",fact_capi,"string_from_pyobj failed in converting 1st keyword`fact' of _flapack.dgesvx to C string");
if (f2py_success) {
STRINGPADN(fact, slen(fact), '\0', ' ');
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.dgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (double *)(PyArray_DATA(capi_a_tmp));
CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a") {
/* Processing variable rcond */
/* Processing variable info */
/* Processing variable n */
n = shape(a,0);
/* Processing variable lda */
lda = shape(a,0);
/* Processing variable af */
af_Dims[0]=n,af_Dims[1]=n;
capi_af_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_OPTIONAL;
capi_af_tmp = array_from_pyobj(NPY_DOUBLE,af_Dims,af_Rank,capi_af_intent,af_capi);
if (capi_af_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 3rd keyword `af' of _flapack.dgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
af = (double *)(PyArray_DATA(capi_af_tmp));
/* Processing variable ldaf */
ldaf = shape(af,0);
/* Processing variable ipiv */
ipiv_Dims[0]=n;
capi_ipiv_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_OPTIONAL;
capi_ipiv_tmp = array_from_pyobj(NPY_INT,ipiv_Dims,ipiv_Rank,capi_ipiv_intent,ipiv_capi);
if (capi_ipiv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 4th keyword `ipiv' of _flapack.dgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
ipiv = (int *)(PyArray_DATA(capi_ipiv_tmp));
/* Processing variable r */
r_Dims[0]=n;
capi_r_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_OPTIONAL;
capi_r_tmp = array_from_pyobj(NPY_DOUBLE,r_Dims,r_Rank,capi_r_intent,r_capi);
if (capi_r_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 6th keyword `r' of _flapack.dgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
r = (double *)(PyArray_DATA(capi_r_tmp));
/* Processing variable c */
c_Dims[0]=n;
capi_c_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_OPTIONAL;
capi_c_tmp = array_from_pyobj(NPY_DOUBLE,c_Dims,c_Rank,capi_c_intent,c_capi);
if (capi_c_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 7th keyword `c' of _flapack.dgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
c = (double *)(PyArray_DATA(capi_c_tmp));
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=n;
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_DOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `b' of _flapack.dgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (double *)(PyArray_DATA(capi_b_tmp));
/* Processing variable ldb */
ldb = shape(b,0);
/* Processing variable ldx */
ldx = n;
/* Processing variable work */
work_Dims[0]=4 * n;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_DOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.dgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (double *)(PyArray_DATA(capi_work_tmp));
/* Processing variable iwork */
iwork_Dims[0]=n;
capi_iwork_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_iwork_tmp = array_from_pyobj(NPY_INT,iwork_Dims,iwork_Rank,capi_iwork_intent,Py_None);
if (capi_iwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `iwork' of _flapack.dgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
iwork = (int *)(PyArray_DATA(capi_iwork_tmp));
/* Processing variable trans */
slen(trans) = 1;
f2py_success = string_from_pyobj(&trans,&slen(trans),"N",trans_capi,"string_from_pyobj failed in converting 2nd keyword`trans' of _flapack.dgesvx to C string");
if (f2py_success) {
STRINGPADN(trans, slen(trans), '\0', ' ');
/* Processing variable nrhs */
nrhs = shape(b,1);
/* Processing variable equed */
slen(equed) = 1;
f2py_success = string_from_pyobj(&equed,&slen(equed),"B",equed_capi,"string_from_pyobj failed in converting 5th keyword`equed' of _flapack.dgesvx to C string");
if (f2py_success) {
STRINGPADN(equed, slen(equed), '\0', ' ');
/* Processing variable x */
x_Dims[0]=n,x_Dims[1]=nrhs;
capi_x_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,Py_None);
if (capi_x_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `x' of _flapack.dgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
x = (double *)(PyArray_DATA(capi_x_tmp));
/* Processing variable ferr */
ferr_Dims[0]=nrhs;
capi_ferr_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_ferr_tmp = array_from_pyobj(NPY_DOUBLE,ferr_Dims,ferr_Rank,capi_ferr_intent,Py_None);
if (capi_ferr_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `ferr' of _flapack.dgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
ferr = (double *)(PyArray_DATA(capi_ferr_tmp));
/* Processing variable berr */
berr_Dims[0]=nrhs;
capi_berr_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_berr_tmp = array_from_pyobj(NPY_DOUBLE,berr_Dims,berr_Rank,capi_berr_intent,Py_None);
if (capi_berr_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `berr' of _flapack.dgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
berr = (double *)(PyArray_DATA(capi_berr_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
{F_INT i;(*f2py_func)(fact,trans,&n,&nrhs,a,&lda,af,&ldaf,ipiv,equed,r,c,b,&ldb,x,&ldx,&rcond,ferr,berr,work,iwork,&info);for(i=0;i<n;--ipiv[i++]);} ;
/*(*f2py_func)(fact,trans,&n,&nrhs,a,&lda,af,&ldaf,ipiv,equed,r,c,b,&ldb,x,&ldx,&rcond,ferr,berr,work,iwork,&info,slen(fact),slen(trans),slen(equed));*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
STRINGPADN(equed, slen(equed), ' ', '\0');
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNyNNNNdNNi",capi_a_tmp,capi_af_tmp,capi_ipiv_tmp,equed,capi_r_tmp,capi_c_tmp,capi_b_tmp,capi_x_tmp,rcond,capi_ferr_tmp,capi_berr_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_berr_tmp == NULL) ... else of berr*/
/* End of cleaning variable berr */
} /*if (capi_ferr_tmp == NULL) ... else of ferr*/
/* End of cleaning variable ferr */
} /*if (capi_x_tmp == NULL) ... else of x*/
/* End of cleaning variable x */
STRINGFREE(equed);
} /*if (f2py_success) of equed*/
/* End of cleaning variable equed */
/* End of cleaning variable nrhs */
STRINGFREE(trans);
} /*if (f2py_success) of trans*/
/* End of cleaning variable trans */
Py_XDECREF(capi_iwork_tmp);
} /*if (capi_iwork_tmp == NULL) ... else of iwork*/
/* End of cleaning variable iwork */
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
/* End of cleaning variable ldx */
/* End of cleaning variable ldb */
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
} /*if (capi_c_tmp == NULL) ... else of c*/
/* End of cleaning variable c */
} /*if (capi_r_tmp == NULL) ... else of r*/
/* End of cleaning variable r */
} /*if (capi_ipiv_tmp == NULL) ... else of ipiv*/
/* End of cleaning variable ipiv */
/* End of cleaning variable ldaf */
} /*if (capi_af_tmp == NULL) ... else of af*/
/* End of cleaning variable af */
/* End of cleaning variable lda */
/* End of cleaning variable n */
/* End of cleaning variable info */
/* End of cleaning variable rcond */
} /*CHECKARRAY(shape(a,0)==shape(a,1))*/
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
STRINGFREE(fact);
} /*if (f2py_success) of fact*/
/* End of cleaning variable fact */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of dgesvx *******************************/
/*********************************** cgesvx ***********************************/
static char doc_f2py_rout__flapack_cgesvx[] = "\
as,lu,ipiv,equed,rs,cs,bs,x,rcond,ferr,berr,info = cgesvx(a,b,[fact,trans,af,ipiv,equed,r,c,overwrite_a,overwrite_b])\n\nWrapper for ``cgesvx``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('F') with bounds (n,n)\n"
"b : input rank-2 array('F') with bounds (n,nrhs)\n"
"\nOther Parameters\n----------------\n"
"fact : input string(len=1), optional\n Default: 'E'\n"
"trans : input string(len=1), optional\n Default: 'N'\n"
"overwrite_a : input int, optional\n Default: 0\n"
"af : input rank-2 array('F') with bounds (n,n)\n"
"ipiv : input rank-1 array('i') with bounds (n)\n"
"equed : input string(len=1), optional\n Default: 'B'\n"
"r : input rank-1 array('f') with bounds (n)\n"
"c : input rank-1 array('f') with bounds (n)\n"
"overwrite_b : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"as : rank-2 array('F') with bounds (n,n) and a storage\n"
"lu : rank-2 array('F') with bounds (n,n) and af storage\n"
"ipiv : rank-1 array('i') with bounds (n)\n"
"equed : string(len=1)\n"
"rs : rank-1 array('f') with bounds (n) and r storage\n"
"cs : rank-1 array('f') with bounds (n) and c storage\n"
"bs : rank-2 array('F') with bounds (n,nrhs) and b storage\n"
"x : rank-2 array('F') with bounds (n,nrhs)\n"
"rcond : float\n"
"ferr : rank-1 array('f') with bounds (nrhs)\n"
"berr : rank-1 array('f') with bounds (nrhs)\n"
"info : int";
/* extern void F_FUNC(cgesvx,CGESVX)(char*,char*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT*,char*,float*,float*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float*,float*,complex_float*,float*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgesvx(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,char*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT*,char*,float*,float*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float*,float*,complex_float*,float*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
string fact = NULL;
int slen(fact);
PyObject *fact_capi = Py_None;
string trans = NULL;
int slen(trans);
PyObject *trans_capi = Py_None;
int n = 0;
int nrhs = 0;
complex_float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int lda = 0;
complex_float *af = NULL;
npy_intp af_Dims[2] = {-1, -1};
const int af_Rank = 2;
PyArrayObject *capi_af_tmp = NULL;
int capi_af_intent = 0;
PyObject *af_capi = Py_None;
int ldaf = 0;
int *ipiv = NULL;
npy_intp ipiv_Dims[1] = {-1};
const int ipiv_Rank = 1;
PyArrayObject *capi_ipiv_tmp = NULL;
int capi_ipiv_intent = 0;
PyObject *ipiv_capi = Py_None;
string equed = NULL;
int slen(equed);
PyObject *equed_capi = Py_None;
float *r = NULL;
npy_intp r_Dims[1] = {-1};
const int r_Rank = 1;
PyArrayObject *capi_r_tmp = NULL;
int capi_r_intent = 0;
PyObject *r_capi = Py_None;
float *c = NULL;
npy_intp c_Dims[1] = {-1};
const int c_Rank = 1;
PyArrayObject *capi_c_tmp = NULL;
int capi_c_intent = 0;
PyObject *c_capi = Py_None;
complex_float *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
int ldb = 0;
complex_float *x = NULL;
npy_intp x_Dims[2] = {-1, -1};
const int x_Rank = 2;
PyArrayObject *capi_x_tmp = NULL;
int capi_x_intent = 0;
int ldx = 0;
float rcond = 0;
float *ferr = NULL;
npy_intp ferr_Dims[1] = {-1};
const int ferr_Rank = 1;
PyArrayObject *capi_ferr_tmp = NULL;
int capi_ferr_intent = 0;
float *berr = NULL;
npy_intp berr_Dims[1] = {-1};
const int berr_Rank = 1;
PyArrayObject *capi_berr_tmp = NULL;
int capi_berr_intent = 0;
complex_float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
float *rwork = NULL;
npy_intp rwork_Dims[1] = {-1};
const int rwork_Rank = 1;
PyArrayObject *capi_rwork_tmp = NULL;
int capi_rwork_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","b","fact","trans","af","ipiv","equed","r","c","overwrite_a","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|OOOOOOOii:_flapack.cgesvx",\
capi_kwlist,&a_capi,&b_capi,&fact_capi,&trans_capi,&af_capi,&ipiv_capi,&equed_capi,&r_capi,&c_capi,&capi_overwrite_a,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable fact */
slen(fact) = 1;
f2py_success = string_from_pyobj(&fact,&slen(fact),"E",fact_capi,"string_from_pyobj failed in converting 1st keyword`fact' of _flapack.cgesvx to C string");
if (f2py_success) {
STRINGPADN(fact, slen(fact), '\0', ' ');
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.cgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_float *)(PyArray_DATA(capi_a_tmp));
CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a") {
/* Processing variable rcond */
/* Processing variable info */
/* Processing variable n */
n = shape(a,0);
/* Processing variable lda */
lda = shape(a,0);
/* Processing variable af */
af_Dims[0]=n,af_Dims[1]=n;
capi_af_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_OPTIONAL;
capi_af_tmp = array_from_pyobj(NPY_CFLOAT,af_Dims,af_Rank,capi_af_intent,af_capi);
if (capi_af_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 3rd keyword `af' of _flapack.cgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
af = (complex_float *)(PyArray_DATA(capi_af_tmp));
/* Processing variable ldaf */
ldaf = shape(af,0);
/* Processing variable ipiv */
ipiv_Dims[0]=n;
capi_ipiv_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_OPTIONAL;
capi_ipiv_tmp = array_from_pyobj(NPY_INT,ipiv_Dims,ipiv_Rank,capi_ipiv_intent,ipiv_capi);
if (capi_ipiv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 4th keyword `ipiv' of _flapack.cgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
ipiv = (int *)(PyArray_DATA(capi_ipiv_tmp));
/* Processing variable r */
r_Dims[0]=n;
capi_r_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_OPTIONAL;
capi_r_tmp = array_from_pyobj(NPY_FLOAT,r_Dims,r_Rank,capi_r_intent,r_capi);
if (capi_r_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 6th keyword `r' of _flapack.cgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
r = (float *)(PyArray_DATA(capi_r_tmp));
/* Processing variable c */
c_Dims[0]=n;
capi_c_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_OPTIONAL;
capi_c_tmp = array_from_pyobj(NPY_FLOAT,c_Dims,c_Rank,capi_c_intent,c_capi);
if (capi_c_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 7th keyword `c' of _flapack.cgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
c = (float *)(PyArray_DATA(capi_c_tmp));
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=n;
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_CFLOAT,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `b' of _flapack.cgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (complex_float *)(PyArray_DATA(capi_b_tmp));
/* Processing variable ldb */
ldb = shape(b,0);
/* Processing variable ldx */
ldx = n;
/* Processing variable work */
work_Dims[0]=2 * n;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_CFLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.cgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_float *)(PyArray_DATA(capi_work_tmp));
/* Processing variable rwork */
rwork_Dims[0]=2 * n;
capi_rwork_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_rwork_tmp = array_from_pyobj(NPY_FLOAT,rwork_Dims,rwork_Rank,capi_rwork_intent,Py_None);
if (capi_rwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `rwork' of _flapack.cgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
rwork = (float *)(PyArray_DATA(capi_rwork_tmp));
/* Processing variable trans */
slen(trans) = 1;
f2py_success = string_from_pyobj(&trans,&slen(trans),"N",trans_capi,"string_from_pyobj failed in converting 2nd keyword`trans' of _flapack.cgesvx to C string");
if (f2py_success) {
STRINGPADN(trans, slen(trans), '\0', ' ');
/* Processing variable nrhs */
nrhs = shape(b,1);
/* Processing variable equed */
slen(equed) = 1;
f2py_success = string_from_pyobj(&equed,&slen(equed),"B",equed_capi,"string_from_pyobj failed in converting 5th keyword`equed' of _flapack.cgesvx to C string");
if (f2py_success) {
STRINGPADN(equed, slen(equed), '\0', ' ');
/* Processing variable x */
x_Dims[0]=n,x_Dims[1]=nrhs;
capi_x_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,Py_None);
if (capi_x_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `x' of _flapack.cgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
x = (complex_float *)(PyArray_DATA(capi_x_tmp));
/* Processing variable ferr */
ferr_Dims[0]=nrhs;
capi_ferr_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_ferr_tmp = array_from_pyobj(NPY_FLOAT,ferr_Dims,ferr_Rank,capi_ferr_intent,Py_None);
if (capi_ferr_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `ferr' of _flapack.cgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
ferr = (float *)(PyArray_DATA(capi_ferr_tmp));
/* Processing variable berr */
berr_Dims[0]=nrhs;
capi_berr_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_berr_tmp = array_from_pyobj(NPY_FLOAT,berr_Dims,berr_Rank,capi_berr_intent,Py_None);
if (capi_berr_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `berr' of _flapack.cgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
berr = (float *)(PyArray_DATA(capi_berr_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
{F_INT i;(*f2py_func)(fact,trans,&n,&nrhs,a,&lda,af,&ldaf,ipiv,equed,r,c,b,&ldb,x,&ldx,&rcond,ferr,berr,work,rwork,&info);for(i=0;i<n;--ipiv[i++]);} ;
/*(*f2py_func)(fact,trans,&n,&nrhs,a,&lda,af,&ldaf,ipiv,equed,r,c,b,&ldb,x,&ldx,&rcond,ferr,berr,work,rwork,&info,slen(fact),slen(trans),slen(equed));*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
STRINGPADN(equed, slen(equed), ' ', '\0');
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNyNNNNfNNi",capi_a_tmp,capi_af_tmp,capi_ipiv_tmp,equed,capi_r_tmp,capi_c_tmp,capi_b_tmp,capi_x_tmp,rcond,capi_ferr_tmp,capi_berr_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_berr_tmp == NULL) ... else of berr*/
/* End of cleaning variable berr */
} /*if (capi_ferr_tmp == NULL) ... else of ferr*/
/* End of cleaning variable ferr */
} /*if (capi_x_tmp == NULL) ... else of x*/
/* End of cleaning variable x */
STRINGFREE(equed);
} /*if (f2py_success) of equed*/
/* End of cleaning variable equed */
/* End of cleaning variable nrhs */
STRINGFREE(trans);
} /*if (f2py_success) of trans*/
/* End of cleaning variable trans */
Py_XDECREF(capi_rwork_tmp);
} /*if (capi_rwork_tmp == NULL) ... else of rwork*/
/* End of cleaning variable rwork */
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
/* End of cleaning variable ldx */
/* End of cleaning variable ldb */
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
} /*if (capi_c_tmp == NULL) ... else of c*/
/* End of cleaning variable c */
} /*if (capi_r_tmp == NULL) ... else of r*/
/* End of cleaning variable r */
} /*if (capi_ipiv_tmp == NULL) ... else of ipiv*/
/* End of cleaning variable ipiv */
/* End of cleaning variable ldaf */
} /*if (capi_af_tmp == NULL) ... else of af*/
/* End of cleaning variable af */
/* End of cleaning variable lda */
/* End of cleaning variable n */
/* End of cleaning variable info */
/* End of cleaning variable rcond */
} /*CHECKARRAY(shape(a,0)==shape(a,1))*/
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
STRINGFREE(fact);
} /*if (f2py_success) of fact*/
/* End of cleaning variable fact */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of cgesvx *******************************/
/*********************************** zgesvx ***********************************/
static char doc_f2py_rout__flapack_zgesvx[] = "\
as,lu,ipiv,equed,rs,cs,bs,x,rcond,ferr,berr,info = zgesvx(a,b,[fact,trans,af,ipiv,equed,r,c,overwrite_a,overwrite_b])\n\nWrapper for ``zgesvx``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('D') with bounds (n,n)\n"
"b : input rank-2 array('D') with bounds (n,nrhs)\n"
"\nOther Parameters\n----------------\n"
"fact : input string(len=1), optional\n Default: 'E'\n"
"trans : input string(len=1), optional\n Default: 'N'\n"
"overwrite_a : input int, optional\n Default: 0\n"
"af : input rank-2 array('D') with bounds (n,n)\n"
"ipiv : input rank-1 array('i') with bounds (n)\n"
"equed : input string(len=1), optional\n Default: 'B'\n"
"r : input rank-1 array('d') with bounds (n)\n"
"c : input rank-1 array('d') with bounds (n)\n"
"overwrite_b : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"as : rank-2 array('D') with bounds (n,n) and a storage\n"
"lu : rank-2 array('D') with bounds (n,n) and af storage\n"
"ipiv : rank-1 array('i') with bounds (n)\n"
"equed : string(len=1)\n"
"rs : rank-1 array('d') with bounds (n) and r storage\n"
"cs : rank-1 array('d') with bounds (n) and c storage\n"
"bs : rank-2 array('D') with bounds (n,nrhs) and b storage\n"
"x : rank-2 array('D') with bounds (n,nrhs)\n"
"rcond : float\n"
"ferr : rank-1 array('d') with bounds (nrhs)\n"
"berr : rank-1 array('d') with bounds (nrhs)\n"
"info : int";
/* extern void F_FUNC(zgesvx,ZGESVX)(char*,char*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT*,char*,double*,double*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double*,double*,complex_double*,double*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgesvx(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,char*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT*,char*,double*,double*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double*,double*,complex_double*,double*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
string fact = NULL;
int slen(fact);
PyObject *fact_capi = Py_None;
string trans = NULL;
int slen(trans);
PyObject *trans_capi = Py_None;
int n = 0;
int nrhs = 0;
complex_double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int lda = 0;
complex_double *af = NULL;
npy_intp af_Dims[2] = {-1, -1};
const int af_Rank = 2;
PyArrayObject *capi_af_tmp = NULL;
int capi_af_intent = 0;
PyObject *af_capi = Py_None;
int ldaf = 0;
int *ipiv = NULL;
npy_intp ipiv_Dims[1] = {-1};
const int ipiv_Rank = 1;
PyArrayObject *capi_ipiv_tmp = NULL;
int capi_ipiv_intent = 0;
PyObject *ipiv_capi = Py_None;
string equed = NULL;
int slen(equed);
PyObject *equed_capi = Py_None;
double *r = NULL;
npy_intp r_Dims[1] = {-1};
const int r_Rank = 1;
PyArrayObject *capi_r_tmp = NULL;
int capi_r_intent = 0;
PyObject *r_capi = Py_None;
double *c = NULL;
npy_intp c_Dims[1] = {-1};
const int c_Rank = 1;
PyArrayObject *capi_c_tmp = NULL;
int capi_c_intent = 0;
PyObject *c_capi = Py_None;
complex_double *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
int ldb = 0;
complex_double *x = NULL;
npy_intp x_Dims[2] = {-1, -1};
const int x_Rank = 2;
PyArrayObject *capi_x_tmp = NULL;
int capi_x_intent = 0;
int ldx = 0;
double rcond = 0;
double *ferr = NULL;
npy_intp ferr_Dims[1] = {-1};
const int ferr_Rank = 1;
PyArrayObject *capi_ferr_tmp = NULL;
int capi_ferr_intent = 0;
double *berr = NULL;
npy_intp berr_Dims[1] = {-1};
const int berr_Rank = 1;
PyArrayObject *capi_berr_tmp = NULL;
int capi_berr_intent = 0;
complex_double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
double *rwork = NULL;
npy_intp rwork_Dims[1] = {-1};
const int rwork_Rank = 1;
PyArrayObject *capi_rwork_tmp = NULL;
int capi_rwork_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","b","fact","trans","af","ipiv","equed","r","c","overwrite_a","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|OOOOOOOii:_flapack.zgesvx",\
capi_kwlist,&a_capi,&b_capi,&fact_capi,&trans_capi,&af_capi,&ipiv_capi,&equed_capi,&r_capi,&c_capi,&capi_overwrite_a,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable fact */
slen(fact) = 1;
f2py_success = string_from_pyobj(&fact,&slen(fact),"E",fact_capi,"string_from_pyobj failed in converting 1st keyword`fact' of _flapack.zgesvx to C string");
if (f2py_success) {
STRINGPADN(fact, slen(fact), '\0', ' ');
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.zgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_double *)(PyArray_DATA(capi_a_tmp));
CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a") {
/* Processing variable rcond */
/* Processing variable info */
/* Processing variable n */
n = shape(a,0);
/* Processing variable lda */
lda = shape(a,0);
/* Processing variable af */
af_Dims[0]=n,af_Dims[1]=n;
capi_af_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_OPTIONAL;
capi_af_tmp = array_from_pyobj(NPY_CDOUBLE,af_Dims,af_Rank,capi_af_intent,af_capi);
if (capi_af_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 3rd keyword `af' of _flapack.zgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
af = (complex_double *)(PyArray_DATA(capi_af_tmp));
/* Processing variable ldaf */
ldaf = shape(af,0);
/* Processing variable ipiv */
ipiv_Dims[0]=n;
capi_ipiv_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_OPTIONAL;
capi_ipiv_tmp = array_from_pyobj(NPY_INT,ipiv_Dims,ipiv_Rank,capi_ipiv_intent,ipiv_capi);
if (capi_ipiv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 4th keyword `ipiv' of _flapack.zgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
ipiv = (int *)(PyArray_DATA(capi_ipiv_tmp));
/* Processing variable r */
r_Dims[0]=n;
capi_r_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_OPTIONAL;
capi_r_tmp = array_from_pyobj(NPY_DOUBLE,r_Dims,r_Rank,capi_r_intent,r_capi);
if (capi_r_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 6th keyword `r' of _flapack.zgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
r = (double *)(PyArray_DATA(capi_r_tmp));
/* Processing variable c */
c_Dims[0]=n;
capi_c_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_OPTIONAL;
capi_c_tmp = array_from_pyobj(NPY_DOUBLE,c_Dims,c_Rank,capi_c_intent,c_capi);
if (capi_c_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 7th keyword `c' of _flapack.zgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
c = (double *)(PyArray_DATA(capi_c_tmp));
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=n;
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_CDOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `b' of _flapack.zgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (complex_double *)(PyArray_DATA(capi_b_tmp));
/* Processing variable ldb */
ldb = shape(b,0);
/* Processing variable ldx */
ldx = n;
/* Processing variable work */
work_Dims[0]=2 * n;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_CDOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.zgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_double *)(PyArray_DATA(capi_work_tmp));
/* Processing variable rwork */
rwork_Dims[0]=2 * n;
capi_rwork_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_rwork_tmp = array_from_pyobj(NPY_DOUBLE,rwork_Dims,rwork_Rank,capi_rwork_intent,Py_None);
if (capi_rwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `rwork' of _flapack.zgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
rwork = (double *)(PyArray_DATA(capi_rwork_tmp));
/* Processing variable trans */
slen(trans) = 1;
f2py_success = string_from_pyobj(&trans,&slen(trans),"N",trans_capi,"string_from_pyobj failed in converting 2nd keyword`trans' of _flapack.zgesvx to C string");
if (f2py_success) {
STRINGPADN(trans, slen(trans), '\0', ' ');
/* Processing variable nrhs */
nrhs = shape(b,1);
/* Processing variable equed */
slen(equed) = 1;
f2py_success = string_from_pyobj(&equed,&slen(equed),"B",equed_capi,"string_from_pyobj failed in converting 5th keyword`equed' of _flapack.zgesvx to C string");
if (f2py_success) {
STRINGPADN(equed, slen(equed), '\0', ' ');
/* Processing variable x */
x_Dims[0]=n,x_Dims[1]=nrhs;
capi_x_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,Py_None);
if (capi_x_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `x' of _flapack.zgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
x = (complex_double *)(PyArray_DATA(capi_x_tmp));
/* Processing variable ferr */
ferr_Dims[0]=nrhs;
capi_ferr_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_ferr_tmp = array_from_pyobj(NPY_DOUBLE,ferr_Dims,ferr_Rank,capi_ferr_intent,Py_None);
if (capi_ferr_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `ferr' of _flapack.zgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
ferr = (double *)(PyArray_DATA(capi_ferr_tmp));
/* Processing variable berr */
berr_Dims[0]=nrhs;
capi_berr_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_berr_tmp = array_from_pyobj(NPY_DOUBLE,berr_Dims,berr_Rank,capi_berr_intent,Py_None);
if (capi_berr_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `berr' of _flapack.zgesvx to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
berr = (double *)(PyArray_DATA(capi_berr_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
{F_INT i;(*f2py_func)(fact,trans,&n,&nrhs,a,&lda,af,&ldaf,ipiv,equed,r,c,b,&ldb,x,&ldx,&rcond,ferr,berr,work,rwork,&info);for(i=0;i<n;--ipiv[i++]);} ;
/*(*f2py_func)(fact,trans,&n,&nrhs,a,&lda,af,&ldaf,ipiv,equed,r,c,b,&ldb,x,&ldx,&rcond,ferr,berr,work,rwork,&info,slen(fact),slen(trans),slen(equed));*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
STRINGPADN(equed, slen(equed), ' ', '\0');
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNyNNNNdNNi",capi_a_tmp,capi_af_tmp,capi_ipiv_tmp,equed,capi_r_tmp,capi_c_tmp,capi_b_tmp,capi_x_tmp,rcond,capi_ferr_tmp,capi_berr_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_berr_tmp == NULL) ... else of berr*/
/* End of cleaning variable berr */
} /*if (capi_ferr_tmp == NULL) ... else of ferr*/
/* End of cleaning variable ferr */
} /*if (capi_x_tmp == NULL) ... else of x*/
/* End of cleaning variable x */
STRINGFREE(equed);
} /*if (f2py_success) of equed*/
/* End of cleaning variable equed */
/* End of cleaning variable nrhs */
STRINGFREE(trans);
} /*if (f2py_success) of trans*/
/* End of cleaning variable trans */
Py_XDECREF(capi_rwork_tmp);
} /*if (capi_rwork_tmp == NULL) ... else of rwork*/
/* End of cleaning variable rwork */
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
/* End of cleaning variable ldx */
/* End of cleaning variable ldb */
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
} /*if (capi_c_tmp == NULL) ... else of c*/
/* End of cleaning variable c */
} /*if (capi_r_tmp == NULL) ... else of r*/
/* End of cleaning variable r */
} /*if (capi_ipiv_tmp == NULL) ... else of ipiv*/
/* End of cleaning variable ipiv */
/* End of cleaning variable ldaf */
} /*if (capi_af_tmp == NULL) ... else of af*/
/* End of cleaning variable af */
/* End of cleaning variable lda */
/* End of cleaning variable n */
/* End of cleaning variable info */
/* End of cleaning variable rcond */
} /*CHECKARRAY(shape(a,0)==shape(a,1))*/
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
STRINGFREE(fact);
} /*if (f2py_success) of fact*/
/* End of cleaning variable fact */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of zgesvx *******************************/
/*********************************** sgecon ***********************************/
static char doc_f2py_rout__flapack_sgecon[] = "\
rcond,info = sgecon(a,anorm,[norm])\n\nWrapper for ``sgecon``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('f') with bounds (n,n)\n"
"anorm : input float\n"
"\nOther Parameters\n----------------\n"
"norm : input string(len=1), optional\n Default: '1'\n"
"\nReturns\n-------\n"
"rcond : float\n"
"info : int";
/* extern void F_FUNC(sgecon,SGECON)(char*,F_INT*,float*,F_INT*,float*,float*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgecon(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,float*,F_INT*,float*,float*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
string norm = NULL;
int slen(norm);
PyObject *norm_capi = Py_None;
int n = 0;
float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
PyObject *a_capi = Py_None;
int lda = 0;
float anorm = 0;
PyObject *anorm_capi = Py_None;
float rcond = 0;
float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int *irwork = NULL;
npy_intp irwork_Dims[1] = {-1};
const int irwork_Rank = 1;
PyArrayObject *capi_irwork_tmp = NULL;
int capi_irwork_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","anorm","norm",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|O:_flapack.sgecon",\
capi_kwlist,&a_capi,&anorm_capi,&norm_capi))
return NULL;
/*frompyobj*/
/* Processing variable norm */
slen(norm) = 1;
f2py_success = string_from_pyobj(&norm,&slen(norm),"1",norm_capi,"string_from_pyobj failed in converting 1st keyword`norm' of _flapack.sgecon to C string");
if (f2py_success) {
STRINGPADN(norm, slen(norm), '\0', ' ');
/* Processing variable a */
;
capi_a_intent |= F2PY_INTENT_IN;
capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.sgecon to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (float *)(PyArray_DATA(capi_a_tmp));
CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a") {
/* Processing variable anorm */
f2py_success = float_from_pyobj(&anorm,anorm_capi,"_flapack.sgecon() 2nd argument (anorm) can't be converted to float");
if (f2py_success) {
/* Processing variable rcond */
/* Processing variable info */
/* Processing variable n */
n = shape(a,0);
/* Processing variable lda */
lda = shape(a,0);
/* Processing variable work */
work_Dims[0]=4 * n;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_FLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.sgecon to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (float *)(PyArray_DATA(capi_work_tmp));
/* Processing variable irwork */
irwork_Dims[0]=n;
capi_irwork_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_irwork_tmp = array_from_pyobj(NPY_INT,irwork_Dims,irwork_Rank,capi_irwork_intent,Py_None);
if (capi_irwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `irwork' of _flapack.sgecon to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
irwork = (int *)(PyArray_DATA(capi_irwork_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
(*f2py_func)(norm,&n,a,&lda,&anorm,&rcond,work,irwork,&info) ;
/*(*f2py_func)(norm,&n,a,&lda,&anorm,&rcond,work,irwork,&info,slen(norm));*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("fi",rcond,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_irwork_tmp);
} /*if (capi_irwork_tmp == NULL) ... else of irwork*/
/* End of cleaning variable irwork */
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
/* End of cleaning variable lda */
/* End of cleaning variable n */
/* End of cleaning variable info */
/* End of cleaning variable rcond */
} /*if (f2py_success) of anorm*/
/* End of cleaning variable anorm */
} /*CHECKARRAY(shape(a,0)==shape(a,1))*/
if((PyObject *)capi_a_tmp!=a_capi) {
Py_XDECREF(capi_a_tmp); }
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
STRINGFREE(norm);
} /*if (f2py_success) of norm*/
/* End of cleaning variable norm */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of sgecon *******************************/
/*********************************** dgecon ***********************************/
static char doc_f2py_rout__flapack_dgecon[] = "\
rcond,info = dgecon(a,anorm,[norm])\n\nWrapper for ``dgecon``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('d') with bounds (n,n)\n"
"anorm : input float\n"
"\nOther Parameters\n----------------\n"
"norm : input string(len=1), optional\n Default: '1'\n"
"\nReturns\n-------\n"
"rcond : float\n"
"info : int";
/* extern void F_FUNC(dgecon,DGECON)(char*,F_INT*,double*,F_INT*,double*,double*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgecon(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,double*,F_INT*,double*,double*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
string norm = NULL;
int slen(norm);
PyObject *norm_capi = Py_None;
int n = 0;
double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
PyObject *a_capi = Py_None;
int lda = 0;
double anorm = 0;
PyObject *anorm_capi = Py_None;
double rcond = 0;
double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int *irwork = NULL;
npy_intp irwork_Dims[1] = {-1};
const int irwork_Rank = 1;
PyArrayObject *capi_irwork_tmp = NULL;
int capi_irwork_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","anorm","norm",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|O:_flapack.dgecon",\
capi_kwlist,&a_capi,&anorm_capi,&norm_capi))
return NULL;
/*frompyobj*/
/* Processing variable norm */
slen(norm) = 1;
f2py_success = string_from_pyobj(&norm,&slen(norm),"1",norm_capi,"string_from_pyobj failed in converting 1st keyword`norm' of _flapack.dgecon to C string");
if (f2py_success) {
STRINGPADN(norm, slen(norm), '\0', ' ');
/* Processing variable a */
;
capi_a_intent |= F2PY_INTENT_IN;
capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.dgecon to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (double *)(PyArray_DATA(capi_a_tmp));
CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a") {
/* Processing variable anorm */
f2py_success = double_from_pyobj(&anorm,anorm_capi,"_flapack.dgecon() 2nd argument (anorm) can't be converted to double");
if (f2py_success) {
/* Processing variable rcond */
/* Processing variable info */
/* Processing variable n */
n = shape(a,0);
/* Processing variable lda */
lda = shape(a,0);
/* Processing variable work */
work_Dims[0]=4 * n;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_DOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.dgecon to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (double *)(PyArray_DATA(capi_work_tmp));
/* Processing variable irwork */
irwork_Dims[0]=n;
capi_irwork_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_irwork_tmp = array_from_pyobj(NPY_INT,irwork_Dims,irwork_Rank,capi_irwork_intent,Py_None);
if (capi_irwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `irwork' of _flapack.dgecon to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
irwork = (int *)(PyArray_DATA(capi_irwork_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
(*f2py_func)(norm,&n,a,&lda,&anorm,&rcond,work,irwork,&info) ;
/*(*f2py_func)(norm,&n,a,&lda,&anorm,&rcond,work,irwork,&info,slen(norm));*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("di",rcond,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_irwork_tmp);
} /*if (capi_irwork_tmp == NULL) ... else of irwork*/
/* End of cleaning variable irwork */
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
/* End of cleaning variable lda */
/* End of cleaning variable n */
/* End of cleaning variable info */
/* End of cleaning variable rcond */
} /*if (f2py_success) of anorm*/
/* End of cleaning variable anorm */
} /*CHECKARRAY(shape(a,0)==shape(a,1))*/
if((PyObject *)capi_a_tmp!=a_capi) {
Py_XDECREF(capi_a_tmp); }
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
STRINGFREE(norm);
} /*if (f2py_success) of norm*/
/* End of cleaning variable norm */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of dgecon *******************************/
/*********************************** cgecon ***********************************/
static char doc_f2py_rout__flapack_cgecon[] = "\
rcond,info = cgecon(a,anorm,[norm])\n\nWrapper for ``cgecon``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('F') with bounds (n,n)\n"
"anorm : input float\n"
"\nOther Parameters\n----------------\n"
"norm : input string(len=1), optional\n Default: '1'\n"
"\nReturns\n-------\n"
"rcond : float\n"
"info : int";
/* extern void F_FUNC(cgecon,CGECON)(char*,F_INT*,complex_float*,F_INT*,float*,float*,complex_float*,float*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgecon(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,complex_float*,F_INT*,float*,float*,complex_float*,float*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
string norm = NULL;
int slen(norm);
PyObject *norm_capi = Py_None;
int n = 0;
complex_float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
PyObject *a_capi = Py_None;
int lda = 0;
float anorm = 0;
PyObject *anorm_capi = Py_None;
float rcond = 0;
complex_float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
float *irwork = NULL;
npy_intp irwork_Dims[1] = {-1};
const int irwork_Rank = 1;
PyArrayObject *capi_irwork_tmp = NULL;
int capi_irwork_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","anorm","norm",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|O:_flapack.cgecon",\
capi_kwlist,&a_capi,&anorm_capi,&norm_capi))
return NULL;
/*frompyobj*/
/* Processing variable norm */
slen(norm) = 1;
f2py_success = string_from_pyobj(&norm,&slen(norm),"1",norm_capi,"string_from_pyobj failed in converting 1st keyword`norm' of _flapack.cgecon to C string");
if (f2py_success) {
STRINGPADN(norm, slen(norm), '\0', ' ');
/* Processing variable a */
;
capi_a_intent |= F2PY_INTENT_IN;
capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.cgecon to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_float *)(PyArray_DATA(capi_a_tmp));
CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a") {
/* Processing variable anorm */
f2py_success = float_from_pyobj(&anorm,anorm_capi,"_flapack.cgecon() 2nd argument (anorm) can't be converted to float");
if (f2py_success) {
/* Processing variable rcond */
/* Processing variable info */
/* Processing variable n */
n = shape(a,0);
/* Processing variable lda */
lda = shape(a,0);
/* Processing variable work */
work_Dims[0]=2 * n;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_CFLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.cgecon to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_float *)(PyArray_DATA(capi_work_tmp));
/* Processing variable irwork */
irwork_Dims[0]=2 * n;
capi_irwork_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_irwork_tmp = array_from_pyobj(NPY_FLOAT,irwork_Dims,irwork_Rank,capi_irwork_intent,Py_None);
if (capi_irwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `irwork' of _flapack.cgecon to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
irwork = (float *)(PyArray_DATA(capi_irwork_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
(*f2py_func)(norm,&n,a,&lda,&anorm,&rcond,work,irwork,&info) ;
/*(*f2py_func)(norm,&n,a,&lda,&anorm,&rcond,work,irwork,&info,slen(norm));*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("fi",rcond,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_irwork_tmp);
} /*if (capi_irwork_tmp == NULL) ... else of irwork*/
/* End of cleaning variable irwork */
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
/* End of cleaning variable lda */
/* End of cleaning variable n */
/* End of cleaning variable info */
/* End of cleaning variable rcond */
} /*if (f2py_success) of anorm*/
/* End of cleaning variable anorm */
} /*CHECKARRAY(shape(a,0)==shape(a,1))*/
if((PyObject *)capi_a_tmp!=a_capi) {
Py_XDECREF(capi_a_tmp); }
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
STRINGFREE(norm);
} /*if (f2py_success) of norm*/
/* End of cleaning variable norm */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of cgecon *******************************/
/*********************************** zgecon ***********************************/
static char doc_f2py_rout__flapack_zgecon[] = "\
rcond,info = zgecon(a,anorm,[norm])\n\nWrapper for ``zgecon``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('D') with bounds (n,n)\n"
"anorm : input float\n"
"\nOther Parameters\n----------------\n"
"norm : input string(len=1), optional\n Default: '1'\n"
"\nReturns\n-------\n"
"rcond : float\n"
"info : int";
/* extern void F_FUNC(zgecon,ZGECON)(char*,F_INT*,complex_double*,F_INT*,double*,double*,complex_double*,double*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgecon(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,complex_double*,F_INT*,double*,double*,complex_double*,double*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
string norm = NULL;
int slen(norm);
PyObject *norm_capi = Py_None;
int n = 0;
complex_double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
PyObject *a_capi = Py_None;
int lda = 0;
double anorm = 0;
PyObject *anorm_capi = Py_None;
double rcond = 0;
complex_double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
double *irwork = NULL;
npy_intp irwork_Dims[1] = {-1};
const int irwork_Rank = 1;
PyArrayObject *capi_irwork_tmp = NULL;
int capi_irwork_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","anorm","norm",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|O:_flapack.zgecon",\
capi_kwlist,&a_capi,&anorm_capi,&norm_capi))
return NULL;
/*frompyobj*/
/* Processing variable norm */
slen(norm) = 1;
f2py_success = string_from_pyobj(&norm,&slen(norm),"1",norm_capi,"string_from_pyobj failed in converting 1st keyword`norm' of _flapack.zgecon to C string");
if (f2py_success) {
STRINGPADN(norm, slen(norm), '\0', ' ');
/* Processing variable a */
;
capi_a_intent |= F2PY_INTENT_IN;
capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.zgecon to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_double *)(PyArray_DATA(capi_a_tmp));
CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a") {
/* Processing variable anorm */
f2py_success = double_from_pyobj(&anorm,anorm_capi,"_flapack.zgecon() 2nd argument (anorm) can't be converted to double");
if (f2py_success) {
/* Processing variable rcond */
/* Processing variable info */
/* Processing variable n */
n = shape(a,0);
/* Processing variable lda */
lda = shape(a,0);
/* Processing variable work */
work_Dims[0]=2 * n;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_CDOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.zgecon to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_double *)(PyArray_DATA(capi_work_tmp));
/* Processing variable irwork */
irwork_Dims[0]=2 * n;
capi_irwork_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_irwork_tmp = array_from_pyobj(NPY_DOUBLE,irwork_Dims,irwork_Rank,capi_irwork_intent,Py_None);
if (capi_irwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `irwork' of _flapack.zgecon to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
irwork = (double *)(PyArray_DATA(capi_irwork_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
(*f2py_func)(norm,&n,a,&lda,&anorm,&rcond,work,irwork,&info) ;
/*(*f2py_func)(norm,&n,a,&lda,&anorm,&rcond,work,irwork,&info,slen(norm));*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("di",rcond,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_irwork_tmp);
} /*if (capi_irwork_tmp == NULL) ... else of irwork*/
/* End of cleaning variable irwork */
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
/* End of cleaning variable lda */
/* End of cleaning variable n */
/* End of cleaning variable info */
/* End of cleaning variable rcond */
} /*if (f2py_success) of anorm*/
/* End of cleaning variable anorm */
} /*CHECKARRAY(shape(a,0)==shape(a,1))*/
if((PyObject *)capi_a_tmp!=a_capi) {
Py_XDECREF(capi_a_tmp); }
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
STRINGFREE(norm);
} /*if (f2py_success) of norm*/
/* End of cleaning variable norm */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of zgecon *******************************/
/*********************************** sgetrf ***********************************/
static char doc_f2py_rout__flapack_sgetrf[] = "\
lu,piv,info = sgetrf(a,[overwrite_a])\n\nWrapper for ``sgetrf``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('f') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"lu : rank-2 array('f') with bounds (m,n) and a storage\n"
"piv : rank-1 array('i') with bounds (MIN(m,n))\n"
"info : int";
/* extern void F_FUNC(sgetrf,SGETRF)(F_INT*,F_INT*,float*,F_INT*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgetrf(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,float*,F_INT*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int *piv = NULL;
npy_intp piv_Dims[1] = {-1};
const int piv_Rank = 1;
PyArrayObject *capi_piv_tmp = NULL;
int capi_piv_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|i:_flapack.sgetrf",\
capi_kwlist,&a_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.sgetrf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (float *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable piv */
piv_Dims[0]=MIN(m,n);
capi_piv_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_piv_tmp = array_from_pyobj(NPY_INT,piv_Dims,piv_Rank,capi_piv_intent,Py_None);
if (capi_piv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `piv' of _flapack.sgetrf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
piv = (int *)(PyArray_DATA(capi_piv_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
{F_INT i;(*f2py_func)(&m,&n,a,&m,piv,&info);for(i=0,n=MIN(m,n);i<n;--piv[i++]);} ;
/*(*f2py_func)(&m,&n,a,piv,&info);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNi",capi_a_tmp,capi_piv_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_piv_tmp == NULL) ... else of piv*/
/* End of cleaning variable piv */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of sgetrf *******************************/
/*********************************** dgetrf ***********************************/
static char doc_f2py_rout__flapack_dgetrf[] = "\
lu,piv,info = dgetrf(a,[overwrite_a])\n\nWrapper for ``dgetrf``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('d') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"lu : rank-2 array('d') with bounds (m,n) and a storage\n"
"piv : rank-1 array('i') with bounds (MIN(m,n))\n"
"info : int";
/* extern void F_FUNC(dgetrf,DGETRF)(F_INT*,F_INT*,double*,F_INT*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgetrf(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,double*,F_INT*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int *piv = NULL;
npy_intp piv_Dims[1] = {-1};
const int piv_Rank = 1;
PyArrayObject *capi_piv_tmp = NULL;
int capi_piv_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|i:_flapack.dgetrf",\
capi_kwlist,&a_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.dgetrf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (double *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable piv */
piv_Dims[0]=MIN(m,n);
capi_piv_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_piv_tmp = array_from_pyobj(NPY_INT,piv_Dims,piv_Rank,capi_piv_intent,Py_None);
if (capi_piv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `piv' of _flapack.dgetrf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
piv = (int *)(PyArray_DATA(capi_piv_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
{F_INT i;(*f2py_func)(&m,&n,a,&m,piv,&info);for(i=0,n=MIN(m,n);i<n;--piv[i++]);} ;
/*(*f2py_func)(&m,&n,a,piv,&info);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNi",capi_a_tmp,capi_piv_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_piv_tmp == NULL) ... else of piv*/
/* End of cleaning variable piv */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of dgetrf *******************************/
/*********************************** cgetrf ***********************************/
static char doc_f2py_rout__flapack_cgetrf[] = "\
lu,piv,info = cgetrf(a,[overwrite_a])\n\nWrapper for ``cgetrf``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('F') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"lu : rank-2 array('F') with bounds (m,n) and a storage\n"
"piv : rank-1 array('i') with bounds (MIN(m,n))\n"
"info : int";
/* extern void F_FUNC(cgetrf,CGETRF)(F_INT*,F_INT*,complex_float*,F_INT*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgetrf(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,complex_float*,F_INT*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
complex_float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int *piv = NULL;
npy_intp piv_Dims[1] = {-1};
const int piv_Rank = 1;
PyArrayObject *capi_piv_tmp = NULL;
int capi_piv_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|i:_flapack.cgetrf",\
capi_kwlist,&a_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.cgetrf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_float *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable piv */
piv_Dims[0]=MIN(m,n);
capi_piv_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_piv_tmp = array_from_pyobj(NPY_INT,piv_Dims,piv_Rank,capi_piv_intent,Py_None);
if (capi_piv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `piv' of _flapack.cgetrf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
piv = (int *)(PyArray_DATA(capi_piv_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
{F_INT i;(*f2py_func)(&m,&n,a,&m,piv,&info);for(i=0,n=MIN(m,n);i<n;--piv[i++]);} ;
/*(*f2py_func)(&m,&n,a,piv,&info);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNi",capi_a_tmp,capi_piv_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_piv_tmp == NULL) ... else of piv*/
/* End of cleaning variable piv */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of cgetrf *******************************/
/*********************************** zgetrf ***********************************/
static char doc_f2py_rout__flapack_zgetrf[] = "\
lu,piv,info = zgetrf(a,[overwrite_a])\n\nWrapper for ``zgetrf``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('D') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"lu : rank-2 array('D') with bounds (m,n) and a storage\n"
"piv : rank-1 array('i') with bounds (MIN(m,n))\n"
"info : int";
/* extern void F_FUNC(zgetrf,ZGETRF)(F_INT*,F_INT*,complex_double*,F_INT*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgetrf(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,complex_double*,F_INT*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
complex_double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int *piv = NULL;
npy_intp piv_Dims[1] = {-1};
const int piv_Rank = 1;
PyArrayObject *capi_piv_tmp = NULL;
int capi_piv_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|i:_flapack.zgetrf",\
capi_kwlist,&a_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.zgetrf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_double *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable piv */
piv_Dims[0]=MIN(m,n);
capi_piv_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_piv_tmp = array_from_pyobj(NPY_INT,piv_Dims,piv_Rank,capi_piv_intent,Py_None);
if (capi_piv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `piv' of _flapack.zgetrf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
piv = (int *)(PyArray_DATA(capi_piv_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
{F_INT i;(*f2py_func)(&m,&n,a,&m,piv,&info);for(i=0,n=MIN(m,n);i<n;--piv[i++]);} ;
/*(*f2py_func)(&m,&n,a,piv,&info);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNi",capi_a_tmp,capi_piv_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_piv_tmp == NULL) ... else of piv*/
/* End of cleaning variable piv */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of zgetrf *******************************/
/*********************************** sgetrs ***********************************/
static char doc_f2py_rout__flapack_sgetrs[] = "\
x,info = sgetrs(lu,piv,b,[trans,overwrite_b])\n\nWrapper for ``sgetrs``.\
\n\nParameters\n----------\n"
"lu : input rank-2 array('f') with bounds (n,n)\n"
"piv : input rank-1 array('i') with bounds (n)\n"
"b : input rank-2 array('f') with bounds (n,nrhs)\n"
"\nOther Parameters\n----------------\n"
"overwrite_b : input int, optional\n Default: 0\n"
"trans : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"x : rank-2 array('f') with bounds (n,nrhs) and b storage\n"
"info : int";
/* extern void F_FUNC(sgetrs,SGETRS)(char*,F_INT*,F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgetrs(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
int nrhs = 0;
float *lu = NULL;
npy_intp lu_Dims[2] = {-1, -1};
const int lu_Rank = 2;
PyArrayObject *capi_lu_tmp = NULL;
int capi_lu_intent = 0;
PyObject *lu_capi = Py_None;
int *piv = NULL;
npy_intp piv_Dims[1] = {-1};
const int piv_Rank = 1;
PyArrayObject *capi_piv_tmp = NULL;
int capi_piv_intent = 0;
PyObject *piv_capi = Py_None;
float *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
int info = 0;
int trans = 0;
PyObject *trans_capi = Py_None;
static char *capi_kwlist[] = {"lu","piv","b","trans","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOO|Oi:_flapack.sgetrs",\
capi_kwlist,&lu_capi,&piv_capi,&b_capi,&trans_capi,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable trans */
if (trans_capi == Py_None) trans = 0; else
f2py_success = int_from_pyobj(&trans,trans_capi,"_flapack.sgetrs() 1st keyword (trans) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","1st keyword trans","sgetrs:trans=%d",trans) {
/* Processing variable lu */
;
capi_lu_intent |= F2PY_INTENT_IN;
capi_lu_tmp = array_from_pyobj(NPY_FLOAT,lu_Dims,lu_Rank,capi_lu_intent,lu_capi);
if (capi_lu_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `lu' of _flapack.sgetrs to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
lu = (float *)(PyArray_DATA(capi_lu_tmp));
CHECKARRAY(shape(lu,0)==shape(lu,1),"shape(lu,0)==shape(lu,1)","1st argument lu") {
/* Processing variable info */
/* Processing variable n */
n = shape(lu,0);
/* Processing variable piv */
piv_Dims[0]=n;
capi_piv_intent |= F2PY_INTENT_IN;
capi_piv_tmp = array_from_pyobj(NPY_INT,piv_Dims,piv_Rank,capi_piv_intent,piv_capi);
if (capi_piv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `piv' of _flapack.sgetrs to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
piv = (int *)(PyArray_DATA(capi_piv_tmp));
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=n;
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_FLOAT,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 3rd argument `b' of _flapack.sgetrs to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (float *)(PyArray_DATA(capi_b_tmp));
CHECKARRAY(shape(lu,0)==shape(b,0),"shape(lu,0)==shape(b,0)","3rd argument b") {
/* Processing variable nrhs */
nrhs = shape(b,1);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
{F_INT i;for(i=0;i<n;++piv[i++]);(*f2py_func)((trans?(trans==2?"C":"T"):"N"),&n,&nrhs,lu,&n,piv,b,&n,&info);for(i=0;i<n;--piv[i++]);} ;
/*(*f2py_func)(&n,&nrhs,lu,piv,b,&info,&trans);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",capi_b_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable nrhs */
} /*CHECKARRAY(shape(lu,0)==shape(b,0))*/
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
if((PyObject *)capi_piv_tmp!=piv_capi) {
Py_XDECREF(capi_piv_tmp); }
} /*if (capi_piv_tmp == NULL) ... else of piv*/
/* End of cleaning variable piv */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*CHECKARRAY(shape(lu,0)==shape(lu,1))*/
if((PyObject *)capi_lu_tmp!=lu_capi) {
Py_XDECREF(capi_lu_tmp); }
} /*if (capi_lu_tmp == NULL) ... else of lu*/
/* End of cleaning variable lu */
} /*CHECKSCALAR(trans>=0 && trans <=2)*/
} /*if (f2py_success) of trans*/
/* End of cleaning variable trans */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of sgetrs *******************************/
/*********************************** dgetrs ***********************************/
static char doc_f2py_rout__flapack_dgetrs[] = "\
x,info = dgetrs(lu,piv,b,[trans,overwrite_b])\n\nWrapper for ``dgetrs``.\
\n\nParameters\n----------\n"
"lu : input rank-2 array('d') with bounds (n,n)\n"
"piv : input rank-1 array('i') with bounds (n)\n"
"b : input rank-2 array('d') with bounds (n,nrhs)\n"
"\nOther Parameters\n----------------\n"
"overwrite_b : input int, optional\n Default: 0\n"
"trans : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"x : rank-2 array('d') with bounds (n,nrhs) and b storage\n"
"info : int";
/* extern void F_FUNC(dgetrs,DGETRS)(char*,F_INT*,F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgetrs(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
int nrhs = 0;
double *lu = NULL;
npy_intp lu_Dims[2] = {-1, -1};
const int lu_Rank = 2;
PyArrayObject *capi_lu_tmp = NULL;
int capi_lu_intent = 0;
PyObject *lu_capi = Py_None;
int *piv = NULL;
npy_intp piv_Dims[1] = {-1};
const int piv_Rank = 1;
PyArrayObject *capi_piv_tmp = NULL;
int capi_piv_intent = 0;
PyObject *piv_capi = Py_None;
double *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
int info = 0;
int trans = 0;
PyObject *trans_capi = Py_None;
static char *capi_kwlist[] = {"lu","piv","b","trans","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOO|Oi:_flapack.dgetrs",\
capi_kwlist,&lu_capi,&piv_capi,&b_capi,&trans_capi,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable trans */
if (trans_capi == Py_None) trans = 0; else
f2py_success = int_from_pyobj(&trans,trans_capi,"_flapack.dgetrs() 1st keyword (trans) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","1st keyword trans","dgetrs:trans=%d",trans) {
/* Processing variable lu */
;
capi_lu_intent |= F2PY_INTENT_IN;
capi_lu_tmp = array_from_pyobj(NPY_DOUBLE,lu_Dims,lu_Rank,capi_lu_intent,lu_capi);
if (capi_lu_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `lu' of _flapack.dgetrs to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
lu = (double *)(PyArray_DATA(capi_lu_tmp));
CHECKARRAY(shape(lu,0)==shape(lu,1),"shape(lu,0)==shape(lu,1)","1st argument lu") {
/* Processing variable info */
/* Processing variable n */
n = shape(lu,0);
/* Processing variable piv */
piv_Dims[0]=n;
capi_piv_intent |= F2PY_INTENT_IN;
capi_piv_tmp = array_from_pyobj(NPY_INT,piv_Dims,piv_Rank,capi_piv_intent,piv_capi);
if (capi_piv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `piv' of _flapack.dgetrs to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
piv = (int *)(PyArray_DATA(capi_piv_tmp));
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=n;
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_DOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 3rd argument `b' of _flapack.dgetrs to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (double *)(PyArray_DATA(capi_b_tmp));
CHECKARRAY(shape(lu,0)==shape(b,0),"shape(lu,0)==shape(b,0)","3rd argument b") {
/* Processing variable nrhs */
nrhs = shape(b,1);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
{F_INT i;for(i=0;i<n;++piv[i++]);(*f2py_func)((trans?(trans==2?"C":"T"):"N"),&n,&nrhs,lu,&n,piv,b,&n,&info);for(i=0;i<n;--piv[i++]);} ;
/*(*f2py_func)(&n,&nrhs,lu,piv,b,&info,&trans);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",capi_b_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable nrhs */
} /*CHECKARRAY(shape(lu,0)==shape(b,0))*/
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
if((PyObject *)capi_piv_tmp!=piv_capi) {
Py_XDECREF(capi_piv_tmp); }
} /*if (capi_piv_tmp == NULL) ... else of piv*/
/* End of cleaning variable piv */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*CHECKARRAY(shape(lu,0)==shape(lu,1))*/
if((PyObject *)capi_lu_tmp!=lu_capi) {
Py_XDECREF(capi_lu_tmp); }
} /*if (capi_lu_tmp == NULL) ... else of lu*/
/* End of cleaning variable lu */
} /*CHECKSCALAR(trans>=0 && trans <=2)*/
} /*if (f2py_success) of trans*/
/* End of cleaning variable trans */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of dgetrs *******************************/
/*********************************** cgetrs ***********************************/
static char doc_f2py_rout__flapack_cgetrs[] = "\
x,info = cgetrs(lu,piv,b,[trans,overwrite_b])\n\nWrapper for ``cgetrs``.\
\n\nParameters\n----------\n"
"lu : input rank-2 array('F') with bounds (n,n)\n"
"piv : input rank-1 array('i') with bounds (n)\n"
"b : input rank-2 array('F') with bounds (n,nrhs)\n"
"\nOther Parameters\n----------------\n"
"overwrite_b : input int, optional\n Default: 0\n"
"trans : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"x : rank-2 array('F') with bounds (n,nrhs) and b storage\n"
"info : int";
/* extern void F_FUNC(cgetrs,CGETRS)(char*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgetrs(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
int nrhs = 0;
complex_float *lu = NULL;
npy_intp lu_Dims[2] = {-1, -1};
const int lu_Rank = 2;
PyArrayObject *capi_lu_tmp = NULL;
int capi_lu_intent = 0;
PyObject *lu_capi = Py_None;
int *piv = NULL;
npy_intp piv_Dims[1] = {-1};
const int piv_Rank = 1;
PyArrayObject *capi_piv_tmp = NULL;
int capi_piv_intent = 0;
PyObject *piv_capi = Py_None;
complex_float *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
int info = 0;
int trans = 0;
PyObject *trans_capi = Py_None;
static char *capi_kwlist[] = {"lu","piv","b","trans","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOO|Oi:_flapack.cgetrs",\
capi_kwlist,&lu_capi,&piv_capi,&b_capi,&trans_capi,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable trans */
if (trans_capi == Py_None) trans = 0; else
f2py_success = int_from_pyobj(&trans,trans_capi,"_flapack.cgetrs() 1st keyword (trans) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","1st keyword trans","cgetrs:trans=%d",trans) {
/* Processing variable lu */
;
capi_lu_intent |= F2PY_INTENT_IN;
capi_lu_tmp = array_from_pyobj(NPY_CFLOAT,lu_Dims,lu_Rank,capi_lu_intent,lu_capi);
if (capi_lu_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `lu' of _flapack.cgetrs to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
lu = (complex_float *)(PyArray_DATA(capi_lu_tmp));
CHECKARRAY(shape(lu,0)==shape(lu,1),"shape(lu,0)==shape(lu,1)","1st argument lu") {
/* Processing variable info */
/* Processing variable n */
n = shape(lu,0);
/* Processing variable piv */
piv_Dims[0]=n;
capi_piv_intent |= F2PY_INTENT_IN;
capi_piv_tmp = array_from_pyobj(NPY_INT,piv_Dims,piv_Rank,capi_piv_intent,piv_capi);
if (capi_piv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `piv' of _flapack.cgetrs to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
piv = (int *)(PyArray_DATA(capi_piv_tmp));
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=n;
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_CFLOAT,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 3rd argument `b' of _flapack.cgetrs to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (complex_float *)(PyArray_DATA(capi_b_tmp));
CHECKARRAY(shape(lu,0)==shape(b,0),"shape(lu,0)==shape(b,0)","3rd argument b") {
/* Processing variable nrhs */
nrhs = shape(b,1);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
{F_INT i;for(i=0;i<n;++piv[i++]);(*f2py_func)((trans?(trans==2?"C":"T"):"N"),&n,&nrhs,lu,&n,piv,b,&n,&info);for(i=0;i<n;--piv[i++]);} ;
/*(*f2py_func)(&n,&nrhs,lu,piv,b,&info,&trans);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",capi_b_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable nrhs */
} /*CHECKARRAY(shape(lu,0)==shape(b,0))*/
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
if((PyObject *)capi_piv_tmp!=piv_capi) {
Py_XDECREF(capi_piv_tmp); }
} /*if (capi_piv_tmp == NULL) ... else of piv*/
/* End of cleaning variable piv */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*CHECKARRAY(shape(lu,0)==shape(lu,1))*/
if((PyObject *)capi_lu_tmp!=lu_capi) {
Py_XDECREF(capi_lu_tmp); }
} /*if (capi_lu_tmp == NULL) ... else of lu*/
/* End of cleaning variable lu */
} /*CHECKSCALAR(trans>=0 && trans <=2)*/
} /*if (f2py_success) of trans*/
/* End of cleaning variable trans */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of cgetrs *******************************/
/*********************************** zgetrs ***********************************/
static char doc_f2py_rout__flapack_zgetrs[] = "\
x,info = zgetrs(lu,piv,b,[trans,overwrite_b])\n\nWrapper for ``zgetrs``.\
\n\nParameters\n----------\n"
"lu : input rank-2 array('D') with bounds (n,n)\n"
"piv : input rank-1 array('i') with bounds (n)\n"
"b : input rank-2 array('D') with bounds (n,nrhs)\n"
"\nOther Parameters\n----------------\n"
"overwrite_b : input int, optional\n Default: 0\n"
"trans : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"x : rank-2 array('D') with bounds (n,nrhs) and b storage\n"
"info : int";
/* extern void F_FUNC(zgetrs,ZGETRS)(char*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgetrs(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
int nrhs = 0;
complex_double *lu = NULL;
npy_intp lu_Dims[2] = {-1, -1};
const int lu_Rank = 2;
PyArrayObject *capi_lu_tmp = NULL;
int capi_lu_intent = 0;
PyObject *lu_capi = Py_None;
int *piv = NULL;
npy_intp piv_Dims[1] = {-1};
const int piv_Rank = 1;
PyArrayObject *capi_piv_tmp = NULL;
int capi_piv_intent = 0;
PyObject *piv_capi = Py_None;
complex_double *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
int info = 0;
int trans = 0;
PyObject *trans_capi = Py_None;
static char *capi_kwlist[] = {"lu","piv","b","trans","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOO|Oi:_flapack.zgetrs",\
capi_kwlist,&lu_capi,&piv_capi,&b_capi,&trans_capi,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable trans */
if (trans_capi == Py_None) trans = 0; else
f2py_success = int_from_pyobj(&trans,trans_capi,"_flapack.zgetrs() 1st keyword (trans) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","1st keyword trans","zgetrs:trans=%d",trans) {
/* Processing variable lu */
;
capi_lu_intent |= F2PY_INTENT_IN;
capi_lu_tmp = array_from_pyobj(NPY_CDOUBLE,lu_Dims,lu_Rank,capi_lu_intent,lu_capi);
if (capi_lu_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `lu' of _flapack.zgetrs to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
lu = (complex_double *)(PyArray_DATA(capi_lu_tmp));
CHECKARRAY(shape(lu,0)==shape(lu,1),"shape(lu,0)==shape(lu,1)","1st argument lu") {
/* Processing variable info */
/* Processing variable n */
n = shape(lu,0);
/* Processing variable piv */
piv_Dims[0]=n;
capi_piv_intent |= F2PY_INTENT_IN;
capi_piv_tmp = array_from_pyobj(NPY_INT,piv_Dims,piv_Rank,capi_piv_intent,piv_capi);
if (capi_piv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `piv' of _flapack.zgetrs to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
piv = (int *)(PyArray_DATA(capi_piv_tmp));
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=n;
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_CDOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 3rd argument `b' of _flapack.zgetrs to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (complex_double *)(PyArray_DATA(capi_b_tmp));
CHECKARRAY(shape(lu,0)==shape(b,0),"shape(lu,0)==shape(b,0)","3rd argument b") {
/* Processing variable nrhs */
nrhs = shape(b,1);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
{F_INT i;for(i=0;i<n;++piv[i++]);(*f2py_func)((trans?(trans==2?"C":"T"):"N"),&n,&nrhs,lu,&n,piv,b,&n,&info);for(i=0;i<n;--piv[i++]);} ;
/*(*f2py_func)(&n,&nrhs,lu,piv,b,&info,&trans);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",capi_b_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable nrhs */
} /*CHECKARRAY(shape(lu,0)==shape(b,0))*/
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
if((PyObject *)capi_piv_tmp!=piv_capi) {
Py_XDECREF(capi_piv_tmp); }
} /*if (capi_piv_tmp == NULL) ... else of piv*/
/* End of cleaning variable piv */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*CHECKARRAY(shape(lu,0)==shape(lu,1))*/
if((PyObject *)capi_lu_tmp!=lu_capi) {
Py_XDECREF(capi_lu_tmp); }
} /*if (capi_lu_tmp == NULL) ... else of lu*/
/* End of cleaning variable lu */
} /*CHECKSCALAR(trans>=0 && trans <=2)*/
} /*if (f2py_success) of trans*/
/* End of cleaning variable trans */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of zgetrs *******************************/
/*********************************** sgetc2 ***********************************/
static char doc_f2py_rout__flapack_sgetc2[] = "\
lu,ipiv,jpiv,info = sgetc2(a,[overwrite_a])\n\nWrapper for ``sgetc2``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('f') with bounds (n,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"lu : rank-2 array('f') with bounds (n,n) and a storage\n"
"ipiv : rank-1 array('i') with bounds (n)\n"
"jpiv : rank-1 array('i') with bounds (n)\n"
"info : int";
/* extern void F_FUNC(sgetc2,SGETC2)(F_INT*,float*,F_INT*,F_INT*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgetc2(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,float*,F_INT*,F_INT*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int lda = 0;
int *ipiv = NULL;
npy_intp ipiv_Dims[1] = {-1};
const int ipiv_Rank = 1;
PyArrayObject *capi_ipiv_tmp = NULL;
int capi_ipiv_intent = 0;
int *jpiv = NULL;
npy_intp jpiv_Dims[1] = {-1};
const int jpiv_Rank = 1;
PyArrayObject *capi_jpiv_tmp = NULL;
int capi_jpiv_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|i:_flapack.sgetc2",\
capi_kwlist,&a_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.sgetc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (float *)(PyArray_DATA(capi_a_tmp));
CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a") {
/* Processing variable info */
/* Processing variable n */
n = shape(a,0);
/* Processing variable lda */
lda = MAX(1,shape(a,0));
/* Processing variable ipiv */
ipiv_Dims[0]=n;
capi_ipiv_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_ipiv_tmp = array_from_pyobj(NPY_INT,ipiv_Dims,ipiv_Rank,capi_ipiv_intent,Py_None);
if (capi_ipiv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `ipiv' of _flapack.sgetc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
ipiv = (int *)(PyArray_DATA(capi_ipiv_tmp));
/* Processing variable jpiv */
jpiv_Dims[0]=n;
capi_jpiv_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_jpiv_tmp = array_from_pyobj(NPY_INT,jpiv_Dims,jpiv_Rank,capi_jpiv_intent,Py_None);
if (capi_jpiv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `jpiv' of _flapack.sgetc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
jpiv = (int *)(PyArray_DATA(capi_jpiv_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
{F_INT i;(*f2py_func)(&n,a,&lda,ipiv,jpiv,&info);for(i=0;i<n;--ipiv[i],--jpiv[i++]);} ;
/*(*f2py_func)(&n,a,&lda,ipiv,jpiv,&info);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNi",capi_a_tmp,capi_ipiv_tmp,capi_jpiv_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_jpiv_tmp == NULL) ... else of jpiv*/
/* End of cleaning variable jpiv */
} /*if (capi_ipiv_tmp == NULL) ... else of ipiv*/
/* End of cleaning variable ipiv */
/* End of cleaning variable lda */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*CHECKARRAY(shape(a,0)==shape(a,1))*/
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of sgetc2 *******************************/
/*********************************** dgetc2 ***********************************/
static char doc_f2py_rout__flapack_dgetc2[] = "\
lu,ipiv,jpiv,info = dgetc2(a,[overwrite_a])\n\nWrapper for ``dgetc2``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('d') with bounds (n,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"lu : rank-2 array('d') with bounds (n,n) and a storage\n"
"ipiv : rank-1 array('i') with bounds (n)\n"
"jpiv : rank-1 array('i') with bounds (n)\n"
"info : int";
/* extern void F_FUNC(dgetc2,DGETC2)(F_INT*,double*,F_INT*,F_INT*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgetc2(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,double*,F_INT*,F_INT*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int lda = 0;
int *ipiv = NULL;
npy_intp ipiv_Dims[1] = {-1};
const int ipiv_Rank = 1;
PyArrayObject *capi_ipiv_tmp = NULL;
int capi_ipiv_intent = 0;
int *jpiv = NULL;
npy_intp jpiv_Dims[1] = {-1};
const int jpiv_Rank = 1;
PyArrayObject *capi_jpiv_tmp = NULL;
int capi_jpiv_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|i:_flapack.dgetc2",\
capi_kwlist,&a_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.dgetc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (double *)(PyArray_DATA(capi_a_tmp));
CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a") {
/* Processing variable info */
/* Processing variable n */
n = shape(a,0);
/* Processing variable lda */
lda = MAX(1,shape(a,0));
/* Processing variable ipiv */
ipiv_Dims[0]=n;
capi_ipiv_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_ipiv_tmp = array_from_pyobj(NPY_INT,ipiv_Dims,ipiv_Rank,capi_ipiv_intent,Py_None);
if (capi_ipiv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `ipiv' of _flapack.dgetc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
ipiv = (int *)(PyArray_DATA(capi_ipiv_tmp));
/* Processing variable jpiv */
jpiv_Dims[0]=n;
capi_jpiv_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_jpiv_tmp = array_from_pyobj(NPY_INT,jpiv_Dims,jpiv_Rank,capi_jpiv_intent,Py_None);
if (capi_jpiv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `jpiv' of _flapack.dgetc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
jpiv = (int *)(PyArray_DATA(capi_jpiv_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
{F_INT i;(*f2py_func)(&n,a,&lda,ipiv,jpiv,&info);for(i=0;i<n;--ipiv[i],--jpiv[i++]);} ;
/*(*f2py_func)(&n,a,&lda,ipiv,jpiv,&info);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNi",capi_a_tmp,capi_ipiv_tmp,capi_jpiv_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_jpiv_tmp == NULL) ... else of jpiv*/
/* End of cleaning variable jpiv */
} /*if (capi_ipiv_tmp == NULL) ... else of ipiv*/
/* End of cleaning variable ipiv */
/* End of cleaning variable lda */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*CHECKARRAY(shape(a,0)==shape(a,1))*/
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of dgetc2 *******************************/
/*********************************** cgetc2 ***********************************/
static char doc_f2py_rout__flapack_cgetc2[] = "\
lu,ipiv,jpiv,info = cgetc2(a,[overwrite_a])\n\nWrapper for ``cgetc2``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('F') with bounds (n,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"lu : rank-2 array('F') with bounds (n,n) and a storage\n"
"ipiv : rank-1 array('i') with bounds (n)\n"
"jpiv : rank-1 array('i') with bounds (n)\n"
"info : int";
/* extern void F_FUNC(cgetc2,CGETC2)(F_INT*,complex_float*,F_INT*,F_INT*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgetc2(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,complex_float*,F_INT*,F_INT*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
complex_float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int lda = 0;
int *ipiv = NULL;
npy_intp ipiv_Dims[1] = {-1};
const int ipiv_Rank = 1;
PyArrayObject *capi_ipiv_tmp = NULL;
int capi_ipiv_intent = 0;
int *jpiv = NULL;
npy_intp jpiv_Dims[1] = {-1};
const int jpiv_Rank = 1;
PyArrayObject *capi_jpiv_tmp = NULL;
int capi_jpiv_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|i:_flapack.cgetc2",\
capi_kwlist,&a_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.cgetc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_float *)(PyArray_DATA(capi_a_tmp));
CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a") {
/* Processing variable info */
/* Processing variable n */
n = shape(a,0);
/* Processing variable lda */
lda = MAX(1,shape(a,0));
/* Processing variable ipiv */
ipiv_Dims[0]=n;
capi_ipiv_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_ipiv_tmp = array_from_pyobj(NPY_INT,ipiv_Dims,ipiv_Rank,capi_ipiv_intent,Py_None);
if (capi_ipiv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `ipiv' of _flapack.cgetc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
ipiv = (int *)(PyArray_DATA(capi_ipiv_tmp));
/* Processing variable jpiv */
jpiv_Dims[0]=n;
capi_jpiv_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_jpiv_tmp = array_from_pyobj(NPY_INT,jpiv_Dims,jpiv_Rank,capi_jpiv_intent,Py_None);
if (capi_jpiv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `jpiv' of _flapack.cgetc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
jpiv = (int *)(PyArray_DATA(capi_jpiv_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
{F_INT i;(*f2py_func)(&n,a,&lda,ipiv,jpiv,&info);for(i=0;i<n;--ipiv[i],--jpiv[i++]);} ;
/*(*f2py_func)(&n,a,&lda,ipiv,jpiv,&info);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNi",capi_a_tmp,capi_ipiv_tmp,capi_jpiv_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_jpiv_tmp == NULL) ... else of jpiv*/
/* End of cleaning variable jpiv */
} /*if (capi_ipiv_tmp == NULL) ... else of ipiv*/
/* End of cleaning variable ipiv */
/* End of cleaning variable lda */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*CHECKARRAY(shape(a,0)==shape(a,1))*/
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of cgetc2 *******************************/
/*********************************** zgetc2 ***********************************/
static char doc_f2py_rout__flapack_zgetc2[] = "\
lu,ipiv,jpiv,info = zgetc2(a,[overwrite_a])\n\nWrapper for ``zgetc2``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('D') with bounds (n,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"lu : rank-2 array('D') with bounds (n,n) and a storage\n"
"ipiv : rank-1 array('i') with bounds (n)\n"
"jpiv : rank-1 array('i') with bounds (n)\n"
"info : int";
/* extern void F_FUNC(zgetc2,ZGETC2)(F_INT*,complex_double*,F_INT*,F_INT*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgetc2(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,complex_double*,F_INT*,F_INT*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
complex_double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int lda = 0;
int *ipiv = NULL;
npy_intp ipiv_Dims[1] = {-1};
const int ipiv_Rank = 1;
PyArrayObject *capi_ipiv_tmp = NULL;
int capi_ipiv_intent = 0;
int *jpiv = NULL;
npy_intp jpiv_Dims[1] = {-1};
const int jpiv_Rank = 1;
PyArrayObject *capi_jpiv_tmp = NULL;
int capi_jpiv_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|i:_flapack.zgetc2",\
capi_kwlist,&a_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.zgetc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_double *)(PyArray_DATA(capi_a_tmp));
CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a") {
/* Processing variable info */
/* Processing variable n */
n = shape(a,0);
/* Processing variable lda */
lda = MAX(1,shape(a,0));
/* Processing variable ipiv */
ipiv_Dims[0]=n;
capi_ipiv_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_ipiv_tmp = array_from_pyobj(NPY_INT,ipiv_Dims,ipiv_Rank,capi_ipiv_intent,Py_None);
if (capi_ipiv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `ipiv' of _flapack.zgetc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
ipiv = (int *)(PyArray_DATA(capi_ipiv_tmp));
/* Processing variable jpiv */
jpiv_Dims[0]=n;
capi_jpiv_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_jpiv_tmp = array_from_pyobj(NPY_INT,jpiv_Dims,jpiv_Rank,capi_jpiv_intent,Py_None);
if (capi_jpiv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `jpiv' of _flapack.zgetc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
jpiv = (int *)(PyArray_DATA(capi_jpiv_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
{F_INT i;(*f2py_func)(&n,a,&lda,ipiv,jpiv,&info);for(i=0;i<n;--ipiv[i],--jpiv[i++]);} ;
/*(*f2py_func)(&n,a,&lda,ipiv,jpiv,&info);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNi",capi_a_tmp,capi_ipiv_tmp,capi_jpiv_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_jpiv_tmp == NULL) ... else of jpiv*/
/* End of cleaning variable jpiv */
} /*if (capi_ipiv_tmp == NULL) ... else of ipiv*/
/* End of cleaning variable ipiv */
/* End of cleaning variable lda */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*CHECKARRAY(shape(a,0)==shape(a,1))*/
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of zgetc2 *******************************/
/*********************************** sgesc2 ***********************************/
static char doc_f2py_rout__flapack_sgesc2[] = "\
x,scale = sgesc2(lu,rhs,ipiv,jpiv,[overwrite_rhs])\n\nWrapper for ``sgesc2``.\
\n\nParameters\n----------\n"
"lu : input rank-2 array('f') with bounds (n,n)\n"
"rhs : input rank-1 array('f') with bounds (n)\n"
"ipiv : input rank-1 array('i') with bounds (n)\n"
"jpiv : input rank-1 array('i') with bounds (n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_rhs : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"x : rank-1 array('f') with bounds (n) and rhs storage\n"
"scale : float";
/* extern void F_FUNC(sgesc2,SGESC2)(F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,float* ); */
static PyObject *f2py_rout__flapack_sgesc2(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,float* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
float *lu = NULL;
npy_intp lu_Dims[2] = {-1, -1};
const int lu_Rank = 2;
PyArrayObject *capi_lu_tmp = NULL;
int capi_lu_intent = 0;
PyObject *lu_capi = Py_None;
int lda = 0;
float *rhs = NULL;
npy_intp rhs_Dims[1] = {-1};
const int rhs_Rank = 1;
PyArrayObject *capi_rhs_tmp = NULL;
int capi_rhs_intent = 0;
int capi_overwrite_rhs = 0;
PyObject *rhs_capi = Py_None;
int *ipiv = NULL;
npy_intp ipiv_Dims[1] = {-1};
const int ipiv_Rank = 1;
PyArrayObject *capi_ipiv_tmp = NULL;
int capi_ipiv_intent = 0;
PyObject *ipiv_capi = Py_None;
int *jpiv = NULL;
npy_intp jpiv_Dims[1] = {-1};
const int jpiv_Rank = 1;
PyArrayObject *capi_jpiv_tmp = NULL;
int capi_jpiv_intent = 0;
PyObject *jpiv_capi = Py_None;
float scale = 0;
static char *capi_kwlist[] = {"lu","rhs","ipiv","jpiv","overwrite_rhs",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOOO|i:_flapack.sgesc2",\
capi_kwlist,&lu_capi,&rhs_capi,&ipiv_capi,&jpiv_capi,&capi_overwrite_rhs))
return NULL;
/*frompyobj*/
/* Processing variable lu */
;
capi_lu_intent |= F2PY_INTENT_IN;
capi_lu_tmp = array_from_pyobj(NPY_FLOAT,lu_Dims,lu_Rank,capi_lu_intent,lu_capi);
if (capi_lu_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `lu' of _flapack.sgesc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
lu = (float *)(PyArray_DATA(capi_lu_tmp));
CHECKARRAY(shape(lu,0)==shape(lu,1),"shape(lu,0)==shape(lu,1)","1st argument lu") {
/* Processing variable scale */
/* Processing variable n */
n = shape(lu,0);
/* Processing variable lda */
lda = MAX(1,shape(lu,0));
/* Processing variable rhs */
capi_rhs_intent |= (capi_overwrite_rhs?0:F2PY_INTENT_COPY);
rhs_Dims[0]=n;
capi_rhs_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_rhs_tmp = array_from_pyobj(NPY_FLOAT,rhs_Dims,rhs_Rank,capi_rhs_intent,rhs_capi);
if (capi_rhs_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `rhs' of _flapack.sgesc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
rhs = (float *)(PyArray_DATA(capi_rhs_tmp));
CHECKARRAY(shape(lu,0)==len(rhs),"shape(lu,0)==len(rhs)","2nd argument rhs") {
/* Processing variable ipiv */
ipiv_Dims[0]=n;
capi_ipiv_intent |= F2PY_INTENT_IN;
capi_ipiv_tmp = array_from_pyobj(NPY_INT,ipiv_Dims,ipiv_Rank,capi_ipiv_intent,ipiv_capi);
if (capi_ipiv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 3rd argument `ipiv' of _flapack.sgesc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
ipiv = (int *)(PyArray_DATA(capi_ipiv_tmp));
/* Processing variable jpiv */
jpiv_Dims[0]=n;
capi_jpiv_intent |= F2PY_INTENT_IN;
capi_jpiv_tmp = array_from_pyobj(NPY_INT,jpiv_Dims,jpiv_Rank,capi_jpiv_intent,jpiv_capi);
if (capi_jpiv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 4th argument `jpiv' of _flapack.sgesc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
jpiv = (int *)(PyArray_DATA(capi_jpiv_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
{F_INT i;for(i=0;i<n;++ipiv[i],++jpiv[i++]);(*f2py_func)(&n,lu,&lda,rhs,ipiv,jpiv,&scale);for(i=0;i<n;--ipiv[i],--jpiv[i++]);} ;
/*(*f2py_func)(&n,lu,&lda,rhs,ipiv,jpiv,&scale);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Nf",capi_rhs_tmp,scale);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
if((PyObject *)capi_jpiv_tmp!=jpiv_capi) {
Py_XDECREF(capi_jpiv_tmp); }
} /*if (capi_jpiv_tmp == NULL) ... else of jpiv*/
/* End of cleaning variable jpiv */
if((PyObject *)capi_ipiv_tmp!=ipiv_capi) {
Py_XDECREF(capi_ipiv_tmp); }
} /*if (capi_ipiv_tmp == NULL) ... else of ipiv*/
/* End of cleaning variable ipiv */
} /*CHECKARRAY(shape(lu,0)==len(rhs))*/
} /*if (capi_rhs_tmp == NULL) ... else of rhs*/
/* End of cleaning variable rhs */
/* End of cleaning variable lda */
/* End of cleaning variable n */
/* End of cleaning variable scale */
} /*CHECKARRAY(shape(lu,0)==shape(lu,1))*/
if((PyObject *)capi_lu_tmp!=lu_capi) {
Py_XDECREF(capi_lu_tmp); }
} /*if (capi_lu_tmp == NULL) ... else of lu*/
/* End of cleaning variable lu */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of sgesc2 *******************************/
/*********************************** dgesc2 ***********************************/
static char doc_f2py_rout__flapack_dgesc2[] = "\
x,scale = dgesc2(lu,rhs,ipiv,jpiv,[overwrite_rhs])\n\nWrapper for ``dgesc2``.\
\n\nParameters\n----------\n"
"lu : input rank-2 array('d') with bounds (n,n)\n"
"rhs : input rank-1 array('d') with bounds (n)\n"
"ipiv : input rank-1 array('i') with bounds (n)\n"
"jpiv : input rank-1 array('i') with bounds (n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_rhs : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"x : rank-1 array('d') with bounds (n) and rhs storage\n"
"scale : float";
/* extern void F_FUNC(dgesc2,DGESC2)(F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,double* ); */
static PyObject *f2py_rout__flapack_dgesc2(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,double* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
double *lu = NULL;
npy_intp lu_Dims[2] = {-1, -1};
const int lu_Rank = 2;
PyArrayObject *capi_lu_tmp = NULL;
int capi_lu_intent = 0;
PyObject *lu_capi = Py_None;
int lda = 0;
double *rhs = NULL;
npy_intp rhs_Dims[1] = {-1};
const int rhs_Rank = 1;
PyArrayObject *capi_rhs_tmp = NULL;
int capi_rhs_intent = 0;
int capi_overwrite_rhs = 0;
PyObject *rhs_capi = Py_None;
int *ipiv = NULL;
npy_intp ipiv_Dims[1] = {-1};
const int ipiv_Rank = 1;
PyArrayObject *capi_ipiv_tmp = NULL;
int capi_ipiv_intent = 0;
PyObject *ipiv_capi = Py_None;
int *jpiv = NULL;
npy_intp jpiv_Dims[1] = {-1};
const int jpiv_Rank = 1;
PyArrayObject *capi_jpiv_tmp = NULL;
int capi_jpiv_intent = 0;
PyObject *jpiv_capi = Py_None;
double scale = 0;
static char *capi_kwlist[] = {"lu","rhs","ipiv","jpiv","overwrite_rhs",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOOO|i:_flapack.dgesc2",\
capi_kwlist,&lu_capi,&rhs_capi,&ipiv_capi,&jpiv_capi,&capi_overwrite_rhs))
return NULL;
/*frompyobj*/
/* Processing variable lu */
;
capi_lu_intent |= F2PY_INTENT_IN;
capi_lu_tmp = array_from_pyobj(NPY_DOUBLE,lu_Dims,lu_Rank,capi_lu_intent,lu_capi);
if (capi_lu_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `lu' of _flapack.dgesc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
lu = (double *)(PyArray_DATA(capi_lu_tmp));
CHECKARRAY(shape(lu,0)==shape(lu,1),"shape(lu,0)==shape(lu,1)","1st argument lu") {
/* Processing variable scale */
/* Processing variable n */
n = shape(lu,0);
/* Processing variable lda */
lda = MAX(1,shape(lu,0));
/* Processing variable rhs */
capi_rhs_intent |= (capi_overwrite_rhs?0:F2PY_INTENT_COPY);
rhs_Dims[0]=n;
capi_rhs_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_rhs_tmp = array_from_pyobj(NPY_DOUBLE,rhs_Dims,rhs_Rank,capi_rhs_intent,rhs_capi);
if (capi_rhs_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `rhs' of _flapack.dgesc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
rhs = (double *)(PyArray_DATA(capi_rhs_tmp));
CHECKARRAY(shape(lu,0)==len(rhs),"shape(lu,0)==len(rhs)","2nd argument rhs") {
/* Processing variable ipiv */
ipiv_Dims[0]=n;
capi_ipiv_intent |= F2PY_INTENT_IN;
capi_ipiv_tmp = array_from_pyobj(NPY_INT,ipiv_Dims,ipiv_Rank,capi_ipiv_intent,ipiv_capi);
if (capi_ipiv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 3rd argument `ipiv' of _flapack.dgesc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
ipiv = (int *)(PyArray_DATA(capi_ipiv_tmp));
/* Processing variable jpiv */
jpiv_Dims[0]=n;
capi_jpiv_intent |= F2PY_INTENT_IN;
capi_jpiv_tmp = array_from_pyobj(NPY_INT,jpiv_Dims,jpiv_Rank,capi_jpiv_intent,jpiv_capi);
if (capi_jpiv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 4th argument `jpiv' of _flapack.dgesc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
jpiv = (int *)(PyArray_DATA(capi_jpiv_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
{F_INT i;for(i=0;i<n;++ipiv[i],++jpiv[i++]);(*f2py_func)(&n,lu,&lda,rhs,ipiv,jpiv,&scale);for(i=0;i<n;--ipiv[i],--jpiv[i++]);} ;
/*(*f2py_func)(&n,lu,&lda,rhs,ipiv,jpiv,&scale);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Nd",capi_rhs_tmp,scale);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
if((PyObject *)capi_jpiv_tmp!=jpiv_capi) {
Py_XDECREF(capi_jpiv_tmp); }
} /*if (capi_jpiv_tmp == NULL) ... else of jpiv*/
/* End of cleaning variable jpiv */
if((PyObject *)capi_ipiv_tmp!=ipiv_capi) {
Py_XDECREF(capi_ipiv_tmp); }
} /*if (capi_ipiv_tmp == NULL) ... else of ipiv*/
/* End of cleaning variable ipiv */
} /*CHECKARRAY(shape(lu,0)==len(rhs))*/
} /*if (capi_rhs_tmp == NULL) ... else of rhs*/
/* End of cleaning variable rhs */
/* End of cleaning variable lda */
/* End of cleaning variable n */
/* End of cleaning variable scale */
} /*CHECKARRAY(shape(lu,0)==shape(lu,1))*/
if((PyObject *)capi_lu_tmp!=lu_capi) {
Py_XDECREF(capi_lu_tmp); }
} /*if (capi_lu_tmp == NULL) ... else of lu*/
/* End of cleaning variable lu */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of dgesc2 *******************************/
/*********************************** cgesc2 ***********************************/
static char doc_f2py_rout__flapack_cgesc2[] = "\
x,scale = cgesc2(lu,rhs,ipiv,jpiv,[overwrite_rhs])\n\nWrapper for ``cgesc2``.\
\n\nParameters\n----------\n"
"lu : input rank-2 array('F') with bounds (n,n)\n"
"rhs : input rank-1 array('F') with bounds (n)\n"
"ipiv : input rank-1 array('i') with bounds (n)\n"
"jpiv : input rank-1 array('i') with bounds (n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_rhs : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"x : rank-1 array('F') with bounds (n) and rhs storage\n"
"scale : float";
/* extern void F_FUNC(cgesc2,CGESC2)(F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT*,float* ); */
static PyObject *f2py_rout__flapack_cgesc2(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT*,float* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
complex_float *lu = NULL;
npy_intp lu_Dims[2] = {-1, -1};
const int lu_Rank = 2;
PyArrayObject *capi_lu_tmp = NULL;
int capi_lu_intent = 0;
PyObject *lu_capi = Py_None;
int lda = 0;
complex_float *rhs = NULL;
npy_intp rhs_Dims[1] = {-1};
const int rhs_Rank = 1;
PyArrayObject *capi_rhs_tmp = NULL;
int capi_rhs_intent = 0;
int capi_overwrite_rhs = 0;
PyObject *rhs_capi = Py_None;
int *ipiv = NULL;
npy_intp ipiv_Dims[1] = {-1};
const int ipiv_Rank = 1;
PyArrayObject *capi_ipiv_tmp = NULL;
int capi_ipiv_intent = 0;
PyObject *ipiv_capi = Py_None;
int *jpiv = NULL;
npy_intp jpiv_Dims[1] = {-1};
const int jpiv_Rank = 1;
PyArrayObject *capi_jpiv_tmp = NULL;
int capi_jpiv_intent = 0;
PyObject *jpiv_capi = Py_None;
float scale = 0;
static char *capi_kwlist[] = {"lu","rhs","ipiv","jpiv","overwrite_rhs",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOOO|i:_flapack.cgesc2",\
capi_kwlist,&lu_capi,&rhs_capi,&ipiv_capi,&jpiv_capi,&capi_overwrite_rhs))
return NULL;
/*frompyobj*/
/* Processing variable lu */
;
capi_lu_intent |= F2PY_INTENT_IN;
capi_lu_tmp = array_from_pyobj(NPY_CFLOAT,lu_Dims,lu_Rank,capi_lu_intent,lu_capi);
if (capi_lu_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `lu' of _flapack.cgesc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
lu = (complex_float *)(PyArray_DATA(capi_lu_tmp));
CHECKARRAY(shape(lu,0)==shape(lu,1),"shape(lu,0)==shape(lu,1)","1st argument lu") {
/* Processing variable scale */
/* Processing variable n */
n = shape(lu,0);
/* Processing variable lda */
lda = MAX(1,shape(lu,0));
/* Processing variable rhs */
capi_rhs_intent |= (capi_overwrite_rhs?0:F2PY_INTENT_COPY);
rhs_Dims[0]=n;
capi_rhs_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_rhs_tmp = array_from_pyobj(NPY_CFLOAT,rhs_Dims,rhs_Rank,capi_rhs_intent,rhs_capi);
if (capi_rhs_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `rhs' of _flapack.cgesc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
rhs = (complex_float *)(PyArray_DATA(capi_rhs_tmp));
CHECKARRAY(shape(lu,0)==len(rhs),"shape(lu,0)==len(rhs)","2nd argument rhs") {
/* Processing variable ipiv */
ipiv_Dims[0]=n;
capi_ipiv_intent |= F2PY_INTENT_IN;
capi_ipiv_tmp = array_from_pyobj(NPY_INT,ipiv_Dims,ipiv_Rank,capi_ipiv_intent,ipiv_capi);
if (capi_ipiv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 3rd argument `ipiv' of _flapack.cgesc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
ipiv = (int *)(PyArray_DATA(capi_ipiv_tmp));
/* Processing variable jpiv */
jpiv_Dims[0]=n;
capi_jpiv_intent |= F2PY_INTENT_IN;
capi_jpiv_tmp = array_from_pyobj(NPY_INT,jpiv_Dims,jpiv_Rank,capi_jpiv_intent,jpiv_capi);
if (capi_jpiv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 4th argument `jpiv' of _flapack.cgesc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
jpiv = (int *)(PyArray_DATA(capi_jpiv_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
{F_INT i;for(i=0;i<n;++ipiv[i],++jpiv[i++]);(*f2py_func)(&n,lu,&lda,rhs,ipiv,jpiv,&scale);for(i=0;i<n;--ipiv[i],--jpiv[i++]);} ;
/*(*f2py_func)(&n,lu,&lda,rhs,ipiv,jpiv,&scale);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Nf",capi_rhs_tmp,scale);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
if((PyObject *)capi_jpiv_tmp!=jpiv_capi) {
Py_XDECREF(capi_jpiv_tmp); }
} /*if (capi_jpiv_tmp == NULL) ... else of jpiv*/
/* End of cleaning variable jpiv */
if((PyObject *)capi_ipiv_tmp!=ipiv_capi) {
Py_XDECREF(capi_ipiv_tmp); }
} /*if (capi_ipiv_tmp == NULL) ... else of ipiv*/
/* End of cleaning variable ipiv */
} /*CHECKARRAY(shape(lu,0)==len(rhs))*/
} /*if (capi_rhs_tmp == NULL) ... else of rhs*/
/* End of cleaning variable rhs */
/* End of cleaning variable lda */
/* End of cleaning variable n */
/* End of cleaning variable scale */
} /*CHECKARRAY(shape(lu,0)==shape(lu,1))*/
if((PyObject *)capi_lu_tmp!=lu_capi) {
Py_XDECREF(capi_lu_tmp); }
} /*if (capi_lu_tmp == NULL) ... else of lu*/
/* End of cleaning variable lu */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of cgesc2 *******************************/
/*********************************** zgesc2 ***********************************/
static char doc_f2py_rout__flapack_zgesc2[] = "\
x,scale = zgesc2(lu,rhs,ipiv,jpiv,[overwrite_rhs])\n\nWrapper for ``zgesc2``.\
\n\nParameters\n----------\n"
"lu : input rank-2 array('D') with bounds (n,n)\n"
"rhs : input rank-1 array('D') with bounds (n)\n"
"ipiv : input rank-1 array('i') with bounds (n)\n"
"jpiv : input rank-1 array('i') with bounds (n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_rhs : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"x : rank-1 array('D') with bounds (n) and rhs storage\n"
"scale : float";
/* extern void F_FUNC(zgesc2,ZGESC2)(F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT*,double* ); */
static PyObject *f2py_rout__flapack_zgesc2(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT*,double* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
complex_double *lu = NULL;
npy_intp lu_Dims[2] = {-1, -1};
const int lu_Rank = 2;
PyArrayObject *capi_lu_tmp = NULL;
int capi_lu_intent = 0;
PyObject *lu_capi = Py_None;
int lda = 0;
complex_double *rhs = NULL;
npy_intp rhs_Dims[1] = {-1};
const int rhs_Rank = 1;
PyArrayObject *capi_rhs_tmp = NULL;
int capi_rhs_intent = 0;
int capi_overwrite_rhs = 0;
PyObject *rhs_capi = Py_None;
int *ipiv = NULL;
npy_intp ipiv_Dims[1] = {-1};
const int ipiv_Rank = 1;
PyArrayObject *capi_ipiv_tmp = NULL;
int capi_ipiv_intent = 0;
PyObject *ipiv_capi = Py_None;
int *jpiv = NULL;
npy_intp jpiv_Dims[1] = {-1};
const int jpiv_Rank = 1;
PyArrayObject *capi_jpiv_tmp = NULL;
int capi_jpiv_intent = 0;
PyObject *jpiv_capi = Py_None;
double scale = 0;
static char *capi_kwlist[] = {"lu","rhs","ipiv","jpiv","overwrite_rhs",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOOO|i:_flapack.zgesc2",\
capi_kwlist,&lu_capi,&rhs_capi,&ipiv_capi,&jpiv_capi,&capi_overwrite_rhs))
return NULL;
/*frompyobj*/
/* Processing variable lu */
;
capi_lu_intent |= F2PY_INTENT_IN;
capi_lu_tmp = array_from_pyobj(NPY_CDOUBLE,lu_Dims,lu_Rank,capi_lu_intent,lu_capi);
if (capi_lu_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `lu' of _flapack.zgesc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
lu = (complex_double *)(PyArray_DATA(capi_lu_tmp));
CHECKARRAY(shape(lu,0)==shape(lu,1),"shape(lu,0)==shape(lu,1)","1st argument lu") {
/* Processing variable scale */
/* Processing variable n */
n = shape(lu,0);
/* Processing variable lda */
lda = MAX(1,shape(lu,0));
/* Processing variable rhs */
capi_rhs_intent |= (capi_overwrite_rhs?0:F2PY_INTENT_COPY);
rhs_Dims[0]=n;
capi_rhs_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_rhs_tmp = array_from_pyobj(NPY_CDOUBLE,rhs_Dims,rhs_Rank,capi_rhs_intent,rhs_capi);
if (capi_rhs_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `rhs' of _flapack.zgesc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
rhs = (complex_double *)(PyArray_DATA(capi_rhs_tmp));
CHECKARRAY(shape(lu,0)==len(rhs),"shape(lu,0)==len(rhs)","2nd argument rhs") {
/* Processing variable ipiv */
ipiv_Dims[0]=n;
capi_ipiv_intent |= F2PY_INTENT_IN;
capi_ipiv_tmp = array_from_pyobj(NPY_INT,ipiv_Dims,ipiv_Rank,capi_ipiv_intent,ipiv_capi);
if (capi_ipiv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 3rd argument `ipiv' of _flapack.zgesc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
ipiv = (int *)(PyArray_DATA(capi_ipiv_tmp));
/* Processing variable jpiv */
jpiv_Dims[0]=n;
capi_jpiv_intent |= F2PY_INTENT_IN;
capi_jpiv_tmp = array_from_pyobj(NPY_INT,jpiv_Dims,jpiv_Rank,capi_jpiv_intent,jpiv_capi);
if (capi_jpiv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 4th argument `jpiv' of _flapack.zgesc2 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
jpiv = (int *)(PyArray_DATA(capi_jpiv_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
{F_INT i;for(i=0;i<n;++ipiv[i],++jpiv[i++]);(*f2py_func)(&n,lu,&lda,rhs,ipiv,jpiv,&scale);for(i=0;i<n;--ipiv[i],--jpiv[i++]);} ;
/*(*f2py_func)(&n,lu,&lda,rhs,ipiv,jpiv,&scale);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Nd",capi_rhs_tmp,scale);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
if((PyObject *)capi_jpiv_tmp!=jpiv_capi) {
Py_XDECREF(capi_jpiv_tmp); }
} /*if (capi_jpiv_tmp == NULL) ... else of jpiv*/
/* End of cleaning variable jpiv */
if((PyObject *)capi_ipiv_tmp!=ipiv_capi) {
Py_XDECREF(capi_ipiv_tmp); }
} /*if (capi_ipiv_tmp == NULL) ... else of ipiv*/
/* End of cleaning variable ipiv */
} /*CHECKARRAY(shape(lu,0)==len(rhs))*/
} /*if (capi_rhs_tmp == NULL) ... else of rhs*/
/* End of cleaning variable rhs */
/* End of cleaning variable lda */
/* End of cleaning variable n */
/* End of cleaning variable scale */
} /*CHECKARRAY(shape(lu,0)==shape(lu,1))*/
if((PyObject *)capi_lu_tmp!=lu_capi) {
Py_XDECREF(capi_lu_tmp); }
} /*if (capi_lu_tmp == NULL) ... else of lu*/
/* End of cleaning variable lu */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of zgesc2 *******************************/
/*********************************** sgetri ***********************************/
static char doc_f2py_rout__flapack_sgetri[] = "\
inv_a,info = sgetri(lu,piv,[lwork,overwrite_lu])\n\nWrapper for ``sgetri``.\
\n\nParameters\n----------\n"
"lu : input rank-2 array('f') with bounds (n,n)\n"
"piv : input rank-1 array('i') with bounds (n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_lu : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: max(3*n,1)\n"
"\nReturns\n-------\n"
"inv_a : rank-2 array('f') with bounds (n,n) and lu storage\n"
"info : int";
/* extern void F_FUNC(sgetri,SGETRI)(F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgetri(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
float *lu = NULL;
npy_intp lu_Dims[2] = {-1, -1};
const int lu_Rank = 2;
PyArrayObject *capi_lu_tmp = NULL;
int capi_lu_intent = 0;
int capi_overwrite_lu = 0;
PyObject *lu_capi = Py_None;
int *piv = NULL;
npy_intp piv_Dims[1] = {-1};
const int piv_Rank = 1;
PyArrayObject *capi_piv_tmp = NULL;
int capi_piv_intent = 0;
PyObject *piv_capi = Py_None;
float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"lu","piv","lwork","overwrite_lu",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|Oi:_flapack.sgetri",\
capi_kwlist,&lu_capi,&piv_capi,&lwork_capi,&capi_overwrite_lu))
return NULL;
/*frompyobj*/
/* Processing variable lu */
capi_lu_intent |= (capi_overwrite_lu?0:F2PY_INTENT_COPY);
;
capi_lu_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_lu_tmp = array_from_pyobj(NPY_FLOAT,lu_Dims,lu_Rank,capi_lu_intent,lu_capi);
if (capi_lu_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `lu' of _flapack.sgetri to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
lu = (float *)(PyArray_DATA(capi_lu_tmp));
CHECKARRAY(shape(lu,0)==shape(lu,1),"shape(lu,0)==shape(lu,1)","1st argument lu") {
/* Processing variable info */
/* Processing variable n */
n = shape(lu,0);
/* Processing variable piv */
piv_Dims[0]=n;
capi_piv_intent |= F2PY_INTENT_IN;
capi_piv_tmp = array_from_pyobj(NPY_INT,piv_Dims,piv_Rank,capi_piv_intent,piv_capi);
if (capi_piv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `piv' of _flapack.sgetri to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
piv = (int *)(PyArray_DATA(capi_piv_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max(3*n,1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.sgetri() 1st keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=n,"lwork>=n","1st keyword lwork","sgetri:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_FLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.sgetri to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (float *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
{F_INT i;for(i=0;i<n;++piv[i++]);(*f2py_func)(&n,lu,&n,piv,work,&lwork,&info);for(i=0;i<n;--piv[i++]);} ;
/*(*f2py_func)(&n,lu,piv,work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",capi_lu_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=n)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
if((PyObject *)capi_piv_tmp!=piv_capi) {
Py_XDECREF(capi_piv_tmp); }
} /*if (capi_piv_tmp == NULL) ... else of piv*/
/* End of cleaning variable piv */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*CHECKARRAY(shape(lu,0)==shape(lu,1))*/
} /*if (capi_lu_tmp == NULL) ... else of lu*/
/* End of cleaning variable lu */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of sgetri *******************************/
/*********************************** dgetri ***********************************/
static char doc_f2py_rout__flapack_dgetri[] = "\
inv_a,info = dgetri(lu,piv,[lwork,overwrite_lu])\n\nWrapper for ``dgetri``.\
\n\nParameters\n----------\n"
"lu : input rank-2 array('d') with bounds (n,n)\n"
"piv : input rank-1 array('i') with bounds (n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_lu : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: max(3*n,1)\n"
"\nReturns\n-------\n"
"inv_a : rank-2 array('d') with bounds (n,n) and lu storage\n"
"info : int";
/* extern void F_FUNC(dgetri,DGETRI)(F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgetri(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
double *lu = NULL;
npy_intp lu_Dims[2] = {-1, -1};
const int lu_Rank = 2;
PyArrayObject *capi_lu_tmp = NULL;
int capi_lu_intent = 0;
int capi_overwrite_lu = 0;
PyObject *lu_capi = Py_None;
int *piv = NULL;
npy_intp piv_Dims[1] = {-1};
const int piv_Rank = 1;
PyArrayObject *capi_piv_tmp = NULL;
int capi_piv_intent = 0;
PyObject *piv_capi = Py_None;
double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"lu","piv","lwork","overwrite_lu",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|Oi:_flapack.dgetri",\
capi_kwlist,&lu_capi,&piv_capi,&lwork_capi,&capi_overwrite_lu))
return NULL;
/*frompyobj*/
/* Processing variable lu */
capi_lu_intent |= (capi_overwrite_lu?0:F2PY_INTENT_COPY);
;
capi_lu_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_lu_tmp = array_from_pyobj(NPY_DOUBLE,lu_Dims,lu_Rank,capi_lu_intent,lu_capi);
if (capi_lu_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `lu' of _flapack.dgetri to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
lu = (double *)(PyArray_DATA(capi_lu_tmp));
CHECKARRAY(shape(lu,0)==shape(lu,1),"shape(lu,0)==shape(lu,1)","1st argument lu") {
/* Processing variable info */
/* Processing variable n */
n = shape(lu,0);
/* Processing variable piv */
piv_Dims[0]=n;
capi_piv_intent |= F2PY_INTENT_IN;
capi_piv_tmp = array_from_pyobj(NPY_INT,piv_Dims,piv_Rank,capi_piv_intent,piv_capi);
if (capi_piv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `piv' of _flapack.dgetri to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
piv = (int *)(PyArray_DATA(capi_piv_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max(3*n,1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.dgetri() 1st keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=n,"lwork>=n","1st keyword lwork","dgetri:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_DOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.dgetri to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (double *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
{F_INT i;for(i=0;i<n;++piv[i++]);(*f2py_func)(&n,lu,&n,piv,work,&lwork,&info);for(i=0;i<n;--piv[i++]);} ;
/*(*f2py_func)(&n,lu,piv,work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",capi_lu_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=n)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
if((PyObject *)capi_piv_tmp!=piv_capi) {
Py_XDECREF(capi_piv_tmp); }
} /*if (capi_piv_tmp == NULL) ... else of piv*/
/* End of cleaning variable piv */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*CHECKARRAY(shape(lu,0)==shape(lu,1))*/
} /*if (capi_lu_tmp == NULL) ... else of lu*/
/* End of cleaning variable lu */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of dgetri *******************************/
/*********************************** cgetri ***********************************/
static char doc_f2py_rout__flapack_cgetri[] = "\
inv_a,info = cgetri(lu,piv,[lwork,overwrite_lu])\n\nWrapper for ``cgetri``.\
\n\nParameters\n----------\n"
"lu : input rank-2 array('F') with bounds (n,n)\n"
"piv : input rank-1 array('i') with bounds (n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_lu : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: max(3*n,1)\n"
"\nReturns\n-------\n"
"inv_a : rank-2 array('F') with bounds (n,n) and lu storage\n"
"info : int";
/* extern void F_FUNC(cgetri,CGETRI)(F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgetri(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
complex_float *lu = NULL;
npy_intp lu_Dims[2] = {-1, -1};
const int lu_Rank = 2;
PyArrayObject *capi_lu_tmp = NULL;
int capi_lu_intent = 0;
int capi_overwrite_lu = 0;
PyObject *lu_capi = Py_None;
int *piv = NULL;
npy_intp piv_Dims[1] = {-1};
const int piv_Rank = 1;
PyArrayObject *capi_piv_tmp = NULL;
int capi_piv_intent = 0;
PyObject *piv_capi = Py_None;
complex_float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"lu","piv","lwork","overwrite_lu",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|Oi:_flapack.cgetri",\
capi_kwlist,&lu_capi,&piv_capi,&lwork_capi,&capi_overwrite_lu))
return NULL;
/*frompyobj*/
/* Processing variable lu */
capi_lu_intent |= (capi_overwrite_lu?0:F2PY_INTENT_COPY);
;
capi_lu_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_lu_tmp = array_from_pyobj(NPY_CFLOAT,lu_Dims,lu_Rank,capi_lu_intent,lu_capi);
if (capi_lu_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `lu' of _flapack.cgetri to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
lu = (complex_float *)(PyArray_DATA(capi_lu_tmp));
CHECKARRAY(shape(lu,0)==shape(lu,1),"shape(lu,0)==shape(lu,1)","1st argument lu") {
/* Processing variable info */
/* Processing variable n */
n = shape(lu,0);
/* Processing variable piv */
piv_Dims[0]=n;
capi_piv_intent |= F2PY_INTENT_IN;
capi_piv_tmp = array_from_pyobj(NPY_INT,piv_Dims,piv_Rank,capi_piv_intent,piv_capi);
if (capi_piv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `piv' of _flapack.cgetri to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
piv = (int *)(PyArray_DATA(capi_piv_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max(3*n,1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.cgetri() 1st keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=n,"lwork>=n","1st keyword lwork","cgetri:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_CFLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.cgetri to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_float *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
{F_INT i;for(i=0;i<n;++piv[i++]);(*f2py_func)(&n,lu,&n,piv,work,&lwork,&info);for(i=0;i<n;--piv[i++]);} ;
/*(*f2py_func)(&n,lu,piv,work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",capi_lu_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=n)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
if((PyObject *)capi_piv_tmp!=piv_capi) {
Py_XDECREF(capi_piv_tmp); }
} /*if (capi_piv_tmp == NULL) ... else of piv*/
/* End of cleaning variable piv */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*CHECKARRAY(shape(lu,0)==shape(lu,1))*/
} /*if (capi_lu_tmp == NULL) ... else of lu*/
/* End of cleaning variable lu */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of cgetri *******************************/
/*********************************** zgetri ***********************************/
static char doc_f2py_rout__flapack_zgetri[] = "\
inv_a,info = zgetri(lu,piv,[lwork,overwrite_lu])\n\nWrapper for ``zgetri``.\
\n\nParameters\n----------\n"
"lu : input rank-2 array('D') with bounds (n,n)\n"
"piv : input rank-1 array('i') with bounds (n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_lu : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: max(3*n,1)\n"
"\nReturns\n-------\n"
"inv_a : rank-2 array('D') with bounds (n,n) and lu storage\n"
"info : int";
/* extern void F_FUNC(zgetri,ZGETRI)(F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgetri(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
complex_double *lu = NULL;
npy_intp lu_Dims[2] = {-1, -1};
const int lu_Rank = 2;
PyArrayObject *capi_lu_tmp = NULL;
int capi_lu_intent = 0;
int capi_overwrite_lu = 0;
PyObject *lu_capi = Py_None;
int *piv = NULL;
npy_intp piv_Dims[1] = {-1};
const int piv_Rank = 1;
PyArrayObject *capi_piv_tmp = NULL;
int capi_piv_intent = 0;
PyObject *piv_capi = Py_None;
complex_double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"lu","piv","lwork","overwrite_lu",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|Oi:_flapack.zgetri",\
capi_kwlist,&lu_capi,&piv_capi,&lwork_capi,&capi_overwrite_lu))
return NULL;
/*frompyobj*/
/* Processing variable lu */
capi_lu_intent |= (capi_overwrite_lu?0:F2PY_INTENT_COPY);
;
capi_lu_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_lu_tmp = array_from_pyobj(NPY_CDOUBLE,lu_Dims,lu_Rank,capi_lu_intent,lu_capi);
if (capi_lu_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `lu' of _flapack.zgetri to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
lu = (complex_double *)(PyArray_DATA(capi_lu_tmp));
CHECKARRAY(shape(lu,0)==shape(lu,1),"shape(lu,0)==shape(lu,1)","1st argument lu") {
/* Processing variable info */
/* Processing variable n */
n = shape(lu,0);
/* Processing variable piv */
piv_Dims[0]=n;
capi_piv_intent |= F2PY_INTENT_IN;
capi_piv_tmp = array_from_pyobj(NPY_INT,piv_Dims,piv_Rank,capi_piv_intent,piv_capi);
if (capi_piv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `piv' of _flapack.zgetri to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
piv = (int *)(PyArray_DATA(capi_piv_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max(3*n,1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.zgetri() 1st keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=n,"lwork>=n","1st keyword lwork","zgetri:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_CDOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.zgetri to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_double *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
{F_INT i;for(i=0;i<n;++piv[i++]);(*f2py_func)(&n,lu,&n,piv,work,&lwork,&info);for(i=0;i<n;--piv[i++]);} ;
/*(*f2py_func)(&n,lu,piv,work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",capi_lu_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=n)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
if((PyObject *)capi_piv_tmp!=piv_capi) {
Py_XDECREF(capi_piv_tmp); }
} /*if (capi_piv_tmp == NULL) ... else of piv*/
/* End of cleaning variable piv */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*CHECKARRAY(shape(lu,0)==shape(lu,1))*/
} /*if (capi_lu_tmp == NULL) ... else of lu*/
/* End of cleaning variable lu */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of zgetri *******************************/
/******************************** sgetri_lwork ********************************/
static char doc_f2py_rout__flapack_sgetri_lwork[] = "\
work,info = sgetri_lwork(n)\n\nWrapper for ``sgetri_lwork``.\
\n\nParameters\n----------\n"
"n : input int\n"
"\nReturns\n-------\n"
"work : float\n"
"info : int";
/* extern void F_FUNC(sgetri ,SGETRI )(F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgetri_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
PyObject *n_capi = Py_None;
float lu = 0;
int piv = 0;
float work = 0;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"n",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|:_flapack.sgetri_lwork",\
capi_kwlist,&n_capi))
return NULL;
/*frompyobj*/
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.sgetri_lwork() 1st argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable lu */
/* Processing variable piv */
/* Processing variable info */
/* Processing variable lwork */
lwork = -1;
/* Processing variable work */
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&n,&lu,&n,&piv,&work,&lwork,&info) ;
/*(*f2py_func)(&n,&lu,&piv,&work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("fi",work,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable work */
/* End of cleaning variable lwork */
/* End of cleaning variable info */
/* End of cleaning variable piv */
/* End of cleaning variable lu */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of sgetri_lwork ****************************/
/******************************** dgetri_lwork ********************************/
static char doc_f2py_rout__flapack_dgetri_lwork[] = "\
work,info = dgetri_lwork(n)\n\nWrapper for ``dgetri_lwork``.\
\n\nParameters\n----------\n"
"n : input int\n"
"\nReturns\n-------\n"
"work : float\n"
"info : int";
/* extern void F_FUNC(dgetri ,DGETRI )(F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgetri_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
PyObject *n_capi = Py_None;
double lu = 0;
int piv = 0;
double work = 0;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"n",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|:_flapack.dgetri_lwork",\
capi_kwlist,&n_capi))
return NULL;
/*frompyobj*/
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.dgetri_lwork() 1st argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable lu */
/* Processing variable piv */
/* Processing variable info */
/* Processing variable lwork */
lwork = -1;
/* Processing variable work */
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&n,&lu,&n,&piv,&work,&lwork,&info) ;
/*(*f2py_func)(&n,&lu,&piv,&work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("di",work,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable work */
/* End of cleaning variable lwork */
/* End of cleaning variable info */
/* End of cleaning variable piv */
/* End of cleaning variable lu */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of dgetri_lwork ****************************/
/******************************** cgetri_lwork ********************************/
static char doc_f2py_rout__flapack_cgetri_lwork[] = "\
work,info = cgetri_lwork(n)\n\nWrapper for ``cgetri_lwork``.\
\n\nParameters\n----------\n"
"n : input int\n"
"\nReturns\n-------\n"
"work : complex\n"
"info : int";
/* extern void F_FUNC(cgetri ,CGETRI )(F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgetri_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
PyObject *n_capi = Py_None;
complex_float lu;
int piv = 0;
complex_float work;
PyObject *work_capi = Py_None;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"n",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|:_flapack.cgetri_lwork",\
capi_kwlist,&n_capi))
return NULL;
/*frompyobj*/
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.cgetri_lwork() 1st argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable lu */
/* Processing variable piv */
/* Processing variable info */
/* Processing variable lwork */
lwork = -1;
/* Processing variable work */
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&n,&lu,&n,&piv,&work,&lwork,&info) ;
/*(*f2py_func)(&n,&lu,&piv,&work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
work_capi = pyobj_from_complex_float1(work);
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",work_capi,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable work */
/* End of cleaning variable lwork */
/* End of cleaning variable info */
/* End of cleaning variable piv */
/* End of cleaning variable lu */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of cgetri_lwork ****************************/
/******************************** zgetri_lwork ********************************/
static char doc_f2py_rout__flapack_zgetri_lwork[] = "\
work,info = zgetri_lwork(n)\n\nWrapper for ``zgetri_lwork``.\
\n\nParameters\n----------\n"
"n : input int\n"
"\nReturns\n-------\n"
"work : complex\n"
"info : int";
/* extern void F_FUNC(zgetri ,ZGETRI )(F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgetri_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int n = 0;
PyObject *n_capi = Py_None;
complex_double lu;
int piv = 0;
complex_double work;
PyObject *work_capi = Py_None;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"n",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|:_flapack.zgetri_lwork",\
capi_kwlist,&n_capi))
return NULL;
/*frompyobj*/
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.zgetri_lwork() 1st argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable lu */
/* Processing variable piv */
/* Processing variable info */
/* Processing variable lwork */
lwork = -1;
/* Processing variable work */
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&n,&lu,&n,&piv,&work,&lwork,&info) ;
/*(*f2py_func)(&n,&lu,&piv,&work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
work_capi = pyobj_from_complex_double1(work);
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",work_capi,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable work */
/* End of cleaning variable lwork */
/* End of cleaning variable info */
/* End of cleaning variable piv */
/* End of cleaning variable lu */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of zgetri_lwork ****************************/
/*********************************** sgesdd ***********************************/
static char doc_f2py_rout__flapack_sgesdd[] = "\
u,s,vt,info = sgesdd(a,[compute_uv,full_matrices,lwork,overwrite_a])\n\nWrapper for ``sgesdd``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('f') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"compute_uv : input int, optional\n Default: 1\n"
"full_matrices : input int, optional\n Default: 1\n"
"lwork : input int, optional\n Default: max((compute_uv?4*minmn*minmn+MAX(m,n)+9*minmn:MAX(14*minmn+4,10*minmn+2+25*(25+8))+MAX(m,n)),1)\n"
"\nReturns\n-------\n"
"u : rank-2 array('f') with bounds (u0,u1)\n"
"s : rank-1 array('f') with bounds (minmn)\n"
"vt : rank-2 array('f') with bounds (vt0,vt1)\n"
"info : int";
/* extern void F_FUNC(sgesdd,SGESDD)(char*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgesdd(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
int minmn = 0;
int u0 = 0;
int u1 = 0;
int vt0 = 0;
int vt1 = 0;
float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int compute_uv = 0;
PyObject *compute_uv_capi = Py_None;
int full_matrices = 0;
PyObject *full_matrices_capi = Py_None;
float *u = NULL;
npy_intp u_Dims[2] = {-1, -1};
const int u_Rank = 2;
PyArrayObject *capi_u_tmp = NULL;
int capi_u_intent = 0;
float *s = NULL;
npy_intp s_Dims[1] = {-1};
const int s_Rank = 1;
PyArrayObject *capi_s_tmp = NULL;
int capi_s_intent = 0;
float *vt = NULL;
npy_intp vt_Dims[2] = {-1, -1};
const int vt_Rank = 2;
PyArrayObject *capi_vt_tmp = NULL;
int capi_vt_intent = 0;
float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int *iwork = NULL;
npy_intp iwork_Dims[1] = {-1};
const int iwork_Rank = 1;
PyArrayObject *capi_iwork_tmp = NULL;
int capi_iwork_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","compute_uv","full_matrices","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|OOOi:_flapack.sgesdd",\
capi_kwlist,&a_capi,&compute_uv_capi,&full_matrices_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable compute_uv */
if (compute_uv_capi == Py_None) compute_uv = 1; else
f2py_success = int_from_pyobj(&compute_uv,compute_uv_capi,"_flapack.sgesdd() 1st keyword (compute_uv) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(compute_uv==0||compute_uv==1,"compute_uv==0||compute_uv==1","1st keyword compute_uv","sgesdd:compute_uv=%d",compute_uv) {
/* Processing variable full_matrices */
if (full_matrices_capi == Py_None) full_matrices = 1; else
f2py_success = int_from_pyobj(&full_matrices,full_matrices_capi,"_flapack.sgesdd() 2nd keyword (full_matrices) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(full_matrices==0||full_matrices==1,"full_matrices==0||full_matrices==1","2nd keyword full_matrices","sgesdd:full_matrices=%d",full_matrices) {
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_ALIGNED8;
capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.sgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (float *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable u0 */
u0 = (compute_uv?m:1);
/* Processing variable u1 */
u1 = (compute_uv?(full_matrices?m:minmn):1);
/* Processing variable vt0 */
vt0 = (compute_uv?(full_matrices?n:minmn):1);
/* Processing variable vt1 */
vt1 = (compute_uv?n:1);
/* Processing variable s */
s_Dims[0]=minmn;
capi_s_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_s_tmp = array_from_pyobj(NPY_FLOAT,s_Dims,s_Rank,capi_s_intent,Py_None);
if (capi_s_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `s' of _flapack.sgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
s = (float *)(PyArray_DATA(capi_s_tmp));
/* Processing variable u */
u_Dims[0]=u0,u_Dims[1]=u1;
capi_u_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_u_tmp = array_from_pyobj(NPY_FLOAT,u_Dims,u_Rank,capi_u_intent,Py_None);
if (capi_u_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `u' of _flapack.sgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
u = (float *)(PyArray_DATA(capi_u_tmp));
/* Processing variable vt */
vt_Dims[0]=vt0,vt_Dims[1]=vt1;
capi_vt_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_vt_tmp = array_from_pyobj(NPY_FLOAT,vt_Dims,vt_Rank,capi_vt_intent,Py_None);
if (capi_vt_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `vt' of _flapack.sgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
vt = (float *)(PyArray_DATA(capi_vt_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max((compute_uv?4*minmn*minmn+MAX(m,n)+9*minmn:MAX(14*minmn+4,10*minmn+2+25*(25+8))+MAX(m,n)),1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.sgesdd() 3rd keyword (lwork) can't be converted to int");
if (f2py_success) {
/* Processing variable iwork */
iwork_Dims[0]=8 * minmn;
capi_iwork_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_iwork_tmp = array_from_pyobj(NPY_INT,iwork_Dims,iwork_Rank,capi_iwork_intent,Py_None);
if (capi_iwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `iwork' of _flapack.sgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
iwork = (int *)(PyArray_DATA(capi_iwork_tmp));
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_FLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.sgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (float *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)((compute_uv?(full_matrices?"A":"S"):"N"),&m,&n,a,&m,s,u,&u0,vt,&vt0,work,&lwork,iwork,&info) ;
/*(*f2py_func)(&m,&n,&minmn,&u0,&u1,&vt0,&vt1,a,&compute_uv,&full_matrices,u,s,vt,work,&lwork,iwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNi",capi_u_tmp,capi_s_tmp,capi_vt_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
Py_XDECREF(capi_iwork_tmp);
} /*if (capi_iwork_tmp == NULL) ... else of iwork*/
/* End of cleaning variable iwork */
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
} /*if (capi_vt_tmp == NULL) ... else of vt*/
/* End of cleaning variable vt */
} /*if (capi_u_tmp == NULL) ... else of u*/
/* End of cleaning variable u */
} /*if (capi_s_tmp == NULL) ... else of s*/
/* End of cleaning variable s */
/* End of cleaning variable vt1 */
/* End of cleaning variable vt0 */
/* End of cleaning variable u1 */
/* End of cleaning variable u0 */
/* End of cleaning variable minmn */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
if((PyObject *)capi_a_tmp!=a_capi) {
Py_XDECREF(capi_a_tmp); }
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
} /*CHECKSCALAR(full_matrices==0||full_matrices==1)*/
} /*if (f2py_success) of full_matrices*/
/* End of cleaning variable full_matrices */
} /*CHECKSCALAR(compute_uv==0||compute_uv==1)*/
} /*if (f2py_success) of compute_uv*/
/* End of cleaning variable compute_uv */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of sgesdd *******************************/
/*********************************** dgesdd ***********************************/
static char doc_f2py_rout__flapack_dgesdd[] = "\
u,s,vt,info = dgesdd(a,[compute_uv,full_matrices,lwork,overwrite_a])\n\nWrapper for ``dgesdd``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('d') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"compute_uv : input int, optional\n Default: 1\n"
"full_matrices : input int, optional\n Default: 1\n"
"lwork : input int, optional\n Default: max((compute_uv?4*minmn*minmn+MAX(m,n)+9*minmn:MAX(14*minmn+4,10*minmn+2+25*(25+8))+MAX(m,n)),1)\n"
"\nReturns\n-------\n"
"u : rank-2 array('d') with bounds (u0,u1)\n"
"s : rank-1 array('d') with bounds (minmn)\n"
"vt : rank-2 array('d') with bounds (vt0,vt1)\n"
"info : int";
/* extern void F_FUNC(dgesdd,DGESDD)(char*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgesdd(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
int minmn = 0;
int u0 = 0;
int u1 = 0;
int vt0 = 0;
int vt1 = 0;
double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int compute_uv = 0;
PyObject *compute_uv_capi = Py_None;
int full_matrices = 0;
PyObject *full_matrices_capi = Py_None;
double *u = NULL;
npy_intp u_Dims[2] = {-1, -1};
const int u_Rank = 2;
PyArrayObject *capi_u_tmp = NULL;
int capi_u_intent = 0;
double *s = NULL;
npy_intp s_Dims[1] = {-1};
const int s_Rank = 1;
PyArrayObject *capi_s_tmp = NULL;
int capi_s_intent = 0;
double *vt = NULL;
npy_intp vt_Dims[2] = {-1, -1};
const int vt_Rank = 2;
PyArrayObject *capi_vt_tmp = NULL;
int capi_vt_intent = 0;
double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int *iwork = NULL;
npy_intp iwork_Dims[1] = {-1};
const int iwork_Rank = 1;
PyArrayObject *capi_iwork_tmp = NULL;
int capi_iwork_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","compute_uv","full_matrices","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|OOOi:_flapack.dgesdd",\
capi_kwlist,&a_capi,&compute_uv_capi,&full_matrices_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable compute_uv */
if (compute_uv_capi == Py_None) compute_uv = 1; else
f2py_success = int_from_pyobj(&compute_uv,compute_uv_capi,"_flapack.dgesdd() 1st keyword (compute_uv) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(compute_uv==0||compute_uv==1,"compute_uv==0||compute_uv==1","1st keyword compute_uv","dgesdd:compute_uv=%d",compute_uv) {
/* Processing variable full_matrices */
if (full_matrices_capi == Py_None) full_matrices = 1; else
f2py_success = int_from_pyobj(&full_matrices,full_matrices_capi,"_flapack.dgesdd() 2nd keyword (full_matrices) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(full_matrices==0||full_matrices==1,"full_matrices==0||full_matrices==1","2nd keyword full_matrices","dgesdd:full_matrices=%d",full_matrices) {
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_ALIGNED8;
capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.dgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (double *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable u0 */
u0 = (compute_uv?m:1);
/* Processing variable u1 */
u1 = (compute_uv?(full_matrices?m:minmn):1);
/* Processing variable vt0 */
vt0 = (compute_uv?(full_matrices?n:minmn):1);
/* Processing variable vt1 */
vt1 = (compute_uv?n:1);
/* Processing variable s */
s_Dims[0]=minmn;
capi_s_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_s_tmp = array_from_pyobj(NPY_DOUBLE,s_Dims,s_Rank,capi_s_intent,Py_None);
if (capi_s_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `s' of _flapack.dgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
s = (double *)(PyArray_DATA(capi_s_tmp));
/* Processing variable u */
u_Dims[0]=u0,u_Dims[1]=u1;
capi_u_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_u_tmp = array_from_pyobj(NPY_DOUBLE,u_Dims,u_Rank,capi_u_intent,Py_None);
if (capi_u_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `u' of _flapack.dgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
u = (double *)(PyArray_DATA(capi_u_tmp));
/* Processing variable vt */
vt_Dims[0]=vt0,vt_Dims[1]=vt1;
capi_vt_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_vt_tmp = array_from_pyobj(NPY_DOUBLE,vt_Dims,vt_Rank,capi_vt_intent,Py_None);
if (capi_vt_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `vt' of _flapack.dgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
vt = (double *)(PyArray_DATA(capi_vt_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max((compute_uv?4*minmn*minmn+MAX(m,n)+9*minmn:MAX(14*minmn+4,10*minmn+2+25*(25+8))+MAX(m,n)),1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.dgesdd() 3rd keyword (lwork) can't be converted to int");
if (f2py_success) {
/* Processing variable iwork */
iwork_Dims[0]=8 * minmn;
capi_iwork_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_iwork_tmp = array_from_pyobj(NPY_INT,iwork_Dims,iwork_Rank,capi_iwork_intent,Py_None);
if (capi_iwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `iwork' of _flapack.dgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
iwork = (int *)(PyArray_DATA(capi_iwork_tmp));
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_DOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.dgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (double *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)((compute_uv?(full_matrices?"A":"S"):"N"),&m,&n,a,&m,s,u,&u0,vt,&vt0,work,&lwork,iwork,&info) ;
/*(*f2py_func)(&m,&n,&minmn,&u0,&u1,&vt0,&vt1,a,&compute_uv,&full_matrices,u,s,vt,work,&lwork,iwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNi",capi_u_tmp,capi_s_tmp,capi_vt_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
Py_XDECREF(capi_iwork_tmp);
} /*if (capi_iwork_tmp == NULL) ... else of iwork*/
/* End of cleaning variable iwork */
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
} /*if (capi_vt_tmp == NULL) ... else of vt*/
/* End of cleaning variable vt */
} /*if (capi_u_tmp == NULL) ... else of u*/
/* End of cleaning variable u */
} /*if (capi_s_tmp == NULL) ... else of s*/
/* End of cleaning variable s */
/* End of cleaning variable vt1 */
/* End of cleaning variable vt0 */
/* End of cleaning variable u1 */
/* End of cleaning variable u0 */
/* End of cleaning variable minmn */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
if((PyObject *)capi_a_tmp!=a_capi) {
Py_XDECREF(capi_a_tmp); }
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
} /*CHECKSCALAR(full_matrices==0||full_matrices==1)*/
} /*if (f2py_success) of full_matrices*/
/* End of cleaning variable full_matrices */
} /*CHECKSCALAR(compute_uv==0||compute_uv==1)*/
} /*if (f2py_success) of compute_uv*/
/* End of cleaning variable compute_uv */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of dgesdd *******************************/
/******************************** sgesdd_lwork ********************************/
static char doc_f2py_rout__flapack_sgesdd_lwork[] = "\
work,info = sgesdd_lwork(m,n,[compute_uv,full_matrices])\n\nWrapper for ``sgesdd_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"\nOther Parameters\n----------------\n"
"compute_uv : input int, optional\n Default: 1\n"
"full_matrices : input int, optional\n Default: 1\n"
"\nReturns\n-------\n"
"work : float\n"
"info : int";
/* extern void F_FUNC(sgesdd ,SGESDD )(char*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgesdd_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
int minmn = 0;
int u0 = 0;
int vt0 = 0;
float a = 0;
int compute_uv = 0;
PyObject *compute_uv_capi = Py_None;
int full_matrices = 0;
PyObject *full_matrices_capi = Py_None;
float u = 0;
float s = 0;
float vt = 0;
float work = 0;
int lwork = 0;
int iwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n","compute_uv","full_matrices",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|OO:_flapack.sgesdd_lwork",\
capi_kwlist,&m_capi,&n_capi,&compute_uv_capi,&full_matrices_capi))
return NULL;
/*frompyobj*/
/* Processing variable compute_uv */
if (compute_uv_capi == Py_None) compute_uv = 1; else
f2py_success = int_from_pyobj(&compute_uv,compute_uv_capi,"_flapack.sgesdd_lwork() 1st keyword (compute_uv) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(compute_uv==0||compute_uv==1,"compute_uv==0||compute_uv==1","1st keyword compute_uv","sgesdd_lwork:compute_uv=%d",compute_uv) {
/* Processing variable full_matrices */
if (full_matrices_capi == Py_None) full_matrices = 1; else
f2py_success = int_from_pyobj(&full_matrices,full_matrices_capi,"_flapack.sgesdd_lwork() 2nd keyword (full_matrices) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(full_matrices==0||full_matrices==1,"full_matrices==0||full_matrices==1","2nd keyword full_matrices","sgesdd_lwork:full_matrices=%d",full_matrices) {
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.sgesdd_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.sgesdd_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable a */
/* Processing variable s */
/* Processing variable u */
/* Processing variable vt */
/* Processing variable work */
/* Processing variable lwork */
lwork = -1;
/* Processing variable iwork */
/* Processing variable info */
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable u0 */
u0 = (compute_uv?m:1);
/* Processing variable vt0 */
vt0 = (compute_uv?(full_matrices?n:minmn):1);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)((compute_uv?(full_matrices?"A":"S"):"N"),&m,&n,&a,&m,&s,&u,&u0,&vt,&vt0,&work,&lwork,&iwork,&info) ;
/*(*f2py_func)(&m,&n,&minmn,&u0,&vt0,&a,&compute_uv,&full_matrices,&u,&s,&vt,&work,&lwork,&iwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("fi",work,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable vt0 */
/* End of cleaning variable u0 */
/* End of cleaning variable minmn */
/* End of cleaning variable info */
/* End of cleaning variable iwork */
/* End of cleaning variable lwork */
/* End of cleaning variable work */
/* End of cleaning variable vt */
/* End of cleaning variable u */
/* End of cleaning variable s */
/* End of cleaning variable a */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
} /*CHECKSCALAR(full_matrices==0||full_matrices==1)*/
} /*if (f2py_success) of full_matrices*/
/* End of cleaning variable full_matrices */
} /*CHECKSCALAR(compute_uv==0||compute_uv==1)*/
} /*if (f2py_success) of compute_uv*/
/* End of cleaning variable compute_uv */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of sgesdd_lwork ****************************/
/******************************** dgesdd_lwork ********************************/
static char doc_f2py_rout__flapack_dgesdd_lwork[] = "\
work,info = dgesdd_lwork(m,n,[compute_uv,full_matrices])\n\nWrapper for ``dgesdd_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"\nOther Parameters\n----------------\n"
"compute_uv : input int, optional\n Default: 1\n"
"full_matrices : input int, optional\n Default: 1\n"
"\nReturns\n-------\n"
"work : float\n"
"info : int";
/* extern void F_FUNC(dgesdd ,DGESDD )(char*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgesdd_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
int minmn = 0;
int u0 = 0;
int vt0 = 0;
double a = 0;
int compute_uv = 0;
PyObject *compute_uv_capi = Py_None;
int full_matrices = 0;
PyObject *full_matrices_capi = Py_None;
double u = 0;
double s = 0;
double vt = 0;
double work = 0;
int lwork = 0;
int iwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n","compute_uv","full_matrices",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|OO:_flapack.dgesdd_lwork",\
capi_kwlist,&m_capi,&n_capi,&compute_uv_capi,&full_matrices_capi))
return NULL;
/*frompyobj*/
/* Processing variable compute_uv */
if (compute_uv_capi == Py_None) compute_uv = 1; else
f2py_success = int_from_pyobj(&compute_uv,compute_uv_capi,"_flapack.dgesdd_lwork() 1st keyword (compute_uv) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(compute_uv==0||compute_uv==1,"compute_uv==0||compute_uv==1","1st keyword compute_uv","dgesdd_lwork:compute_uv=%d",compute_uv) {
/* Processing variable full_matrices */
if (full_matrices_capi == Py_None) full_matrices = 1; else
f2py_success = int_from_pyobj(&full_matrices,full_matrices_capi,"_flapack.dgesdd_lwork() 2nd keyword (full_matrices) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(full_matrices==0||full_matrices==1,"full_matrices==0||full_matrices==1","2nd keyword full_matrices","dgesdd_lwork:full_matrices=%d",full_matrices) {
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.dgesdd_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.dgesdd_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable a */
/* Processing variable s */
/* Processing variable u */
/* Processing variable vt */
/* Processing variable work */
/* Processing variable lwork */
lwork = -1;
/* Processing variable iwork */
/* Processing variable info */
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable u0 */
u0 = (compute_uv?m:1);
/* Processing variable vt0 */
vt0 = (compute_uv?(full_matrices?n:minmn):1);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)((compute_uv?(full_matrices?"A":"S"):"N"),&m,&n,&a,&m,&s,&u,&u0,&vt,&vt0,&work,&lwork,&iwork,&info) ;
/*(*f2py_func)(&m,&n,&minmn,&u0,&vt0,&a,&compute_uv,&full_matrices,&u,&s,&vt,&work,&lwork,&iwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("di",work,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable vt0 */
/* End of cleaning variable u0 */
/* End of cleaning variable minmn */
/* End of cleaning variable info */
/* End of cleaning variable iwork */
/* End of cleaning variable lwork */
/* End of cleaning variable work */
/* End of cleaning variable vt */
/* End of cleaning variable u */
/* End of cleaning variable s */
/* End of cleaning variable a */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
} /*CHECKSCALAR(full_matrices==0||full_matrices==1)*/
} /*if (f2py_success) of full_matrices*/
/* End of cleaning variable full_matrices */
} /*CHECKSCALAR(compute_uv==0||compute_uv==1)*/
} /*if (f2py_success) of compute_uv*/
/* End of cleaning variable compute_uv */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of dgesdd_lwork ****************************/
/*********************************** cgesdd ***********************************/
static char doc_f2py_rout__flapack_cgesdd[] = "\
u,s,vt,info = cgesdd(a,[compute_uv,full_matrices,lwork,overwrite_a])\n\nWrapper for ``cgesdd``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('F') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"compute_uv : input int, optional\n Default: 1\n"
"full_matrices : input int, optional\n Default: 1\n"
"lwork : input int, optional\n Default: max((compute_uv?2*minmn*minmn+MAX(m,n)+2*minmn:2*minmn+MAX(m,n)),1)\n"
"\nReturns\n-------\n"
"u : rank-2 array('F') with bounds (u0,u1)\n"
"s : rank-1 array('f') with bounds (minmn)\n"
"vt : rank-2 array('F') with bounds (vt0,vt1)\n"
"info : int";
/* extern void F_FUNC(cgesdd,CGESDD)(char*,F_INT*,F_INT*,complex_float*,F_INT*,float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgesdd(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,F_INT*,complex_float*,F_INT*,float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
int minmn = 0;
int u0 = 0;
int u1 = 0;
int vt0 = 0;
int vt1 = 0;
complex_float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int compute_uv = 0;
PyObject *compute_uv_capi = Py_None;
int full_matrices = 0;
PyObject *full_matrices_capi = Py_None;
complex_float *u = NULL;
npy_intp u_Dims[2] = {-1, -1};
const int u_Rank = 2;
PyArrayObject *capi_u_tmp = NULL;
int capi_u_intent = 0;
float *s = NULL;
npy_intp s_Dims[1] = {-1};
const int s_Rank = 1;
PyArrayObject *capi_s_tmp = NULL;
int capi_s_intent = 0;
complex_float *vt = NULL;
npy_intp vt_Dims[2] = {-1, -1};
const int vt_Rank = 2;
PyArrayObject *capi_vt_tmp = NULL;
int capi_vt_intent = 0;
complex_float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
float *rwork = NULL;
npy_intp rwork_Dims[1] = {-1};
const int rwork_Rank = 1;
PyArrayObject *capi_rwork_tmp = NULL;
int capi_rwork_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int *iwork = NULL;
npy_intp iwork_Dims[1] = {-1};
const int iwork_Rank = 1;
PyArrayObject *capi_iwork_tmp = NULL;
int capi_iwork_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","compute_uv","full_matrices","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|OOOi:_flapack.cgesdd",\
capi_kwlist,&a_capi,&compute_uv_capi,&full_matrices_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable compute_uv */
if (compute_uv_capi == Py_None) compute_uv = 1; else
f2py_success = int_from_pyobj(&compute_uv,compute_uv_capi,"_flapack.cgesdd() 1st keyword (compute_uv) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(compute_uv==0||compute_uv==1,"compute_uv==0||compute_uv==1","1st keyword compute_uv","cgesdd:compute_uv=%d",compute_uv) {
/* Processing variable full_matrices */
if (full_matrices_capi == Py_None) full_matrices = 1; else
f2py_success = int_from_pyobj(&full_matrices,full_matrices_capi,"_flapack.cgesdd() 2nd keyword (full_matrices) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(full_matrices==0||full_matrices==1,"full_matrices==0||full_matrices==1","2nd keyword full_matrices","cgesdd:full_matrices=%d",full_matrices) {
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN;
capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.cgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_float *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable u0 */
u0 = (compute_uv?m:1);
/* Processing variable u1 */
u1 = (compute_uv?(full_matrices?m:minmn):1);
/* Processing variable vt0 */
vt0 = (compute_uv?(full_matrices?n:minmn):1);
/* Processing variable vt1 */
vt1 = (compute_uv?n:1);
/* Processing variable s */
s_Dims[0]=minmn;
capi_s_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_s_tmp = array_from_pyobj(NPY_FLOAT,s_Dims,s_Rank,capi_s_intent,Py_None);
if (capi_s_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `s' of _flapack.cgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
s = (float *)(PyArray_DATA(capi_s_tmp));
/* Processing variable u */
u_Dims[0]=u0,u_Dims[1]=u1;
capi_u_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_u_tmp = array_from_pyobj(NPY_CFLOAT,u_Dims,u_Rank,capi_u_intent,Py_None);
if (capi_u_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `u' of _flapack.cgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
u = (complex_float *)(PyArray_DATA(capi_u_tmp));
/* Processing variable vt */
vt_Dims[0]=vt0,vt_Dims[1]=vt1;
capi_vt_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_vt_tmp = array_from_pyobj(NPY_CFLOAT,vt_Dims,vt_Rank,capi_vt_intent,Py_None);
if (capi_vt_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `vt' of _flapack.cgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
vt = (complex_float *)(PyArray_DATA(capi_vt_tmp));
/* Processing variable rwork */
rwork_Dims[0]=(compute_uv?minmn*MAX(5*minmn+7, 2*MAX(m,n)+2*minmn+1):7*minmn);
capi_rwork_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_rwork_tmp = array_from_pyobj(NPY_FLOAT,rwork_Dims,rwork_Rank,capi_rwork_intent,Py_None);
if (capi_rwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `rwork' of _flapack.cgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
rwork = (float *)(PyArray_DATA(capi_rwork_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max((compute_uv?2*minmn*minmn+MAX(m,n)+2*minmn:2*minmn+MAX(m,n)),1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.cgesdd() 3rd keyword (lwork) can't be converted to int");
if (f2py_success) {
/* Processing variable iwork */
iwork_Dims[0]=8 * minmn;
capi_iwork_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_iwork_tmp = array_from_pyobj(NPY_INT,iwork_Dims,iwork_Rank,capi_iwork_intent,Py_None);
if (capi_iwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `iwork' of _flapack.cgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
iwork = (int *)(PyArray_DATA(capi_iwork_tmp));
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_CFLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.cgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_float *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)((compute_uv?(full_matrices?"A":"S"):"N"),&m,&n,a,&m,s,u,&u0,vt,&vt0,work,&lwork,rwork,iwork,&info) ;
/*(*f2py_func)(&m,&n,&minmn,&u0,&u1,&vt0,&vt1,a,&compute_uv,&full_matrices,u,s,vt,work,rwork,&lwork,iwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNi",capi_u_tmp,capi_s_tmp,capi_vt_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
Py_XDECREF(capi_iwork_tmp);
} /*if (capi_iwork_tmp == NULL) ... else of iwork*/
/* End of cleaning variable iwork */
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
Py_XDECREF(capi_rwork_tmp);
} /*if (capi_rwork_tmp == NULL) ... else of rwork*/
/* End of cleaning variable rwork */
} /*if (capi_vt_tmp == NULL) ... else of vt*/
/* End of cleaning variable vt */
} /*if (capi_u_tmp == NULL) ... else of u*/
/* End of cleaning variable u */
} /*if (capi_s_tmp == NULL) ... else of s*/
/* End of cleaning variable s */
/* End of cleaning variable vt1 */
/* End of cleaning variable vt0 */
/* End of cleaning variable u1 */
/* End of cleaning variable u0 */
/* End of cleaning variable minmn */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
if((PyObject *)capi_a_tmp!=a_capi) {
Py_XDECREF(capi_a_tmp); }
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
} /*CHECKSCALAR(full_matrices==0||full_matrices==1)*/
} /*if (f2py_success) of full_matrices*/
/* End of cleaning variable full_matrices */
} /*CHECKSCALAR(compute_uv==0||compute_uv==1)*/
} /*if (f2py_success) of compute_uv*/
/* End of cleaning variable compute_uv */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of cgesdd *******************************/
/*********************************** zgesdd ***********************************/
static char doc_f2py_rout__flapack_zgesdd[] = "\
u,s,vt,info = zgesdd(a,[compute_uv,full_matrices,lwork,overwrite_a])\n\nWrapper for ``zgesdd``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('D') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"compute_uv : input int, optional\n Default: 1\n"
"full_matrices : input int, optional\n Default: 1\n"
"lwork : input int, optional\n Default: max((compute_uv?2*minmn*minmn+MAX(m,n)+2*minmn:2*minmn+MAX(m,n)),1)\n"
"\nReturns\n-------\n"
"u : rank-2 array('D') with bounds (u0,u1)\n"
"s : rank-1 array('d') with bounds (minmn)\n"
"vt : rank-2 array('D') with bounds (vt0,vt1)\n"
"info : int";
/* extern void F_FUNC(zgesdd,ZGESDD)(char*,F_INT*,F_INT*,complex_double*,F_INT*,double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgesdd(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,F_INT*,complex_double*,F_INT*,double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
int minmn = 0;
int u0 = 0;
int u1 = 0;
int vt0 = 0;
int vt1 = 0;
complex_double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int compute_uv = 0;
PyObject *compute_uv_capi = Py_None;
int full_matrices = 0;
PyObject *full_matrices_capi = Py_None;
complex_double *u = NULL;
npy_intp u_Dims[2] = {-1, -1};
const int u_Rank = 2;
PyArrayObject *capi_u_tmp = NULL;
int capi_u_intent = 0;
double *s = NULL;
npy_intp s_Dims[1] = {-1};
const int s_Rank = 1;
PyArrayObject *capi_s_tmp = NULL;
int capi_s_intent = 0;
complex_double *vt = NULL;
npy_intp vt_Dims[2] = {-1, -1};
const int vt_Rank = 2;
PyArrayObject *capi_vt_tmp = NULL;
int capi_vt_intent = 0;
complex_double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
double *rwork = NULL;
npy_intp rwork_Dims[1] = {-1};
const int rwork_Rank = 1;
PyArrayObject *capi_rwork_tmp = NULL;
int capi_rwork_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int *iwork = NULL;
npy_intp iwork_Dims[1] = {-1};
const int iwork_Rank = 1;
PyArrayObject *capi_iwork_tmp = NULL;
int capi_iwork_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","compute_uv","full_matrices","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|OOOi:_flapack.zgesdd",\
capi_kwlist,&a_capi,&compute_uv_capi,&full_matrices_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable compute_uv */
if (compute_uv_capi == Py_None) compute_uv = 1; else
f2py_success = int_from_pyobj(&compute_uv,compute_uv_capi,"_flapack.zgesdd() 1st keyword (compute_uv) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(compute_uv==0||compute_uv==1,"compute_uv==0||compute_uv==1","1st keyword compute_uv","zgesdd:compute_uv=%d",compute_uv) {
/* Processing variable full_matrices */
if (full_matrices_capi == Py_None) full_matrices = 1; else
f2py_success = int_from_pyobj(&full_matrices,full_matrices_capi,"_flapack.zgesdd() 2nd keyword (full_matrices) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(full_matrices==0||full_matrices==1,"full_matrices==0||full_matrices==1","2nd keyword full_matrices","zgesdd:full_matrices=%d",full_matrices) {
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN;
capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.zgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_double *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable u0 */
u0 = (compute_uv?m:1);
/* Processing variable u1 */
u1 = (compute_uv?(full_matrices?m:minmn):1);
/* Processing variable vt0 */
vt0 = (compute_uv?(full_matrices?n:minmn):1);
/* Processing variable vt1 */
vt1 = (compute_uv?n:1);
/* Processing variable s */
s_Dims[0]=minmn;
capi_s_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_s_tmp = array_from_pyobj(NPY_DOUBLE,s_Dims,s_Rank,capi_s_intent,Py_None);
if (capi_s_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `s' of _flapack.zgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
s = (double *)(PyArray_DATA(capi_s_tmp));
/* Processing variable u */
u_Dims[0]=u0,u_Dims[1]=u1;
capi_u_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_u_tmp = array_from_pyobj(NPY_CDOUBLE,u_Dims,u_Rank,capi_u_intent,Py_None);
if (capi_u_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `u' of _flapack.zgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
u = (complex_double *)(PyArray_DATA(capi_u_tmp));
/* Processing variable vt */
vt_Dims[0]=vt0,vt_Dims[1]=vt1;
capi_vt_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_vt_tmp = array_from_pyobj(NPY_CDOUBLE,vt_Dims,vt_Rank,capi_vt_intent,Py_None);
if (capi_vt_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `vt' of _flapack.zgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
vt = (complex_double *)(PyArray_DATA(capi_vt_tmp));
/* Processing variable rwork */
rwork_Dims[0]=(compute_uv?minmn*MAX(5*minmn+7, 2*MAX(m,n)+2*minmn+1):7*minmn);
capi_rwork_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_rwork_tmp = array_from_pyobj(NPY_DOUBLE,rwork_Dims,rwork_Rank,capi_rwork_intent,Py_None);
if (capi_rwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `rwork' of _flapack.zgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
rwork = (double *)(PyArray_DATA(capi_rwork_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max((compute_uv?2*minmn*minmn+MAX(m,n)+2*minmn:2*minmn+MAX(m,n)),1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.zgesdd() 3rd keyword (lwork) can't be converted to int");
if (f2py_success) {
/* Processing variable iwork */
iwork_Dims[0]=8 * minmn;
capi_iwork_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_iwork_tmp = array_from_pyobj(NPY_INT,iwork_Dims,iwork_Rank,capi_iwork_intent,Py_None);
if (capi_iwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `iwork' of _flapack.zgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
iwork = (int *)(PyArray_DATA(capi_iwork_tmp));
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_CDOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.zgesdd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_double *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)((compute_uv?(full_matrices?"A":"S"):"N"),&m,&n,a,&m,s,u,&u0,vt,&vt0,work,&lwork,rwork,iwork,&info) ;
/*(*f2py_func)(&m,&n,&minmn,&u0,&u1,&vt0,&vt1,a,&compute_uv,&full_matrices,u,s,vt,work,rwork,&lwork,iwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNi",capi_u_tmp,capi_s_tmp,capi_vt_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
Py_XDECREF(capi_iwork_tmp);
} /*if (capi_iwork_tmp == NULL) ... else of iwork*/
/* End of cleaning variable iwork */
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
Py_XDECREF(capi_rwork_tmp);
} /*if (capi_rwork_tmp == NULL) ... else of rwork*/
/* End of cleaning variable rwork */
} /*if (capi_vt_tmp == NULL) ... else of vt*/
/* End of cleaning variable vt */
} /*if (capi_u_tmp == NULL) ... else of u*/
/* End of cleaning variable u */
} /*if (capi_s_tmp == NULL) ... else of s*/
/* End of cleaning variable s */
/* End of cleaning variable vt1 */
/* End of cleaning variable vt0 */
/* End of cleaning variable u1 */
/* End of cleaning variable u0 */
/* End of cleaning variable minmn */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
if((PyObject *)capi_a_tmp!=a_capi) {
Py_XDECREF(capi_a_tmp); }
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
} /*CHECKSCALAR(full_matrices==0||full_matrices==1)*/
} /*if (f2py_success) of full_matrices*/
/* End of cleaning variable full_matrices */
} /*CHECKSCALAR(compute_uv==0||compute_uv==1)*/
} /*if (f2py_success) of compute_uv*/
/* End of cleaning variable compute_uv */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of zgesdd *******************************/
/******************************** cgesdd_lwork ********************************/
static char doc_f2py_rout__flapack_cgesdd_lwork[] = "\
work,info = cgesdd_lwork(m,n,[compute_uv,full_matrices])\n\nWrapper for ``cgesdd_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"\nOther Parameters\n----------------\n"
"compute_uv : input int, optional\n Default: 1\n"
"full_matrices : input int, optional\n Default: 1\n"
"\nReturns\n-------\n"
"work : complex\n"
"info : int";
/* extern void F_FUNC(cgesdd ,CGESDD )(char*,F_INT*,F_INT*,complex_float*,F_INT*,float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgesdd_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,F_INT*,complex_float*,F_INT*,float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
int minmn = 0;
int u0 = 0;
int vt0 = 0;
complex_float a;
int compute_uv = 0;
PyObject *compute_uv_capi = Py_None;
int full_matrices = 0;
PyObject *full_matrices_capi = Py_None;
complex_float u;
float s = 0;
complex_float vt;
complex_float work;
PyObject *work_capi = Py_None;
float rwork = 0;
int lwork = 0;
int iwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n","compute_uv","full_matrices",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|OO:_flapack.cgesdd_lwork",\
capi_kwlist,&m_capi,&n_capi,&compute_uv_capi,&full_matrices_capi))
return NULL;
/*frompyobj*/
/* Processing variable compute_uv */
if (compute_uv_capi == Py_None) compute_uv = 1; else
f2py_success = int_from_pyobj(&compute_uv,compute_uv_capi,"_flapack.cgesdd_lwork() 1st keyword (compute_uv) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(compute_uv==0||compute_uv==1,"compute_uv==0||compute_uv==1","1st keyword compute_uv","cgesdd_lwork:compute_uv=%d",compute_uv) {
/* Processing variable full_matrices */
if (full_matrices_capi == Py_None) full_matrices = 1; else
f2py_success = int_from_pyobj(&full_matrices,full_matrices_capi,"_flapack.cgesdd_lwork() 2nd keyword (full_matrices) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(full_matrices==0||full_matrices==1,"full_matrices==0||full_matrices==1","2nd keyword full_matrices","cgesdd_lwork:full_matrices=%d",full_matrices) {
/* Processing variable a */
/* Processing variable s */
/* Processing variable u */
/* Processing variable vt */
/* Processing variable work */
/* Processing variable rwork */
/* Processing variable lwork */
lwork = -1;
/* Processing variable iwork */
/* Processing variable info */
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.cgesdd_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.cgesdd_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable u0 */
u0 = (compute_uv?m:1);
/* Processing variable vt0 */
vt0 = (compute_uv?(full_matrices?n:minmn):1);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)((compute_uv?(full_matrices?"A":"S"):"N"),&m,&n,&a,&m,&s,&u,&u0,&vt,&vt0,&work,&lwork,&rwork,&iwork,&info) ;
/*(*f2py_func)(&m,&n,&minmn,&u0,&vt0,&a,&compute_uv,&full_matrices,&u,&s,&vt,&work,&rwork,&lwork,&iwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
work_capi = pyobj_from_complex_float1(work);
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",work_capi,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable vt0 */
/* End of cleaning variable u0 */
/* End of cleaning variable minmn */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/* End of cleaning variable info */
/* End of cleaning variable iwork */
/* End of cleaning variable lwork */
/* End of cleaning variable rwork */
/* End of cleaning variable work */
/* End of cleaning variable vt */
/* End of cleaning variable u */
/* End of cleaning variable s */
/* End of cleaning variable a */
} /*CHECKSCALAR(full_matrices==0||full_matrices==1)*/
} /*if (f2py_success) of full_matrices*/
/* End of cleaning variable full_matrices */
} /*CHECKSCALAR(compute_uv==0||compute_uv==1)*/
} /*if (f2py_success) of compute_uv*/
/* End of cleaning variable compute_uv */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of cgesdd_lwork ****************************/
/******************************** zgesdd_lwork ********************************/
static char doc_f2py_rout__flapack_zgesdd_lwork[] = "\
work,info = zgesdd_lwork(m,n,[compute_uv,full_matrices])\n\nWrapper for ``zgesdd_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"\nOther Parameters\n----------------\n"
"compute_uv : input int, optional\n Default: 1\n"
"full_matrices : input int, optional\n Default: 1\n"
"\nReturns\n-------\n"
"work : complex\n"
"info : int";
/* extern void F_FUNC(zgesdd ,ZGESDD )(char*,F_INT*,F_INT*,complex_double*,F_INT*,double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgesdd_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,F_INT*,complex_double*,F_INT*,double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
int minmn = 0;
int u0 = 0;
int vt0 = 0;
complex_double a;
int compute_uv = 0;
PyObject *compute_uv_capi = Py_None;
int full_matrices = 0;
PyObject *full_matrices_capi = Py_None;
complex_double u;
double s = 0;
complex_double vt;
complex_double work;
PyObject *work_capi = Py_None;
double rwork = 0;
int lwork = 0;
int iwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n","compute_uv","full_matrices",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|OO:_flapack.zgesdd_lwork",\
capi_kwlist,&m_capi,&n_capi,&compute_uv_capi,&full_matrices_capi))
return NULL;
/*frompyobj*/
/* Processing variable compute_uv */
if (compute_uv_capi == Py_None) compute_uv = 1; else
f2py_success = int_from_pyobj(&compute_uv,compute_uv_capi,"_flapack.zgesdd_lwork() 1st keyword (compute_uv) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(compute_uv==0||compute_uv==1,"compute_uv==0||compute_uv==1","1st keyword compute_uv","zgesdd_lwork:compute_uv=%d",compute_uv) {
/* Processing variable full_matrices */
if (full_matrices_capi == Py_None) full_matrices = 1; else
f2py_success = int_from_pyobj(&full_matrices,full_matrices_capi,"_flapack.zgesdd_lwork() 2nd keyword (full_matrices) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(full_matrices==0||full_matrices==1,"full_matrices==0||full_matrices==1","2nd keyword full_matrices","zgesdd_lwork:full_matrices=%d",full_matrices) {
/* Processing variable a */
/* Processing variable s */
/* Processing variable u */
/* Processing variable vt */
/* Processing variable work */
/* Processing variable rwork */
/* Processing variable lwork */
lwork = -1;
/* Processing variable iwork */
/* Processing variable info */
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.zgesdd_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.zgesdd_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable u0 */
u0 = (compute_uv?m:1);
/* Processing variable vt0 */
vt0 = (compute_uv?(full_matrices?n:minmn):1);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)((compute_uv?(full_matrices?"A":"S"):"N"),&m,&n,&a,&m,&s,&u,&u0,&vt,&vt0,&work,&lwork,&rwork,&iwork,&info) ;
/*(*f2py_func)(&m,&n,&minmn,&u0,&vt0,&a,&compute_uv,&full_matrices,&u,&s,&vt,&work,&rwork,&lwork,&iwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
work_capi = pyobj_from_complex_double1(work);
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",work_capi,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable vt0 */
/* End of cleaning variable u0 */
/* End of cleaning variable minmn */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/* End of cleaning variable info */
/* End of cleaning variable iwork */
/* End of cleaning variable lwork */
/* End of cleaning variable rwork */
/* End of cleaning variable work */
/* End of cleaning variable vt */
/* End of cleaning variable u */
/* End of cleaning variable s */
/* End of cleaning variable a */
} /*CHECKSCALAR(full_matrices==0||full_matrices==1)*/
} /*if (f2py_success) of full_matrices*/
/* End of cleaning variable full_matrices */
} /*CHECKSCALAR(compute_uv==0||compute_uv==1)*/
} /*if (f2py_success) of compute_uv*/
/* End of cleaning variable compute_uv */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of zgesdd_lwork ****************************/
/*********************************** sgesvd ***********************************/
static char doc_f2py_rout__flapack_sgesvd[] = "\
u,s,vt,info = sgesvd(a,[compute_uv,full_matrices,lwork,overwrite_a])\n\nWrapper for ``sgesvd``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('f') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"compute_uv : input int, optional\n Default: 1\n"
"full_matrices : input int, optional\n Default: 1\n"
"lwork : input int, optional\n Default: max(MAX(3*minmn+MAX(m,n),5*minmn),1)\n"
"\nReturns\n-------\n"
"u : rank-2 array('f') with bounds (u0,u1)\n"
"s : rank-1 array('f') with bounds (minmn)\n"
"vt : rank-2 array('f') with bounds (vt0,vt1)\n"
"info : int";
/* extern void F_FUNC(sgesvd,SGESVD)(char*,char*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgesvd(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,char*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
int minmn = 0;
int u0 = 0;
int u1 = 0;
int vt0 = 0;
int vt1 = 0;
float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int compute_uv = 0;
PyObject *compute_uv_capi = Py_None;
int full_matrices = 0;
PyObject *full_matrices_capi = Py_None;
float *u = NULL;
npy_intp u_Dims[2] = {-1, -1};
const int u_Rank = 2;
PyArrayObject *capi_u_tmp = NULL;
int capi_u_intent = 0;
float *s = NULL;
npy_intp s_Dims[1] = {-1};
const int s_Rank = 1;
PyArrayObject *capi_s_tmp = NULL;
int capi_s_intent = 0;
float *vt = NULL;
npy_intp vt_Dims[2] = {-1, -1};
const int vt_Rank = 2;
PyArrayObject *capi_vt_tmp = NULL;
int capi_vt_intent = 0;
float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","compute_uv","full_matrices","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|OOOi:_flapack.sgesvd",\
capi_kwlist,&a_capi,&compute_uv_capi,&full_matrices_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable compute_uv */
if (compute_uv_capi == Py_None) compute_uv = 1; else
f2py_success = int_from_pyobj(&compute_uv,compute_uv_capi,"_flapack.sgesvd() 1st keyword (compute_uv) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(compute_uv==0||compute_uv==1,"compute_uv==0||compute_uv==1","1st keyword compute_uv","sgesvd:compute_uv=%d",compute_uv) {
/* Processing variable full_matrices */
if (full_matrices_capi == Py_None) full_matrices = 1; else
f2py_success = int_from_pyobj(&full_matrices,full_matrices_capi,"_flapack.sgesvd() 2nd keyword (full_matrices) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(full_matrices==0||full_matrices==1,"full_matrices==0||full_matrices==1","2nd keyword full_matrices","sgesvd:full_matrices=%d",full_matrices) {
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_ALIGNED8;
capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.sgesvd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (float *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable u0 */
u0 = (compute_uv?m:1);
/* Processing variable u1 */
u1 = (compute_uv?(full_matrices?m:minmn):1);
/* Processing variable vt0 */
vt0 = (compute_uv?(full_matrices?n:minmn):1);
/* Processing variable vt1 */
vt1 = (compute_uv?n:1);
/* Processing variable s */
s_Dims[0]=minmn;
capi_s_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_s_tmp = array_from_pyobj(NPY_FLOAT,s_Dims,s_Rank,capi_s_intent,Py_None);
if (capi_s_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `s' of _flapack.sgesvd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
s = (float *)(PyArray_DATA(capi_s_tmp));
/* Processing variable u */
u_Dims[0]=u0,u_Dims[1]=u1;
capi_u_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_u_tmp = array_from_pyobj(NPY_FLOAT,u_Dims,u_Rank,capi_u_intent,Py_None);
if (capi_u_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `u' of _flapack.sgesvd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
u = (float *)(PyArray_DATA(capi_u_tmp));
/* Processing variable vt */
vt_Dims[0]=vt0,vt_Dims[1]=vt1;
capi_vt_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_vt_tmp = array_from_pyobj(NPY_FLOAT,vt_Dims,vt_Rank,capi_vt_intent,Py_None);
if (capi_vt_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `vt' of _flapack.sgesvd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
vt = (float *)(PyArray_DATA(capi_vt_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max(MAX(3*minmn+MAX(m,n),5*minmn),1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.sgesvd() 3rd keyword (lwork) can't be converted to int");
if (f2py_success) {
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_FLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.sgesvd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (float *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)((compute_uv?(full_matrices?"A":"S"):"N"),(compute_uv?(full_matrices?"A":"S"):"N"),&m,&n,a,&m,s,u,&u0,vt,&vt0,work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,&minmn,&u0,&u1,&vt0,&vt1,a,&compute_uv,&full_matrices,u,s,vt,work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNi",capi_u_tmp,capi_s_tmp,capi_vt_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
} /*if (capi_vt_tmp == NULL) ... else of vt*/
/* End of cleaning variable vt */
} /*if (capi_u_tmp == NULL) ... else of u*/
/* End of cleaning variable u */
} /*if (capi_s_tmp == NULL) ... else of s*/
/* End of cleaning variable s */
/* End of cleaning variable vt1 */
/* End of cleaning variable vt0 */
/* End of cleaning variable u1 */
/* End of cleaning variable u0 */
/* End of cleaning variable minmn */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
if((PyObject *)capi_a_tmp!=a_capi) {
Py_XDECREF(capi_a_tmp); }
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
} /*CHECKSCALAR(full_matrices==0||full_matrices==1)*/
} /*if (f2py_success) of full_matrices*/
/* End of cleaning variable full_matrices */
} /*CHECKSCALAR(compute_uv==0||compute_uv==1)*/
} /*if (f2py_success) of compute_uv*/
/* End of cleaning variable compute_uv */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of sgesvd *******************************/
/*********************************** dgesvd ***********************************/
static char doc_f2py_rout__flapack_dgesvd[] = "\
u,s,vt,info = dgesvd(a,[compute_uv,full_matrices,lwork,overwrite_a])\n\nWrapper for ``dgesvd``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('d') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"compute_uv : input int, optional\n Default: 1\n"
"full_matrices : input int, optional\n Default: 1\n"
"lwork : input int, optional\n Default: max(MAX(3*minmn+MAX(m,n),5*minmn),1)\n"
"\nReturns\n-------\n"
"u : rank-2 array('d') with bounds (u0,u1)\n"
"s : rank-1 array('d') with bounds (minmn)\n"
"vt : rank-2 array('d') with bounds (vt0,vt1)\n"
"info : int";
/* extern void F_FUNC(dgesvd,DGESVD)(char*,char*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgesvd(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,char*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
int minmn = 0;
int u0 = 0;
int u1 = 0;
int vt0 = 0;
int vt1 = 0;
double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int compute_uv = 0;
PyObject *compute_uv_capi = Py_None;
int full_matrices = 0;
PyObject *full_matrices_capi = Py_None;
double *u = NULL;
npy_intp u_Dims[2] = {-1, -1};
const int u_Rank = 2;
PyArrayObject *capi_u_tmp = NULL;
int capi_u_intent = 0;
double *s = NULL;
npy_intp s_Dims[1] = {-1};
const int s_Rank = 1;
PyArrayObject *capi_s_tmp = NULL;
int capi_s_intent = 0;
double *vt = NULL;
npy_intp vt_Dims[2] = {-1, -1};
const int vt_Rank = 2;
PyArrayObject *capi_vt_tmp = NULL;
int capi_vt_intent = 0;
double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","compute_uv","full_matrices","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|OOOi:_flapack.dgesvd",\
capi_kwlist,&a_capi,&compute_uv_capi,&full_matrices_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable compute_uv */
if (compute_uv_capi == Py_None) compute_uv = 1; else
f2py_success = int_from_pyobj(&compute_uv,compute_uv_capi,"_flapack.dgesvd() 1st keyword (compute_uv) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(compute_uv==0||compute_uv==1,"compute_uv==0||compute_uv==1","1st keyword compute_uv","dgesvd:compute_uv=%d",compute_uv) {
/* Processing variable full_matrices */
if (full_matrices_capi == Py_None) full_matrices = 1; else
f2py_success = int_from_pyobj(&full_matrices,full_matrices_capi,"_flapack.dgesvd() 2nd keyword (full_matrices) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(full_matrices==0||full_matrices==1,"full_matrices==0||full_matrices==1","2nd keyword full_matrices","dgesvd:full_matrices=%d",full_matrices) {
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_ALIGNED8;
capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.dgesvd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (double *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable u0 */
u0 = (compute_uv?m:1);
/* Processing variable u1 */
u1 = (compute_uv?(full_matrices?m:minmn):1);
/* Processing variable vt0 */
vt0 = (compute_uv?(full_matrices?n:minmn):1);
/* Processing variable vt1 */
vt1 = (compute_uv?n:1);
/* Processing variable s */
s_Dims[0]=minmn;
capi_s_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_s_tmp = array_from_pyobj(NPY_DOUBLE,s_Dims,s_Rank,capi_s_intent,Py_None);
if (capi_s_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `s' of _flapack.dgesvd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
s = (double *)(PyArray_DATA(capi_s_tmp));
/* Processing variable u */
u_Dims[0]=u0,u_Dims[1]=u1;
capi_u_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_u_tmp = array_from_pyobj(NPY_DOUBLE,u_Dims,u_Rank,capi_u_intent,Py_None);
if (capi_u_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `u' of _flapack.dgesvd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
u = (double *)(PyArray_DATA(capi_u_tmp));
/* Processing variable vt */
vt_Dims[0]=vt0,vt_Dims[1]=vt1;
capi_vt_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_vt_tmp = array_from_pyobj(NPY_DOUBLE,vt_Dims,vt_Rank,capi_vt_intent,Py_None);
if (capi_vt_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `vt' of _flapack.dgesvd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
vt = (double *)(PyArray_DATA(capi_vt_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max(MAX(3*minmn+MAX(m,n),5*minmn),1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.dgesvd() 3rd keyword (lwork) can't be converted to int");
if (f2py_success) {
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_DOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.dgesvd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (double *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)((compute_uv?(full_matrices?"A":"S"):"N"),(compute_uv?(full_matrices?"A":"S"):"N"),&m,&n,a,&m,s,u,&u0,vt,&vt0,work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,&minmn,&u0,&u1,&vt0,&vt1,a,&compute_uv,&full_matrices,u,s,vt,work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNi",capi_u_tmp,capi_s_tmp,capi_vt_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
} /*if (capi_vt_tmp == NULL) ... else of vt*/
/* End of cleaning variable vt */
} /*if (capi_u_tmp == NULL) ... else of u*/
/* End of cleaning variable u */
} /*if (capi_s_tmp == NULL) ... else of s*/
/* End of cleaning variable s */
/* End of cleaning variable vt1 */
/* End of cleaning variable vt0 */
/* End of cleaning variable u1 */
/* End of cleaning variable u0 */
/* End of cleaning variable minmn */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
if((PyObject *)capi_a_tmp!=a_capi) {
Py_XDECREF(capi_a_tmp); }
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
} /*CHECKSCALAR(full_matrices==0||full_matrices==1)*/
} /*if (f2py_success) of full_matrices*/
/* End of cleaning variable full_matrices */
} /*CHECKSCALAR(compute_uv==0||compute_uv==1)*/
} /*if (f2py_success) of compute_uv*/
/* End of cleaning variable compute_uv */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of dgesvd *******************************/
/******************************** sgesvd_lwork ********************************/
static char doc_f2py_rout__flapack_sgesvd_lwork[] = "\
work,info = sgesvd_lwork(m,n,[compute_uv,full_matrices])\n\nWrapper for ``sgesvd_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"\nOther Parameters\n----------------\n"
"compute_uv : input int, optional\n Default: 1\n"
"full_matrices : input int, optional\n Default: 1\n"
"\nReturns\n-------\n"
"work : float\n"
"info : int";
/* extern void F_FUNC(sgesvd ,SGESVD )(char*,char*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgesvd_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,char*,F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
int minmn = 0;
int u0 = 0;
int vt0 = 0;
float a = 0;
int compute_uv = 0;
PyObject *compute_uv_capi = Py_None;
int full_matrices = 0;
PyObject *full_matrices_capi = Py_None;
float u = 0;
float s = 0;
float vt = 0;
float work = 0;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n","compute_uv","full_matrices",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|OO:_flapack.sgesvd_lwork",\
capi_kwlist,&m_capi,&n_capi,&compute_uv_capi,&full_matrices_capi))
return NULL;
/*frompyobj*/
/* Processing variable compute_uv */
if (compute_uv_capi == Py_None) compute_uv = 1; else
f2py_success = int_from_pyobj(&compute_uv,compute_uv_capi,"_flapack.sgesvd_lwork() 1st keyword (compute_uv) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(compute_uv==0||compute_uv==1,"compute_uv==0||compute_uv==1","1st keyword compute_uv","sgesvd_lwork:compute_uv=%d",compute_uv) {
/* Processing variable full_matrices */
if (full_matrices_capi == Py_None) full_matrices = 1; else
f2py_success = int_from_pyobj(&full_matrices,full_matrices_capi,"_flapack.sgesvd_lwork() 2nd keyword (full_matrices) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(full_matrices==0||full_matrices==1,"full_matrices==0||full_matrices==1","2nd keyword full_matrices","sgesvd_lwork:full_matrices=%d",full_matrices) {
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.sgesvd_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.sgesvd_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable a */
/* Processing variable s */
/* Processing variable u */
/* Processing variable vt */
/* Processing variable lwork */
lwork = -1;
/* Processing variable work */
/* Processing variable info */
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable u0 */
u0 = (compute_uv?m:1);
/* Processing variable vt0 */
vt0 = (compute_uv?(full_matrices?n:minmn):1);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)((compute_uv?(full_matrices?"A":"S"):"N"),(compute_uv?(full_matrices?"A":"S"):"N"),&m,&n,&a,&m,&s,&u,&u0,&vt,&vt0,&work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,&minmn,&u0,&vt0,&a,&compute_uv,&full_matrices,&u,&s,&vt,&work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("fi",work,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable vt0 */
/* End of cleaning variable u0 */
/* End of cleaning variable minmn */
/* End of cleaning variable info */
/* End of cleaning variable work */
/* End of cleaning variable lwork */
/* End of cleaning variable vt */
/* End of cleaning variable u */
/* End of cleaning variable s */
/* End of cleaning variable a */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
} /*CHECKSCALAR(full_matrices==0||full_matrices==1)*/
} /*if (f2py_success) of full_matrices*/
/* End of cleaning variable full_matrices */
} /*CHECKSCALAR(compute_uv==0||compute_uv==1)*/
} /*if (f2py_success) of compute_uv*/
/* End of cleaning variable compute_uv */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of sgesvd_lwork ****************************/
/******************************** dgesvd_lwork ********************************/
static char doc_f2py_rout__flapack_dgesvd_lwork[] = "\
work,info = dgesvd_lwork(m,n,[compute_uv,full_matrices])\n\nWrapper for ``dgesvd_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"\nOther Parameters\n----------------\n"
"compute_uv : input int, optional\n Default: 1\n"
"full_matrices : input int, optional\n Default: 1\n"
"\nReturns\n-------\n"
"work : float\n"
"info : int";
/* extern void F_FUNC(dgesvd ,DGESVD )(char*,char*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgesvd_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,char*,F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
int minmn = 0;
int u0 = 0;
int vt0 = 0;
double a = 0;
int compute_uv = 0;
PyObject *compute_uv_capi = Py_None;
int full_matrices = 0;
PyObject *full_matrices_capi = Py_None;
double u = 0;
double s = 0;
double vt = 0;
double work = 0;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n","compute_uv","full_matrices",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|OO:_flapack.dgesvd_lwork",\
capi_kwlist,&m_capi,&n_capi,&compute_uv_capi,&full_matrices_capi))
return NULL;
/*frompyobj*/
/* Processing variable compute_uv */
if (compute_uv_capi == Py_None) compute_uv = 1; else
f2py_success = int_from_pyobj(&compute_uv,compute_uv_capi,"_flapack.dgesvd_lwork() 1st keyword (compute_uv) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(compute_uv==0||compute_uv==1,"compute_uv==0||compute_uv==1","1st keyword compute_uv","dgesvd_lwork:compute_uv=%d",compute_uv) {
/* Processing variable full_matrices */
if (full_matrices_capi == Py_None) full_matrices = 1; else
f2py_success = int_from_pyobj(&full_matrices,full_matrices_capi,"_flapack.dgesvd_lwork() 2nd keyword (full_matrices) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(full_matrices==0||full_matrices==1,"full_matrices==0||full_matrices==1","2nd keyword full_matrices","dgesvd_lwork:full_matrices=%d",full_matrices) {
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.dgesvd_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.dgesvd_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable a */
/* Processing variable s */
/* Processing variable u */
/* Processing variable vt */
/* Processing variable lwork */
lwork = -1;
/* Processing variable work */
/* Processing variable info */
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable u0 */
u0 = (compute_uv?m:1);
/* Processing variable vt0 */
vt0 = (compute_uv?(full_matrices?n:minmn):1);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)((compute_uv?(full_matrices?"A":"S"):"N"),(compute_uv?(full_matrices?"A":"S"):"N"),&m,&n,&a,&m,&s,&u,&u0,&vt,&vt0,&work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,&minmn,&u0,&vt0,&a,&compute_uv,&full_matrices,&u,&s,&vt,&work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("di",work,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable vt0 */
/* End of cleaning variable u0 */
/* End of cleaning variable minmn */
/* End of cleaning variable info */
/* End of cleaning variable work */
/* End of cleaning variable lwork */
/* End of cleaning variable vt */
/* End of cleaning variable u */
/* End of cleaning variable s */
/* End of cleaning variable a */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
} /*CHECKSCALAR(full_matrices==0||full_matrices==1)*/
} /*if (f2py_success) of full_matrices*/
/* End of cleaning variable full_matrices */
} /*CHECKSCALAR(compute_uv==0||compute_uv==1)*/
} /*if (f2py_success) of compute_uv*/
/* End of cleaning variable compute_uv */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of dgesvd_lwork ****************************/
/*********************************** cgesvd ***********************************/
static char doc_f2py_rout__flapack_cgesvd[] = "\
u,s,vt,info = cgesvd(a,[compute_uv,full_matrices,lwork,overwrite_a])\n\nWrapper for ``cgesvd``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('F') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"compute_uv : input int, optional\n Default: 1\n"
"full_matrices : input int, optional\n Default: 1\n"
"lwork : input int, optional\n Default: MAX(2*minmn+MAX(m,n),1)\n"
"\nReturns\n-------\n"
"u : rank-2 array('F') with bounds (u0,u1)\n"
"s : rank-1 array('f') with bounds (minmn)\n"
"vt : rank-2 array('F') with bounds (vt0,vt1)\n"
"info : int";
/* extern void F_FUNC(cgesvd,CGESVD)(char*,char*,F_INT*,F_INT*,complex_float*,F_INT*,float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgesvd(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,char*,F_INT*,F_INT*,complex_float*,F_INT*,float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
int minmn = 0;
int u0 = 0;
int u1 = 0;
int vt0 = 0;
int vt1 = 0;
complex_float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int compute_uv = 0;
PyObject *compute_uv_capi = Py_None;
int full_matrices = 0;
PyObject *full_matrices_capi = Py_None;
complex_float *u = NULL;
npy_intp u_Dims[2] = {-1, -1};
const int u_Rank = 2;
PyArrayObject *capi_u_tmp = NULL;
int capi_u_intent = 0;
float *s = NULL;
npy_intp s_Dims[1] = {-1};
const int s_Rank = 1;
PyArrayObject *capi_s_tmp = NULL;
int capi_s_intent = 0;
complex_float *vt = NULL;
npy_intp vt_Dims[2] = {-1, -1};
const int vt_Rank = 2;
PyArrayObject *capi_vt_tmp = NULL;
int capi_vt_intent = 0;
complex_float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
float *rwork = NULL;
npy_intp rwork_Dims[1] = {-1};
const int rwork_Rank = 1;
PyArrayObject *capi_rwork_tmp = NULL;
int capi_rwork_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","compute_uv","full_matrices","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|OOOi:_flapack.cgesvd",\
capi_kwlist,&a_capi,&compute_uv_capi,&full_matrices_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable compute_uv */
if (compute_uv_capi == Py_None) compute_uv = 1; else
f2py_success = int_from_pyobj(&compute_uv,compute_uv_capi,"_flapack.cgesvd() 1st keyword (compute_uv) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(compute_uv==0||compute_uv==1,"compute_uv==0||compute_uv==1","1st keyword compute_uv","cgesvd:compute_uv=%d",compute_uv) {
/* Processing variable full_matrices */
if (full_matrices_capi == Py_None) full_matrices = 1; else
f2py_success = int_from_pyobj(&full_matrices,full_matrices_capi,"_flapack.cgesvd() 2nd keyword (full_matrices) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(full_matrices==0||full_matrices==1,"full_matrices==0||full_matrices==1","2nd keyword full_matrices","cgesvd:full_matrices=%d",full_matrices) {
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN;
capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.cgesvd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_float *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable u0 */
u0 = (compute_uv?m:1);
/* Processing variable u1 */
u1 = (compute_uv?(full_matrices?m:minmn):1);
/* Processing variable vt0 */
vt0 = (compute_uv?(full_matrices?n:minmn):1);
/* Processing variable vt1 */
vt1 = (compute_uv?n:1);
/* Processing variable s */
s_Dims[0]=minmn;
capi_s_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_s_tmp = array_from_pyobj(NPY_FLOAT,s_Dims,s_Rank,capi_s_intent,Py_None);
if (capi_s_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `s' of _flapack.cgesvd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
s = (float *)(PyArray_DATA(capi_s_tmp));
/* Processing variable u */
u_Dims[0]=u0,u_Dims[1]=u1;
capi_u_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_u_tmp = array_from_pyobj(NPY_CFLOAT,u_Dims,u_Rank,capi_u_intent,Py_None);
if (capi_u_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `u' of _flapack.cgesvd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
u = (complex_float *)(PyArray_DATA(capi_u_tmp));
/* Processing variable vt */
vt_Dims[0]=vt0,vt_Dims[1]=vt1;
capi_vt_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_vt_tmp = array_from_pyobj(NPY_CFLOAT,vt_Dims,vt_Rank,capi_vt_intent,Py_None);
if (capi_vt_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `vt' of _flapack.cgesvd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
vt = (complex_float *)(PyArray_DATA(capi_vt_tmp));
/* Processing variable rwork */
rwork_Dims[0]=(MAX(1,5*minmn));
capi_rwork_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_rwork_tmp = array_from_pyobj(NPY_FLOAT,rwork_Dims,rwork_Rank,capi_rwork_intent,Py_None);
if (capi_rwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `rwork' of _flapack.cgesvd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
rwork = (float *)(PyArray_DATA(capi_rwork_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = MAX(2*minmn+MAX(m,n),1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.cgesvd() 3rd keyword (lwork) can't be converted to int");
if (f2py_success) {
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_CFLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.cgesvd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_float *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)((compute_uv?(full_matrices?"A":"S"):"N"),(compute_uv?(full_matrices?"A":"S"):"N"),&m,&n,a,&m,s,u,&u0,vt,&vt0,work,&lwork,rwork,&info) ;
/*(*f2py_func)(&m,&n,&minmn,&u0,&u1,&vt0,&vt1,a,&compute_uv,&full_matrices,u,s,vt,work,rwork,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNi",capi_u_tmp,capi_s_tmp,capi_vt_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
Py_XDECREF(capi_rwork_tmp);
} /*if (capi_rwork_tmp == NULL) ... else of rwork*/
/* End of cleaning variable rwork */
} /*if (capi_vt_tmp == NULL) ... else of vt*/
/* End of cleaning variable vt */
} /*if (capi_u_tmp == NULL) ... else of u*/
/* End of cleaning variable u */
} /*if (capi_s_tmp == NULL) ... else of s*/
/* End of cleaning variable s */
/* End of cleaning variable vt1 */
/* End of cleaning variable vt0 */
/* End of cleaning variable u1 */
/* End of cleaning variable u0 */
/* End of cleaning variable minmn */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
if((PyObject *)capi_a_tmp!=a_capi) {
Py_XDECREF(capi_a_tmp); }
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
} /*CHECKSCALAR(full_matrices==0||full_matrices==1)*/
} /*if (f2py_success) of full_matrices*/
/* End of cleaning variable full_matrices */
} /*CHECKSCALAR(compute_uv==0||compute_uv==1)*/
} /*if (f2py_success) of compute_uv*/
/* End of cleaning variable compute_uv */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of cgesvd *******************************/
/*********************************** zgesvd ***********************************/
static char doc_f2py_rout__flapack_zgesvd[] = "\
u,s,vt,info = zgesvd(a,[compute_uv,full_matrices,lwork,overwrite_a])\n\nWrapper for ``zgesvd``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('D') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"compute_uv : input int, optional\n Default: 1\n"
"full_matrices : input int, optional\n Default: 1\n"
"lwork : input int, optional\n Default: MAX(2*minmn+MAX(m,n),1)\n"
"\nReturns\n-------\n"
"u : rank-2 array('D') with bounds (u0,u1)\n"
"s : rank-1 array('d') with bounds (minmn)\n"
"vt : rank-2 array('D') with bounds (vt0,vt1)\n"
"info : int";
/* extern void F_FUNC(zgesvd,ZGESVD)(char*,char*,F_INT*,F_INT*,complex_double*,F_INT*,double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgesvd(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,char*,F_INT*,F_INT*,complex_double*,F_INT*,double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
int minmn = 0;
int u0 = 0;
int u1 = 0;
int vt0 = 0;
int vt1 = 0;
complex_double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int compute_uv = 0;
PyObject *compute_uv_capi = Py_None;
int full_matrices = 0;
PyObject *full_matrices_capi = Py_None;
complex_double *u = NULL;
npy_intp u_Dims[2] = {-1, -1};
const int u_Rank = 2;
PyArrayObject *capi_u_tmp = NULL;
int capi_u_intent = 0;
double *s = NULL;
npy_intp s_Dims[1] = {-1};
const int s_Rank = 1;
PyArrayObject *capi_s_tmp = NULL;
int capi_s_intent = 0;
complex_double *vt = NULL;
npy_intp vt_Dims[2] = {-1, -1};
const int vt_Rank = 2;
PyArrayObject *capi_vt_tmp = NULL;
int capi_vt_intent = 0;
complex_double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
double *rwork = NULL;
npy_intp rwork_Dims[1] = {-1};
const int rwork_Rank = 1;
PyArrayObject *capi_rwork_tmp = NULL;
int capi_rwork_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","compute_uv","full_matrices","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|OOOi:_flapack.zgesvd",\
capi_kwlist,&a_capi,&compute_uv_capi,&full_matrices_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable compute_uv */
if (compute_uv_capi == Py_None) compute_uv = 1; else
f2py_success = int_from_pyobj(&compute_uv,compute_uv_capi,"_flapack.zgesvd() 1st keyword (compute_uv) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(compute_uv==0||compute_uv==1,"compute_uv==0||compute_uv==1","1st keyword compute_uv","zgesvd:compute_uv=%d",compute_uv) {
/* Processing variable full_matrices */
if (full_matrices_capi == Py_None) full_matrices = 1; else
f2py_success = int_from_pyobj(&full_matrices,full_matrices_capi,"_flapack.zgesvd() 2nd keyword (full_matrices) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(full_matrices==0||full_matrices==1,"full_matrices==0||full_matrices==1","2nd keyword full_matrices","zgesvd:full_matrices=%d",full_matrices) {
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN;
capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.zgesvd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_double *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable u0 */
u0 = (compute_uv?m:1);
/* Processing variable u1 */
u1 = (compute_uv?(full_matrices?m:minmn):1);
/* Processing variable vt0 */
vt0 = (compute_uv?(full_matrices?n:minmn):1);
/* Processing variable vt1 */
vt1 = (compute_uv?n:1);
/* Processing variable s */
s_Dims[0]=minmn;
capi_s_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_s_tmp = array_from_pyobj(NPY_DOUBLE,s_Dims,s_Rank,capi_s_intent,Py_None);
if (capi_s_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `s' of _flapack.zgesvd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
s = (double *)(PyArray_DATA(capi_s_tmp));
/* Processing variable u */
u_Dims[0]=u0,u_Dims[1]=u1;
capi_u_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_u_tmp = array_from_pyobj(NPY_CDOUBLE,u_Dims,u_Rank,capi_u_intent,Py_None);
if (capi_u_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `u' of _flapack.zgesvd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
u = (complex_double *)(PyArray_DATA(capi_u_tmp));
/* Processing variable vt */
vt_Dims[0]=vt0,vt_Dims[1]=vt1;
capi_vt_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_vt_tmp = array_from_pyobj(NPY_CDOUBLE,vt_Dims,vt_Rank,capi_vt_intent,Py_None);
if (capi_vt_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `vt' of _flapack.zgesvd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
vt = (complex_double *)(PyArray_DATA(capi_vt_tmp));
/* Processing variable rwork */
rwork_Dims[0]=(MAX(1,5*minmn));
capi_rwork_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_rwork_tmp = array_from_pyobj(NPY_DOUBLE,rwork_Dims,rwork_Rank,capi_rwork_intent,Py_None);
if (capi_rwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `rwork' of _flapack.zgesvd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
rwork = (double *)(PyArray_DATA(capi_rwork_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = MAX(2*minmn+MAX(m,n),1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.zgesvd() 3rd keyword (lwork) can't be converted to int");
if (f2py_success) {
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_CDOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.zgesvd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_double *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)((compute_uv?(full_matrices?"A":"S"):"N"),(compute_uv?(full_matrices?"A":"S"):"N"),&m,&n,a,&m,s,u,&u0,vt,&vt0,work,&lwork,rwork,&info) ;
/*(*f2py_func)(&m,&n,&minmn,&u0,&u1,&vt0,&vt1,a,&compute_uv,&full_matrices,u,s,vt,work,rwork,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNi",capi_u_tmp,capi_s_tmp,capi_vt_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
Py_XDECREF(capi_rwork_tmp);
} /*if (capi_rwork_tmp == NULL) ... else of rwork*/
/* End of cleaning variable rwork */
} /*if (capi_vt_tmp == NULL) ... else of vt*/
/* End of cleaning variable vt */
} /*if (capi_u_tmp == NULL) ... else of u*/
/* End of cleaning variable u */
} /*if (capi_s_tmp == NULL) ... else of s*/
/* End of cleaning variable s */
/* End of cleaning variable vt1 */
/* End of cleaning variable vt0 */
/* End of cleaning variable u1 */
/* End of cleaning variable u0 */
/* End of cleaning variable minmn */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
if((PyObject *)capi_a_tmp!=a_capi) {
Py_XDECREF(capi_a_tmp); }
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
} /*CHECKSCALAR(full_matrices==0||full_matrices==1)*/
} /*if (f2py_success) of full_matrices*/
/* End of cleaning variable full_matrices */
} /*CHECKSCALAR(compute_uv==0||compute_uv==1)*/
} /*if (f2py_success) of compute_uv*/
/* End of cleaning variable compute_uv */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of zgesvd *******************************/
/******************************** cgesvd_lwork ********************************/
static char doc_f2py_rout__flapack_cgesvd_lwork[] = "\
work,info = cgesvd_lwork(m,n,[compute_uv,full_matrices])\n\nWrapper for ``cgesvd_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"\nOther Parameters\n----------------\n"
"compute_uv : input int, optional\n Default: 1\n"
"full_matrices : input int, optional\n Default: 1\n"
"\nReturns\n-------\n"
"work : complex\n"
"info : int";
/* extern void F_FUNC(cgesvd ,CGESVD )(char*,char*,F_INT*,F_INT*,complex_float*,F_INT*,float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgesvd_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,char*,F_INT*,F_INT*,complex_float*,F_INT*,float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
int minmn = 0;
int u0 = 0;
int vt0 = 0;
complex_float a;
int compute_uv = 0;
PyObject *compute_uv_capi = Py_None;
int full_matrices = 0;
PyObject *full_matrices_capi = Py_None;
complex_float u;
float s = 0;
complex_float vt;
complex_float work;
PyObject *work_capi = Py_None;
float rwork = 0;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n","compute_uv","full_matrices",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|OO:_flapack.cgesvd_lwork",\
capi_kwlist,&m_capi,&n_capi,&compute_uv_capi,&full_matrices_capi))
return NULL;
/*frompyobj*/
/* Processing variable compute_uv */
if (compute_uv_capi == Py_None) compute_uv = 1; else
f2py_success = int_from_pyobj(&compute_uv,compute_uv_capi,"_flapack.cgesvd_lwork() 1st keyword (compute_uv) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(compute_uv==0||compute_uv==1,"compute_uv==0||compute_uv==1","1st keyword compute_uv","cgesvd_lwork:compute_uv=%d",compute_uv) {
/* Processing variable full_matrices */
if (full_matrices_capi == Py_None) full_matrices = 1; else
f2py_success = int_from_pyobj(&full_matrices,full_matrices_capi,"_flapack.cgesvd_lwork() 2nd keyword (full_matrices) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(full_matrices==0||full_matrices==1,"full_matrices==0||full_matrices==1","2nd keyword full_matrices","cgesvd_lwork:full_matrices=%d",full_matrices) {
/* Processing variable lwork */
lwork = -1;
/* Processing variable a */
/* Processing variable s */
/* Processing variable u */
/* Processing variable vt */
/* Processing variable work */
/* Processing variable rwork */
/* Processing variable info */
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.cgesvd_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.cgesvd_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable u0 */
u0 = (compute_uv?m:1);
/* Processing variable vt0 */
vt0 = (compute_uv?(full_matrices?n:minmn):1);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)((compute_uv?(full_matrices?"A":"S"):"N"),(compute_uv?(full_matrices?"A":"S"):"N"),&m,&n,&a,&m,&s,&u,&u0,&vt,&vt0,&work,&lwork,&rwork,&info) ;
/*(*f2py_func)(&m,&n,&minmn,&u0,&vt0,&a,&compute_uv,&full_matrices,&u,&s,&vt,&work,&rwork,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
work_capi = pyobj_from_complex_float1(work);
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",work_capi,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable vt0 */
/* End of cleaning variable u0 */
/* End of cleaning variable minmn */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/* End of cleaning variable info */
/* End of cleaning variable rwork */
/* End of cleaning variable work */
/* End of cleaning variable vt */
/* End of cleaning variable u */
/* End of cleaning variable s */
/* End of cleaning variable a */
/* End of cleaning variable lwork */
} /*CHECKSCALAR(full_matrices==0||full_matrices==1)*/
} /*if (f2py_success) of full_matrices*/
/* End of cleaning variable full_matrices */
} /*CHECKSCALAR(compute_uv==0||compute_uv==1)*/
} /*if (f2py_success) of compute_uv*/
/* End of cleaning variable compute_uv */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of cgesvd_lwork ****************************/
/******************************** zgesvd_lwork ********************************/
static char doc_f2py_rout__flapack_zgesvd_lwork[] = "\
work,info = zgesvd_lwork(m,n,[compute_uv,full_matrices])\n\nWrapper for ``zgesvd_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"\nOther Parameters\n----------------\n"
"compute_uv : input int, optional\n Default: 1\n"
"full_matrices : input int, optional\n Default: 1\n"
"\nReturns\n-------\n"
"work : complex\n"
"info : int";
/* extern void F_FUNC(zgesvd ,ZGESVD )(char*,char*,F_INT*,F_INT*,complex_double*,F_INT*,double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgesvd_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,char*,F_INT*,F_INT*,complex_double*,F_INT*,double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
int minmn = 0;
int u0 = 0;
int vt0 = 0;
complex_double a;
int compute_uv = 0;
PyObject *compute_uv_capi = Py_None;
int full_matrices = 0;
PyObject *full_matrices_capi = Py_None;
complex_double u;
double s = 0;
complex_double vt;
complex_double work;
PyObject *work_capi = Py_None;
double rwork = 0;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n","compute_uv","full_matrices",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|OO:_flapack.zgesvd_lwork",\
capi_kwlist,&m_capi,&n_capi,&compute_uv_capi,&full_matrices_capi))
return NULL;
/*frompyobj*/
/* Processing variable compute_uv */
if (compute_uv_capi == Py_None) compute_uv = 1; else
f2py_success = int_from_pyobj(&compute_uv,compute_uv_capi,"_flapack.zgesvd_lwork() 1st keyword (compute_uv) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(compute_uv==0||compute_uv==1,"compute_uv==0||compute_uv==1","1st keyword compute_uv","zgesvd_lwork:compute_uv=%d",compute_uv) {
/* Processing variable full_matrices */
if (full_matrices_capi == Py_None) full_matrices = 1; else
f2py_success = int_from_pyobj(&full_matrices,full_matrices_capi,"_flapack.zgesvd_lwork() 2nd keyword (full_matrices) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(full_matrices==0||full_matrices==1,"full_matrices==0||full_matrices==1","2nd keyword full_matrices","zgesvd_lwork:full_matrices=%d",full_matrices) {
/* Processing variable lwork */
lwork = -1;
/* Processing variable a */
/* Processing variable s */
/* Processing variable u */
/* Processing variable vt */
/* Processing variable work */
/* Processing variable rwork */
/* Processing variable info */
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.zgesvd_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.zgesvd_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable u0 */
u0 = (compute_uv?m:1);
/* Processing variable vt0 */
vt0 = (compute_uv?(full_matrices?n:minmn):1);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)((compute_uv?(full_matrices?"A":"S"):"N"),(compute_uv?(full_matrices?"A":"S"):"N"),&m,&n,&a,&m,&s,&u,&u0,&vt,&vt0,&work,&lwork,&rwork,&info) ;
/*(*f2py_func)(&m,&n,&minmn,&u0,&vt0,&a,&compute_uv,&full_matrices,&u,&s,&vt,&work,&rwork,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
work_capi = pyobj_from_complex_double1(work);
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",work_capi,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable vt0 */
/* End of cleaning variable u0 */
/* End of cleaning variable minmn */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/* End of cleaning variable info */
/* End of cleaning variable rwork */
/* End of cleaning variable work */
/* End of cleaning variable vt */
/* End of cleaning variable u */
/* End of cleaning variable s */
/* End of cleaning variable a */
/* End of cleaning variable lwork */
} /*CHECKSCALAR(full_matrices==0||full_matrices==1)*/
} /*if (f2py_success) of full_matrices*/
/* End of cleaning variable full_matrices */
} /*CHECKSCALAR(compute_uv==0||compute_uv==1)*/
} /*if (f2py_success) of compute_uv*/
/* End of cleaning variable compute_uv */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of zgesvd_lwork ****************************/
/*********************************** sgels ***********************************/
static char doc_f2py_rout__flapack_sgels[] = "\
lqr,x,info = sgels(a,b,[trans,lwork,overwrite_a,overwrite_b])\n\nWrapper for ``sgels``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('f') with bounds (m,n)\n"
"b : input rank-2 array('f') with bounds (MAX(m,n),nrhs)\n"
"\nOther Parameters\n----------------\n"
"trans : input string(len=1), optional\n Default: 'N'\n"
"overwrite_a : input int, optional\n Default: 0\n"
"overwrite_b : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: MAX(MIN(m,n)+MAX(MIN(m,n),nrhs),1)\n"
"\nReturns\n-------\n"
"lqr : rank-2 array('f') with bounds (m,n) and a storage\n"
"x : rank-2 array('f') with bounds (MAX(m,n),nrhs) and b storage\n"
"info : int";
/* extern void F_FUNC(sgels,SGELS)(char*,F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgels(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
string trans = NULL;
int slen(trans);
PyObject *trans_capi = Py_None;
int m = 0;
int n = 0;
int nrhs = 0;
float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int lda = 0;
float *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
int ldb = 0;
float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","b","trans","lwork","overwrite_a","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|OOii:_flapack.sgels",\
capi_kwlist,&a_capi,&b_capi,&trans_capi,&lwork_capi,&capi_overwrite_a,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.sgels to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (float *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable lda */
lda = MAX(1,shape(a,0));
/* Processing variable trans */
slen(trans) = 1;
f2py_success = string_from_pyobj(&trans,&slen(trans),"N",trans_capi,"string_from_pyobj failed in converting 1st keyword`trans' of _flapack.sgels to C string");
if (f2py_success) {
STRINGPADN(trans, slen(trans), '\0', ' ');
CHECKSTRING(*trans=='N'||*trans=='T',"*trans=='N'||*trans=='T'","1st keyword trans","sgels:slen(trans)=%d trans=\"%s\"",trans) {
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=MAX(m,n);
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_FLOAT,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `b' of _flapack.sgels to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (float *)(PyArray_DATA(capi_b_tmp));
CHECKARRAY(shape(b,0)==MAX(m,n),"shape(b,0)==MAX(m,n)","2nd argument b") {
/* Processing variable ldb */
ldb = MAX(1,MAX(m,n));
/* Processing variable nrhs */
nrhs = shape(b,1);
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = MAX(MIN(m,n)+MAX(MIN(m,n),nrhs),1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.sgels() 2nd keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=1||lwork==-1,"lwork>=1||lwork==-1","2nd keyword lwork","sgels:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=MAX(1,lwork);
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_FLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.sgels to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (float *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(trans,&m,&n,&nrhs,a,&lda,b,&ldb,work,&lwork,&info) ;
/*(*f2py_func)(trans,&m,&n,&nrhs,a,&lda,b,&ldb,work,&lwork,&info,slen(trans));*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNi",capi_a_tmp,capi_b_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=1||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable nrhs */
/* End of cleaning variable ldb */
} /*CHECKARRAY(shape(b,0)==MAX(m,n))*/
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
} /*CHECKSTRING(*trans=='N'||*trans=='T')*/
STRINGFREE(trans);
} /*if (f2py_success) of trans*/
/* End of cleaning variable trans */
/* End of cleaning variable lda */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************** end of sgels ********************************/
/*********************************** dgels ***********************************/
static char doc_f2py_rout__flapack_dgels[] = "\
lqr,x,info = dgels(a,b,[trans,lwork,overwrite_a,overwrite_b])\n\nWrapper for ``dgels``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('d') with bounds (m,n)\n"
"b : input rank-2 array('d') with bounds (MAX(m,n),nrhs)\n"
"\nOther Parameters\n----------------\n"
"trans : input string(len=1), optional\n Default: 'N'\n"
"overwrite_a : input int, optional\n Default: 0\n"
"overwrite_b : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: MAX(MIN(m,n)+MAX(MIN(m,n),nrhs),1)\n"
"\nReturns\n-------\n"
"lqr : rank-2 array('d') with bounds (m,n) and a storage\n"
"x : rank-2 array('d') with bounds (MAX(m,n),nrhs) and b storage\n"
"info : int";
/* extern void F_FUNC(dgels,DGELS)(char*,F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgels(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
string trans = NULL;
int slen(trans);
PyObject *trans_capi = Py_None;
int m = 0;
int n = 0;
int nrhs = 0;
double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int lda = 0;
double *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
int ldb = 0;
double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","b","trans","lwork","overwrite_a","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|OOii:_flapack.dgels",\
capi_kwlist,&a_capi,&b_capi,&trans_capi,&lwork_capi,&capi_overwrite_a,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.dgels to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (double *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable lda */
lda = MAX(1,shape(a,0));
/* Processing variable trans */
slen(trans) = 1;
f2py_success = string_from_pyobj(&trans,&slen(trans),"N",trans_capi,"string_from_pyobj failed in converting 1st keyword`trans' of _flapack.dgels to C string");
if (f2py_success) {
STRINGPADN(trans, slen(trans), '\0', ' ');
CHECKSTRING(*trans=='N'||*trans=='T',"*trans=='N'||*trans=='T'","1st keyword trans","dgels:slen(trans)=%d trans=\"%s\"",trans) {
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=MAX(m,n);
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_DOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `b' of _flapack.dgels to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (double *)(PyArray_DATA(capi_b_tmp));
CHECKARRAY(shape(b,0)==MAX(m,n),"shape(b,0)==MAX(m,n)","2nd argument b") {
/* Processing variable ldb */
ldb = MAX(1,MAX(m,n));
/* Processing variable nrhs */
nrhs = shape(b,1);
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = MAX(MIN(m,n)+MAX(MIN(m,n),nrhs),1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.dgels() 2nd keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=1||lwork==-1,"lwork>=1||lwork==-1","2nd keyword lwork","dgels:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=MAX(1,lwork);
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_DOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.dgels to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (double *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(trans,&m,&n,&nrhs,a,&lda,b,&ldb,work,&lwork,&info) ;
/*(*f2py_func)(trans,&m,&n,&nrhs,a,&lda,b,&ldb,work,&lwork,&info,slen(trans));*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNi",capi_a_tmp,capi_b_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=1||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable nrhs */
/* End of cleaning variable ldb */
} /*CHECKARRAY(shape(b,0)==MAX(m,n))*/
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
} /*CHECKSTRING(*trans=='N'||*trans=='T')*/
STRINGFREE(trans);
} /*if (f2py_success) of trans*/
/* End of cleaning variable trans */
/* End of cleaning variable lda */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************** end of dgels ********************************/
/*********************************** cgels ***********************************/
static char doc_f2py_rout__flapack_cgels[] = "\
lqr,x,info = cgels(a,b,[trans,lwork,overwrite_a,overwrite_b])\n\nWrapper for ``cgels``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('F') with bounds (m,n)\n"
"b : input rank-2 array('F') with bounds (MAX(m,n),nrhs)\n"
"\nOther Parameters\n----------------\n"
"trans : input string(len=1), optional\n Default: 'N'\n"
"overwrite_a : input int, optional\n Default: 0\n"
"overwrite_b : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: MAX(MIN(m,n)+MAX(MIN(m,n),nrhs),1)\n"
"\nReturns\n-------\n"
"lqr : rank-2 array('F') with bounds (m,n) and a storage\n"
"x : rank-2 array('F') with bounds (MAX(m,n),nrhs) and b storage\n"
"info : int";
/* extern void F_FUNC(cgels,CGELS)(char*,F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgels(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
string trans = NULL;
int slen(trans);
PyObject *trans_capi = Py_None;
int m = 0;
int n = 0;
int nrhs = 0;
complex_float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int lda = 0;
complex_float *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
int ldb = 0;
complex_float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","b","trans","lwork","overwrite_a","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|OOii:_flapack.cgels",\
capi_kwlist,&a_capi,&b_capi,&trans_capi,&lwork_capi,&capi_overwrite_a,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.cgels to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_float *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable lda */
lda = MAX(1,shape(a,0));
/* Processing variable trans */
slen(trans) = 1;
f2py_success = string_from_pyobj(&trans,&slen(trans),"N",trans_capi,"string_from_pyobj failed in converting 1st keyword`trans' of _flapack.cgels to C string");
if (f2py_success) {
STRINGPADN(trans, slen(trans), '\0', ' ');
CHECKSTRING(*trans=='N'||*trans=='C',"*trans=='N'||*trans=='C'","1st keyword trans","cgels:slen(trans)=%d trans=\"%s\"",trans) {
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=MAX(m,n);
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_CFLOAT,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `b' of _flapack.cgels to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (complex_float *)(PyArray_DATA(capi_b_tmp));
CHECKARRAY(shape(b,0)==MAX(m,n),"shape(b,0)==MAX(m,n)","2nd argument b") {
/* Processing variable ldb */
ldb = MAX(1,MAX(m,n));
/* Processing variable nrhs */
nrhs = shape(b,1);
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = MAX(MIN(m,n)+MAX(MIN(m,n),nrhs),1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.cgels() 2nd keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=1||lwork==-1,"lwork>=1||lwork==-1","2nd keyword lwork","cgels:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=MAX(1,lwork);
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_CFLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.cgels to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_float *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(trans,&m,&n,&nrhs,a,&lda,b,&ldb,work,&lwork,&info) ;
/*(*f2py_func)(trans,&m,&n,&nrhs,a,&lda,b,&ldb,work,&lwork,&info,slen(trans));*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNi",capi_a_tmp,capi_b_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=1||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable nrhs */
/* End of cleaning variable ldb */
} /*CHECKARRAY(shape(b,0)==MAX(m,n))*/
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
} /*CHECKSTRING(*trans=='N'||*trans=='C')*/
STRINGFREE(trans);
} /*if (f2py_success) of trans*/
/* End of cleaning variable trans */
/* End of cleaning variable lda */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************** end of cgels ********************************/
/*********************************** zgels ***********************************/
static char doc_f2py_rout__flapack_zgels[] = "\
lqr,x,info = zgels(a,b,[trans,lwork,overwrite_a,overwrite_b])\n\nWrapper for ``zgels``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('D') with bounds (m,n)\n"
"b : input rank-2 array('D') with bounds (MAX(m,n),nrhs)\n"
"\nOther Parameters\n----------------\n"
"trans : input string(len=1), optional\n Default: 'N'\n"
"overwrite_a : input int, optional\n Default: 0\n"
"overwrite_b : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: MAX(MIN(m,n)+MAX(MIN(m,n),nrhs),1)\n"
"\nReturns\n-------\n"
"lqr : rank-2 array('D') with bounds (m,n) and a storage\n"
"x : rank-2 array('D') with bounds (MAX(m,n),nrhs) and b storage\n"
"info : int";
/* extern void F_FUNC(zgels,ZGELS)(char*,F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgels(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
string trans = NULL;
int slen(trans);
PyObject *trans_capi = Py_None;
int m = 0;
int n = 0;
int nrhs = 0;
complex_double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int lda = 0;
complex_double *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
int ldb = 0;
complex_double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","b","trans","lwork","overwrite_a","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|OOii:_flapack.zgels",\
capi_kwlist,&a_capi,&b_capi,&trans_capi,&lwork_capi,&capi_overwrite_a,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.zgels to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_double *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable lda */
lda = MAX(1,shape(a,0));
/* Processing variable trans */
slen(trans) = 1;
f2py_success = string_from_pyobj(&trans,&slen(trans),"N",trans_capi,"string_from_pyobj failed in converting 1st keyword`trans' of _flapack.zgels to C string");
if (f2py_success) {
STRINGPADN(trans, slen(trans), '\0', ' ');
CHECKSTRING(*trans=='N'||*trans=='C',"*trans=='N'||*trans=='C'","1st keyword trans","zgels:slen(trans)=%d trans=\"%s\"",trans) {
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=MAX(m,n);
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_CDOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `b' of _flapack.zgels to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (complex_double *)(PyArray_DATA(capi_b_tmp));
CHECKARRAY(shape(b,0)==MAX(m,n),"shape(b,0)==MAX(m,n)","2nd argument b") {
/* Processing variable ldb */
ldb = MAX(1,MAX(m,n));
/* Processing variable nrhs */
nrhs = shape(b,1);
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = MAX(MIN(m,n)+MAX(MIN(m,n),nrhs),1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.zgels() 2nd keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=1||lwork==-1,"lwork>=1||lwork==-1","2nd keyword lwork","zgels:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=MAX(1,lwork);
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_CDOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.zgels to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_double *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(trans,&m,&n,&nrhs,a,&lda,b,&ldb,work,&lwork,&info) ;
/*(*f2py_func)(trans,&m,&n,&nrhs,a,&lda,b,&ldb,work,&lwork,&info,slen(trans));*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNi",capi_a_tmp,capi_b_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=1||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable nrhs */
/* End of cleaning variable ldb */
} /*CHECKARRAY(shape(b,0)==MAX(m,n))*/
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
} /*CHECKSTRING(*trans=='N'||*trans=='C')*/
STRINGFREE(trans);
} /*if (f2py_success) of trans*/
/* End of cleaning variable trans */
/* End of cleaning variable lda */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************** end of zgels ********************************/
/******************************** sgels_lwork ********************************/
static char doc_f2py_rout__flapack_sgels_lwork[] = "\
work,info = sgels_lwork(m,n,nrhs,[trans])\n\nWrapper for ``sgels_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"nrhs : input int\n"
"\nOther Parameters\n----------------\n"
"trans : input string(len=1), optional\n Default: 'N'\n"
"\nReturns\n-------\n"
"work : float\n"
"info : int";
/* extern void F_FUNC(sgels ,SGELS )(char*,F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgels_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
string trans = NULL;
int slen(trans);
PyObject *trans_capi = Py_None;
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
int nrhs = 0;
PyObject *nrhs_capi = Py_None;
float a = 0;
int lda = 0;
float b = 0;
int ldb = 0;
float work = 0;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n","nrhs","trans",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOO|O:_flapack.sgels_lwork",\
capi_kwlist,&m_capi,&n_capi,&nrhs_capi,&trans_capi))
return NULL;
/*frompyobj*/
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.sgels_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(m>=0,"m>=0","1st argument m","sgels_lwork:m=%d",m) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.sgels_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(n>=0,"n>=0","2nd argument n","sgels_lwork:n=%d",n) {
/* Processing variable nrhs */
f2py_success = int_from_pyobj(&nrhs,nrhs_capi,"_flapack.sgels_lwork() 3rd argument (nrhs) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(nrhs>=0,"nrhs>=0","3rd argument nrhs","sgels_lwork:nrhs=%d",nrhs) {
/* Processing variable a */
/* Processing variable b */
/* Processing variable lwork */
lwork = -1;
/* Processing variable work */
/* Processing variable info */
/* Processing variable trans */
slen(trans) = 1;
f2py_success = string_from_pyobj(&trans,&slen(trans),"N",trans_capi,"string_from_pyobj failed in converting 1st keyword`trans' of _flapack.sgels_lwork to C string");
if (f2py_success) {
STRINGPADN(trans, slen(trans), '\0', ' ');
CHECKSTRING(*trans=='N'||*trans=='T',"*trans=='N'||*trans=='T'","1st keyword trans","sgels_lwork:slen(trans)=%d trans=\"%s\"",trans) {
/* Processing variable lda */
lda = MAX(1,m);
/* Processing variable ldb */
ldb = MAX(1,MAX(m,n));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(trans,&m,&n,&nrhs,&a,&lda,&b,&ldb,&work,&lwork,&info) ;
/*(*f2py_func)(trans,&m,&n,&nrhs,&a,&lda,&b,&ldb,&work,&lwork,&info,slen(trans));*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("fi",work,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable ldb */
/* End of cleaning variable lda */
} /*CHECKSTRING(*trans=='N'||*trans=='T')*/
STRINGFREE(trans);
} /*if (f2py_success) of trans*/
/* End of cleaning variable trans */
/* End of cleaning variable info */
/* End of cleaning variable work */
/* End of cleaning variable lwork */
/* End of cleaning variable b */
/* End of cleaning variable a */
} /*CHECKSCALAR(nrhs>=0)*/
} /*if (f2py_success) of nrhs*/
/* End of cleaning variable nrhs */
} /*CHECKSCALAR(n>=0)*/
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*CHECKSCALAR(m>=0)*/
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/***************************** end of sgels_lwork *****************************/
/******************************** dgels_lwork ********************************/
static char doc_f2py_rout__flapack_dgels_lwork[] = "\
work,info = dgels_lwork(m,n,nrhs,[trans])\n\nWrapper for ``dgels_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"nrhs : input int\n"
"\nOther Parameters\n----------------\n"
"trans : input string(len=1), optional\n Default: 'N'\n"
"\nReturns\n-------\n"
"work : float\n"
"info : int";
/* extern void F_FUNC(dgels ,DGELS )(char*,F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgels_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
string trans = NULL;
int slen(trans);
PyObject *trans_capi = Py_None;
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
int nrhs = 0;
PyObject *nrhs_capi = Py_None;
double a = 0;
int lda = 0;
double b = 0;
int ldb = 0;
double work = 0;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n","nrhs","trans",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOO|O:_flapack.dgels_lwork",\
capi_kwlist,&m_capi,&n_capi,&nrhs_capi,&trans_capi))
return NULL;
/*frompyobj*/
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.dgels_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(m>=0,"m>=0","1st argument m","dgels_lwork:m=%d",m) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.dgels_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(n>=0,"n>=0","2nd argument n","dgels_lwork:n=%d",n) {
/* Processing variable nrhs */
f2py_success = int_from_pyobj(&nrhs,nrhs_capi,"_flapack.dgels_lwork() 3rd argument (nrhs) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(nrhs>=0,"nrhs>=0","3rd argument nrhs","dgels_lwork:nrhs=%d",nrhs) {
/* Processing variable a */
/* Processing variable b */
/* Processing variable lwork */
lwork = -1;
/* Processing variable work */
/* Processing variable info */
/* Processing variable trans */
slen(trans) = 1;
f2py_success = string_from_pyobj(&trans,&slen(trans),"N",trans_capi,"string_from_pyobj failed in converting 1st keyword`trans' of _flapack.dgels_lwork to C string");
if (f2py_success) {
STRINGPADN(trans, slen(trans), '\0', ' ');
CHECKSTRING(*trans=='N'||*trans=='T',"*trans=='N'||*trans=='T'","1st keyword trans","dgels_lwork:slen(trans)=%d trans=\"%s\"",trans) {
/* Processing variable lda */
lda = MAX(1,m);
/* Processing variable ldb */
ldb = MAX(1,MAX(m,n));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(trans,&m,&n,&nrhs,&a,&lda,&b,&ldb,&work,&lwork,&info) ;
/*(*f2py_func)(trans,&m,&n,&nrhs,&a,&lda,&b,&ldb,&work,&lwork,&info,slen(trans));*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("di",work,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable ldb */
/* End of cleaning variable lda */
} /*CHECKSTRING(*trans=='N'||*trans=='T')*/
STRINGFREE(trans);
} /*if (f2py_success) of trans*/
/* End of cleaning variable trans */
/* End of cleaning variable info */
/* End of cleaning variable work */
/* End of cleaning variable lwork */
/* End of cleaning variable b */
/* End of cleaning variable a */
} /*CHECKSCALAR(nrhs>=0)*/
} /*if (f2py_success) of nrhs*/
/* End of cleaning variable nrhs */
} /*CHECKSCALAR(n>=0)*/
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*CHECKSCALAR(m>=0)*/
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/***************************** end of dgels_lwork *****************************/
/******************************** cgels_lwork ********************************/
static char doc_f2py_rout__flapack_cgels_lwork[] = "\
work,info = cgels_lwork(m,n,nrhs,[trans])\n\nWrapper for ``cgels_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"nrhs : input int\n"
"\nOther Parameters\n----------------\n"
"trans : input string(len=1), optional\n Default: 'N'\n"
"\nReturns\n-------\n"
"work : complex\n"
"info : int";
/* extern void F_FUNC(cgels ,CGELS )(char*,F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgels_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
string trans = NULL;
int slen(trans);
PyObject *trans_capi = Py_None;
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
int nrhs = 0;
PyObject *nrhs_capi = Py_None;
complex_float a;
int lda = 0;
complex_float b;
int ldb = 0;
complex_float work;
PyObject *work_capi = Py_None;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n","nrhs","trans",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOO|O:_flapack.cgels_lwork",\
capi_kwlist,&m_capi,&n_capi,&nrhs_capi,&trans_capi))
return NULL;
/*frompyobj*/
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.cgels_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(m>=0,"m>=0","1st argument m","cgels_lwork:m=%d",m) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.cgels_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(n>=0,"n>=0","2nd argument n","cgels_lwork:n=%d",n) {
/* Processing variable nrhs */
f2py_success = int_from_pyobj(&nrhs,nrhs_capi,"_flapack.cgels_lwork() 3rd argument (nrhs) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(nrhs>=0,"nrhs>=0","3rd argument nrhs","cgels_lwork:nrhs=%d",nrhs) {
/* Processing variable a */
/* Processing variable b */
/* Processing variable lwork */
lwork = -1;
/* Processing variable work */
/* Processing variable info */
/* Processing variable trans */
slen(trans) = 1;
f2py_success = string_from_pyobj(&trans,&slen(trans),"N",trans_capi,"string_from_pyobj failed in converting 1st keyword`trans' of _flapack.cgels_lwork to C string");
if (f2py_success) {
STRINGPADN(trans, slen(trans), '\0', ' ');
CHECKSTRING(*trans=='N'||*trans=='C',"*trans=='N'||*trans=='C'","1st keyword trans","cgels_lwork:slen(trans)=%d trans=\"%s\"",trans) {
/* Processing variable lda */
lda = MAX(1,m);
/* Processing variable ldb */
ldb = MAX(1,MAX(m,n));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(trans,&m,&n,&nrhs,&a,&lda,&b,&ldb,&work,&lwork,&info) ;
/*(*f2py_func)(trans,&m,&n,&nrhs,&a,&lda,&b,&ldb,&work,&lwork,&info,slen(trans));*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
work_capi = pyobj_from_complex_float1(work);
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",work_capi,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable ldb */
/* End of cleaning variable lda */
} /*CHECKSTRING(*trans=='N'||*trans=='C')*/
STRINGFREE(trans);
} /*if (f2py_success) of trans*/
/* End of cleaning variable trans */
/* End of cleaning variable info */
/* End of cleaning variable work */
/* End of cleaning variable lwork */
/* End of cleaning variable b */
/* End of cleaning variable a */
} /*CHECKSCALAR(nrhs>=0)*/
} /*if (f2py_success) of nrhs*/
/* End of cleaning variable nrhs */
} /*CHECKSCALAR(n>=0)*/
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*CHECKSCALAR(m>=0)*/
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/***************************** end of cgels_lwork *****************************/
/******************************** zgels_lwork ********************************/
static char doc_f2py_rout__flapack_zgels_lwork[] = "\
work,info = zgels_lwork(m,n,nrhs,[trans])\n\nWrapper for ``zgels_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"nrhs : input int\n"
"\nOther Parameters\n----------------\n"
"trans : input string(len=1), optional\n Default: 'N'\n"
"\nReturns\n-------\n"
"work : complex\n"
"info : int";
/* extern void F_FUNC(zgels ,ZGELS )(char*,F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgels_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
string trans = NULL;
int slen(trans);
PyObject *trans_capi = Py_None;
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
int nrhs = 0;
PyObject *nrhs_capi = Py_None;
complex_double a;
int lda = 0;
complex_double b;
int ldb = 0;
complex_double work;
PyObject *work_capi = Py_None;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n","nrhs","trans",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOO|O:_flapack.zgels_lwork",\
capi_kwlist,&m_capi,&n_capi,&nrhs_capi,&trans_capi))
return NULL;
/*frompyobj*/
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.zgels_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(m>=0,"m>=0","1st argument m","zgels_lwork:m=%d",m) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.zgels_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(n>=0,"n>=0","2nd argument n","zgels_lwork:n=%d",n) {
/* Processing variable nrhs */
f2py_success = int_from_pyobj(&nrhs,nrhs_capi,"_flapack.zgels_lwork() 3rd argument (nrhs) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(nrhs>=0,"nrhs>=0","3rd argument nrhs","zgels_lwork:nrhs=%d",nrhs) {
/* Processing variable a */
/* Processing variable b */
/* Processing variable lwork */
lwork = -1;
/* Processing variable work */
/* Processing variable info */
/* Processing variable trans */
slen(trans) = 1;
f2py_success = string_from_pyobj(&trans,&slen(trans),"N",trans_capi,"string_from_pyobj failed in converting 1st keyword`trans' of _flapack.zgels_lwork to C string");
if (f2py_success) {
STRINGPADN(trans, slen(trans), '\0', ' ');
CHECKSTRING(*trans=='N'||*trans=='C',"*trans=='N'||*trans=='C'","1st keyword trans","zgels_lwork:slen(trans)=%d trans=\"%s\"",trans) {
/* Processing variable lda */
lda = MAX(1,m);
/* Processing variable ldb */
ldb = MAX(1,MAX(m,n));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(trans,&m,&n,&nrhs,&a,&lda,&b,&ldb,&work,&lwork,&info) ;
/*(*f2py_func)(trans,&m,&n,&nrhs,&a,&lda,&b,&ldb,&work,&lwork,&info,slen(trans));*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
work_capi = pyobj_from_complex_double1(work);
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",work_capi,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable ldb */
/* End of cleaning variable lda */
} /*CHECKSTRING(*trans=='N'||*trans=='C')*/
STRINGFREE(trans);
} /*if (f2py_success) of trans*/
/* End of cleaning variable trans */
/* End of cleaning variable info */
/* End of cleaning variable work */
/* End of cleaning variable lwork */
/* End of cleaning variable b */
/* End of cleaning variable a */
} /*CHECKSCALAR(nrhs>=0)*/
} /*if (f2py_success) of nrhs*/
/* End of cleaning variable nrhs */
} /*CHECKSCALAR(n>=0)*/
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*CHECKSCALAR(m>=0)*/
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/***************************** end of zgels_lwork *****************************/
/*********************************** sgelss ***********************************/
static char doc_f2py_rout__flapack_sgelss[] = "\
v,x,s,rank,work,info = sgelss(a,b,[cond,lwork,overwrite_a,overwrite_b])\n\nWrapper for ``sgelss``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('f') with bounds (m,n)\n"
"b : input rank-2 array('f') with bounds (maxmn,nrhs)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"overwrite_b : input int, optional\n Default: 0\n"
"cond : input float, optional\n Default: -1.0\n"
"lwork : input int, optional\n Default: max(3*minmn+MAX(2*minmn,MAX(maxmn,nrhs)),1)\n"
"\nReturns\n-------\n"
"v : rank-2 array('f') with bounds (m,n) and a storage\n"
"x : rank-2 array('f') with bounds (maxmn,nrhs) and b storage\n"
"s : rank-1 array('f') with bounds (minmn)\n"
"rank : int\n"
"work : rank-1 array('f') with bounds (MAX(lwork,1))\n"
"info : int";
/* extern void F_FUNC(sgelss,SGELSS)(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgelss(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
int minmn = 0;
int maxmn = 0;
int nrhs = 0;
float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
float *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
float *s = NULL;
npy_intp s_Dims[1] = {-1};
const int s_Rank = 1;
PyArrayObject *capi_s_tmp = NULL;
int capi_s_intent = 0;
float cond = 0;
PyObject *cond_capi = Py_None;
int r = 0;
float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","b","cond","lwork","overwrite_a","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|OOii:_flapack.sgelss",\
capi_kwlist,&a_capi,&b_capi,&cond_capi,&lwork_capi,&capi_overwrite_a,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.sgelss to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (float *)(PyArray_DATA(capi_a_tmp));
/* Processing variable cond */
if (cond_capi == Py_None) cond = -1.0; else
f2py_success = float_from_pyobj(&cond,cond_capi,"_flapack.sgelss() 1st keyword (cond) can't be converted to float");
if (f2py_success) {
/* Processing variable r */
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable maxmn */
maxmn = MAX(m,n);
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=maxmn;
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_FLOAT,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `b' of _flapack.sgelss to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (float *)(PyArray_DATA(capi_b_tmp));
CHECKARRAY(maxmn==shape(b,0),"maxmn==shape(b,0)","2nd argument b") {
/* Processing variable s */
s_Dims[0]=minmn;
capi_s_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_s_tmp = array_from_pyobj(NPY_FLOAT,s_Dims,s_Rank,capi_s_intent,Py_None);
if (capi_s_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `s' of _flapack.sgelss to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
s = (float *)(PyArray_DATA(capi_s_tmp));
/* Processing variable nrhs */
nrhs = shape(b,1);
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max(3*minmn+MAX(2*minmn,MAX(maxmn,nrhs)),1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.sgelss() 2nd keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=1||lwork==-1,"lwork>=1||lwork==-1","2nd keyword lwork","sgelss:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=MAX(lwork,1);
capi_work_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_work_tmp = array_from_pyobj(NPY_FLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.sgelss to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (float *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&nrhs,a,&m,b,&maxmn,s,&cond,&r,work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,&minmn,&maxmn,&nrhs,a,b,s,&cond,&r,work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNiNi",capi_a_tmp,capi_b_tmp,capi_s_tmp,r,capi_work_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=1||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable nrhs */
} /*if (capi_s_tmp == NULL) ... else of s*/
/* End of cleaning variable s */
} /*CHECKARRAY(maxmn==shape(b,0))*/
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
/* End of cleaning variable maxmn */
/* End of cleaning variable minmn */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
/* End of cleaning variable r */
} /*if (f2py_success) of cond*/
/* End of cleaning variable cond */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of sgelss *******************************/
/*********************************** dgelss ***********************************/
static char doc_f2py_rout__flapack_dgelss[] = "\
v,x,s,rank,work,info = dgelss(a,b,[cond,lwork,overwrite_a,overwrite_b])\n\nWrapper for ``dgelss``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('d') with bounds (m,n)\n"
"b : input rank-2 array('d') with bounds (maxmn,nrhs)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"overwrite_b : input int, optional\n Default: 0\n"
"cond : input float, optional\n Default: -1.0\n"
"lwork : input int, optional\n Default: max(3*minmn+MAX(2*minmn,MAX(maxmn,nrhs)),1)\n"
"\nReturns\n-------\n"
"v : rank-2 array('d') with bounds (m,n) and a storage\n"
"x : rank-2 array('d') with bounds (maxmn,nrhs) and b storage\n"
"s : rank-1 array('d') with bounds (minmn)\n"
"rank : int\n"
"work : rank-1 array('d') with bounds (MAX(lwork,1))\n"
"info : int";
/* extern void F_FUNC(dgelss,DGELSS)(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgelss(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
int minmn = 0;
int maxmn = 0;
int nrhs = 0;
double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
double *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
double *s = NULL;
npy_intp s_Dims[1] = {-1};
const int s_Rank = 1;
PyArrayObject *capi_s_tmp = NULL;
int capi_s_intent = 0;
double cond = 0;
PyObject *cond_capi = Py_None;
int r = 0;
double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","b","cond","lwork","overwrite_a","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|OOii:_flapack.dgelss",\
capi_kwlist,&a_capi,&b_capi,&cond_capi,&lwork_capi,&capi_overwrite_a,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.dgelss to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (double *)(PyArray_DATA(capi_a_tmp));
/* Processing variable cond */
if (cond_capi == Py_None) cond = -1.0; else
f2py_success = double_from_pyobj(&cond,cond_capi,"_flapack.dgelss() 1st keyword (cond) can't be converted to double");
if (f2py_success) {
/* Processing variable r */
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable maxmn */
maxmn = MAX(m,n);
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=maxmn;
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_DOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `b' of _flapack.dgelss to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (double *)(PyArray_DATA(capi_b_tmp));
CHECKARRAY(maxmn==shape(b,0),"maxmn==shape(b,0)","2nd argument b") {
/* Processing variable s */
s_Dims[0]=minmn;
capi_s_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_s_tmp = array_from_pyobj(NPY_DOUBLE,s_Dims,s_Rank,capi_s_intent,Py_None);
if (capi_s_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `s' of _flapack.dgelss to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
s = (double *)(PyArray_DATA(capi_s_tmp));
/* Processing variable nrhs */
nrhs = shape(b,1);
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max(3*minmn+MAX(2*minmn,MAX(maxmn,nrhs)),1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.dgelss() 2nd keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=1||lwork==-1,"lwork>=1||lwork==-1","2nd keyword lwork","dgelss:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=MAX(lwork,1);
capi_work_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_work_tmp = array_from_pyobj(NPY_DOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.dgelss to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (double *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&nrhs,a,&m,b,&maxmn,s,&cond,&r,work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,&minmn,&maxmn,&nrhs,a,b,s,&cond,&r,work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNiNi",capi_a_tmp,capi_b_tmp,capi_s_tmp,r,capi_work_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=1||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable nrhs */
} /*if (capi_s_tmp == NULL) ... else of s*/
/* End of cleaning variable s */
} /*CHECKARRAY(maxmn==shape(b,0))*/
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
/* End of cleaning variable maxmn */
/* End of cleaning variable minmn */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
/* End of cleaning variable r */
} /*if (f2py_success) of cond*/
/* End of cleaning variable cond */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of dgelss *******************************/
/******************************** sgelss_lwork ********************************/
static char doc_f2py_rout__flapack_sgelss_lwork[] = "\
work,info = sgelss_lwork(m,n,nrhs,[cond,lwork])\n\nWrapper for ``sgelss_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"nrhs : input int\n"
"\nOther Parameters\n----------------\n"
"cond : input float, optional\n Default: -1.0\n"
"lwork : input int, optional\n Default: -1\n"
"\nReturns\n-------\n"
"work : float\n"
"info : int";
/* extern void F_FUNC(sgelss ,SGELSS )(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgelss_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
int maxmn = 0;
int nrhs = 0;
PyObject *nrhs_capi = Py_None;
float a = 0;
float b = 0;
float s = 0;
float cond = 0;
PyObject *cond_capi = Py_None;
int r = 0;
float work = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"m","n","nrhs","cond","lwork",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOO|OO:_flapack.sgelss_lwork",\
capi_kwlist,&m_capi,&n_capi,&nrhs_capi,&cond_capi,&lwork_capi))
return NULL;
/*frompyobj*/
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.sgelss_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.sgelss_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable a */
/* Processing variable nrhs */
f2py_success = int_from_pyobj(&nrhs,nrhs_capi,"_flapack.sgelss_lwork() 3rd argument (nrhs) can't be converted to int");
if (f2py_success) {
/* Processing variable b */
/* Processing variable cond */
if (cond_capi == Py_None) cond = -1.0; else
f2py_success = float_from_pyobj(&cond,cond_capi,"_flapack.sgelss_lwork() 1st keyword (cond) can't be converted to float");
if (f2py_success) {
/* Processing variable r */
/* Processing variable s */
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = -1; else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.sgelss_lwork() 2nd keyword (lwork) can't be converted to int");
if (f2py_success) {
/* Processing variable work */
/* Processing variable info */
/* Processing variable maxmn */
maxmn = MAX(m,n);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&nrhs,&a,&m,&b,&maxmn,&s,&cond,&r,&work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,&maxmn,&nrhs,&a,&b,&s,&cond,&r,&work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("fi",work,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable maxmn */
/* End of cleaning variable info */
/* End of cleaning variable work */
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable s */
/* End of cleaning variable r */
} /*if (f2py_success) of cond*/
/* End of cleaning variable cond */
/* End of cleaning variable b */
} /*if (f2py_success) of nrhs*/
/* End of cleaning variable nrhs */
/* End of cleaning variable a */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of sgelss_lwork ****************************/
/******************************** dgelss_lwork ********************************/
static char doc_f2py_rout__flapack_dgelss_lwork[] = "\
work,info = dgelss_lwork(m,n,nrhs,[cond,lwork])\n\nWrapper for ``dgelss_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"nrhs : input int\n"
"\nOther Parameters\n----------------\n"
"cond : input float, optional\n Default: -1.0\n"
"lwork : input int, optional\n Default: -1\n"
"\nReturns\n-------\n"
"work : float\n"
"info : int";
/* extern void F_FUNC(dgelss ,DGELSS )(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgelss_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
int maxmn = 0;
int nrhs = 0;
PyObject *nrhs_capi = Py_None;
double a = 0;
double b = 0;
double s = 0;
double cond = 0;
PyObject *cond_capi = Py_None;
int r = 0;
double work = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"m","n","nrhs","cond","lwork",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOO|OO:_flapack.dgelss_lwork",\
capi_kwlist,&m_capi,&n_capi,&nrhs_capi,&cond_capi,&lwork_capi))
return NULL;
/*frompyobj*/
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.dgelss_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.dgelss_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable a */
/* Processing variable nrhs */
f2py_success = int_from_pyobj(&nrhs,nrhs_capi,"_flapack.dgelss_lwork() 3rd argument (nrhs) can't be converted to int");
if (f2py_success) {
/* Processing variable b */
/* Processing variable cond */
if (cond_capi == Py_None) cond = -1.0; else
f2py_success = double_from_pyobj(&cond,cond_capi,"_flapack.dgelss_lwork() 1st keyword (cond) can't be converted to double");
if (f2py_success) {
/* Processing variable r */
/* Processing variable s */
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = -1; else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.dgelss_lwork() 2nd keyword (lwork) can't be converted to int");
if (f2py_success) {
/* Processing variable work */
/* Processing variable info */
/* Processing variable maxmn */
maxmn = MAX(m,n);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&nrhs,&a,&m,&b,&maxmn,&s,&cond,&r,&work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,&maxmn,&nrhs,&a,&b,&s,&cond,&r,&work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("di",work,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable maxmn */
/* End of cleaning variable info */
/* End of cleaning variable work */
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable s */
/* End of cleaning variable r */
} /*if (f2py_success) of cond*/
/* End of cleaning variable cond */
/* End of cleaning variable b */
} /*if (f2py_success) of nrhs*/
/* End of cleaning variable nrhs */
/* End of cleaning variable a */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of dgelss_lwork ****************************/
/*********************************** cgelss ***********************************/
static char doc_f2py_rout__flapack_cgelss[] = "\
v,x,s,rank,work,info = cgelss(a,b,[cond,lwork,overwrite_a,overwrite_b])\n\nWrapper for ``cgelss``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('F') with bounds (m,n)\n"
"b : input rank-2 array('F') with bounds (maxmn,nrhs)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"overwrite_b : input int, optional\n Default: 0\n"
"cond : input float, optional\n Default: -1.0\n"
"lwork : input int, optional\n Default: max(2*minmn+MAX(maxmn,nrhs),1)\n"
"\nReturns\n-------\n"
"v : rank-2 array('F') with bounds (m,n) and a storage\n"
"x : rank-2 array('F') with bounds (maxmn,nrhs) and b storage\n"
"s : rank-1 array('f') with bounds (minmn)\n"
"rank : int\n"
"work : rank-1 array('F') with bounds (MAX(lwork,1))\n"
"info : int";
/* extern void F_FUNC(cgelss,CGELSS)(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float*,F_INT*,complex_float*,F_INT*,float*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgelss(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float*,F_INT*,complex_float*,F_INT*,float*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
int minmn = 0;
int maxmn = 0;
int nrhs = 0;
complex_float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
complex_float *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
float *s = NULL;
npy_intp s_Dims[1] = {-1};
const int s_Rank = 1;
PyArrayObject *capi_s_tmp = NULL;
int capi_s_intent = 0;
float cond = 0;
PyObject *cond_capi = Py_None;
int r = 0;
complex_float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
float *rwork = NULL;
npy_intp rwork_Dims[1] = {-1};
const int rwork_Rank = 1;
PyArrayObject *capi_rwork_tmp = NULL;
int capi_rwork_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","b","cond","lwork","overwrite_a","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|OOii:_flapack.cgelss",\
capi_kwlist,&a_capi,&b_capi,&cond_capi,&lwork_capi,&capi_overwrite_a,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.cgelss to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_float *)(PyArray_DATA(capi_a_tmp));
/* Processing variable cond */
if (cond_capi == Py_None) cond = -1.0; else
f2py_success = float_from_pyobj(&cond,cond_capi,"_flapack.cgelss() 1st keyword (cond) can't be converted to float");
if (f2py_success) {
/* Processing variable r */
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable maxmn */
maxmn = MAX(m,n);
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=maxmn;
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_CFLOAT,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `b' of _flapack.cgelss to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (complex_float *)(PyArray_DATA(capi_b_tmp));
CHECKARRAY(maxmn==shape(b,0),"maxmn==shape(b,0)","2nd argument b") {
/* Processing variable s */
s_Dims[0]=minmn;
capi_s_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_s_tmp = array_from_pyobj(NPY_FLOAT,s_Dims,s_Rank,capi_s_intent,Py_None);
if (capi_s_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `s' of _flapack.cgelss to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
s = (float *)(PyArray_DATA(capi_s_tmp));
/* Processing variable nrhs */
nrhs = shape(b,1);
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max(2*minmn+MAX(maxmn,nrhs),1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.cgelss() 2nd keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=1||lwork==-1,"lwork>=1||lwork==-1","2nd keyword lwork","cgelss:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=MAX(lwork,1);
capi_work_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_work_tmp = array_from_pyobj(NPY_CFLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.cgelss to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_float *)(PyArray_DATA(capi_work_tmp));
/* Processing variable rwork */
rwork_Dims[0]=5 * minmn;
capi_rwork_intent |= F2PY_INTENT_HIDE;
capi_rwork_tmp = array_from_pyobj(NPY_FLOAT,rwork_Dims,rwork_Rank,capi_rwork_intent,Py_None);
if (capi_rwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `rwork' of _flapack.cgelss to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
rwork = (float *)(PyArray_DATA(capi_rwork_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&nrhs,a,&m,b,&maxmn,s,&cond,&r,work,&lwork,rwork,&info) ;
/*(*f2py_func)(&m,&n,&minmn,&maxmn,&nrhs,a,b,s,&cond,&r,work,rwork,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNiNi",capi_a_tmp,capi_b_tmp,capi_s_tmp,r,capi_work_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_rwork_tmp);
} /*if (capi_rwork_tmp == NULL) ... else of rwork*/
/* End of cleaning variable rwork */
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=1||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable nrhs */
} /*if (capi_s_tmp == NULL) ... else of s*/
/* End of cleaning variable s */
} /*CHECKARRAY(maxmn==shape(b,0))*/
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
/* End of cleaning variable maxmn */
/* End of cleaning variable minmn */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
/* End of cleaning variable r */
} /*if (f2py_success) of cond*/
/* End of cleaning variable cond */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of cgelss *******************************/
/*********************************** zgelss ***********************************/
static char doc_f2py_rout__flapack_zgelss[] = "\
v,x,s,rank,work,info = zgelss(a,b,[cond,lwork,overwrite_a,overwrite_b])\n\nWrapper for ``zgelss``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('D') with bounds (m,n)\n"
"b : input rank-2 array('D') with bounds (maxmn,nrhs)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"overwrite_b : input int, optional\n Default: 0\n"
"cond : input float, optional\n Default: -1.0\n"
"lwork : input int, optional\n Default: max(2*minmn+MAX(maxmn,nrhs),1)\n"
"\nReturns\n-------\n"
"v : rank-2 array('D') with bounds (m,n) and a storage\n"
"x : rank-2 array('D') with bounds (maxmn,nrhs) and b storage\n"
"s : rank-1 array('d') with bounds (minmn)\n"
"rank : int\n"
"work : rank-1 array('D') with bounds (MAX(lwork,1))\n"
"info : int";
/* extern void F_FUNC(zgelss,ZGELSS)(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double*,F_INT*,complex_double*,F_INT*,double*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgelss(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double*,F_INT*,complex_double*,F_INT*,double*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
int minmn = 0;
int maxmn = 0;
int nrhs = 0;
complex_double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
complex_double *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
double *s = NULL;
npy_intp s_Dims[1] = {-1};
const int s_Rank = 1;
PyArrayObject *capi_s_tmp = NULL;
int capi_s_intent = 0;
double cond = 0;
PyObject *cond_capi = Py_None;
int r = 0;
complex_double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
double *rwork = NULL;
npy_intp rwork_Dims[1] = {-1};
const int rwork_Rank = 1;
PyArrayObject *capi_rwork_tmp = NULL;
int capi_rwork_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","b","cond","lwork","overwrite_a","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|OOii:_flapack.zgelss",\
capi_kwlist,&a_capi,&b_capi,&cond_capi,&lwork_capi,&capi_overwrite_a,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.zgelss to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_double *)(PyArray_DATA(capi_a_tmp));
/* Processing variable cond */
if (cond_capi == Py_None) cond = -1.0; else
f2py_success = double_from_pyobj(&cond,cond_capi,"_flapack.zgelss() 1st keyword (cond) can't be converted to double");
if (f2py_success) {
/* Processing variable r */
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable maxmn */
maxmn = MAX(m,n);
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=maxmn;
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_CDOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `b' of _flapack.zgelss to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (complex_double *)(PyArray_DATA(capi_b_tmp));
CHECKARRAY(maxmn==shape(b,0),"maxmn==shape(b,0)","2nd argument b") {
/* Processing variable s */
s_Dims[0]=minmn;
capi_s_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_s_tmp = array_from_pyobj(NPY_DOUBLE,s_Dims,s_Rank,capi_s_intent,Py_None);
if (capi_s_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `s' of _flapack.zgelss to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
s = (double *)(PyArray_DATA(capi_s_tmp));
/* Processing variable nrhs */
nrhs = shape(b,1);
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max(2*minmn+MAX(maxmn,nrhs),1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.zgelss() 2nd keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=1||lwork==-1,"lwork>=1||lwork==-1","2nd keyword lwork","zgelss:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=MAX(lwork,1);
capi_work_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_work_tmp = array_from_pyobj(NPY_CDOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.zgelss to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_double *)(PyArray_DATA(capi_work_tmp));
/* Processing variable rwork */
rwork_Dims[0]=5 * minmn;
capi_rwork_intent |= F2PY_INTENT_HIDE;
capi_rwork_tmp = array_from_pyobj(NPY_DOUBLE,rwork_Dims,rwork_Rank,capi_rwork_intent,Py_None);
if (capi_rwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `rwork' of _flapack.zgelss to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
rwork = (double *)(PyArray_DATA(capi_rwork_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&nrhs,a,&m,b,&maxmn,s,&cond,&r,work,&lwork,rwork,&info) ;
/*(*f2py_func)(&m,&n,&minmn,&maxmn,&nrhs,a,b,s,&cond,&r,work,rwork,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNiNi",capi_a_tmp,capi_b_tmp,capi_s_tmp,r,capi_work_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_rwork_tmp);
} /*if (capi_rwork_tmp == NULL) ... else of rwork*/
/* End of cleaning variable rwork */
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=1||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable nrhs */
} /*if (capi_s_tmp == NULL) ... else of s*/
/* End of cleaning variable s */
} /*CHECKARRAY(maxmn==shape(b,0))*/
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
/* End of cleaning variable maxmn */
/* End of cleaning variable minmn */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
/* End of cleaning variable r */
} /*if (f2py_success) of cond*/
/* End of cleaning variable cond */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of zgelss *******************************/
/******************************** cgelss_lwork ********************************/
static char doc_f2py_rout__flapack_cgelss_lwork[] = "\
work,info = cgelss_lwork(m,n,nrhs,[cond,lwork])\n\nWrapper for ``cgelss_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"nrhs : input int\n"
"\nOther Parameters\n----------------\n"
"cond : input float, optional\n Default: -1.0\n"
"lwork : input int, optional\n Default: -1\n"
"\nReturns\n-------\n"
"work : complex\n"
"info : int";
/* extern void F_FUNC(cgelss ,CGELSS )(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float*,F_INT*,complex_float*,F_INT*,float*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgelss_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float*,F_INT*,complex_float*,F_INT*,float*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
int maxmn = 0;
int nrhs = 0;
PyObject *nrhs_capi = Py_None;
complex_float a;
complex_float b;
float s = 0;
float cond = 0;
PyObject *cond_capi = Py_None;
int r = 0;
complex_float work;
PyObject *work_capi = Py_None;
float rwork = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"m","n","nrhs","cond","lwork",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOO|OO:_flapack.cgelss_lwork",\
capi_kwlist,&m_capi,&n_capi,&nrhs_capi,&cond_capi,&lwork_capi))
return NULL;
/*frompyobj*/
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.cgelss_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.cgelss_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable a */
/* Processing variable nrhs */
f2py_success = int_from_pyobj(&nrhs,nrhs_capi,"_flapack.cgelss_lwork() 3rd argument (nrhs) can't be converted to int");
if (f2py_success) {
/* Processing variable b */
/* Processing variable cond */
if (cond_capi == Py_None) cond = -1.0; else
f2py_success = float_from_pyobj(&cond,cond_capi,"_flapack.cgelss_lwork() 1st keyword (cond) can't be converted to float");
if (f2py_success) {
/* Processing variable r */
/* Processing variable s */
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = -1; else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.cgelss_lwork() 2nd keyword (lwork) can't be converted to int");
if (f2py_success) {
/* Processing variable work */
/* Processing variable rwork */
/* Processing variable info */
/* Processing variable maxmn */
maxmn = MAX(m,n);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&nrhs,&a,&m,&b,&maxmn,&s,&cond,&r,&work,&lwork,&rwork,&info) ;
/*(*f2py_func)(&m,&n,&maxmn,&nrhs,&a,&b,&s,&cond,&r,&work,&rwork,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
work_capi = pyobj_from_complex_float1(work);
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",work_capi,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable maxmn */
/* End of cleaning variable info */
/* End of cleaning variable rwork */
/* End of cleaning variable work */
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable s */
/* End of cleaning variable r */
} /*if (f2py_success) of cond*/
/* End of cleaning variable cond */
/* End of cleaning variable b */
} /*if (f2py_success) of nrhs*/
/* End of cleaning variable nrhs */
/* End of cleaning variable a */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of cgelss_lwork ****************************/
/******************************** zgelss_lwork ********************************/
static char doc_f2py_rout__flapack_zgelss_lwork[] = "\
work,info = zgelss_lwork(m,n,nrhs,[cond,lwork])\n\nWrapper for ``zgelss_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"nrhs : input int\n"
"\nOther Parameters\n----------------\n"
"cond : input float, optional\n Default: -1.0\n"
"lwork : input int, optional\n Default: -1\n"
"\nReturns\n-------\n"
"work : complex\n"
"info : int";
/* extern void F_FUNC(zgelss ,ZGELSS )(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double*,F_INT*,complex_double*,F_INT*,double*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgelss_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double*,F_INT*,complex_double*,F_INT*,double*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
int maxmn = 0;
int nrhs = 0;
PyObject *nrhs_capi = Py_None;
complex_double a;
complex_double b;
double s = 0;
double cond = 0;
PyObject *cond_capi = Py_None;
int r = 0;
complex_double work;
PyObject *work_capi = Py_None;
double rwork = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"m","n","nrhs","cond","lwork",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOO|OO:_flapack.zgelss_lwork",\
capi_kwlist,&m_capi,&n_capi,&nrhs_capi,&cond_capi,&lwork_capi))
return NULL;
/*frompyobj*/
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.zgelss_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.zgelss_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable a */
/* Processing variable nrhs */
f2py_success = int_from_pyobj(&nrhs,nrhs_capi,"_flapack.zgelss_lwork() 3rd argument (nrhs) can't be converted to int");
if (f2py_success) {
/* Processing variable b */
/* Processing variable cond */
if (cond_capi == Py_None) cond = -1.0; else
f2py_success = double_from_pyobj(&cond,cond_capi,"_flapack.zgelss_lwork() 1st keyword (cond) can't be converted to double");
if (f2py_success) {
/* Processing variable r */
/* Processing variable s */
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = -1; else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.zgelss_lwork() 2nd keyword (lwork) can't be converted to int");
if (f2py_success) {
/* Processing variable work */
/* Processing variable rwork */
/* Processing variable info */
/* Processing variable maxmn */
maxmn = MAX(m,n);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&nrhs,&a,&m,&b,&maxmn,&s,&cond,&r,&work,&lwork,&rwork,&info) ;
/*(*f2py_func)(&m,&n,&maxmn,&nrhs,&a,&b,&s,&cond,&r,&work,&rwork,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
work_capi = pyobj_from_complex_double1(work);
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",work_capi,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable maxmn */
/* End of cleaning variable info */
/* End of cleaning variable rwork */
/* End of cleaning variable work */
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable s */
/* End of cleaning variable r */
} /*if (f2py_success) of cond*/
/* End of cleaning variable cond */
/* End of cleaning variable b */
} /*if (f2py_success) of nrhs*/
/* End of cleaning variable nrhs */
/* End of cleaning variable a */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of zgelss_lwork ****************************/
/*********************************** sgelsy ***********************************/
static char doc_f2py_rout__flapack_sgelsy[] = "\
v,x,j,rank,info = sgelsy(a,b,jptv,cond,lwork,[overwrite_a,overwrite_b])\n\nWrapper for ``sgelsy``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('f') with bounds (m,n)\n"
"b : input rank-2 array('f') with bounds (maxmn,nrhs)\n"
"jptv : input rank-1 array('i') with bounds (n)\n"
"cond : input float\n"
"lwork : input int\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"overwrite_b : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"v : rank-2 array('f') with bounds (m,n) and a storage\n"
"x : rank-2 array('f') with bounds (maxmn,nrhs) and b storage\n"
"j : rank-1 array('i') with bounds (n) and jptv storage\n"
"rank : int\n"
"info : int";
/* extern void F_FUNC(sgelsy,SGELSY)(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgelsy(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
int maxmn = 0;
int minmn = 0;
int nrhs = 0;
float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
float *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
int *jptv = NULL;
npy_intp jptv_Dims[1] = {-1};
const int jptv_Rank = 1;
PyArrayObject *capi_jptv_tmp = NULL;
int capi_jptv_intent = 0;
PyObject *jptv_capi = Py_None;
float cond = 0;
PyObject *cond_capi = Py_None;
int r = 0;
float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","b","jptv","cond","lwork","overwrite_a","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOOOO|ii:_flapack.sgelsy",\
capi_kwlist,&a_capi,&b_capi,&jptv_capi,&cond_capi,&lwork_capi,&capi_overwrite_a,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.sgelsy to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (float *)(PyArray_DATA(capi_a_tmp));
/* Processing variable cond */
f2py_success = float_from_pyobj(&cond,cond_capi,"_flapack.sgelsy() 4th argument (cond) can't be converted to float");
if (f2py_success) {
/* Processing variable r */
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable maxmn */
maxmn = MAX(m,n);
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=maxmn;
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_FLOAT,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `b' of _flapack.sgelsy to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (float *)(PyArray_DATA(capi_b_tmp));
CHECKARRAY(maxmn==shape(b,0),"maxmn==shape(b,0)","2nd argument b") {
/* Processing variable jptv */
jptv_Dims[0]=n;
capi_jptv_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_jptv_tmp = array_from_pyobj(NPY_INT,jptv_Dims,jptv_Rank,capi_jptv_intent,jptv_capi);
if (capi_jptv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 3rd argument `jptv' of _flapack.sgelsy to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
jptv = (int *)(PyArray_DATA(capi_jptv_tmp));
/* Processing variable nrhs */
nrhs = shape(b,1);
/* Processing variable lwork */
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.sgelsy() 5th argument (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=MAX(minmn+3*n+1, 2*minmn+nrhs),"lwork>=MAX(minmn+3*n+1, 2*minmn+nrhs)","5th argument lwork","sgelsy:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_FLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.sgelsy to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (float *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&nrhs,a,&m,b,&maxmn,jptv,&cond,&r,work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,&maxmn,&minmn,&nrhs,a,b,jptv,&cond,&r,work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNii",capi_a_tmp,capi_b_tmp,capi_jptv_tmp,r,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=MAX(minmn+3*n+1, 2*minmn+nrhs))*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable nrhs */
} /*if (capi_jptv_tmp == NULL) ... else of jptv*/
/* End of cleaning variable jptv */
} /*CHECKARRAY(maxmn==shape(b,0))*/
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
/* End of cleaning variable minmn */
/* End of cleaning variable maxmn */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
/* End of cleaning variable r */
} /*if (f2py_success) of cond*/
/* End of cleaning variable cond */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of sgelsy *******************************/
/*********************************** dgelsy ***********************************/
static char doc_f2py_rout__flapack_dgelsy[] = "\
v,x,j,rank,info = dgelsy(a,b,jptv,cond,lwork,[overwrite_a,overwrite_b])\n\nWrapper for ``dgelsy``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('d') with bounds (m,n)\n"
"b : input rank-2 array('d') with bounds (maxmn,nrhs)\n"
"jptv : input rank-1 array('i') with bounds (n)\n"
"cond : input float\n"
"lwork : input int\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"overwrite_b : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"v : rank-2 array('d') with bounds (m,n) and a storage\n"
"x : rank-2 array('d') with bounds (maxmn,nrhs) and b storage\n"
"j : rank-1 array('i') with bounds (n) and jptv storage\n"
"rank : int\n"
"info : int";
/* extern void F_FUNC(dgelsy,DGELSY)(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgelsy(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
int maxmn = 0;
int minmn = 0;
int nrhs = 0;
double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
double *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
int *jptv = NULL;
npy_intp jptv_Dims[1] = {-1};
const int jptv_Rank = 1;
PyArrayObject *capi_jptv_tmp = NULL;
int capi_jptv_intent = 0;
PyObject *jptv_capi = Py_None;
double cond = 0;
PyObject *cond_capi = Py_None;
int r = 0;
double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","b","jptv","cond","lwork","overwrite_a","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOOOO|ii:_flapack.dgelsy",\
capi_kwlist,&a_capi,&b_capi,&jptv_capi,&cond_capi,&lwork_capi,&capi_overwrite_a,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.dgelsy to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (double *)(PyArray_DATA(capi_a_tmp));
/* Processing variable cond */
f2py_success = double_from_pyobj(&cond,cond_capi,"_flapack.dgelsy() 4th argument (cond) can't be converted to double");
if (f2py_success) {
/* Processing variable r */
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable maxmn */
maxmn = MAX(m,n);
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=maxmn;
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_DOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `b' of _flapack.dgelsy to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (double *)(PyArray_DATA(capi_b_tmp));
CHECKARRAY(maxmn==shape(b,0),"maxmn==shape(b,0)","2nd argument b") {
/* Processing variable jptv */
jptv_Dims[0]=n;
capi_jptv_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_jptv_tmp = array_from_pyobj(NPY_INT,jptv_Dims,jptv_Rank,capi_jptv_intent,jptv_capi);
if (capi_jptv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 3rd argument `jptv' of _flapack.dgelsy to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
jptv = (int *)(PyArray_DATA(capi_jptv_tmp));
/* Processing variable nrhs */
nrhs = shape(b,1);
/* Processing variable lwork */
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.dgelsy() 5th argument (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=MAX(minmn+3*n+1, 2*minmn+nrhs),"lwork>=MAX(minmn+3*n+1, 2*minmn+nrhs)","5th argument lwork","dgelsy:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_DOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.dgelsy to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (double *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&nrhs,a,&m,b,&maxmn,jptv,&cond,&r,work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,&maxmn,&minmn,&nrhs,a,b,jptv,&cond,&r,work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNii",capi_a_tmp,capi_b_tmp,capi_jptv_tmp,r,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=MAX(minmn+3*n+1, 2*minmn+nrhs))*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable nrhs */
} /*if (capi_jptv_tmp == NULL) ... else of jptv*/
/* End of cleaning variable jptv */
} /*CHECKARRAY(maxmn==shape(b,0))*/
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
/* End of cleaning variable minmn */
/* End of cleaning variable maxmn */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
/* End of cleaning variable r */
} /*if (f2py_success) of cond*/
/* End of cleaning variable cond */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of dgelsy *******************************/
/******************************** sgelsy_lwork ********************************/
static char doc_f2py_rout__flapack_sgelsy_lwork[] = "\
work,info = sgelsy_lwork(m,n,nrhs,cond,[lwork])\n\nWrapper for ``sgelsy_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"nrhs : input int\n"
"cond : input float\n"
"\nOther Parameters\n----------------\n"
"lwork : input int, optional\n Default: -1\n"
"\nReturns\n-------\n"
"work : float\n"
"info : int";
/* extern void F_FUNC(sgelsy ,SGELSY )(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgelsy_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
int maxmn = 0;
int nrhs = 0;
PyObject *nrhs_capi = Py_None;
float a = 0;
float b = 0;
int jptv = 0;
float cond = 0;
PyObject *cond_capi = Py_None;
int r = 0;
float work = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"m","n","nrhs","cond","lwork",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOOO|O:_flapack.sgelsy_lwork",\
capi_kwlist,&m_capi,&n_capi,&nrhs_capi,&cond_capi,&lwork_capi))
return NULL;
/*frompyobj*/
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.sgelsy_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.sgelsy_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable a */
/* Processing variable nrhs */
f2py_success = int_from_pyobj(&nrhs,nrhs_capi,"_flapack.sgelsy_lwork() 3rd argument (nrhs) can't be converted to int");
if (f2py_success) {
/* Processing variable b */
/* Processing variable cond */
f2py_success = float_from_pyobj(&cond,cond_capi,"_flapack.sgelsy_lwork() 4th argument (cond) can't be converted to float");
if (f2py_success) {
/* Processing variable r */
/* Processing variable jptv */
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = -1; else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.sgelsy_lwork() 1st keyword (lwork) can't be converted to int");
if (f2py_success) {
/* Processing variable work */
/* Processing variable info */
/* Processing variable maxmn */
maxmn = MAX(m,n);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&nrhs,&a,&m,&b,&maxmn,&jptv,&cond,&r,&work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,&maxmn,&nrhs,&a,&b,&jptv,&cond,&r,&work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("fi",work,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable maxmn */
/* End of cleaning variable info */
/* End of cleaning variable work */
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable jptv */
/* End of cleaning variable r */
} /*if (f2py_success) of cond*/
/* End of cleaning variable cond */
/* End of cleaning variable b */
} /*if (f2py_success) of nrhs*/
/* End of cleaning variable nrhs */
/* End of cleaning variable a */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of sgelsy_lwork ****************************/
/******************************** dgelsy_lwork ********************************/
static char doc_f2py_rout__flapack_dgelsy_lwork[] = "\
work,info = dgelsy_lwork(m,n,nrhs,cond,[lwork])\n\nWrapper for ``dgelsy_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"nrhs : input int\n"
"cond : input float\n"
"\nOther Parameters\n----------------\n"
"lwork : input int, optional\n Default: -1\n"
"\nReturns\n-------\n"
"work : float\n"
"info : int";
/* extern void F_FUNC(dgelsy ,DGELSY )(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgelsy_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
int maxmn = 0;
int nrhs = 0;
PyObject *nrhs_capi = Py_None;
double a = 0;
double b = 0;
int jptv = 0;
double cond = 0;
PyObject *cond_capi = Py_None;
int r = 0;
double work = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"m","n","nrhs","cond","lwork",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOOO|O:_flapack.dgelsy_lwork",\
capi_kwlist,&m_capi,&n_capi,&nrhs_capi,&cond_capi,&lwork_capi))
return NULL;
/*frompyobj*/
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.dgelsy_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.dgelsy_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable a */
/* Processing variable nrhs */
f2py_success = int_from_pyobj(&nrhs,nrhs_capi,"_flapack.dgelsy_lwork() 3rd argument (nrhs) can't be converted to int");
if (f2py_success) {
/* Processing variable b */
/* Processing variable cond */
f2py_success = double_from_pyobj(&cond,cond_capi,"_flapack.dgelsy_lwork() 4th argument (cond) can't be converted to double");
if (f2py_success) {
/* Processing variable r */
/* Processing variable jptv */
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = -1; else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.dgelsy_lwork() 1st keyword (lwork) can't be converted to int");
if (f2py_success) {
/* Processing variable work */
/* Processing variable info */
/* Processing variable maxmn */
maxmn = MAX(m,n);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&nrhs,&a,&m,&b,&maxmn,&jptv,&cond,&r,&work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,&maxmn,&nrhs,&a,&b,&jptv,&cond,&r,&work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("di",work,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable maxmn */
/* End of cleaning variable info */
/* End of cleaning variable work */
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable jptv */
/* End of cleaning variable r */
} /*if (f2py_success) of cond*/
/* End of cleaning variable cond */
/* End of cleaning variable b */
} /*if (f2py_success) of nrhs*/
/* End of cleaning variable nrhs */
/* End of cleaning variable a */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of dgelsy_lwork ****************************/
/*********************************** cgelsy ***********************************/
static char doc_f2py_rout__flapack_cgelsy[] = "\
v,x,j,rank,info = cgelsy(a,b,jptv,cond,lwork,[overwrite_a,overwrite_b])\n\nWrapper for ``cgelsy``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('F') with bounds (m,n)\n"
"b : input rank-2 array('F') with bounds (maxmn,nrhs)\n"
"jptv : input rank-1 array('i') with bounds (n)\n"
"cond : input float\n"
"lwork : input int\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"overwrite_b : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"v : rank-2 array('F') with bounds (m,n) and a storage\n"
"x : rank-2 array('F') with bounds (maxmn,nrhs) and b storage\n"
"j : rank-1 array('i') with bounds (n) and jptv storage\n"
"rank : int\n"
"info : int";
/* extern void F_FUNC(cgelsy,CGELSY)(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT*,float*,F_INT*,complex_float*,F_INT*,float*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgelsy(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT*,float*,F_INT*,complex_float*,F_INT*,float*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
int maxmn = 0;
int minmn = 0;
int nrhs = 0;
complex_float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
complex_float *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
int *jptv = NULL;
npy_intp jptv_Dims[1] = {-1};
const int jptv_Rank = 1;
PyArrayObject *capi_jptv_tmp = NULL;
int capi_jptv_intent = 0;
PyObject *jptv_capi = Py_None;
float cond = 0;
PyObject *cond_capi = Py_None;
int r = 0;
complex_float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
float *rwork = NULL;
npy_intp rwork_Dims[1] = {-1};
const int rwork_Rank = 1;
PyArrayObject *capi_rwork_tmp = NULL;
int capi_rwork_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","b","jptv","cond","lwork","overwrite_a","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOOOO|ii:_flapack.cgelsy",\
capi_kwlist,&a_capi,&b_capi,&jptv_capi,&cond_capi,&lwork_capi,&capi_overwrite_a,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.cgelsy to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_float *)(PyArray_DATA(capi_a_tmp));
/* Processing variable cond */
f2py_success = float_from_pyobj(&cond,cond_capi,"_flapack.cgelsy() 4th argument (cond) can't be converted to float");
if (f2py_success) {
/* Processing variable r */
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable maxmn */
maxmn = MAX(m,n);
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=maxmn;
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_CFLOAT,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `b' of _flapack.cgelsy to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (complex_float *)(PyArray_DATA(capi_b_tmp));
CHECKARRAY(maxmn==shape(b,0),"maxmn==shape(b,0)","2nd argument b") {
/* Processing variable jptv */
jptv_Dims[0]=n;
capi_jptv_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_jptv_tmp = array_from_pyobj(NPY_INT,jptv_Dims,jptv_Rank,capi_jptv_intent,jptv_capi);
if (capi_jptv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 3rd argument `jptv' of _flapack.cgelsy to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
jptv = (int *)(PyArray_DATA(capi_jptv_tmp));
/* Processing variable rwork */
rwork_Dims[0]=2 * n;
capi_rwork_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_rwork_tmp = array_from_pyobj(NPY_FLOAT,rwork_Dims,rwork_Rank,capi_rwork_intent,Py_None);
if (capi_rwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `rwork' of _flapack.cgelsy to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
rwork = (float *)(PyArray_DATA(capi_rwork_tmp));
/* Processing variable nrhs */
nrhs = shape(b,1);
/* Processing variable lwork */
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.cgelsy() 5th argument (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=minmn+MAX(MAX(2*minmn, n+1), minmn+nrhs),"lwork>=minmn+MAX(MAX(2*minmn, n+1), minmn+nrhs)","5th argument lwork","cgelsy:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_CFLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.cgelsy to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_float *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&nrhs,a,&m,b,&maxmn,jptv,&cond,&r,work,&lwork,rwork,&info) ;
/*(*f2py_func)(&m,&n,&maxmn,&minmn,&nrhs,a,b,jptv,&cond,&r,work,&lwork,rwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNii",capi_a_tmp,capi_b_tmp,capi_jptv_tmp,r,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=minmn+MAX(MAX(2*minmn, n+1), minmn+nrhs))*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable nrhs */
Py_XDECREF(capi_rwork_tmp);
} /*if (capi_rwork_tmp == NULL) ... else of rwork*/
/* End of cleaning variable rwork */
} /*if (capi_jptv_tmp == NULL) ... else of jptv*/
/* End of cleaning variable jptv */
} /*CHECKARRAY(maxmn==shape(b,0))*/
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
/* End of cleaning variable minmn */
/* End of cleaning variable maxmn */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
/* End of cleaning variable r */
} /*if (f2py_success) of cond*/
/* End of cleaning variable cond */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of cgelsy *******************************/
/*********************************** zgelsy ***********************************/
static char doc_f2py_rout__flapack_zgelsy[] = "\
v,x,j,rank,info = zgelsy(a,b,jptv,cond,lwork,[overwrite_a,overwrite_b])\n\nWrapper for ``zgelsy``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('D') with bounds (m,n)\n"
"b : input rank-2 array('D') with bounds (maxmn,nrhs)\n"
"jptv : input rank-1 array('i') with bounds (n)\n"
"cond : input float\n"
"lwork : input int\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"overwrite_b : input int, optional\n Default: 0\n"
"\nReturns\n-------\n"
"v : rank-2 array('D') with bounds (m,n) and a storage\n"
"x : rank-2 array('D') with bounds (maxmn,nrhs) and b storage\n"
"j : rank-1 array('i') with bounds (n) and jptv storage\n"
"rank : int\n"
"info : int";
/* extern void F_FUNC(zgelsy,ZGELSY)(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT*,double*,F_INT*,complex_double*,F_INT*,double*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgelsy(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT*,double*,F_INT*,complex_double*,F_INT*,double*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
int maxmn = 0;
int minmn = 0;
int nrhs = 0;
complex_double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
complex_double *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
int *jptv = NULL;
npy_intp jptv_Dims[1] = {-1};
const int jptv_Rank = 1;
PyArrayObject *capi_jptv_tmp = NULL;
int capi_jptv_intent = 0;
PyObject *jptv_capi = Py_None;
double cond = 0;
PyObject *cond_capi = Py_None;
int r = 0;
complex_double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
double *rwork = NULL;
npy_intp rwork_Dims[1] = {-1};
const int rwork_Rank = 1;
PyArrayObject *capi_rwork_tmp = NULL;
int capi_rwork_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","b","jptv","cond","lwork","overwrite_a","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOOOO|ii:_flapack.zgelsy",\
capi_kwlist,&a_capi,&b_capi,&jptv_capi,&cond_capi,&lwork_capi,&capi_overwrite_a,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.zgelsy to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_double *)(PyArray_DATA(capi_a_tmp));
/* Processing variable cond */
f2py_success = double_from_pyobj(&cond,cond_capi,"_flapack.zgelsy() 4th argument (cond) can't be converted to double");
if (f2py_success) {
/* Processing variable r */
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable maxmn */
maxmn = MAX(m,n);
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=maxmn;
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_CDOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `b' of _flapack.zgelsy to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (complex_double *)(PyArray_DATA(capi_b_tmp));
CHECKARRAY(maxmn==shape(b,0),"maxmn==shape(b,0)","2nd argument b") {
/* Processing variable jptv */
jptv_Dims[0]=n;
capi_jptv_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_jptv_tmp = array_from_pyobj(NPY_INT,jptv_Dims,jptv_Rank,capi_jptv_intent,jptv_capi);
if (capi_jptv_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 3rd argument `jptv' of _flapack.zgelsy to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
jptv = (int *)(PyArray_DATA(capi_jptv_tmp));
/* Processing variable rwork */
rwork_Dims[0]=2 * n;
capi_rwork_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_rwork_tmp = array_from_pyobj(NPY_DOUBLE,rwork_Dims,rwork_Rank,capi_rwork_intent,Py_None);
if (capi_rwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `rwork' of _flapack.zgelsy to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
rwork = (double *)(PyArray_DATA(capi_rwork_tmp));
/* Processing variable nrhs */
nrhs = shape(b,1);
/* Processing variable lwork */
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.zgelsy() 5th argument (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=minmn+MAX(MAX(2*minmn, n+1), minmn+nrhs),"lwork>=minmn+MAX(MAX(2*minmn, n+1), minmn+nrhs)","5th argument lwork","zgelsy:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_CDOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.zgelsy to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_double *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&nrhs,a,&m,b,&maxmn,jptv,&cond,&r,work,&lwork,rwork,&info) ;
/*(*f2py_func)(&m,&n,&maxmn,&minmn,&nrhs,a,b,jptv,&cond,&r,work,&lwork,rwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNii",capi_a_tmp,capi_b_tmp,capi_jptv_tmp,r,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=minmn+MAX(MAX(2*minmn, n+1), minmn+nrhs))*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable nrhs */
Py_XDECREF(capi_rwork_tmp);
} /*if (capi_rwork_tmp == NULL) ... else of rwork*/
/* End of cleaning variable rwork */
} /*if (capi_jptv_tmp == NULL) ... else of jptv*/
/* End of cleaning variable jptv */
} /*CHECKARRAY(maxmn==shape(b,0))*/
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
/* End of cleaning variable minmn */
/* End of cleaning variable maxmn */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
/* End of cleaning variable r */
} /*if (f2py_success) of cond*/
/* End of cleaning variable cond */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of zgelsy *******************************/
/******************************** cgelsy_lwork ********************************/
static char doc_f2py_rout__flapack_cgelsy_lwork[] = "\
work,info = cgelsy_lwork(m,n,nrhs,cond,[lwork])\n\nWrapper for ``cgelsy_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"nrhs : input int\n"
"cond : input float\n"
"\nOther Parameters\n----------------\n"
"lwork : input int, optional\n Default: -1\n"
"\nReturns\n-------\n"
"work : complex\n"
"info : int";
/* extern void F_FUNC(cgelsy ,CGELSY )(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT*,float*,F_INT*,complex_float*,F_INT*,float*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgelsy_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,F_INT*,float*,F_INT*,complex_float*,F_INT*,float*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
int maxmn = 0;
int nrhs = 0;
PyObject *nrhs_capi = Py_None;
complex_float a;
complex_float b;
int jptv = 0;
float cond = 0;
PyObject *cond_capi = Py_None;
int r = 0;
complex_float work;
PyObject *work_capi = Py_None;
int lwork = 0;
PyObject *lwork_capi = Py_None;
float rwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n","nrhs","cond","lwork",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOOO|O:_flapack.cgelsy_lwork",\
capi_kwlist,&m_capi,&n_capi,&nrhs_capi,&cond_capi,&lwork_capi))
return NULL;
/*frompyobj*/
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.cgelsy_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.cgelsy_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable a */
/* Processing variable nrhs */
f2py_success = int_from_pyobj(&nrhs,nrhs_capi,"_flapack.cgelsy_lwork() 3rd argument (nrhs) can't be converted to int");
if (f2py_success) {
/* Processing variable b */
/* Processing variable cond */
f2py_success = float_from_pyobj(&cond,cond_capi,"_flapack.cgelsy_lwork() 4th argument (cond) can't be converted to float");
if (f2py_success) {
/* Processing variable r */
/* Processing variable jptv */
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = -1; else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.cgelsy_lwork() 1st keyword (lwork) can't be converted to int");
if (f2py_success) {
/* Processing variable work */
/* Processing variable rwork */
/* Processing variable info */
/* Processing variable maxmn */
maxmn = MAX(m,n);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&nrhs,&a,&m,&b,&maxmn,&jptv,&cond,&r,&work,&lwork,&rwork,&info) ;
/*(*f2py_func)(&m,&n,&maxmn,&nrhs,&a,&b,&jptv,&cond,&r,&work,&lwork,&rwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
work_capi = pyobj_from_complex_float1(work);
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",work_capi,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable maxmn */
/* End of cleaning variable info */
/* End of cleaning variable rwork */
/* End of cleaning variable work */
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable jptv */
/* End of cleaning variable r */
} /*if (f2py_success) of cond*/
/* End of cleaning variable cond */
/* End of cleaning variable b */
} /*if (f2py_success) of nrhs*/
/* End of cleaning variable nrhs */
/* End of cleaning variable a */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of cgelsy_lwork ****************************/
/******************************** zgelsy_lwork ********************************/
static char doc_f2py_rout__flapack_zgelsy_lwork[] = "\
work,info = zgelsy_lwork(m,n,nrhs,cond,[lwork])\n\nWrapper for ``zgelsy_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"nrhs : input int\n"
"cond : input float\n"
"\nOther Parameters\n----------------\n"
"lwork : input int, optional\n Default: -1\n"
"\nReturns\n-------\n"
"work : complex\n"
"info : int";
/* extern void F_FUNC(zgelsy ,ZGELSY )(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT*,double*,F_INT*,complex_double*,F_INT*,double*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgelsy_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,F_INT*,double*,F_INT*,complex_double*,F_INT*,double*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
int maxmn = 0;
int nrhs = 0;
PyObject *nrhs_capi = Py_None;
complex_double a;
complex_double b;
int jptv = 0;
double cond = 0;
PyObject *cond_capi = Py_None;
int r = 0;
complex_double work;
PyObject *work_capi = Py_None;
int lwork = 0;
PyObject *lwork_capi = Py_None;
double rwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n","nrhs","cond","lwork",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOOO|O:_flapack.zgelsy_lwork",\
capi_kwlist,&m_capi,&n_capi,&nrhs_capi,&cond_capi,&lwork_capi))
return NULL;
/*frompyobj*/
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.zgelsy_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.zgelsy_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable a */
/* Processing variable nrhs */
f2py_success = int_from_pyobj(&nrhs,nrhs_capi,"_flapack.zgelsy_lwork() 3rd argument (nrhs) can't be converted to int");
if (f2py_success) {
/* Processing variable b */
/* Processing variable cond */
f2py_success = double_from_pyobj(&cond,cond_capi,"_flapack.zgelsy_lwork() 4th argument (cond) can't be converted to double");
if (f2py_success) {
/* Processing variable r */
/* Processing variable jptv */
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = -1; else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.zgelsy_lwork() 1st keyword (lwork) can't be converted to int");
if (f2py_success) {
/* Processing variable work */
/* Processing variable rwork */
/* Processing variable info */
/* Processing variable maxmn */
maxmn = MAX(m,n);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&nrhs,&a,&m,&b,&maxmn,&jptv,&cond,&r,&work,&lwork,&rwork,&info) ;
/*(*f2py_func)(&m,&n,&maxmn,&nrhs,&a,&b,&jptv,&cond,&r,&work,&lwork,&rwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
work_capi = pyobj_from_complex_double1(work);
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",work_capi,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable maxmn */
/* End of cleaning variable info */
/* End of cleaning variable rwork */
/* End of cleaning variable work */
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable jptv */
/* End of cleaning variable r */
} /*if (f2py_success) of cond*/
/* End of cleaning variable cond */
/* End of cleaning variable b */
} /*if (f2py_success) of nrhs*/
/* End of cleaning variable nrhs */
/* End of cleaning variable a */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of zgelsy_lwork ****************************/
/*********************************** sgelsd ***********************************/
static char doc_f2py_rout__flapack_sgelsd[] = "\
x,s,rank,info = sgelsd(a,b,lwork,size_iwork,[cond,overwrite_a,overwrite_b])\n\nWrapper for ``sgelsd``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('f') with bounds (m,n)\n"
"b : input rank-2 array('f') with bounds (maxmn,nrhs)\n"
"lwork : input int\n"
"size_iwork : input int\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"overwrite_b : input int, optional\n Default: 0\n"
"cond : input float, optional\n Default: -1.0\n"
"\nReturns\n-------\n"
"x : rank-2 array('f') with bounds (maxmn,nrhs) and b storage\n"
"s : rank-1 array('f') with bounds (minmn)\n"
"rank : int\n"
"info : int";
/* extern void F_FUNC(sgelsd,SGELSD)(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgelsd(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
int minmn = 0;
int maxmn = 0;
int nrhs = 0;
float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
float *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
float *s = NULL;
npy_intp s_Dims[1] = {-1};
const int s_Rank = 1;
PyArrayObject *capi_s_tmp = NULL;
int capi_s_intent = 0;
float cond = 0;
PyObject *cond_capi = Py_None;
int r = 0;
float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int size_iwork = 0;
PyObject *size_iwork_capi = Py_None;
int *iwork = NULL;
npy_intp iwork_Dims[1] = {-1};
const int iwork_Rank = 1;
PyArrayObject *capi_iwork_tmp = NULL;
int capi_iwork_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","b","lwork","size_iwork","cond","overwrite_a","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOOO|Oii:_flapack.sgelsd",\
capi_kwlist,&a_capi,&b_capi,&lwork_capi,&size_iwork_capi,&cond_capi,&capi_overwrite_a,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN;
capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.sgelsd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (float *)(PyArray_DATA(capi_a_tmp));
/* Processing variable cond */
if (cond_capi == Py_None) cond = -1.0; else
f2py_success = float_from_pyobj(&cond,cond_capi,"_flapack.sgelsd() 1st keyword (cond) can't be converted to float");
if (f2py_success) {
/* Processing variable r */
/* Processing variable lwork */
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.sgelsd() 3rd argument (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=1,"lwork>=1","3rd argument lwork","sgelsd:lwork=%d",lwork) {
/* Processing variable size_iwork */
f2py_success = int_from_pyobj(&size_iwork,size_iwork_capi,"_flapack.sgelsd() 4th argument (size_iwork) can't be converted to int");
if (f2py_success) {
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable maxmn */
maxmn = MAX(m,n);
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=maxmn;
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_FLOAT,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `b' of _flapack.sgelsd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (float *)(PyArray_DATA(capi_b_tmp));
CHECKARRAY(maxmn==shape(b,0),"maxmn==shape(b,0)","2nd argument b") {
/* Processing variable s */
s_Dims[0]=minmn;
capi_s_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_s_tmp = array_from_pyobj(NPY_FLOAT,s_Dims,s_Rank,capi_s_intent,Py_None);
if (capi_s_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `s' of _flapack.sgelsd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
s = (float *)(PyArray_DATA(capi_s_tmp));
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_FLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.sgelsd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (float *)(PyArray_DATA(capi_work_tmp));
/* Processing variable iwork */
iwork_Dims[0]=MAX(1,size_iwork);
capi_iwork_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_iwork_tmp = array_from_pyobj(NPY_INT,iwork_Dims,iwork_Rank,capi_iwork_intent,Py_None);
if (capi_iwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `iwork' of _flapack.sgelsd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
iwork = (int *)(PyArray_DATA(capi_iwork_tmp));
/* Processing variable nrhs */
nrhs = shape(b,1);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&nrhs,a,&m,b,&maxmn,s,&cond,&r,work,&lwork,iwork,&info) ;
/*(*f2py_func)(&m,&n,&minmn,&maxmn,&nrhs,a,b,s,&cond,&r,work,&lwork,&size_iwork,iwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNii",capi_b_tmp,capi_s_tmp,r,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable nrhs */
Py_XDECREF(capi_iwork_tmp);
} /*if (capi_iwork_tmp == NULL) ... else of iwork*/
/* End of cleaning variable iwork */
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*if (capi_s_tmp == NULL) ... else of s*/
/* End of cleaning variable s */
} /*CHECKARRAY(maxmn==shape(b,0))*/
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
/* End of cleaning variable maxmn */
/* End of cleaning variable minmn */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (f2py_success) of size_iwork*/
/* End of cleaning variable size_iwork */
} /*CHECKSCALAR(lwork>=1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable r */
} /*if (f2py_success) of cond*/
/* End of cleaning variable cond */
if((PyObject *)capi_a_tmp!=a_capi) {
Py_XDECREF(capi_a_tmp); }
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of sgelsd *******************************/
/*********************************** dgelsd ***********************************/
static char doc_f2py_rout__flapack_dgelsd[] = "\
x,s,rank,info = dgelsd(a,b,lwork,size_iwork,[cond,overwrite_a,overwrite_b])\n\nWrapper for ``dgelsd``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('d') with bounds (m,n)\n"
"b : input rank-2 array('d') with bounds (maxmn,nrhs)\n"
"lwork : input int\n"
"size_iwork : input int\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"overwrite_b : input int, optional\n Default: 0\n"
"cond : input float, optional\n Default: -1.0\n"
"\nReturns\n-------\n"
"x : rank-2 array('d') with bounds (maxmn,nrhs) and b storage\n"
"s : rank-1 array('d') with bounds (minmn)\n"
"rank : int\n"
"info : int";
/* extern void F_FUNC(dgelsd,DGELSD)(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgelsd(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
int minmn = 0;
int maxmn = 0;
int nrhs = 0;
double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
double *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
double *s = NULL;
npy_intp s_Dims[1] = {-1};
const int s_Rank = 1;
PyArrayObject *capi_s_tmp = NULL;
int capi_s_intent = 0;
double cond = 0;
PyObject *cond_capi = Py_None;
int r = 0;
double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int size_iwork = 0;
PyObject *size_iwork_capi = Py_None;
int *iwork = NULL;
npy_intp iwork_Dims[1] = {-1};
const int iwork_Rank = 1;
PyArrayObject *capi_iwork_tmp = NULL;
int capi_iwork_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","b","lwork","size_iwork","cond","overwrite_a","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOOO|Oii:_flapack.dgelsd",\
capi_kwlist,&a_capi,&b_capi,&lwork_capi,&size_iwork_capi,&cond_capi,&capi_overwrite_a,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN;
capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.dgelsd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (double *)(PyArray_DATA(capi_a_tmp));
/* Processing variable cond */
if (cond_capi == Py_None) cond = -1.0; else
f2py_success = double_from_pyobj(&cond,cond_capi,"_flapack.dgelsd() 1st keyword (cond) can't be converted to double");
if (f2py_success) {
/* Processing variable r */
/* Processing variable lwork */
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.dgelsd() 3rd argument (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=1,"lwork>=1","3rd argument lwork","dgelsd:lwork=%d",lwork) {
/* Processing variable size_iwork */
f2py_success = int_from_pyobj(&size_iwork,size_iwork_capi,"_flapack.dgelsd() 4th argument (size_iwork) can't be converted to int");
if (f2py_success) {
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable maxmn */
maxmn = MAX(m,n);
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=maxmn;
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_DOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `b' of _flapack.dgelsd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (double *)(PyArray_DATA(capi_b_tmp));
CHECKARRAY(maxmn==shape(b,0),"maxmn==shape(b,0)","2nd argument b") {
/* Processing variable s */
s_Dims[0]=minmn;
capi_s_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_s_tmp = array_from_pyobj(NPY_DOUBLE,s_Dims,s_Rank,capi_s_intent,Py_None);
if (capi_s_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `s' of _flapack.dgelsd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
s = (double *)(PyArray_DATA(capi_s_tmp));
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_DOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.dgelsd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (double *)(PyArray_DATA(capi_work_tmp));
/* Processing variable iwork */
iwork_Dims[0]=MAX(1,size_iwork);
capi_iwork_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_iwork_tmp = array_from_pyobj(NPY_INT,iwork_Dims,iwork_Rank,capi_iwork_intent,Py_None);
if (capi_iwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `iwork' of _flapack.dgelsd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
iwork = (int *)(PyArray_DATA(capi_iwork_tmp));
/* Processing variable nrhs */
nrhs = shape(b,1);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&nrhs,a,&m,b,&maxmn,s,&cond,&r,work,&lwork,iwork,&info) ;
/*(*f2py_func)(&m,&n,&minmn,&maxmn,&nrhs,a,b,s,&cond,&r,work,&lwork,&size_iwork,iwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNii",capi_b_tmp,capi_s_tmp,r,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable nrhs */
Py_XDECREF(capi_iwork_tmp);
} /*if (capi_iwork_tmp == NULL) ... else of iwork*/
/* End of cleaning variable iwork */
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*if (capi_s_tmp == NULL) ... else of s*/
/* End of cleaning variable s */
} /*CHECKARRAY(maxmn==shape(b,0))*/
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
/* End of cleaning variable maxmn */
/* End of cleaning variable minmn */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (f2py_success) of size_iwork*/
/* End of cleaning variable size_iwork */
} /*CHECKSCALAR(lwork>=1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable r */
} /*if (f2py_success) of cond*/
/* End of cleaning variable cond */
if((PyObject *)capi_a_tmp!=a_capi) {
Py_XDECREF(capi_a_tmp); }
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of dgelsd *******************************/
/******************************** sgelsd_lwork ********************************/
static char doc_f2py_rout__flapack_sgelsd_lwork[] = "\
work,iwork,info = sgelsd_lwork(m,n,nrhs,[cond,lwork])\n\nWrapper for ``sgelsd_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"nrhs : input int\n"
"\nOther Parameters\n----------------\n"
"cond : input float, optional\n Default: -1.0\n"
"lwork : input int, optional\n Default: -1\n"
"\nReturns\n-------\n"
"work : float\n"
"iwork : int\n"
"info : int";
/* extern void F_FUNC(sgelsd ,SGELSD )(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgelsd_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT*,float*,float*,F_INT*,float*,F_INT*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
int maxmn = 0;
int nrhs = 0;
PyObject *nrhs_capi = Py_None;
float a = 0;
float b = 0;
float s = 0;
float cond = 0;
PyObject *cond_capi = Py_None;
int r = 0;
float work = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int iwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n","nrhs","cond","lwork",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOO|OO:_flapack.sgelsd_lwork",\
capi_kwlist,&m_capi,&n_capi,&nrhs_capi,&cond_capi,&lwork_capi))
return NULL;
/*frompyobj*/
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.sgelsd_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.sgelsd_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable a */
/* Processing variable nrhs */
f2py_success = int_from_pyobj(&nrhs,nrhs_capi,"_flapack.sgelsd_lwork() 3rd argument (nrhs) can't be converted to int");
if (f2py_success) {
/* Processing variable b */
/* Processing variable cond */
if (cond_capi == Py_None) cond = -1.0; else
f2py_success = float_from_pyobj(&cond,cond_capi,"_flapack.sgelsd_lwork() 1st keyword (cond) can't be converted to float");
if (f2py_success) {
/* Processing variable r */
/* Processing variable s */
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = -1; else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.sgelsd_lwork() 2nd keyword (lwork) can't be converted to int");
if (f2py_success) {
/* Processing variable work */
/* Processing variable iwork */
/* Processing variable info */
/* Processing variable maxmn */
maxmn = MAX(m,n);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&nrhs,&a,&m,&b,&maxmn,&s,&cond,&r,&work,&lwork,&iwork,&info) ;
/*(*f2py_func)(&m,&n,&maxmn,&nrhs,&a,&b,&s,&cond,&r,&work,&lwork,&iwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("fii",work,iwork,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable maxmn */
/* End of cleaning variable info */
/* End of cleaning variable iwork */
/* End of cleaning variable work */
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable s */
/* End of cleaning variable r */
} /*if (f2py_success) of cond*/
/* End of cleaning variable cond */
/* End of cleaning variable b */
} /*if (f2py_success) of nrhs*/
/* End of cleaning variable nrhs */
/* End of cleaning variable a */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of sgelsd_lwork ****************************/
/******************************** dgelsd_lwork ********************************/
static char doc_f2py_rout__flapack_dgelsd_lwork[] = "\
work,iwork,info = dgelsd_lwork(m,n,nrhs,[cond,lwork])\n\nWrapper for ``dgelsd_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"nrhs : input int\n"
"\nOther Parameters\n----------------\n"
"cond : input float, optional\n Default: -1.0\n"
"lwork : input int, optional\n Default: -1\n"
"\nReturns\n-------\n"
"work : float\n"
"iwork : int\n"
"info : int";
/* extern void F_FUNC(dgelsd ,DGELSD )(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgelsd_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT*,double*,double*,F_INT*,double*,F_INT*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
int maxmn = 0;
int nrhs = 0;
PyObject *nrhs_capi = Py_None;
double a = 0;
double b = 0;
double s = 0;
double cond = 0;
PyObject *cond_capi = Py_None;
int r = 0;
double work = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int iwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n","nrhs","cond","lwork",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOO|OO:_flapack.dgelsd_lwork",\
capi_kwlist,&m_capi,&n_capi,&nrhs_capi,&cond_capi,&lwork_capi))
return NULL;
/*frompyobj*/
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.dgelsd_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.dgelsd_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable a */
/* Processing variable nrhs */
f2py_success = int_from_pyobj(&nrhs,nrhs_capi,"_flapack.dgelsd_lwork() 3rd argument (nrhs) can't be converted to int");
if (f2py_success) {
/* Processing variable b */
/* Processing variable cond */
if (cond_capi == Py_None) cond = -1.0; else
f2py_success = double_from_pyobj(&cond,cond_capi,"_flapack.dgelsd_lwork() 1st keyword (cond) can't be converted to double");
if (f2py_success) {
/* Processing variable r */
/* Processing variable s */
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = -1; else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.dgelsd_lwork() 2nd keyword (lwork) can't be converted to int");
if (f2py_success) {
/* Processing variable work */
/* Processing variable iwork */
/* Processing variable info */
/* Processing variable maxmn */
maxmn = MAX(m,n);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&nrhs,&a,&m,&b,&maxmn,&s,&cond,&r,&work,&lwork,&iwork,&info) ;
/*(*f2py_func)(&m,&n,&maxmn,&nrhs,&a,&b,&s,&cond,&r,&work,&lwork,&iwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("dii",work,iwork,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable maxmn */
/* End of cleaning variable info */
/* End of cleaning variable iwork */
/* End of cleaning variable work */
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable s */
/* End of cleaning variable r */
} /*if (f2py_success) of cond*/
/* End of cleaning variable cond */
/* End of cleaning variable b */
} /*if (f2py_success) of nrhs*/
/* End of cleaning variable nrhs */
/* End of cleaning variable a */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of dgelsd_lwork ****************************/
/*********************************** cgelsd ***********************************/
static char doc_f2py_rout__flapack_cgelsd[] = "\
x,s,rank,info = cgelsd(a,b,lwork,size_rwork,size_iwork,[cond,overwrite_a,overwrite_b])\n\nWrapper for ``cgelsd``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('F') with bounds (m,n)\n"
"b : input rank-2 array('F') with bounds (maxmn,nrhs)\n"
"lwork : input int\n"
"size_rwork : input int\n"
"size_iwork : input int\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"overwrite_b : input int, optional\n Default: 0\n"
"cond : input float, optional\n Default: -1.0\n"
"\nReturns\n-------\n"
"x : rank-2 array('F') with bounds (maxmn,nrhs) and b storage\n"
"s : rank-1 array('f') with bounds (minmn)\n"
"rank : int\n"
"info : int";
/* extern void F_FUNC(cgelsd,CGELSD)(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float*,F_INT*, complex_float*,F_INT*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgelsd(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float*,F_INT*, complex_float*,F_INT*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
int minmn = 0;
int maxmn = 0;
int nrhs = 0;
complex_float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
complex_float *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
float *s = NULL;
npy_intp s_Dims[1] = {-1};
const int s_Rank = 1;
PyArrayObject *capi_s_tmp = NULL;
int capi_s_intent = 0;
float cond = 0;
PyObject *cond_capi = Py_None;
int r = 0;
complex_float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int size_rwork = 0;
PyObject *size_rwork_capi = Py_None;
float *rwork = NULL;
npy_intp rwork_Dims[1] = {-1};
const int rwork_Rank = 1;
PyArrayObject *capi_rwork_tmp = NULL;
int capi_rwork_intent = 0;
int size_iwork = 0;
PyObject *size_iwork_capi = Py_None;
int *iwork = NULL;
npy_intp iwork_Dims[1] = {-1};
const int iwork_Rank = 1;
PyArrayObject *capi_iwork_tmp = NULL;
int capi_iwork_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","b","lwork","size_rwork","size_iwork","cond","overwrite_a","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOOOO|Oii:_flapack.cgelsd",\
capi_kwlist,&a_capi,&b_capi,&lwork_capi,&size_rwork_capi,&size_iwork_capi,&cond_capi,&capi_overwrite_a,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN;
capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.cgelsd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_float *)(PyArray_DATA(capi_a_tmp));
/* Processing variable cond */
if (cond_capi == Py_None) cond = -1.0; else
f2py_success = float_from_pyobj(&cond,cond_capi,"_flapack.cgelsd() 1st keyword (cond) can't be converted to float");
if (f2py_success) {
/* Processing variable r */
/* Processing variable lwork */
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.cgelsd() 3rd argument (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=1||lwork==-1,"lwork>=1||lwork==-1","3rd argument lwork","cgelsd:lwork=%d",lwork) {
/* Processing variable size_rwork */
f2py_success = int_from_pyobj(&size_rwork,size_rwork_capi,"_flapack.cgelsd() 4th argument (size_rwork) can't be converted to int");
if (f2py_success) {
/* Processing variable size_iwork */
f2py_success = int_from_pyobj(&size_iwork,size_iwork_capi,"_flapack.cgelsd() 5th argument (size_iwork) can't be converted to int");
if (f2py_success) {
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable maxmn */
maxmn = MAX(m,n);
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=maxmn;
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_CFLOAT,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `b' of _flapack.cgelsd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (complex_float *)(PyArray_DATA(capi_b_tmp));
CHECKARRAY(maxmn==shape(b,0),"maxmn==shape(b,0)","2nd argument b") {
/* Processing variable s */
s_Dims[0]=minmn;
capi_s_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_s_tmp = array_from_pyobj(NPY_FLOAT,s_Dims,s_Rank,capi_s_intent,Py_None);
if (capi_s_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `s' of _flapack.cgelsd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
s = (float *)(PyArray_DATA(capi_s_tmp));
/* Processing variable work */
work_Dims[0]=MAX(lwork,1);
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_CFLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.cgelsd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_float *)(PyArray_DATA(capi_work_tmp));
/* Processing variable rwork */
rwork_Dims[0]=MAX(1,size_rwork);
capi_rwork_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_rwork_tmp = array_from_pyobj(NPY_FLOAT,rwork_Dims,rwork_Rank,capi_rwork_intent,Py_None);
if (capi_rwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `rwork' of _flapack.cgelsd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
rwork = (float *)(PyArray_DATA(capi_rwork_tmp));
/* Processing variable iwork */
iwork_Dims[0]=MAX(1,size_iwork);
capi_iwork_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_iwork_tmp = array_from_pyobj(NPY_INT,iwork_Dims,iwork_Rank,capi_iwork_intent,Py_None);
if (capi_iwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `iwork' of _flapack.cgelsd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
iwork = (int *)(PyArray_DATA(capi_iwork_tmp));
/* Processing variable nrhs */
nrhs = shape(b,1);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&nrhs,a,&m,b,&maxmn,s,&cond,&r,work,&lwork, rwork, iwork,&info) ;
/*(*f2py_func)(&m,&n,&minmn,&maxmn,&nrhs,a,b,s,&cond,&r,work,&lwork,&size_rwork,rwork,&size_iwork,iwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNii",capi_b_tmp,capi_s_tmp,r,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable nrhs */
Py_XDECREF(capi_iwork_tmp);
} /*if (capi_iwork_tmp == NULL) ... else of iwork*/
/* End of cleaning variable iwork */
Py_XDECREF(capi_rwork_tmp);
} /*if (capi_rwork_tmp == NULL) ... else of rwork*/
/* End of cleaning variable rwork */
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*if (capi_s_tmp == NULL) ... else of s*/
/* End of cleaning variable s */
} /*CHECKARRAY(maxmn==shape(b,0))*/
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
/* End of cleaning variable maxmn */
/* End of cleaning variable minmn */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (f2py_success) of size_iwork*/
/* End of cleaning variable size_iwork */
} /*if (f2py_success) of size_rwork*/
/* End of cleaning variable size_rwork */
} /*CHECKSCALAR(lwork>=1||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable r */
} /*if (f2py_success) of cond*/
/* End of cleaning variable cond */
if((PyObject *)capi_a_tmp!=a_capi) {
Py_XDECREF(capi_a_tmp); }
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of cgelsd *******************************/
/*********************************** zgelsd ***********************************/
static char doc_f2py_rout__flapack_zgelsd[] = "\
x,s,rank,info = zgelsd(a,b,lwork,size_rwork,size_iwork,[cond,overwrite_a,overwrite_b])\n\nWrapper for ``zgelsd``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('D') with bounds (m,n)\n"
"b : input rank-2 array('D') with bounds (maxmn,nrhs)\n"
"lwork : input int\n"
"size_rwork : input int\n"
"size_iwork : input int\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"overwrite_b : input int, optional\n Default: 0\n"
"cond : input float, optional\n Default: -1.0\n"
"\nReturns\n-------\n"
"x : rank-2 array('D') with bounds (maxmn,nrhs) and b storage\n"
"s : rank-1 array('d') with bounds (minmn)\n"
"rank : int\n"
"info : int";
/* extern void F_FUNC(zgelsd,ZGELSD)(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double*,F_INT*, complex_double*,F_INT*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgelsd(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double*,F_INT*, complex_double*,F_INT*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
int minmn = 0;
int maxmn = 0;
int nrhs = 0;
complex_double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
complex_double *b = NULL;
npy_intp b_Dims[2] = {-1, -1};
const int b_Rank = 2;
PyArrayObject *capi_b_tmp = NULL;
int capi_b_intent = 0;
int capi_overwrite_b = 0;
PyObject *b_capi = Py_None;
double *s = NULL;
npy_intp s_Dims[1] = {-1};
const int s_Rank = 1;
PyArrayObject *capi_s_tmp = NULL;
int capi_s_intent = 0;
double cond = 0;
PyObject *cond_capi = Py_None;
int r = 0;
complex_double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int size_rwork = 0;
PyObject *size_rwork_capi = Py_None;
double *rwork = NULL;
npy_intp rwork_Dims[1] = {-1};
const int rwork_Rank = 1;
PyArrayObject *capi_rwork_tmp = NULL;
int capi_rwork_intent = 0;
int size_iwork = 0;
PyObject *size_iwork_capi = Py_None;
int *iwork = NULL;
npy_intp iwork_Dims[1] = {-1};
const int iwork_Rank = 1;
PyArrayObject *capi_iwork_tmp = NULL;
int capi_iwork_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","b","lwork","size_rwork","size_iwork","cond","overwrite_a","overwrite_b",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOOOO|Oii:_flapack.zgelsd",\
capi_kwlist,&a_capi,&b_capi,&lwork_capi,&size_rwork_capi,&size_iwork_capi,&cond_capi,&capi_overwrite_a,&capi_overwrite_b))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN;
capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.zgelsd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_double *)(PyArray_DATA(capi_a_tmp));
/* Processing variable cond */
if (cond_capi == Py_None) cond = -1.0; else
f2py_success = double_from_pyobj(&cond,cond_capi,"_flapack.zgelsd() 1st keyword (cond) can't be converted to double");
if (f2py_success) {
/* Processing variable r */
/* Processing variable lwork */
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.zgelsd() 3rd argument (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=1||lwork==-1,"lwork>=1||lwork==-1","3rd argument lwork","zgelsd:lwork=%d",lwork) {
/* Processing variable size_rwork */
f2py_success = int_from_pyobj(&size_rwork,size_rwork_capi,"_flapack.zgelsd() 4th argument (size_rwork) can't be converted to int");
if (f2py_success) {
/* Processing variable size_iwork */
f2py_success = int_from_pyobj(&size_iwork,size_iwork_capi,"_flapack.zgelsd() 5th argument (size_iwork) can't be converted to int");
if (f2py_success) {
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable minmn */
minmn = MIN(m,n);
/* Processing variable maxmn */
maxmn = MAX(m,n);
/* Processing variable b */
capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY);
b_Dims[0]=maxmn;
capi_b_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_b_tmp = array_from_pyobj(NPY_CDOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi);
if (capi_b_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 2nd argument `b' of _flapack.zgelsd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
b = (complex_double *)(PyArray_DATA(capi_b_tmp));
CHECKARRAY(maxmn==shape(b,0),"maxmn==shape(b,0)","2nd argument b") {
/* Processing variable s */
s_Dims[0]=minmn;
capi_s_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_s_tmp = array_from_pyobj(NPY_DOUBLE,s_Dims,s_Rank,capi_s_intent,Py_None);
if (capi_s_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `s' of _flapack.zgelsd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
s = (double *)(PyArray_DATA(capi_s_tmp));
/* Processing variable work */
work_Dims[0]=MAX(lwork,1);
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_CDOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.zgelsd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_double *)(PyArray_DATA(capi_work_tmp));
/* Processing variable rwork */
rwork_Dims[0]=MAX(1,size_rwork);
capi_rwork_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_rwork_tmp = array_from_pyobj(NPY_DOUBLE,rwork_Dims,rwork_Rank,capi_rwork_intent,Py_None);
if (capi_rwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `rwork' of _flapack.zgelsd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
rwork = (double *)(PyArray_DATA(capi_rwork_tmp));
/* Processing variable iwork */
iwork_Dims[0]=MAX(1,size_iwork);
capi_iwork_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_iwork_tmp = array_from_pyobj(NPY_INT,iwork_Dims,iwork_Rank,capi_iwork_intent,Py_None);
if (capi_iwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `iwork' of _flapack.zgelsd to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
iwork = (int *)(PyArray_DATA(capi_iwork_tmp));
/* Processing variable nrhs */
nrhs = shape(b,1);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&nrhs,a,&m,b,&maxmn,s,&cond,&r,work,&lwork, rwork, iwork,&info) ;
/*(*f2py_func)(&m,&n,&minmn,&maxmn,&nrhs,a,b,s,&cond,&r,work,&lwork,&size_rwork,rwork,&size_iwork,iwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNii",capi_b_tmp,capi_s_tmp,r,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable nrhs */
Py_XDECREF(capi_iwork_tmp);
} /*if (capi_iwork_tmp == NULL) ... else of iwork*/
/* End of cleaning variable iwork */
Py_XDECREF(capi_rwork_tmp);
} /*if (capi_rwork_tmp == NULL) ... else of rwork*/
/* End of cleaning variable rwork */
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*if (capi_s_tmp == NULL) ... else of s*/
/* End of cleaning variable s */
} /*CHECKARRAY(maxmn==shape(b,0))*/
} /*if (capi_b_tmp == NULL) ... else of b*/
/* End of cleaning variable b */
/* End of cleaning variable maxmn */
/* End of cleaning variable minmn */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (f2py_success) of size_iwork*/
/* End of cleaning variable size_iwork */
} /*if (f2py_success) of size_rwork*/
/* End of cleaning variable size_rwork */
} /*CHECKSCALAR(lwork>=1||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable r */
} /*if (f2py_success) of cond*/
/* End of cleaning variable cond */
if((PyObject *)capi_a_tmp!=a_capi) {
Py_XDECREF(capi_a_tmp); }
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of zgelsd *******************************/
/******************************** cgelsd_lwork ********************************/
static char doc_f2py_rout__flapack_cgelsd_lwork[] = "\
work,rwork,iwork,info = cgelsd_lwork(m,n,nrhs,[cond,lwork])\n\nWrapper for ``cgelsd_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"nrhs : input int\n"
"\nOther Parameters\n----------------\n"
"cond : input float, optional\n Default: -1.0\n"
"lwork : input int, optional\n Default: -1\n"
"\nReturns\n-------\n"
"work : complex\n"
"rwork : float\n"
"iwork : int\n"
"info : int";
/* extern void F_FUNC(cgelsd ,CGELSD )(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float*,F_INT*, complex_float*,F_INT*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgelsd_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float*,F_INT*, complex_float*,F_INT*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
int maxmn = 0;
int nrhs = 0;
PyObject *nrhs_capi = Py_None;
complex_float a;
complex_float b;
float s = 0;
float cond = 0;
PyObject *cond_capi = Py_None;
int r = 0;
complex_float work;
PyObject *work_capi = Py_None;
int lwork = 0;
PyObject *lwork_capi = Py_None;
float rwork = 0;
int iwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n","nrhs","cond","lwork",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOO|OO:_flapack.cgelsd_lwork",\
capi_kwlist,&m_capi,&n_capi,&nrhs_capi,&cond_capi,&lwork_capi))
return NULL;
/*frompyobj*/
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.cgelsd_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.cgelsd_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable a */
/* Processing variable nrhs */
f2py_success = int_from_pyobj(&nrhs,nrhs_capi,"_flapack.cgelsd_lwork() 3rd argument (nrhs) can't be converted to int");
if (f2py_success) {
/* Processing variable b */
/* Processing variable cond */
if (cond_capi == Py_None) cond = -1.0; else
f2py_success = float_from_pyobj(&cond,cond_capi,"_flapack.cgelsd_lwork() 1st keyword (cond) can't be converted to float");
if (f2py_success) {
/* Processing variable r */
/* Processing variable s */
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = -1; else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.cgelsd_lwork() 2nd keyword (lwork) can't be converted to int");
if (f2py_success) {
/* Processing variable work */
/* Processing variable rwork */
/* Processing variable iwork */
/* Processing variable info */
/* Processing variable maxmn */
maxmn = MAX(m,n);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&nrhs,&a,&m,&b,&maxmn,&s,&cond,&r,&work,&lwork, &rwork, &iwork,&info) ;
/*(*f2py_func)(&m,&n,&maxmn,&nrhs,&a,&b,&s,&cond,&r,&work,&lwork,&rwork,&iwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
work_capi = pyobj_from_complex_float1(work);
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Nfii",work_capi,rwork,iwork,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable maxmn */
/* End of cleaning variable info */
/* End of cleaning variable iwork */
/* End of cleaning variable rwork */
/* End of cleaning variable work */
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable s */
/* End of cleaning variable r */
} /*if (f2py_success) of cond*/
/* End of cleaning variable cond */
/* End of cleaning variable b */
} /*if (f2py_success) of nrhs*/
/* End of cleaning variable nrhs */
/* End of cleaning variable a */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of cgelsd_lwork ****************************/
/******************************** zgelsd_lwork ********************************/
static char doc_f2py_rout__flapack_zgelsd_lwork[] = "\
work,rwork,iwork,info = zgelsd_lwork(m,n,nrhs,[cond,lwork])\n\nWrapper for ``zgelsd_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"nrhs : input int\n"
"\nOther Parameters\n----------------\n"
"cond : input float, optional\n Default: -1.0\n"
"lwork : input int, optional\n Default: -1\n"
"\nReturns\n-------\n"
"work : complex\n"
"rwork : float\n"
"iwork : int\n"
"info : int";
/* extern void F_FUNC(zgelsd ,ZGELSD )(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double*,F_INT*, complex_double*,F_INT*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgelsd_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double*,F_INT*, complex_double*,F_INT*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
int maxmn = 0;
int nrhs = 0;
PyObject *nrhs_capi = Py_None;
complex_double a;
complex_double b;
double s = 0;
double cond = 0;
PyObject *cond_capi = Py_None;
int r = 0;
complex_double work;
PyObject *work_capi = Py_None;
int lwork = 0;
PyObject *lwork_capi = Py_None;
double rwork = 0;
int iwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n","nrhs","cond","lwork",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OOO|OO:_flapack.zgelsd_lwork",\
capi_kwlist,&m_capi,&n_capi,&nrhs_capi,&cond_capi,&lwork_capi))
return NULL;
/*frompyobj*/
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.zgelsd_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.zgelsd_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable a */
/* Processing variable nrhs */
f2py_success = int_from_pyobj(&nrhs,nrhs_capi,"_flapack.zgelsd_lwork() 3rd argument (nrhs) can't be converted to int");
if (f2py_success) {
/* Processing variable b */
/* Processing variable cond */
if (cond_capi == Py_None) cond = -1.0; else
f2py_success = double_from_pyobj(&cond,cond_capi,"_flapack.zgelsd_lwork() 1st keyword (cond) can't be converted to double");
if (f2py_success) {
/* Processing variable r */
/* Processing variable s */
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = -1; else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.zgelsd_lwork() 2nd keyword (lwork) can't be converted to int");
if (f2py_success) {
/* Processing variable work */
/* Processing variable rwork */
/* Processing variable iwork */
/* Processing variable info */
/* Processing variable maxmn */
maxmn = MAX(m,n);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&nrhs,&a,&m,&b,&maxmn,&s,&cond,&r,&work,&lwork, &rwork, &iwork,&info) ;
/*(*f2py_func)(&m,&n,&maxmn,&nrhs,&a,&b,&s,&cond,&r,&work,&lwork,&rwork,&iwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
work_capi = pyobj_from_complex_double1(work);
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ndii",work_capi,rwork,iwork,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable maxmn */
/* End of cleaning variable info */
/* End of cleaning variable iwork */
/* End of cleaning variable rwork */
/* End of cleaning variable work */
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable s */
/* End of cleaning variable r */
} /*if (f2py_success) of cond*/
/* End of cleaning variable cond */
/* End of cleaning variable b */
} /*if (f2py_success) of nrhs*/
/* End of cleaning variable nrhs */
/* End of cleaning variable a */
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of zgelsd_lwork ****************************/
/*********************************** sgeqp3 ***********************************/
static char doc_f2py_rout__flapack_sgeqp3[] = "\
qr,jpvt,tau,work,info = sgeqp3(a,[lwork,overwrite_a])\n\nWrapper for ``sgeqp3``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('f') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: max(3*(n+1),1)\n"
"\nReturns\n-------\n"
"qr : rank-2 array('f') with bounds (m,n) and a storage\n"
"jpvt : rank-1 array('i') with bounds (n)\n"
"tau : rank-1 array('f') with bounds (MIN(m,n))\n"
"work : rank-1 array('f') with bounds (MAX(lwork,1))\n"
"info : int";
/* extern void F_FUNC(sgeqp3,SGEQP3)(F_INT*,F_INT*,float*,F_INT*,F_INT*,float*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgeqp3(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,float*,F_INT*,F_INT*,float*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int *jpvt = NULL;
npy_intp jpvt_Dims[1] = {-1};
const int jpvt_Rank = 1;
PyArrayObject *capi_jpvt_tmp = NULL;
int capi_jpvt_intent = 0;
float *tau = NULL;
npy_intp tau_Dims[1] = {-1};
const int tau_Rank = 1;
PyArrayObject *capi_tau_tmp = NULL;
int capi_tau_intent = 0;
float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|Oi:_flapack.sgeqp3",\
capi_kwlist,&a_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_INTENT_ALIGNED8;
capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.sgeqp3 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (float *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable jpvt */
jpvt_Dims[0]=n;
capi_jpvt_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_jpvt_tmp = array_from_pyobj(NPY_INT,jpvt_Dims,jpvt_Rank,capi_jpvt_intent,Py_None);
if (capi_jpvt_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `jpvt' of _flapack.sgeqp3 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
jpvt = (int *)(PyArray_DATA(capi_jpvt_tmp));
/* Processing variable tau */
tau_Dims[0]=MIN(m,n);
capi_tau_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_tau_tmp = array_from_pyobj(NPY_FLOAT,tau_Dims,tau_Rank,capi_tau_intent,Py_None);
if (capi_tau_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `tau' of _flapack.sgeqp3 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
tau = (float *)(PyArray_DATA(capi_tau_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max(3*(n+1),1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.sgeqp3() 1st keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=n||lwork==-1,"lwork>=n||lwork==-1","1st keyword lwork","sgeqp3:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=MAX(lwork,1);
capi_work_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_work_tmp = array_from_pyobj(NPY_FLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.sgeqp3 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (float *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
(*f2py_func)(&m,&n,a,&m,jpvt,tau,work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,a,jpvt,tau,work,&lwork,&info);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNNi",capi_a_tmp,capi_jpvt_tmp,capi_tau_tmp,capi_work_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=n||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
} /*if (capi_tau_tmp == NULL) ... else of tau*/
/* End of cleaning variable tau */
} /*if (capi_jpvt_tmp == NULL) ... else of jpvt*/
/* End of cleaning variable jpvt */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of sgeqp3 *******************************/
/*********************************** dgeqp3 ***********************************/
static char doc_f2py_rout__flapack_dgeqp3[] = "\
qr,jpvt,tau,work,info = dgeqp3(a,[lwork,overwrite_a])\n\nWrapper for ``dgeqp3``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('d') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: max(3*(n+1),1)\n"
"\nReturns\n-------\n"
"qr : rank-2 array('d') with bounds (m,n) and a storage\n"
"jpvt : rank-1 array('i') with bounds (n)\n"
"tau : rank-1 array('d') with bounds (MIN(m,n))\n"
"work : rank-1 array('d') with bounds (MAX(lwork,1))\n"
"info : int";
/* extern void F_FUNC(dgeqp3,DGEQP3)(F_INT*,F_INT*,double*,F_INT*,F_INT*,double*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgeqp3(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,double*,F_INT*,F_INT*,double*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int *jpvt = NULL;
npy_intp jpvt_Dims[1] = {-1};
const int jpvt_Rank = 1;
PyArrayObject *capi_jpvt_tmp = NULL;
int capi_jpvt_intent = 0;
double *tau = NULL;
npy_intp tau_Dims[1] = {-1};
const int tau_Rank = 1;
PyArrayObject *capi_tau_tmp = NULL;
int capi_tau_intent = 0;
double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|Oi:_flapack.dgeqp3",\
capi_kwlist,&a_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_INTENT_ALIGNED8;
capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.dgeqp3 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (double *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable jpvt */
jpvt_Dims[0]=n;
capi_jpvt_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_jpvt_tmp = array_from_pyobj(NPY_INT,jpvt_Dims,jpvt_Rank,capi_jpvt_intent,Py_None);
if (capi_jpvt_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `jpvt' of _flapack.dgeqp3 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
jpvt = (int *)(PyArray_DATA(capi_jpvt_tmp));
/* Processing variable tau */
tau_Dims[0]=MIN(m,n);
capi_tau_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_tau_tmp = array_from_pyobj(NPY_DOUBLE,tau_Dims,tau_Rank,capi_tau_intent,Py_None);
if (capi_tau_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `tau' of _flapack.dgeqp3 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
tau = (double *)(PyArray_DATA(capi_tau_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max(3*(n+1),1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.dgeqp3() 1st keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=n||lwork==-1,"lwork>=n||lwork==-1","1st keyword lwork","dgeqp3:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=MAX(lwork,1);
capi_work_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_work_tmp = array_from_pyobj(NPY_DOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.dgeqp3 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (double *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
(*f2py_func)(&m,&n,a,&m,jpvt,tau,work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,a,jpvt,tau,work,&lwork,&info);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNNi",capi_a_tmp,capi_jpvt_tmp,capi_tau_tmp,capi_work_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=n||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
} /*if (capi_tau_tmp == NULL) ... else of tau*/
/* End of cleaning variable tau */
} /*if (capi_jpvt_tmp == NULL) ... else of jpvt*/
/* End of cleaning variable jpvt */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of dgeqp3 *******************************/
/*********************************** cgeqp3 ***********************************/
static char doc_f2py_rout__flapack_cgeqp3[] = "\
qr,jpvt,tau,work,info = cgeqp3(a,[lwork,overwrite_a])\n\nWrapper for ``cgeqp3``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('F') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: max(3*(n+1),1)\n"
"\nReturns\n-------\n"
"qr : rank-2 array('F') with bounds (m,n) and a storage\n"
"jpvt : rank-1 array('i') with bounds (n)\n"
"tau : rank-1 array('F') with bounds (MIN(m,n))\n"
"work : rank-1 array('F') with bounds (MAX(lwork,1))\n"
"info : int";
/* extern void F_FUNC(cgeqp3,CGEQP3)(F_INT*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,complex_float*,F_INT*,float*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgeqp3(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,complex_float*,F_INT*,F_INT*,complex_float*,complex_float*,F_INT*,float*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
complex_float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int *jpvt = NULL;
npy_intp jpvt_Dims[1] = {-1};
const int jpvt_Rank = 1;
PyArrayObject *capi_jpvt_tmp = NULL;
int capi_jpvt_intent = 0;
complex_float *tau = NULL;
npy_intp tau_Dims[1] = {-1};
const int tau_Rank = 1;
PyArrayObject *capi_tau_tmp = NULL;
int capi_tau_intent = 0;
complex_float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
float *rwork = NULL;
npy_intp rwork_Dims[1] = {-1};
const int rwork_Rank = 1;
PyArrayObject *capi_rwork_tmp = NULL;
int capi_rwork_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|Oi:_flapack.cgeqp3",\
capi_kwlist,&a_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_INTENT_ALIGNED8;
capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.cgeqp3 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_float *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable jpvt */
jpvt_Dims[0]=n;
capi_jpvt_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_jpvt_tmp = array_from_pyobj(NPY_INT,jpvt_Dims,jpvt_Rank,capi_jpvt_intent,Py_None);
if (capi_jpvt_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `jpvt' of _flapack.cgeqp3 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
jpvt = (int *)(PyArray_DATA(capi_jpvt_tmp));
/* Processing variable tau */
tau_Dims[0]=MIN(m,n);
capi_tau_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_tau_tmp = array_from_pyobj(NPY_CFLOAT,tau_Dims,tau_Rank,capi_tau_intent,Py_None);
if (capi_tau_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `tau' of _flapack.cgeqp3 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
tau = (complex_float *)(PyArray_DATA(capi_tau_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max(3*(n+1),1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.cgeqp3() 1st keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=n||lwork==-1,"lwork>=n||lwork==-1","1st keyword lwork","cgeqp3:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=MAX(lwork,1);
capi_work_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_work_tmp = array_from_pyobj(NPY_CFLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.cgeqp3 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_float *)(PyArray_DATA(capi_work_tmp));
/* Processing variable rwork */
rwork_Dims[0]=2 * n;
capi_rwork_intent |= F2PY_INTENT_HIDE;
capi_rwork_tmp = array_from_pyobj(NPY_FLOAT,rwork_Dims,rwork_Rank,capi_rwork_intent,Py_None);
if (capi_rwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `rwork' of _flapack.cgeqp3 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
rwork = (float *)(PyArray_DATA(capi_rwork_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
(*f2py_func)(&m,&n,a,&m,jpvt,tau,work,&lwork,rwork,&info) ;
/*(*f2py_func)(&m,&n,a,jpvt,tau,work,&lwork,rwork,&info);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNNi",capi_a_tmp,capi_jpvt_tmp,capi_tau_tmp,capi_work_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_rwork_tmp);
} /*if (capi_rwork_tmp == NULL) ... else of rwork*/
/* End of cleaning variable rwork */
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=n||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
} /*if (capi_tau_tmp == NULL) ... else of tau*/
/* End of cleaning variable tau */
} /*if (capi_jpvt_tmp == NULL) ... else of jpvt*/
/* End of cleaning variable jpvt */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of cgeqp3 *******************************/
/*********************************** zgeqp3 ***********************************/
static char doc_f2py_rout__flapack_zgeqp3[] = "\
qr,jpvt,tau,work,info = zgeqp3(a,[lwork,overwrite_a])\n\nWrapper for ``zgeqp3``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('D') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: max(3*(n+1),1)\n"
"\nReturns\n-------\n"
"qr : rank-2 array('D') with bounds (m,n) and a storage\n"
"jpvt : rank-1 array('i') with bounds (n)\n"
"tau : rank-1 array('D') with bounds (MIN(m,n))\n"
"work : rank-1 array('D') with bounds (MAX(lwork,1))\n"
"info : int";
/* extern void F_FUNC(zgeqp3,ZGEQP3)(F_INT*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,complex_double*,F_INT*,double*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgeqp3(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,complex_double*,F_INT*,F_INT*,complex_double*,complex_double*,F_INT*,double*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
complex_double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int *jpvt = NULL;
npy_intp jpvt_Dims[1] = {-1};
const int jpvt_Rank = 1;
PyArrayObject *capi_jpvt_tmp = NULL;
int capi_jpvt_intent = 0;
complex_double *tau = NULL;
npy_intp tau_Dims[1] = {-1};
const int tau_Rank = 1;
PyArrayObject *capi_tau_tmp = NULL;
int capi_tau_intent = 0;
complex_double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
double *rwork = NULL;
npy_intp rwork_Dims[1] = {-1};
const int rwork_Rank = 1;
PyArrayObject *capi_rwork_tmp = NULL;
int capi_rwork_intent = 0;
int info = 0;
static char *capi_kwlist[] = {"a","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|Oi:_flapack.zgeqp3",\
capi_kwlist,&a_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_INTENT_ALIGNED8;
capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.zgeqp3 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_double *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable jpvt */
jpvt_Dims[0]=n;
capi_jpvt_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_jpvt_tmp = array_from_pyobj(NPY_INT,jpvt_Dims,jpvt_Rank,capi_jpvt_intent,Py_None);
if (capi_jpvt_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `jpvt' of _flapack.zgeqp3 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
jpvt = (int *)(PyArray_DATA(capi_jpvt_tmp));
/* Processing variable tau */
tau_Dims[0]=MIN(m,n);
capi_tau_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_tau_tmp = array_from_pyobj(NPY_CDOUBLE,tau_Dims,tau_Rank,capi_tau_intent,Py_None);
if (capi_tau_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `tau' of _flapack.zgeqp3 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
tau = (complex_double *)(PyArray_DATA(capi_tau_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max(3*(n+1),1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.zgeqp3() 1st keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=n||lwork==-1,"lwork>=n||lwork==-1","1st keyword lwork","zgeqp3:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=MAX(lwork,1);
capi_work_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_work_tmp = array_from_pyobj(NPY_CDOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.zgeqp3 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_double *)(PyArray_DATA(capi_work_tmp));
/* Processing variable rwork */
rwork_Dims[0]=2 * n;
capi_rwork_intent |= F2PY_INTENT_HIDE;
capi_rwork_tmp = array_from_pyobj(NPY_DOUBLE,rwork_Dims,rwork_Rank,capi_rwork_intent,Py_None);
if (capi_rwork_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `rwork' of _flapack.zgeqp3 to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
rwork = (double *)(PyArray_DATA(capi_rwork_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
(*f2py_func)(&m,&n,a,&m,jpvt,tau,work,&lwork,rwork,&info) ;
/*(*f2py_func)(&m,&n,a,jpvt,tau,work,&lwork,rwork,&info);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNNi",capi_a_tmp,capi_jpvt_tmp,capi_tau_tmp,capi_work_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_rwork_tmp);
} /*if (capi_rwork_tmp == NULL) ... else of rwork*/
/* End of cleaning variable rwork */
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=n||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
} /*if (capi_tau_tmp == NULL) ... else of tau*/
/* End of cleaning variable tau */
} /*if (capi_jpvt_tmp == NULL) ... else of jpvt*/
/* End of cleaning variable jpvt */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of zgeqp3 *******************************/
/*********************************** sgeqrf ***********************************/
static char doc_f2py_rout__flapack_sgeqrf[] = "\
qr,tau,work,info = sgeqrf(a,[lwork,overwrite_a])\n\nWrapper for ``sgeqrf``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('f') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: max(3*n,1)\n"
"\nReturns\n-------\n"
"qr : rank-2 array('f') with bounds (m,n) and a storage\n"
"tau : rank-1 array('f') with bounds (MIN(m,n))\n"
"work : rank-1 array('f') with bounds (MAX(lwork,1))\n"
"info : int";
/* extern void F_FUNC(sgeqrf,SGEQRF)(F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgeqrf(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
float *tau = NULL;
npy_intp tau_Dims[1] = {-1};
const int tau_Rank = 1;
PyArrayObject *capi_tau_tmp = NULL;
int capi_tau_intent = 0;
float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|Oi:_flapack.sgeqrf",\
capi_kwlist,&a_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_INTENT_ALIGNED8;
capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.sgeqrf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (float *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable tau */
tau_Dims[0]=MIN(m,n);
capi_tau_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_tau_tmp = array_from_pyobj(NPY_FLOAT,tau_Dims,tau_Rank,capi_tau_intent,Py_None);
if (capi_tau_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `tau' of _flapack.sgeqrf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
tau = (float *)(PyArray_DATA(capi_tau_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max(3*n,1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.sgeqrf() 1st keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=n||lwork==-1,"lwork>=n||lwork==-1","1st keyword lwork","sgeqrf:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=MAX(lwork,1);
capi_work_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_work_tmp = array_from_pyobj(NPY_FLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.sgeqrf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (float *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
(*f2py_func)(&m,&n,a,&m,tau,work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,a,tau,work,&lwork,&info);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNi",capi_a_tmp,capi_tau_tmp,capi_work_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=n||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
} /*if (capi_tau_tmp == NULL) ... else of tau*/
/* End of cleaning variable tau */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of sgeqrf *******************************/
/*********************************** dgeqrf ***********************************/
static char doc_f2py_rout__flapack_dgeqrf[] = "\
qr,tau,work,info = dgeqrf(a,[lwork,overwrite_a])\n\nWrapper for ``dgeqrf``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('d') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: max(3*n,1)\n"
"\nReturns\n-------\n"
"qr : rank-2 array('d') with bounds (m,n) and a storage\n"
"tau : rank-1 array('d') with bounds (MIN(m,n))\n"
"work : rank-1 array('d') with bounds (MAX(lwork,1))\n"
"info : int";
/* extern void F_FUNC(dgeqrf,DGEQRF)(F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgeqrf(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
double *tau = NULL;
npy_intp tau_Dims[1] = {-1};
const int tau_Rank = 1;
PyArrayObject *capi_tau_tmp = NULL;
int capi_tau_intent = 0;
double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|Oi:_flapack.dgeqrf",\
capi_kwlist,&a_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_INTENT_ALIGNED8;
capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.dgeqrf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (double *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable tau */
tau_Dims[0]=MIN(m,n);
capi_tau_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_tau_tmp = array_from_pyobj(NPY_DOUBLE,tau_Dims,tau_Rank,capi_tau_intent,Py_None);
if (capi_tau_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `tau' of _flapack.dgeqrf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
tau = (double *)(PyArray_DATA(capi_tau_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max(3*n,1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.dgeqrf() 1st keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=n||lwork==-1,"lwork>=n||lwork==-1","1st keyword lwork","dgeqrf:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=MAX(lwork,1);
capi_work_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_work_tmp = array_from_pyobj(NPY_DOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.dgeqrf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (double *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
(*f2py_func)(&m,&n,a,&m,tau,work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,a,tau,work,&lwork,&info);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNi",capi_a_tmp,capi_tau_tmp,capi_work_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=n||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
} /*if (capi_tau_tmp == NULL) ... else of tau*/
/* End of cleaning variable tau */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of dgeqrf *******************************/
/*********************************** cgeqrf ***********************************/
static char doc_f2py_rout__flapack_cgeqrf[] = "\
qr,tau,work,info = cgeqrf(a,[lwork,overwrite_a])\n\nWrapper for ``cgeqrf``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('F') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: max(3*n,1)\n"
"\nReturns\n-------\n"
"qr : rank-2 array('F') with bounds (m,n) and a storage\n"
"tau : rank-1 array('F') with bounds (MIN(m,n))\n"
"work : rank-1 array('F') with bounds (MAX(lwork,1))\n"
"info : int";
/* extern void F_FUNC(cgeqrf,CGEQRF)(F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgeqrf(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
complex_float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
complex_float *tau = NULL;
npy_intp tau_Dims[1] = {-1};
const int tau_Rank = 1;
PyArrayObject *capi_tau_tmp = NULL;
int capi_tau_intent = 0;
complex_float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|Oi:_flapack.cgeqrf",\
capi_kwlist,&a_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_INTENT_ALIGNED8;
capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.cgeqrf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_float *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable tau */
tau_Dims[0]=MIN(m,n);
capi_tau_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_tau_tmp = array_from_pyobj(NPY_CFLOAT,tau_Dims,tau_Rank,capi_tau_intent,Py_None);
if (capi_tau_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `tau' of _flapack.cgeqrf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
tau = (complex_float *)(PyArray_DATA(capi_tau_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max(3*n,1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.cgeqrf() 1st keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=n||lwork==-1,"lwork>=n||lwork==-1","1st keyword lwork","cgeqrf:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=MAX(lwork,1);
capi_work_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_work_tmp = array_from_pyobj(NPY_CFLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.cgeqrf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_float *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
(*f2py_func)(&m,&n,a,&m,tau,work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,a,tau,work,&lwork,&info);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNi",capi_a_tmp,capi_tau_tmp,capi_work_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=n||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
} /*if (capi_tau_tmp == NULL) ... else of tau*/
/* End of cleaning variable tau */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of cgeqrf *******************************/
/*********************************** zgeqrf ***********************************/
static char doc_f2py_rout__flapack_zgeqrf[] = "\
qr,tau,work,info = zgeqrf(a,[lwork,overwrite_a])\n\nWrapper for ``zgeqrf``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('D') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: max(3*n,1)\n"
"\nReturns\n-------\n"
"qr : rank-2 array('D') with bounds (m,n) and a storage\n"
"tau : rank-1 array('D') with bounds (MIN(m,n))\n"
"work : rank-1 array('D') with bounds (MAX(lwork,1))\n"
"info : int";
/* extern void F_FUNC(zgeqrf,ZGEQRF)(F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgeqrf(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
complex_double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
complex_double *tau = NULL;
npy_intp tau_Dims[1] = {-1};
const int tau_Rank = 1;
PyArrayObject *capi_tau_tmp = NULL;
int capi_tau_intent = 0;
complex_double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|Oi:_flapack.zgeqrf",\
capi_kwlist,&a_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_INTENT_ALIGNED8;
capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.zgeqrf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_double *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable tau */
tau_Dims[0]=MIN(m,n);
capi_tau_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_tau_tmp = array_from_pyobj(NPY_CDOUBLE,tau_Dims,tau_Rank,capi_tau_intent,Py_None);
if (capi_tau_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `tau' of _flapack.zgeqrf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
tau = (complex_double *)(PyArray_DATA(capi_tau_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max(3*n,1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.zgeqrf() 1st keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=n||lwork==-1,"lwork>=n||lwork==-1","1st keyword lwork","zgeqrf:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=MAX(lwork,1);
capi_work_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_work_tmp = array_from_pyobj(NPY_CDOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.zgeqrf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_double *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
(*f2py_func)(&m,&n,a,&m,tau,work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,a,tau,work,&lwork,&info);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNi",capi_a_tmp,capi_tau_tmp,capi_work_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=n||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
} /*if (capi_tau_tmp == NULL) ... else of tau*/
/* End of cleaning variable tau */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of zgeqrf *******************************/
/******************************** sgeqrf_lwork ********************************/
static char doc_f2py_rout__flapack_sgeqrf_lwork[] = "\
work,info = sgeqrf_lwork(m,n)\n\nWrapper for ``sgeqrf_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"\nReturns\n-------\n"
"work : float\n"
"info : int";
/* extern void F_FUNC(sgeqrf ,SGEQRF )(F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgeqrf_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
float a = 0;
float tau = 0;
float work = 0;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|:_flapack.sgeqrf_lwork",\
capi_kwlist,&m_capi,&n_capi))
return NULL;
/*frompyobj*/
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.sgeqrf_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(m > 0,"m > 0","1st argument m","sgeqrf_lwork:m=%d",m) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.sgeqrf_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(n > 0,"n > 0","2nd argument n","sgeqrf_lwork:n=%d",n) {
/* Processing variable a */
/* Processing variable tau */
/* Processing variable work */
/* Processing variable lwork */
lwork = -1;
/* Processing variable info */
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&a,&m,&tau,&work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,&a,&tau,&work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("fi",work,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable info */
/* End of cleaning variable lwork */
/* End of cleaning variable work */
/* End of cleaning variable tau */
/* End of cleaning variable a */
} /*CHECKSCALAR(n > 0)*/
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*CHECKSCALAR(m > 0)*/
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of sgeqrf_lwork ****************************/
/******************************** dgeqrf_lwork ********************************/
static char doc_f2py_rout__flapack_dgeqrf_lwork[] = "\
work,info = dgeqrf_lwork(m,n)\n\nWrapper for ``dgeqrf_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"\nReturns\n-------\n"
"work : float\n"
"info : int";
/* extern void F_FUNC(dgeqrf ,DGEQRF )(F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgeqrf_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
double a = 0;
double tau = 0;
double work = 0;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|:_flapack.dgeqrf_lwork",\
capi_kwlist,&m_capi,&n_capi))
return NULL;
/*frompyobj*/
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.dgeqrf_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(m > 0,"m > 0","1st argument m","dgeqrf_lwork:m=%d",m) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.dgeqrf_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(n > 0,"n > 0","2nd argument n","dgeqrf_lwork:n=%d",n) {
/* Processing variable a */
/* Processing variable tau */
/* Processing variable work */
/* Processing variable lwork */
lwork = -1;
/* Processing variable info */
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&a,&m,&tau,&work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,&a,&tau,&work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("di",work,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable info */
/* End of cleaning variable lwork */
/* End of cleaning variable work */
/* End of cleaning variable tau */
/* End of cleaning variable a */
} /*CHECKSCALAR(n > 0)*/
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*CHECKSCALAR(m > 0)*/
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of dgeqrf_lwork ****************************/
/******************************** cgeqrf_lwork ********************************/
static char doc_f2py_rout__flapack_cgeqrf_lwork[] = "\
work,info = cgeqrf_lwork(m,n)\n\nWrapper for ``cgeqrf_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"\nReturns\n-------\n"
"work : complex\n"
"info : int";
/* extern void F_FUNC(cgeqrf ,CGEQRF )(F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgeqrf_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
complex_float a;
complex_float tau;
complex_float work;
PyObject *work_capi = Py_None;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|:_flapack.cgeqrf_lwork",\
capi_kwlist,&m_capi,&n_capi))
return NULL;
/*frompyobj*/
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.cgeqrf_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(m > 0,"m > 0","1st argument m","cgeqrf_lwork:m=%d",m) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.cgeqrf_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(n > 0,"n > 0","2nd argument n","cgeqrf_lwork:n=%d",n) {
/* Processing variable a */
/* Processing variable tau */
/* Processing variable work */
/* Processing variable lwork */
lwork = -1;
/* Processing variable info */
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&a,&m,&tau,&work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,&a,&tau,&work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
work_capi = pyobj_from_complex_float1(work);
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",work_capi,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable info */
/* End of cleaning variable lwork */
/* End of cleaning variable work */
/* End of cleaning variable tau */
/* End of cleaning variable a */
} /*CHECKSCALAR(n > 0)*/
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*CHECKSCALAR(m > 0)*/
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of cgeqrf_lwork ****************************/
/******************************** zgeqrf_lwork ********************************/
static char doc_f2py_rout__flapack_zgeqrf_lwork[] = "\
work,info = zgeqrf_lwork(m,n)\n\nWrapper for ``zgeqrf_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"\nReturns\n-------\n"
"work : complex\n"
"info : int";
/* extern void F_FUNC(zgeqrf ,ZGEQRF )(F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgeqrf_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
complex_double a;
complex_double tau;
complex_double work;
PyObject *work_capi = Py_None;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|:_flapack.zgeqrf_lwork",\
capi_kwlist,&m_capi,&n_capi))
return NULL;
/*frompyobj*/
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.zgeqrf_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(m > 0,"m > 0","1st argument m","zgeqrf_lwork:m=%d",m) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.zgeqrf_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(n > 0,"n > 0","2nd argument n","zgeqrf_lwork:n=%d",n) {
/* Processing variable a */
/* Processing variable tau */
/* Processing variable work */
/* Processing variable lwork */
lwork = -1;
/* Processing variable info */
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&a,&m,&tau,&work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,&a,&tau,&work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
work_capi = pyobj_from_complex_double1(work);
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",work_capi,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable info */
/* End of cleaning variable lwork */
/* End of cleaning variable work */
/* End of cleaning variable tau */
/* End of cleaning variable a */
} /*CHECKSCALAR(n > 0)*/
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*CHECKSCALAR(m > 0)*/
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of zgeqrf_lwork ****************************/
/********************************** sgeqrfp **********************************/
static char doc_f2py_rout__flapack_sgeqrfp[] = "\
qr,tau,info = sgeqrfp(a,[lwork,overwrite_a])\n\nWrapper for ``sgeqrfp``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('f') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: MAX(1, n)\n"
"\nReturns\n-------\n"
"qr : rank-2 array('f') with bounds (m,n) and a storage\n"
"tau : rank-1 array('f') with bounds (MIN(m,n))\n"
"info : int";
/* extern void F_FUNC(sgeqrfp,SGEQRFP)(F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgeqrfp(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int lda = 0;
float *tau = NULL;
npy_intp tau_Dims[1] = {-1};
const int tau_Rank = 1;
PyArrayObject *capi_tau_tmp = NULL;
int capi_tau_intent = 0;
float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|Oi:_flapack.sgeqrfp",\
capi_kwlist,&a_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.sgeqrfp to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (float *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a, 0);
CHECKSCALAR(m > 0,"m > 0","hidden m","sgeqrfp:m=%d",m) {
/* Processing variable n */
n = shape(a, 1);
CHECKSCALAR(n > 0,"n > 0","hidden n","sgeqrfp:n=%d",n) {
/* Processing variable lda */
lda = max(1, shape(a, 0));
/* Processing variable tau */
tau_Dims[0]=MIN(m,n);
capi_tau_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_tau_tmp = array_from_pyobj(NPY_FLOAT,tau_Dims,tau_Rank,capi_tau_intent,Py_None);
if (capi_tau_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `tau' of _flapack.sgeqrfp to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
tau = (float *)(PyArray_DATA(capi_tau_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = MAX(1, n); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.sgeqrfp() 1st keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=n||lwork==-1,"lwork>=n||lwork==-1","1st keyword lwork","sgeqrfp:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE;
capi_work_tmp = array_from_pyobj(NPY_FLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.sgeqrfp to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (float *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,a,&lda,tau,work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,a,&lda,tau,work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNi",capi_a_tmp,capi_tau_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=n||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
} /*if (capi_tau_tmp == NULL) ... else of tau*/
/* End of cleaning variable tau */
/* End of cleaning variable lda */
} /*CHECKSCALAR(n > 0)*/
/* End of cleaning variable n */
} /*CHECKSCALAR(m > 0)*/
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of sgeqrfp *******************************/
/********************************** dgeqrfp **********************************/
static char doc_f2py_rout__flapack_dgeqrfp[] = "\
qr,tau,info = dgeqrfp(a,[lwork,overwrite_a])\n\nWrapper for ``dgeqrfp``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('d') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: MAX(1, n)\n"
"\nReturns\n-------\n"
"qr : rank-2 array('d') with bounds (m,n) and a storage\n"
"tau : rank-1 array('d') with bounds (MIN(m,n))\n"
"info : int";
/* extern void F_FUNC(dgeqrfp,DGEQRFP)(F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgeqrfp(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int lda = 0;
double *tau = NULL;
npy_intp tau_Dims[1] = {-1};
const int tau_Rank = 1;
PyArrayObject *capi_tau_tmp = NULL;
int capi_tau_intent = 0;
double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|Oi:_flapack.dgeqrfp",\
capi_kwlist,&a_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.dgeqrfp to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (double *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a, 0);
CHECKSCALAR(m > 0,"m > 0","hidden m","dgeqrfp:m=%d",m) {
/* Processing variable n */
n = shape(a, 1);
CHECKSCALAR(n > 0,"n > 0","hidden n","dgeqrfp:n=%d",n) {
/* Processing variable lda */
lda = max(1, shape(a, 0));
/* Processing variable tau */
tau_Dims[0]=MIN(m,n);
capi_tau_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_tau_tmp = array_from_pyobj(NPY_DOUBLE,tau_Dims,tau_Rank,capi_tau_intent,Py_None);
if (capi_tau_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `tau' of _flapack.dgeqrfp to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
tau = (double *)(PyArray_DATA(capi_tau_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = MAX(1, n); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.dgeqrfp() 1st keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=n||lwork==-1,"lwork>=n||lwork==-1","1st keyword lwork","dgeqrfp:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE;
capi_work_tmp = array_from_pyobj(NPY_DOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.dgeqrfp to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (double *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,a,&lda,tau,work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,a,&lda,tau,work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNi",capi_a_tmp,capi_tau_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=n||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
} /*if (capi_tau_tmp == NULL) ... else of tau*/
/* End of cleaning variable tau */
/* End of cleaning variable lda */
} /*CHECKSCALAR(n > 0)*/
/* End of cleaning variable n */
} /*CHECKSCALAR(m > 0)*/
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of dgeqrfp *******************************/
/********************************** cgeqrfp **********************************/
static char doc_f2py_rout__flapack_cgeqrfp[] = "\
qr,tau,info = cgeqrfp(a,[lwork,overwrite_a])\n\nWrapper for ``cgeqrfp``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('F') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: MAX(1, n)\n"
"\nReturns\n-------\n"
"qr : rank-2 array('F') with bounds (m,n) and a storage\n"
"tau : rank-1 array('F') with bounds (MIN(m,n))\n"
"info : int";
/* extern void F_FUNC(cgeqrfp,CGEQRFP)(F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgeqrfp(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
complex_float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int lda = 0;
complex_float *tau = NULL;
npy_intp tau_Dims[1] = {-1};
const int tau_Rank = 1;
PyArrayObject *capi_tau_tmp = NULL;
int capi_tau_intent = 0;
complex_float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|Oi:_flapack.cgeqrfp",\
capi_kwlist,&a_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.cgeqrfp to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_float *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a, 0);
CHECKSCALAR(m > 0,"m > 0","hidden m","cgeqrfp:m=%d",m) {
/* Processing variable n */
n = shape(a, 1);
CHECKSCALAR(n > 0,"n > 0","hidden n","cgeqrfp:n=%d",n) {
/* Processing variable lda */
lda = max(1, shape(a, 0));
/* Processing variable tau */
tau_Dims[0]=MIN(m,n);
capi_tau_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_tau_tmp = array_from_pyobj(NPY_CFLOAT,tau_Dims,tau_Rank,capi_tau_intent,Py_None);
if (capi_tau_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `tau' of _flapack.cgeqrfp to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
tau = (complex_float *)(PyArray_DATA(capi_tau_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = MAX(1, n); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.cgeqrfp() 1st keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=n||lwork==-1,"lwork>=n||lwork==-1","1st keyword lwork","cgeqrfp:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE;
capi_work_tmp = array_from_pyobj(NPY_CFLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.cgeqrfp to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_float *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,a,&lda,tau,work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,a,&lda,tau,work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNi",capi_a_tmp,capi_tau_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=n||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
} /*if (capi_tau_tmp == NULL) ... else of tau*/
/* End of cleaning variable tau */
/* End of cleaning variable lda */
} /*CHECKSCALAR(n > 0)*/
/* End of cleaning variable n */
} /*CHECKSCALAR(m > 0)*/
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of cgeqrfp *******************************/
/********************************** zgeqrfp **********************************/
static char doc_f2py_rout__flapack_zgeqrfp[] = "\
qr,tau,info = zgeqrfp(a,[lwork,overwrite_a])\n\nWrapper for ``zgeqrfp``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('D') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: MAX(1, n)\n"
"\nReturns\n-------\n"
"qr : rank-2 array('D') with bounds (m,n) and a storage\n"
"tau : rank-1 array('D') with bounds (MIN(m,n))\n"
"info : int";
/* extern void F_FUNC(zgeqrfp,ZGEQRFP)(F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgeqrfp(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
complex_double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
int lda = 0;
complex_double *tau = NULL;
npy_intp tau_Dims[1] = {-1};
const int tau_Rank = 1;
PyArrayObject *capi_tau_tmp = NULL;
int capi_tau_intent = 0;
complex_double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|Oi:_flapack.zgeqrfp",\
capi_kwlist,&a_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.zgeqrfp to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_double *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a, 0);
CHECKSCALAR(m > 0,"m > 0","hidden m","zgeqrfp:m=%d",m) {
/* Processing variable n */
n = shape(a, 1);
CHECKSCALAR(n > 0,"n > 0","hidden n","zgeqrfp:n=%d",n) {
/* Processing variable lda */
lda = max(1, shape(a, 0));
/* Processing variable tau */
tau_Dims[0]=MIN(m,n);
capi_tau_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_tau_tmp = array_from_pyobj(NPY_CDOUBLE,tau_Dims,tau_Rank,capi_tau_intent,Py_None);
if (capi_tau_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `tau' of _flapack.zgeqrfp to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
tau = (complex_double *)(PyArray_DATA(capi_tau_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = MAX(1, n); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.zgeqrfp() 1st keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=n||lwork==-1,"lwork>=n||lwork==-1","1st keyword lwork","zgeqrfp:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE;
capi_work_tmp = array_from_pyobj(NPY_CDOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.zgeqrfp to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_double *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,a,&lda,tau,work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,a,&lda,tau,work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNi",capi_a_tmp,capi_tau_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=n||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
} /*if (capi_tau_tmp == NULL) ... else of tau*/
/* End of cleaning variable tau */
/* End of cleaning variable lda */
} /*CHECKSCALAR(n > 0)*/
/* End of cleaning variable n */
} /*CHECKSCALAR(m > 0)*/
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of zgeqrfp *******************************/
/******************************* sgeqrfp_lwork *******************************/
static char doc_f2py_rout__flapack_sgeqrfp_lwork[] = "\
work,info = sgeqrfp_lwork(m,n)\n\nWrapper for ``sgeqrfp_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"\nReturns\n-------\n"
"work : float\n"
"info : int";
/* extern void F_FUNC(sgeqrfp ,SGEQRFP )(F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgeqrfp_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
float a = 0;
int lda = 0;
float tau = 0;
float work = 0;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|:_flapack.sgeqrfp_lwork",\
capi_kwlist,&m_capi,&n_capi))
return NULL;
/*frompyobj*/
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.sgeqrfp_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(m > 0,"m > 0","1st argument m","sgeqrfp_lwork:m=%d",m) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.sgeqrfp_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(n > 0,"n > 0","2nd argument n","sgeqrfp_lwork:n=%d",n) {
/* Processing variable a */
/* Processing variable tau */
/* Processing variable work */
/* Processing variable lwork */
lwork = -1;
/* Processing variable info */
/* Processing variable lda */
lda = m;
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&a,&lda,&tau,&work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,&a,&lda,&tau,&work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("fi",work,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable lda */
/* End of cleaning variable info */
/* End of cleaning variable lwork */
/* End of cleaning variable work */
/* End of cleaning variable tau */
/* End of cleaning variable a */
} /*CHECKSCALAR(n > 0)*/
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*CHECKSCALAR(m > 0)*/
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of sgeqrfp_lwork ****************************/
/******************************* dgeqrfp_lwork *******************************/
static char doc_f2py_rout__flapack_dgeqrfp_lwork[] = "\
work,info = dgeqrfp_lwork(m,n)\n\nWrapper for ``dgeqrfp_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"\nReturns\n-------\n"
"work : float\n"
"info : int";
/* extern void F_FUNC(dgeqrfp ,DGEQRFP )(F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgeqrfp_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
double a = 0;
int lda = 0;
double tau = 0;
double work = 0;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|:_flapack.dgeqrfp_lwork",\
capi_kwlist,&m_capi,&n_capi))
return NULL;
/*frompyobj*/
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.dgeqrfp_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(m > 0,"m > 0","1st argument m","dgeqrfp_lwork:m=%d",m) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.dgeqrfp_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(n > 0,"n > 0","2nd argument n","dgeqrfp_lwork:n=%d",n) {
/* Processing variable a */
/* Processing variable tau */
/* Processing variable work */
/* Processing variable lwork */
lwork = -1;
/* Processing variable info */
/* Processing variable lda */
lda = m;
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&a,&lda,&tau,&work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,&a,&lda,&tau,&work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("di",work,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable lda */
/* End of cleaning variable info */
/* End of cleaning variable lwork */
/* End of cleaning variable work */
/* End of cleaning variable tau */
/* End of cleaning variable a */
} /*CHECKSCALAR(n > 0)*/
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*CHECKSCALAR(m > 0)*/
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of dgeqrfp_lwork ****************************/
/******************************* cgeqrfp_lwork *******************************/
static char doc_f2py_rout__flapack_cgeqrfp_lwork[] = "\
work,info = cgeqrfp_lwork(m,n)\n\nWrapper for ``cgeqrfp_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"\nReturns\n-------\n"
"work : complex\n"
"info : int";
/* extern void F_FUNC(cgeqrfp ,CGEQRFP )(F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgeqrfp_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
complex_float a;
int lda = 0;
complex_float tau;
complex_float work;
PyObject *work_capi = Py_None;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|:_flapack.cgeqrfp_lwork",\
capi_kwlist,&m_capi,&n_capi))
return NULL;
/*frompyobj*/
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.cgeqrfp_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(m > 0,"m > 0","1st argument m","cgeqrfp_lwork:m=%d",m) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.cgeqrfp_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(n > 0,"n > 0","2nd argument n","cgeqrfp_lwork:n=%d",n) {
/* Processing variable a */
/* Processing variable tau */
/* Processing variable work */
/* Processing variable lwork */
lwork = -1;
/* Processing variable info */
/* Processing variable lda */
lda = m;
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&a,&lda,&tau,&work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,&a,&lda,&tau,&work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
work_capi = pyobj_from_complex_float1(work);
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",work_capi,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable lda */
/* End of cleaning variable info */
/* End of cleaning variable lwork */
/* End of cleaning variable work */
/* End of cleaning variable tau */
/* End of cleaning variable a */
} /*CHECKSCALAR(n > 0)*/
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*CHECKSCALAR(m > 0)*/
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of cgeqrfp_lwork ****************************/
/******************************* zgeqrfp_lwork *******************************/
static char doc_f2py_rout__flapack_zgeqrfp_lwork[] = "\
work,info = zgeqrfp_lwork(m,n)\n\nWrapper for ``zgeqrfp_lwork``.\
\n\nParameters\n----------\n"
"m : input int\n"
"n : input int\n"
"\nReturns\n-------\n"
"work : complex\n"
"info : int";
/* extern void F_FUNC(zgeqrfp ,ZGEQRFP )(F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgeqrfp_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
PyObject *m_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
complex_double a;
int lda = 0;
complex_double tau;
complex_double work;
PyObject *work_capi = Py_None;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"m","n",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"OO|:_flapack.zgeqrfp_lwork",\
capi_kwlist,&m_capi,&n_capi))
return NULL;
/*frompyobj*/
/* Processing variable m */
f2py_success = int_from_pyobj(&m,m_capi,"_flapack.zgeqrfp_lwork() 1st argument (m) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(m > 0,"m > 0","1st argument m","zgeqrfp_lwork:m=%d",m) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.zgeqrfp_lwork() 2nd argument (n) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(n > 0,"n > 0","2nd argument n","zgeqrfp_lwork:n=%d",n) {
/* Processing variable a */
/* Processing variable tau */
/* Processing variable work */
/* Processing variable lwork */
lwork = -1;
/* Processing variable info */
/* Processing variable lda */
lda = m;
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
(*f2py_func)(&m,&n,&a,&lda,&tau,&work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,&a,&lda,&tau,&work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
work_capi = pyobj_from_complex_double1(work);
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("Ni",work_capi,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
/* End of cleaning variable lda */
/* End of cleaning variable info */
/* End of cleaning variable lwork */
/* End of cleaning variable work */
/* End of cleaning variable tau */
/* End of cleaning variable a */
} /*CHECKSCALAR(n > 0)*/
} /*if (f2py_success) of n*/
/* End of cleaning variable n */
} /*CHECKSCALAR(m > 0)*/
} /*if (f2py_success) of m*/
/* End of cleaning variable m */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/**************************** end of zgeqrfp_lwork ****************************/
/*********************************** sgerqf ***********************************/
static char doc_f2py_rout__flapack_sgerqf[] = "\
qr,tau,work,info = sgerqf(a,[lwork,overwrite_a])\n\nWrapper for ``sgerqf``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('f') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: max(3*m,1)\n"
"\nReturns\n-------\n"
"qr : rank-2 array('f') with bounds (m,n) and a storage\n"
"tau : rank-1 array('f') with bounds (MIN(m,n))\n"
"work : rank-1 array('f') with bounds (MAX(lwork,1))\n"
"info : int";
/* extern void F_FUNC(sgerqf,SGERQF)(F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgerqf(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,float*,F_INT*,float*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
float *tau = NULL;
npy_intp tau_Dims[1] = {-1};
const int tau_Rank = 1;
PyArrayObject *capi_tau_tmp = NULL;
int capi_tau_intent = 0;
float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|Oi:_flapack.sgerqf",\
capi_kwlist,&a_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_INTENT_ALIGNED8;
capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.sgerqf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (float *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable tau */
tau_Dims[0]=MIN(m,n);
capi_tau_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_tau_tmp = array_from_pyobj(NPY_FLOAT,tau_Dims,tau_Rank,capi_tau_intent,Py_None);
if (capi_tau_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `tau' of _flapack.sgerqf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
tau = (float *)(PyArray_DATA(capi_tau_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max(3*m,1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.sgerqf() 1st keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=m||lwork==-1,"lwork>=m||lwork==-1","1st keyword lwork","sgerqf:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=MAX(lwork,1);
capi_work_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_work_tmp = array_from_pyobj(NPY_FLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.sgerqf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (float *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
(*f2py_func)(&m,&n,a,&m,tau,work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,a,tau,work,&lwork,&info);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNi",capi_a_tmp,capi_tau_tmp,capi_work_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=m||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
} /*if (capi_tau_tmp == NULL) ... else of tau*/
/* End of cleaning variable tau */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of sgerqf *******************************/
/*********************************** dgerqf ***********************************/
static char doc_f2py_rout__flapack_dgerqf[] = "\
qr,tau,work,info = dgerqf(a,[lwork,overwrite_a])\n\nWrapper for ``dgerqf``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('d') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: max(3*m,1)\n"
"\nReturns\n-------\n"
"qr : rank-2 array('d') with bounds (m,n) and a storage\n"
"tau : rank-1 array('d') with bounds (MIN(m,n))\n"
"work : rank-1 array('d') with bounds (MAX(lwork,1))\n"
"info : int";
/* extern void F_FUNC(dgerqf,DGERQF)(F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgerqf(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,double*,F_INT*,double*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
double *tau = NULL;
npy_intp tau_Dims[1] = {-1};
const int tau_Rank = 1;
PyArrayObject *capi_tau_tmp = NULL;
int capi_tau_intent = 0;
double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|Oi:_flapack.dgerqf",\
capi_kwlist,&a_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_INTENT_ALIGNED8;
capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.dgerqf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (double *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable tau */
tau_Dims[0]=MIN(m,n);
capi_tau_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_tau_tmp = array_from_pyobj(NPY_DOUBLE,tau_Dims,tau_Rank,capi_tau_intent,Py_None);
if (capi_tau_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `tau' of _flapack.dgerqf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
tau = (double *)(PyArray_DATA(capi_tau_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max(3*m,1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.dgerqf() 1st keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=m||lwork==-1,"lwork>=m||lwork==-1","1st keyword lwork","dgerqf:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=MAX(lwork,1);
capi_work_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_work_tmp = array_from_pyobj(NPY_DOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.dgerqf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (double *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
(*f2py_func)(&m,&n,a,&m,tau,work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,a,tau,work,&lwork,&info);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNi",capi_a_tmp,capi_tau_tmp,capi_work_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=m||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
} /*if (capi_tau_tmp == NULL) ... else of tau*/
/* End of cleaning variable tau */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of dgerqf *******************************/
/*********************************** cgerqf ***********************************/
static char doc_f2py_rout__flapack_cgerqf[] = "\
qr,tau,work,info = cgerqf(a,[lwork,overwrite_a])\n\nWrapper for ``cgerqf``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('F') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: max(3*m,1)\n"
"\nReturns\n-------\n"
"qr : rank-2 array('F') with bounds (m,n) and a storage\n"
"tau : rank-1 array('F') with bounds (MIN(m,n))\n"
"work : rank-1 array('F') with bounds (MAX(lwork,1))\n"
"info : int";
/* extern void F_FUNC(cgerqf,CGERQF)(F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_cgerqf(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
complex_float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
complex_float *tau = NULL;
npy_intp tau_Dims[1] = {-1};
const int tau_Rank = 1;
PyArrayObject *capi_tau_tmp = NULL;
int capi_tau_intent = 0;
complex_float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|Oi:_flapack.cgerqf",\
capi_kwlist,&a_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_INTENT_ALIGNED8;
capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.cgerqf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_float *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable tau */
tau_Dims[0]=MIN(m,n);
capi_tau_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_tau_tmp = array_from_pyobj(NPY_CFLOAT,tau_Dims,tau_Rank,capi_tau_intent,Py_None);
if (capi_tau_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `tau' of _flapack.cgerqf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
tau = (complex_float *)(PyArray_DATA(capi_tau_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max(3*m,1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.cgerqf() 1st keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=m||lwork==-1,"lwork>=m||lwork==-1","1st keyword lwork","cgerqf:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=MAX(lwork,1);
capi_work_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_work_tmp = array_from_pyobj(NPY_CFLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.cgerqf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_float *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
(*f2py_func)(&m,&n,a,&m,tau,work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,a,tau,work,&lwork,&info);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNi",capi_a_tmp,capi_tau_tmp,capi_work_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=m||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
} /*if (capi_tau_tmp == NULL) ... else of tau*/
/* End of cleaning variable tau */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of cgerqf *******************************/
/*********************************** zgerqf ***********************************/
static char doc_f2py_rout__flapack_zgerqf[] = "\
qr,tau,work,info = zgerqf(a,[lwork,overwrite_a])\n\nWrapper for ``zgerqf``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('D') with bounds (m,n)\n"
"\nOther Parameters\n----------------\n"
"overwrite_a : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: max(3*m,1)\n"
"\nReturns\n-------\n"
"qr : rank-2 array('D') with bounds (m,n) and a storage\n"
"tau : rank-1 array('D') with bounds (MIN(m,n))\n"
"work : rank-1 array('D') with bounds (MAX(lwork,1))\n"
"info : int";
/* extern void F_FUNC(zgerqf,ZGERQF)(F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_zgerqf(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int m = 0;
int n = 0;
complex_double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
complex_double *tau = NULL;
npy_intp tau_Dims[1] = {-1};
const int tau_Rank = 1;
PyArrayObject *capi_tau_tmp = NULL;
int capi_tau_intent = 0;
complex_double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|Oi:_flapack.zgerqf",\
capi_kwlist,&a_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT|F2PY_INTENT_ALIGNED8;
capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.zgerqf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (complex_double *)(PyArray_DATA(capi_a_tmp));
/* Processing variable info */
/* Processing variable m */
m = shape(a,0);
/* Processing variable n */
n = shape(a,1);
/* Processing variable tau */
tau_Dims[0]=MIN(m,n);
capi_tau_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_tau_tmp = array_from_pyobj(NPY_CDOUBLE,tau_Dims,tau_Rank,capi_tau_intent,Py_None);
if (capi_tau_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `tau' of _flapack.zgerqf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
tau = (complex_double *)(PyArray_DATA(capi_tau_tmp));
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max(3*m,1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.zgerqf() 1st keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=m||lwork==-1,"lwork>=m||lwork==-1","1st keyword lwork","zgerqf:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=MAX(lwork,1);
capi_work_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_work_tmp = array_from_pyobj(NPY_CDOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.zgerqf to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (complex_double *)(PyArray_DATA(capi_work_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
Py_BEGIN_ALLOW_THREADS
(*f2py_func)(&m,&n,a,&m,tau,work,&lwork,&info) ;
/*(*f2py_func)(&m,&n,a,tau,work,&lwork,&info);*/
Py_END_ALLOW_THREADS
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNi",capi_a_tmp,capi_tau_tmp,capi_work_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=m||lwork==-1)*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
} /*if (capi_tau_tmp == NULL) ... else of tau*/
/* End of cleaning variable tau */
/* End of cleaning variable n */
/* End of cleaning variable m */
/* End of cleaning variable info */
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************* end of zgerqf *******************************/
/*********************************** sgeev ***********************************/
static char doc_f2py_rout__flapack_sgeev[] = "\
wr,wi,vl,vr,info = sgeev(a,[compute_vl,compute_vr,lwork,overwrite_a])\n\nWrapper for ``sgeev``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('f') with bounds (n,n)\n"
"\nOther Parameters\n----------------\n"
"compute_vl : input int, optional\n Default: 1\n"
"compute_vr : input int, optional\n Default: 1\n"
"overwrite_a : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: max(4*n,1)\n"
"\nReturns\n-------\n"
"wr : rank-1 array('f') with bounds (n)\n"
"wi : rank-1 array('f') with bounds (n)\n"
"vl : rank-2 array('f') with bounds (ldvl,n)\n"
"vr : rank-2 array('f') with bounds (ldvr,n)\n"
"info : int";
/* extern void F_FUNC(sgeev,SGEEV)(char*,char*,F_INT*,float*,F_INT*,float*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgeev(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,char*,F_INT*,float*,F_INT*,float*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int compute_vl = 0;
PyObject *compute_vl_capi = Py_None;
int compute_vr = 0;
PyObject *compute_vr_capi = Py_None;
int n = 0;
float *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
float *wr = NULL;
npy_intp wr_Dims[1] = {-1};
const int wr_Rank = 1;
PyArrayObject *capi_wr_tmp = NULL;
int capi_wr_intent = 0;
float *wi = NULL;
npy_intp wi_Dims[1] = {-1};
const int wi_Rank = 1;
PyArrayObject *capi_wi_tmp = NULL;
int capi_wi_intent = 0;
float *vl = NULL;
npy_intp vl_Dims[2] = {-1, -1};
const int vl_Rank = 2;
PyArrayObject *capi_vl_tmp = NULL;
int capi_vl_intent = 0;
int ldvl = 0;
float *vr = NULL;
npy_intp vr_Dims[2] = {-1, -1};
const int vr_Rank = 2;
PyArrayObject *capi_vr_tmp = NULL;
int capi_vr_intent = 0;
int ldvr = 0;
float *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","compute_vl","compute_vr","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|OOOi:_flapack.sgeev",\
capi_kwlist,&a_capi,&compute_vl_capi,&compute_vr_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable compute_vl */
if (compute_vl_capi == Py_None) compute_vl = 1; else
f2py_success = int_from_pyobj(&compute_vl,compute_vl_capi,"_flapack.sgeev() 1st keyword (compute_vl) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(compute_vl==1||compute_vl==0,"compute_vl==1||compute_vl==0","1st keyword compute_vl","sgeev:compute_vl=%d",compute_vl) {
/* Processing variable compute_vr */
if (compute_vr_capi == Py_None) compute_vr = 1; else
f2py_success = int_from_pyobj(&compute_vr,compute_vr_capi,"_flapack.sgeev() 2nd keyword (compute_vr) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(compute_vr==1||compute_vr==0,"compute_vr==1||compute_vr==0","2nd keyword compute_vr","sgeev:compute_vr=%d",compute_vr) {
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_ALIGNED8;
capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.sgeev to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (float *)(PyArray_DATA(capi_a_tmp));
CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a") {
/* Processing variable info */
/* Processing variable n */
n = shape(a,0);
/* Processing variable wr */
wr_Dims[0]=n;
capi_wr_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_wr_tmp = array_from_pyobj(NPY_FLOAT,wr_Dims,wr_Rank,capi_wr_intent,Py_None);
if (capi_wr_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `wr' of _flapack.sgeev to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
wr = (float *)(PyArray_DATA(capi_wr_tmp));
/* Processing variable wi */
wi_Dims[0]=n;
capi_wi_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_wi_tmp = array_from_pyobj(NPY_FLOAT,wi_Dims,wi_Rank,capi_wi_intent,Py_None);
if (capi_wi_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `wi' of _flapack.sgeev to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
wi = (float *)(PyArray_DATA(capi_wi_tmp));
/* Processing variable ldvl */
ldvl = (compute_vl?n:1);
/* Processing variable ldvr */
ldvr = (compute_vr?n:1);
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max(4*n,1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.sgeev() 3rd keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=((compute_vl||compute_vr)?4*n:3*n),"lwork>=((compute_vl||compute_vr)?4*n:3*n)","3rd keyword lwork","sgeev:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_FLOAT,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.sgeev to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (float *)(PyArray_DATA(capi_work_tmp));
/* Processing variable vl */
vl_Dims[0]=ldvl,vl_Dims[1]=n;
capi_vl_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_vl_tmp = array_from_pyobj(NPY_FLOAT,vl_Dims,vl_Rank,capi_vl_intent,Py_None);
if (capi_vl_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `vl' of _flapack.sgeev to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
vl = (float *)(PyArray_DATA(capi_vl_tmp));
/* Processing variable vr */
vr_Dims[0]=ldvr,vr_Dims[1]=n;
capi_vr_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_vr_tmp = array_from_pyobj(NPY_FLOAT,vr_Dims,vr_Rank,capi_vr_intent,Py_None);
if (capi_vr_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `vr' of _flapack.sgeev to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
vr = (float *)(PyArray_DATA(capi_vr_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
{(*f2py_func)((compute_vl?"V":"N"),(compute_vr?"V":"N"),&n,a,&n,wr,wi,vl,&ldvl,vr,&ldvr,work,&lwork,&info);} ;
/*(*f2py_func)(&compute_vl,&compute_vr,&n,a,wr,wi,vl,&ldvl,vr,&ldvr,work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNNi",capi_wr_tmp,capi_wi_tmp,capi_vl_tmp,capi_vr_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_vr_tmp == NULL) ... else of vr*/
/* End of cleaning variable vr */
} /*if (capi_vl_tmp == NULL) ... else of vl*/
/* End of cleaning variable vl */
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=((compute_vl||compute_vr)?4*n:3*n))*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable ldvr */
/* End of cleaning variable ldvl */
} /*if (capi_wi_tmp == NULL) ... else of wi*/
/* End of cleaning variable wi */
} /*if (capi_wr_tmp == NULL) ... else of wr*/
/* End of cleaning variable wr */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*CHECKARRAY(shape(a,0)==shape(a,1))*/
if((PyObject *)capi_a_tmp!=a_capi) {
Py_XDECREF(capi_a_tmp); }
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
} /*CHECKSCALAR(compute_vr==1||compute_vr==0)*/
} /*if (f2py_success) of compute_vr*/
/* End of cleaning variable compute_vr */
} /*CHECKSCALAR(compute_vl==1||compute_vl==0)*/
} /*if (f2py_success) of compute_vl*/
/* End of cleaning variable compute_vl */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************** end of sgeev ********************************/
/*********************************** dgeev ***********************************/
static char doc_f2py_rout__flapack_dgeev[] = "\
wr,wi,vl,vr,info = dgeev(a,[compute_vl,compute_vr,lwork,overwrite_a])\n\nWrapper for ``dgeev``.\
\n\nParameters\n----------\n"
"a : input rank-2 array('d') with bounds (n,n)\n"
"\nOther Parameters\n----------------\n"
"compute_vl : input int, optional\n Default: 1\n"
"compute_vr : input int, optional\n Default: 1\n"
"overwrite_a : input int, optional\n Default: 0\n"
"lwork : input int, optional\n Default: max(4*n,1)\n"
"\nReturns\n-------\n"
"wr : rank-1 array('d') with bounds (n)\n"
"wi : rank-1 array('d') with bounds (n)\n"
"vl : rank-2 array('d') with bounds (ldvl,n)\n"
"vr : rank-2 array('d') with bounds (ldvr,n)\n"
"info : int";
/* extern void F_FUNC(dgeev,DGEEV)(char*,char*,F_INT*,double*,F_INT*,double*,double*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_dgeev(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,char*,F_INT*,double*,F_INT*,double*,double*,double*,F_INT*,double*,F_INT*,double*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int compute_vl = 0;
PyObject *compute_vl_capi = Py_None;
int compute_vr = 0;
PyObject *compute_vr_capi = Py_None;
int n = 0;
double *a = NULL;
npy_intp a_Dims[2] = {-1, -1};
const int a_Rank = 2;
PyArrayObject *capi_a_tmp = NULL;
int capi_a_intent = 0;
int capi_overwrite_a = 0;
PyObject *a_capi = Py_None;
double *wr = NULL;
npy_intp wr_Dims[1] = {-1};
const int wr_Rank = 1;
PyArrayObject *capi_wr_tmp = NULL;
int capi_wr_intent = 0;
double *wi = NULL;
npy_intp wi_Dims[1] = {-1};
const int wi_Rank = 1;
PyArrayObject *capi_wi_tmp = NULL;
int capi_wi_intent = 0;
double *vl = NULL;
npy_intp vl_Dims[2] = {-1, -1};
const int vl_Rank = 2;
PyArrayObject *capi_vl_tmp = NULL;
int capi_vl_intent = 0;
int ldvl = 0;
double *vr = NULL;
npy_intp vr_Dims[2] = {-1, -1};
const int vr_Rank = 2;
PyArrayObject *capi_vr_tmp = NULL;
int capi_vr_intent = 0;
int ldvr = 0;
double *work = NULL;
npy_intp work_Dims[1] = {-1};
const int work_Rank = 1;
PyArrayObject *capi_work_tmp = NULL;
int capi_work_intent = 0;
int lwork = 0;
PyObject *lwork_capi = Py_None;
int info = 0;
static char *capi_kwlist[] = {"a","compute_vl","compute_vr","lwork","overwrite_a",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|OOOi:_flapack.dgeev",\
capi_kwlist,&a_capi,&compute_vl_capi,&compute_vr_capi,&lwork_capi,&capi_overwrite_a))
return NULL;
/*frompyobj*/
/* Processing variable compute_vl */
if (compute_vl_capi == Py_None) compute_vl = 1; else
f2py_success = int_from_pyobj(&compute_vl,compute_vl_capi,"_flapack.dgeev() 1st keyword (compute_vl) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(compute_vl==1||compute_vl==0,"compute_vl==1||compute_vl==0","1st keyword compute_vl","dgeev:compute_vl=%d",compute_vl) {
/* Processing variable compute_vr */
if (compute_vr_capi == Py_None) compute_vr = 1; else
f2py_success = int_from_pyobj(&compute_vr,compute_vr_capi,"_flapack.dgeev() 2nd keyword (compute_vr) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(compute_vr==1||compute_vr==0,"compute_vr==1||compute_vr==0","2nd keyword compute_vr","dgeev:compute_vr=%d",compute_vr) {
/* Processing variable a */
capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY);
;
capi_a_intent |= F2PY_INTENT_IN|F2PY_INTENT_ALIGNED8;
capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi);
if (capi_a_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting 1st argument `a' of _flapack.dgeev to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
a = (double *)(PyArray_DATA(capi_a_tmp));
CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a") {
/* Processing variable info */
/* Processing variable n */
n = shape(a,0);
/* Processing variable wr */
wr_Dims[0]=n;
capi_wr_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_wr_tmp = array_from_pyobj(NPY_DOUBLE,wr_Dims,wr_Rank,capi_wr_intent,Py_None);
if (capi_wr_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `wr' of _flapack.dgeev to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
wr = (double *)(PyArray_DATA(capi_wr_tmp));
/* Processing variable wi */
wi_Dims[0]=n;
capi_wi_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_wi_tmp = array_from_pyobj(NPY_DOUBLE,wi_Dims,wi_Rank,capi_wi_intent,Py_None);
if (capi_wi_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `wi' of _flapack.dgeev to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
wi = (double *)(PyArray_DATA(capi_wi_tmp));
/* Processing variable ldvl */
ldvl = (compute_vl?n:1);
/* Processing variable ldvr */
ldvr = (compute_vr?n:1);
/* Processing variable lwork */
if (lwork_capi == Py_None) lwork = max(4*n,1); else
f2py_success = int_from_pyobj(&lwork,lwork_capi,"_flapack.dgeev() 3rd keyword (lwork) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(lwork>=((compute_vl||compute_vr)?4*n:3*n),"lwork>=((compute_vl||compute_vr)?4*n:3*n)","3rd keyword lwork","dgeev:lwork=%d",lwork) {
/* Processing variable work */
work_Dims[0]=lwork;
capi_work_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_CACHE;
capi_work_tmp = array_from_pyobj(NPY_DOUBLE,work_Dims,work_Rank,capi_work_intent,Py_None);
if (capi_work_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `work' of _flapack.dgeev to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
work = (double *)(PyArray_DATA(capi_work_tmp));
/* Processing variable vl */
vl_Dims[0]=ldvl,vl_Dims[1]=n;
capi_vl_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_vl_tmp = array_from_pyobj(NPY_DOUBLE,vl_Dims,vl_Rank,capi_vl_intent,Py_None);
if (capi_vl_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `vl' of _flapack.dgeev to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
vl = (double *)(PyArray_DATA(capi_vl_tmp));
/* Processing variable vr */
vr_Dims[0]=ldvr,vr_Dims[1]=n;
capi_vr_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
capi_vr_tmp = array_from_pyobj(NPY_DOUBLE,vr_Dims,vr_Rank,capi_vr_intent,Py_None);
if (capi_vr_tmp == NULL) {
PyObject *exc, *val, *tb;
PyErr_Fetch(&exc, &val, &tb);
PyErr_SetString(exc ? exc : _flapack_error,"failed in converting hidden `vr' of _flapack.dgeev to C/Fortran array" );
npy_PyErr_ChainExceptionsCause(exc, val, tb);
} else {
vr = (double *)(PyArray_DATA(capi_vr_tmp));
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
{(*f2py_func)((compute_vl?"V":"N"),(compute_vr?"V":"N"),&n,a,&n,wr,wi,vl,&ldvl,vr,&ldvr,work,&lwork,&info);} ;
/*(*f2py_func)(&compute_vl,&compute_vr,&n,a,wr,wi,vl,&ldvl,vr,&ldvr,work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
CFUNCSMESS("Building return value.\n");
capi_buildvalue = Py_BuildValue("NNNNi",capi_wr_tmp,capi_wi_tmp,capi_vl_tmp,capi_vr_tmp,info);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
} /*if (capi_vr_tmp == NULL) ... else of vr*/
/* End of cleaning variable vr */
} /*if (capi_vl_tmp == NULL) ... else of vl*/
/* End of cleaning variable vl */
Py_XDECREF(capi_work_tmp);
} /*if (capi_work_tmp == NULL) ... else of work*/
/* End of cleaning variable work */
} /*CHECKSCALAR(lwork>=((compute_vl||compute_vr)?4*n:3*n))*/
} /*if (f2py_success) of lwork*/
/* End of cleaning variable lwork */
/* End of cleaning variable ldvr */
/* End of cleaning variable ldvl */
} /*if (capi_wi_tmp == NULL) ... else of wi*/
/* End of cleaning variable wi */
} /*if (capi_wr_tmp == NULL) ... else of wr*/
/* End of cleaning variable wr */
/* End of cleaning variable n */
/* End of cleaning variable info */
} /*CHECKARRAY(shape(a,0)==shape(a,1))*/
if((PyObject *)capi_a_tmp!=a_capi) {
Py_XDECREF(capi_a_tmp); }
} /*if (capi_a_tmp == NULL) ... else of a*/
/* End of cleaning variable a */
} /*CHECKSCALAR(compute_vr==1||compute_vr==0)*/
} /*if (f2py_success) of compute_vr*/
/* End of cleaning variable compute_vr */
} /*CHECKSCALAR(compute_vl==1||compute_vl==0)*/
} /*if (f2py_success) of compute_vl*/
/* End of cleaning variable compute_vl */
/*end of cleanupfrompyobj*/
if (capi_buildvalue == NULL) {
/*routdebugfailure*/
} else {
/*routdebugleave*/
}
CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************** end of dgeev ********************************/
/******************************** sgeev_lwork ********************************/
static char doc_f2py_rout__flapack_sgeev_lwork[] = "\
work,info = sgeev_lwork(n,[compute_vl,compute_vr])\n\nWrapper for ``sgeev_lwork``.\
\n\nParameters\n----------\n"
"n : input int\n"
"\nOther Parameters\n----------------\n"
"compute_vl : input int, optional\n Default: 1\n"
"compute_vr : input int, optional\n Default: 1\n"
"\nReturns\n-------\n"
"work : float\n"
"info : int";
/* extern void F_FUNC(sgeev ,SGEEV )(char*,char*,F_INT*,float*,F_INT*,float*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* ); */
static PyObject *f2py_rout__flapack_sgeev_lwork(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(char*,char*,F_INT*,float*,F_INT*,float*,float*,float*,F_INT*,float*,F_INT*,float*,F_INT*,F_INT* )) {
PyObject * volatile capi_buildvalue = NULL;
volatile int f2py_success = 1;
/*decl*/
int compute_vl = 0;
PyObject *compute_vl_capi = Py_None;
int compute_vr = 0;
PyObject *compute_vr_capi = Py_None;
int n = 0;
PyObject *n_capi = Py_None;
float a = 0;
float wr = 0;
float wi = 0;
float vl = 0;
int ldvl = 0;
float vr = 0;
int ldvr = 0;
float work = 0;
int lwork = 0;
int info = 0;
static char *capi_kwlist[] = {"n","compute_vl","compute_vr",NULL};
/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"O|OO:_flapack.sgeev_lwork",\
capi_kwlist,&n_capi,&compute_vl_capi,&compute_vr_capi))
return NULL;
/*frompyobj*/
/* Processing variable compute_vl */
if (compute_vl_capi == Py_None) compute_vl = 1; else
f2py_success = int_from_pyobj(&compute_vl,compute_vl_capi,"_flapack.sgeev_lwork() 1st keyword (compute_vl) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(compute_vl==1||compute_vl==0,"compute_vl==1||compute_vl==0","1st keyword compute_vl","sgeev_lwork:compute_vl=%d",compute_vl) {
/* Processing variable compute_vr */
if (compute_vr_capi == Py_None) compute_vr = 1; else
f2py_success = int_from_pyobj(&compute_vr,compute_vr_capi,"_flapack.sgeev_lwork() 2nd keyword (compute_vr) can't be converted to int");
if (f2py_success) {
CHECKSCALAR(compute_vr==1||compute_vr==0,"compute_vr==1||compute_vr==0","2nd keyword compute_vr","sgeev_lwork:compute_vr=%d",compute_vr) {
/* Processing variable n */
f2py_success = int_from_pyobj(&n,n_capi,"_flapack.sgeev_lwork() 1st argument (n) can't be converted to int");
if (f2py_success) {
/* Processing variable a */
/* Processing variable wr */
/* Processing variable wi */
/* Processing variable vl */
/* Processing variable vr */
/* Processing variable lwork */
lwork = -1;
/* Processing variable work */
/* Processing variable info */
/* Processing variable ldvl */
ldvl = (compute_vl?n:1);
/* Processing variable ldvr */
ldvr = (compute_vr?n:1);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
{(*f2py_func)((compute_vl?"V":"N"),(compute_vr?"V":"N"),&n,&a,&n,&wr,&wi,&vl,&ldvl,&vr,&ldvr,&work,&lwork,&info);} ;
/*(*f2py_func)(&compute_vl,&compute_vr,&n,&a,&wr,&wi,&vl,&ldvl,&vr,&ldvr,&work,&lwork,&info);*/
if (PyErr_Occurred())
f2py_success = 0;
#ifdef F2PY_REPORT
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment