/* File: full_profile_profilemodule.c * This file is auto-generated with f2py (version:2). * f2py is a Fortran to Python Interface Generator (FPIG), Second Edition, * written by Pearu Peterson . * Generation date: Wed Jan 8 13:23:37 2025 * 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 #include "fortranobject.h" #include #include /**************** See f2py2e/rules.py: mod_rules['modulebody'] ****************/ static PyObject *full_profile_profile_error; static PyObject *full_profile_profile_module; /*********************** See f2py2e/cfuncs.py: typedefs ***********************/ typedef signed char signed_char; typedef struct {float r,i;} complex_float; /****************** See f2py2e/cfuncs.py: typedefs_generated ******************/ typedef void(*cb_fcn_in_lmdif__user__routines_typedef)(int *,int *,float *,float *,int *); typedef void(*cb_fcn_in_fdjac2__user__routines_typedef)(int *,int *,float *,float *,int *); /********************** See f2py2e/cfuncs.py: cppmacros **********************/ #define PRINTPYOBJERR(obj)\ fprintf(stderr,"full_profile_profile.error is related to ");\ PyObject_Print((PyObject *)obj,stderr,Py_PRINT_RAW);\ fprintf(stderr,"\n"); #define pyobj_from_int1(v) (PyInt_FromLong(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 #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(full_profile_profile_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 #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 #define SWAP(a,b,t) {\ t *c;\ c = a;\ a = b;\ b = c;} #define pyobj_from_complex_float1(v) (PyComplex_FromDoubles(v.r,v.i)) /************************ See f2py2e/cfuncs.py: cfuncs ************************/ static int double_from_pyobj(double* v,PyObject *obj,const char *errmess) { PyObject* tmp = NULL; if (PyFloat_Check(obj)) { #ifdef __sgi *v = PyFloat_AsDouble(obj); #else *v = PyFloat_AS_DOUBLE(obj); #endif return 1; } tmp = PyNumber_Float(obj); if (tmp) { #ifdef __sgi *v = PyFloat_AsDouble(tmp); #else *v = PyFloat_AS_DOUBLE(tmp); #endif Py_DECREF(tmp); return 1; } if (PyComplex_Check(obj)) tmp = PyObject_GetAttrString(obj,"real"); else if (PyString_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 = full_profile_profile_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 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 int_from_pyobj(int* v,PyObject *obj,const char *errmess) { PyObject* tmp = NULL; if (PyInt_Check(obj)) { *v = (int)PyInt_AS_LONG(obj); return 1; } tmp = PyNumber_Int(obj); if (tmp) { *v = PyInt_AS_LONG(tmp); Py_DECREF(tmp); return 1; } if (PyComplex_Check(obj)) tmp = PyObject_GetAttrString(obj,"real"); else if (PyString_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 = full_profile_profile_error; PyErr_SetString(err,errmess); } 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; int 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 = PyInt_AsLong(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),%d,%d,%d,%d,%d\n",maxnofargs,nofoptargs,tot,opt,ext,siz,*nofargs); #endif if (sizcapi_i) { int itemsize_ = NPY_FLOAT == NPY_STRING ? 1 : 0; /*XXX: Hmm, what will destroy this array??? */ PyArrayObject *tmp_arr = (PyArrayObject *)PyArray_New(&PyArray_Type,1,x_Dims,NPY_FLOAT,NULL,(char*)x,itemsize_,NPY_ARRAY_FARRAY,NULL); if (tmp_arr==NULL) goto capi_fail; if (CAPI_ARGLIST_SETITEM(capi_i++,(PyObject *)tmp_arr)) goto capi_fail; } if (cb_fcn_in_fdjac2__user__routines_nofargs>capi_i) { int itemsize_ = NPY_FLOAT == NPY_STRING ? 1 : 0; /*XXX: Hmm, what will destroy this array??? */ PyArrayObject *tmp_arr = (PyArrayObject *)PyArray_New(&PyArray_Type,1,wa_Dims,NPY_FLOAT,NULL,(char*)wa,itemsize_,NPY_ARRAY_FARRAY,NULL); if (tmp_arr==NULL) goto capi_fail; if (CAPI_ARGLIST_SETITEM(capi_i++,(PyObject *)tmp_arr)) goto capi_fail; } if (cb_fcn_in_fdjac2__user__routines_nofargs>capi_i) if (CAPI_ARGLIST_SETITEM(capi_i++,pyobj_from_int1(iflag))) goto capi_fail; if (cb_fcn_in_fdjac2__user__routines_nofargs>capi_i) if (CAPI_ARGLIST_SETITEM(capi_i++,pyobj_from_int1(m))) goto capi_fail; if (cb_fcn_in_fdjac2__user__routines_nofargs>capi_i) if (CAPI_ARGLIST_SETITEM(capi_i++,pyobj_from_int1(n))) 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 fcn.\n"); #ifdef F2PY_REPORT_ATEXIT f2py_cb_start_call_clock(); #endif #ifdef PYPY_VERSION capi_return = PyObject_CallObject(cb_fcn_in_fdjac2__user__routines_capi,(PyObject *)capi_arglist_list); Py_DECREF(capi_arglist_list); capi_arglist_list = NULL; #else capi_return = PyObject_CallObject(cb_fcn_in_fdjac2__user__routines_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*/ CFUNCSMESS("cb:cb_fcn_in_fdjac2__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_fcn_in_fdjac2__user__routines failed.\n"); Py_XDECREF(capi_return); Py_XDECREF(capi_arglist_list); if (capi_longjmp_ok) longjmp(cb_fcn_in_fdjac2__user__routines_jmpbuf,-1); capi_return_pt: ; return; } /****************** end of cb_fcn_in_fdjac2__user__routines ******************/ /********************** cb_fcn_in_lmdif__user__routines **********************/ PyObject *cb_fcn_in_lmdif__user__routines_capi = NULL;/*was Py_None*/ PyTupleObject *cb_fcn_in_lmdif__user__routines_args_capi = NULL; int cb_fcn_in_lmdif__user__routines_nofargs = 0; jmp_buf cb_fcn_in_lmdif__user__routines_jmpbuf; /*typedef void(*cb_fcn_in_lmdif__user__routines_typedef)(int *,int *,float *,float *,int *);*/ static void cb_fcn_in_lmdif__user__routines (int *m_cb_capi,int *n_cb_capi,float *x,float *fvec,int *iflag_cb_capi) { PyTupleObject *capi_arglist = cb_fcn_in_lmdif__user__routines_args_capi; 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 m=(*m_cb_capi); int n=(*n_cb_capi); int iflag=(*iflag_cb_capi); npy_intp x_Dims[1] = {-1}; npy_intp fvec_Dims[1] = {-1}; #ifdef F2PY_REPORT_ATEXIT f2py_cb_start_clock(); #endif CFUNCSMESS("cb:Call-back function cb_fcn_in_lmdif__user__routines (maxnofargs=5(-2))\n"); CFUNCSMESSPY("cb:cb_fcn_in_lmdif__user__routines_capi=",cb_fcn_in_lmdif__user__routines_capi); if (cb_fcn_in_lmdif__user__routines_capi==NULL) { capi_longjmp_ok = 0; cb_fcn_in_lmdif__user__routines_capi = PyObject_GetAttrString(full_profile_profile_module,"fcn"); } if (cb_fcn_in_lmdif__user__routines_capi==NULL) { PyErr_SetString(full_profile_profile_error,"cb: Callback fcn not defined (as an argument or module full_profile_profile attribute).\n"); goto capi_fail; } if (F2PyCapsule_Check(cb_fcn_in_lmdif__user__routines_capi)) { cb_fcn_in_lmdif__user__routines_typedef cb_fcn_in_lmdif__user__routines_cptr; cb_fcn_in_lmdif__user__routines_cptr = F2PyCapsule_AsVoidPtr(cb_fcn_in_lmdif__user__routines_capi); (*cb_fcn_in_lmdif__user__routines_cptr)(m_cb_capi,n_cb_capi,x,fvec,iflag_cb_capi); return; } if (capi_arglist==NULL) { capi_longjmp_ok = 0; capi_tmp = PyObject_GetAttrString(full_profile_profile_module,"fcn_extra_args"); if (capi_tmp) { capi_arglist = (PyTupleObject *)PySequence_Tuple(capi_tmp); if (capi_arglist==NULL) { PyErr_SetString(full_profile_profile_error,"Failed to convert full_profile_profile.fcn_extra_args to tuple.\n"); goto capi_fail; } } else { PyErr_Clear(); capi_arglist = (PyTupleObject *)Py_BuildValue("()"); } } if (capi_arglist == NULL) { PyErr_SetString(full_profile_profile_error,"Callback fcn argument list is not set.\n"); goto capi_fail; } /*setdims*/ x_Dims[0]=n; fvec_Dims[0]=m; #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_fcn_in_lmdif__user__routines_nofargs>capi_i) { int itemsize_ = NPY_FLOAT == NPY_STRING ? 1 : 0; /*XXX: Hmm, what will destroy this array??? */ PyArrayObject *tmp_arr = (PyArrayObject *)PyArray_New(&PyArray_Type,1,x_Dims,NPY_FLOAT,NULL,(char*)x,itemsize_,NPY_ARRAY_FARRAY,NULL); if (tmp_arr==NULL) goto capi_fail; if (CAPI_ARGLIST_SETITEM(capi_i++,(PyObject *)tmp_arr)) goto capi_fail; } if (cb_fcn_in_lmdif__user__routines_nofargs>capi_i) { int itemsize_ = NPY_FLOAT == NPY_STRING ? 1 : 0; /*XXX: Hmm, what will destroy this array??? */ PyArrayObject *tmp_arr = (PyArrayObject *)PyArray_New(&PyArray_Type,1,fvec_Dims,NPY_FLOAT,NULL,(char*)fvec,itemsize_,NPY_ARRAY_FARRAY,NULL); if (tmp_arr==NULL) goto capi_fail; if (CAPI_ARGLIST_SETITEM(capi_i++,(PyObject *)tmp_arr)) goto capi_fail; } if (cb_fcn_in_lmdif__user__routines_nofargs>capi_i) if (CAPI_ARGLIST_SETITEM(capi_i++,pyobj_from_int1(iflag))) goto capi_fail; if (cb_fcn_in_lmdif__user__routines_nofargs>capi_i) if (CAPI_ARGLIST_SETITEM(capi_i++,pyobj_from_int1(m))) goto capi_fail; if (cb_fcn_in_lmdif__user__routines_nofargs>capi_i) if (CAPI_ARGLIST_SETITEM(capi_i++,pyobj_from_int1(n))) 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 fcn.\n"); #ifdef F2PY_REPORT_ATEXIT f2py_cb_start_call_clock(); #endif #ifdef PYPY_VERSION capi_return = PyObject_CallObject(cb_fcn_in_lmdif__user__routines_capi,(PyObject *)capi_arglist_list); Py_DECREF(capi_arglist_list); capi_arglist_list = NULL; #else capi_return = PyObject_CallObject(cb_fcn_in_lmdif__user__routines_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*/ CFUNCSMESS("cb:cb_fcn_in_lmdif__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_fcn_in_lmdif__user__routines failed.\n"); Py_XDECREF(capi_return); Py_XDECREF(capi_arglist_list); if (capi_longjmp_ok) longjmp(cb_fcn_in_lmdif__user__routines_jmpbuf,-1); capi_return_pt: ; return; } /******************* end of cb_fcn_in_lmdif__user__routines *******************/ /*********************** See f2py2e/rules.py: buildapi ***********************/ /********************************** profile **********************************/ static char doc_f2py_rout_full_profile_profile_profile[] = "\ profile(acf_sum,acf_err,power,en,alag,thb2,bfm2,ote,ete,oti,eti,oph,eph,ophe,ephe,range2,ut,nacf,acf_avg_real,status,[nhts,ibits])\n\nWrapper for ``profile``.\ \n\nParameters\n----------\n" "acf_sum : input rank-3 array('F') with bounds (4,nhts,ibits)\n" "acf_err : input rank-2 array('f') with bounds (nhts,ibits)\n" "power : input rank-1 array('f') with bounds (nhts)\n" "en : input rank-1 array('f') with bounds (nhts)\n" "alag : input rank-1 array('f') with bounds (ibits)\n" "thb2 : input rank-1 array('f') with bounds (nhts)\n" "bfm2 : input rank-1 array('f') with bounds (nhts)\n" "ote : input rank-1 array('f') with bounds (nacf)\n" "ete : input rank-1 array('f') with bounds (nacf)\n" "oti : input rank-1 array('f') with bounds (nacf)\n" "eti : input rank-1 array('f') with bounds (nacf)\n" "oph : input rank-1 array('f') with bounds (nacf)\n" "eph : input rank-1 array('f') with bounds (nacf)\n" "ophe : input rank-1 array('f') with bounds (nacf)\n" "ephe : input rank-1 array('f') with bounds (nacf)\n" "range2 : input rank-1 array('f') with bounds (nhts)\n" "ut : input float\n" "nacf : input int\n" "acf_avg_real : input rank-2 array('f') with bounds (nhts,ibits)\n" "status : input rank-1 array('f') with bounds (1)\n" "\nOther Parameters\n----------------\n" "nhts : input int, optional\n Default: shape(acf_sum,1)\n" "ibits : input int, optional\n Default: shape(acf_sum,2)"; /* extern void F_FUNC(profile,PROFILE)(complex_float*,float*,float*,float*,float*,float*,float*,float*,float*,float*,float*,float*,float*,float*,float*,float*,float*,int*,int*,int*,float*,float*); */ static PyObject *f2py_rout_full_profile_profile_profile(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(complex_float*,float*,float*,float*,float*,float*,float*,float*,float*,float*,float*,float*,float*,float*,float*,float*,float*,int*,int*,int*,float*,float*)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ complex_float *acf_sum = NULL; npy_intp acf_sum_Dims[3] = {-1, -1, -1}; const int acf_sum_Rank = 3; PyArrayObject *capi_acf_sum_tmp = NULL; int capi_acf_sum_intent = 0; PyObject *acf_sum_capi = Py_None; float *acf_err = NULL; npy_intp acf_err_Dims[2] = {-1, -1}; const int acf_err_Rank = 2; PyArrayObject *capi_acf_err_tmp = NULL; int capi_acf_err_intent = 0; PyObject *acf_err_capi = Py_None; float *power = NULL; npy_intp power_Dims[1] = {-1}; const int power_Rank = 1; PyArrayObject *capi_power_tmp = NULL; int capi_power_intent = 0; PyObject *power_capi = Py_None; float *en = NULL; npy_intp en_Dims[1] = {-1}; const int en_Rank = 1; PyArrayObject *capi_en_tmp = NULL; int capi_en_intent = 0; PyObject *en_capi = Py_None; float *alag = NULL; npy_intp alag_Dims[1] = {-1}; const int alag_Rank = 1; PyArrayObject *capi_alag_tmp = NULL; int capi_alag_intent = 0; PyObject *alag_capi = Py_None; float *thb2 = NULL; npy_intp thb2_Dims[1] = {-1}; const int thb2_Rank = 1; PyArrayObject *capi_thb2_tmp = NULL; int capi_thb2_intent = 0; PyObject *thb2_capi = Py_None; float *bfm2 = NULL; npy_intp bfm2_Dims[1] = {-1}; const int bfm2_Rank = 1; PyArrayObject *capi_bfm2_tmp = NULL; int capi_bfm2_intent = 0; PyObject *bfm2_capi = Py_None; float *ote = NULL; npy_intp ote_Dims[1] = {-1}; const int ote_Rank = 1; PyArrayObject *capi_ote_tmp = NULL; int capi_ote_intent = 0; PyObject *ote_capi = Py_None; float *ete = NULL; npy_intp ete_Dims[1] = {-1}; const int ete_Rank = 1; PyArrayObject *capi_ete_tmp = NULL; int capi_ete_intent = 0; PyObject *ete_capi = Py_None; float *oti = NULL; npy_intp oti_Dims[1] = {-1}; const int oti_Rank = 1; PyArrayObject *capi_oti_tmp = NULL; int capi_oti_intent = 0; PyObject *oti_capi = Py_None; float *eti = NULL; npy_intp eti_Dims[1] = {-1}; const int eti_Rank = 1; PyArrayObject *capi_eti_tmp = NULL; int capi_eti_intent = 0; PyObject *eti_capi = Py_None; float *oph = NULL; npy_intp oph_Dims[1] = {-1}; const int oph_Rank = 1; PyArrayObject *capi_oph_tmp = NULL; int capi_oph_intent = 0; PyObject *oph_capi = Py_None; float *eph = NULL; npy_intp eph_Dims[1] = {-1}; const int eph_Rank = 1; PyArrayObject *capi_eph_tmp = NULL; int capi_eph_intent = 0; PyObject *eph_capi = Py_None; float *ophe = NULL; npy_intp ophe_Dims[1] = {-1}; const int ophe_Rank = 1; PyArrayObject *capi_ophe_tmp = NULL; int capi_ophe_intent = 0; PyObject *ophe_capi = Py_None; float *ephe = NULL; npy_intp ephe_Dims[1] = {-1}; const int ephe_Rank = 1; PyArrayObject *capi_ephe_tmp = NULL; int capi_ephe_intent = 0; PyObject *ephe_capi = Py_None; float *range2 = NULL; npy_intp range2_Dims[1] = {-1}; const int range2_Rank = 1; PyArrayObject *capi_range2_tmp = NULL; int capi_range2_intent = 0; PyObject *range2_capi = Py_None; float ut = 0; PyObject *ut_capi = Py_None; int nhts = 0; PyObject *nhts_capi = Py_None; int nacf = 0; PyObject *nacf_capi = Py_None; int ibits = 0; PyObject *ibits_capi = Py_None; float *acf_avg_real = NULL; npy_intp acf_avg_real_Dims[2] = {-1, -1}; const int acf_avg_real_Rank = 2; PyArrayObject *capi_acf_avg_real_tmp = NULL; int capi_acf_avg_real_intent = 0; PyObject *acf_avg_real_capi = Py_None; float *status = NULL; npy_intp status_Dims[1] = {-1}; const int status_Rank = 1; PyArrayObject *capi_status_tmp = NULL; int capi_status_intent = 0; PyObject *status_capi = Py_None; static char *capi_kwlist[] = {"acf_sum","acf_err","power","en","alag","thb2","bfm2","ote","ete","oti","eti","oph","eph","ophe","ephe","range2","ut","nacf","acf_avg_real","status","nhts","ibits",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "OOOOOOOOOOOOOOOOOOOO|OO:full_profile_profile.profile",\ capi_kwlist,&acf_sum_capi,&acf_err_capi,&power_capi,&en_capi,&alag_capi,&thb2_capi,&bfm2_capi,&ote_capi,&ete_capi,&oti_capi,&eti_capi,&oph_capi,&eph_capi,&ophe_capi,&ephe_capi,&range2_capi,&ut_capi,&nacf_capi,&acf_avg_real_capi,&status_capi,&nhts_capi,&ibits_capi)) return NULL; /*frompyobj*/ /* Processing variable acf_sum */ acf_sum_Dims[0]=4; capi_acf_sum_intent |= F2PY_INTENT_IN; capi_acf_sum_tmp = array_from_pyobj(NPY_CFLOAT,acf_sum_Dims,acf_sum_Rank,capi_acf_sum_intent,acf_sum_capi); if (capi_acf_sum_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 1st argument `acf_sum' of full_profile_profile.profile to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { acf_sum = (complex_float *)(PyArray_DATA(capi_acf_sum_tmp)); /* Processing variable ut */ f2py_success = float_from_pyobj(&ut,ut_capi,"full_profile_profile.profile() 17th argument (ut) can't be converted to float"); if (f2py_success) { /* Processing variable nacf */ f2py_success = int_from_pyobj(&nacf,nacf_capi,"full_profile_profile.profile() 18th argument (nacf) can't be converted to int"); if (f2py_success) { /* Processing variable status */ status_Dims[0]=1; capi_status_intent |= F2PY_INTENT_IN; capi_status_tmp = array_from_pyobj(NPY_FLOAT,status_Dims,status_Rank,capi_status_intent,status_capi); if (capi_status_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 20th argument `status' of full_profile_profile.profile to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { status = (float *)(PyArray_DATA(capi_status_tmp)); /* Processing variable ote */ ote_Dims[0]=nacf; capi_ote_intent |= F2PY_INTENT_IN; capi_ote_tmp = array_from_pyobj(NPY_FLOAT,ote_Dims,ote_Rank,capi_ote_intent,ote_capi); if (capi_ote_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 8th argument `ote' of full_profile_profile.profile to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { ote = (float *)(PyArray_DATA(capi_ote_tmp)); /* Processing variable ete */ ete_Dims[0]=nacf; capi_ete_intent |= F2PY_INTENT_IN; capi_ete_tmp = array_from_pyobj(NPY_FLOAT,ete_Dims,ete_Rank,capi_ete_intent,ete_capi); if (capi_ete_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 9th argument `ete' of full_profile_profile.profile to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { ete = (float *)(PyArray_DATA(capi_ete_tmp)); /* Processing variable oti */ oti_Dims[0]=nacf; capi_oti_intent |= F2PY_INTENT_IN; capi_oti_tmp = array_from_pyobj(NPY_FLOAT,oti_Dims,oti_Rank,capi_oti_intent,oti_capi); if (capi_oti_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 10th argument `oti' of full_profile_profile.profile to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { oti = (float *)(PyArray_DATA(capi_oti_tmp)); /* Processing variable eti */ eti_Dims[0]=nacf; capi_eti_intent |= F2PY_INTENT_IN; capi_eti_tmp = array_from_pyobj(NPY_FLOAT,eti_Dims,eti_Rank,capi_eti_intent,eti_capi); if (capi_eti_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 11st argument `eti' of full_profile_profile.profile to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { eti = (float *)(PyArray_DATA(capi_eti_tmp)); /* Processing variable oph */ oph_Dims[0]=nacf; capi_oph_intent |= F2PY_INTENT_IN; capi_oph_tmp = array_from_pyobj(NPY_FLOAT,oph_Dims,oph_Rank,capi_oph_intent,oph_capi); if (capi_oph_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 12nd argument `oph' of full_profile_profile.profile to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { oph = (float *)(PyArray_DATA(capi_oph_tmp)); /* Processing variable eph */ eph_Dims[0]=nacf; capi_eph_intent |= F2PY_INTENT_IN; capi_eph_tmp = array_from_pyobj(NPY_FLOAT,eph_Dims,eph_Rank,capi_eph_intent,eph_capi); if (capi_eph_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 13rd argument `eph' of full_profile_profile.profile to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { eph = (float *)(PyArray_DATA(capi_eph_tmp)); /* Processing variable ophe */ ophe_Dims[0]=nacf; capi_ophe_intent |= F2PY_INTENT_IN; capi_ophe_tmp = array_from_pyobj(NPY_FLOAT,ophe_Dims,ophe_Rank,capi_ophe_intent,ophe_capi); if (capi_ophe_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 14th argument `ophe' of full_profile_profile.profile to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { ophe = (float *)(PyArray_DATA(capi_ophe_tmp)); /* Processing variable ephe */ ephe_Dims[0]=nacf; capi_ephe_intent |= F2PY_INTENT_IN; capi_ephe_tmp = array_from_pyobj(NPY_FLOAT,ephe_Dims,ephe_Rank,capi_ephe_intent,ephe_capi); if (capi_ephe_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 15th argument `ephe' of full_profile_profile.profile to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { ephe = (float *)(PyArray_DATA(capi_ephe_tmp)); /* Processing variable nhts */ if (nhts_capi == Py_None) nhts = shape(acf_sum,1); else f2py_success = int_from_pyobj(&nhts,nhts_capi,"full_profile_profile.profile() 1st keyword (nhts) can't be converted to int"); if (f2py_success) { CHECKSCALAR(shape(acf_sum,1)==nhts,"shape(acf_sum,1)==nhts","1st keyword nhts","profile:nhts=%d",nhts) { /* Processing variable ibits */ if (ibits_capi == Py_None) ibits = shape(acf_sum,2); else f2py_success = int_from_pyobj(&ibits,ibits_capi,"full_profile_profile.profile() 2nd keyword (ibits) can't be converted to int"); if (f2py_success) { CHECKSCALAR(shape(acf_sum,2)==ibits,"shape(acf_sum,2)==ibits","2nd keyword ibits","profile:ibits=%d",ibits) { /* Processing variable acf_avg_real */ acf_avg_real_Dims[0]=nhts,acf_avg_real_Dims[1]=ibits; capi_acf_avg_real_intent |= F2PY_INTENT_IN; capi_acf_avg_real_tmp = array_from_pyobj(NPY_FLOAT,acf_avg_real_Dims,acf_avg_real_Rank,capi_acf_avg_real_intent,acf_avg_real_capi); if (capi_acf_avg_real_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 19th argument `acf_avg_real' of full_profile_profile.profile to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { acf_avg_real = (float *)(PyArray_DATA(capi_acf_avg_real_tmp)); /* Processing variable acf_err */ acf_err_Dims[0]=nhts,acf_err_Dims[1]=ibits; capi_acf_err_intent |= F2PY_INTENT_IN; capi_acf_err_tmp = array_from_pyobj(NPY_FLOAT,acf_err_Dims,acf_err_Rank,capi_acf_err_intent,acf_err_capi); if (capi_acf_err_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 2nd argument `acf_err' of full_profile_profile.profile to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { acf_err = (float *)(PyArray_DATA(capi_acf_err_tmp)); /* Processing variable power */ power_Dims[0]=nhts; capi_power_intent |= F2PY_INTENT_IN; capi_power_tmp = array_from_pyobj(NPY_FLOAT,power_Dims,power_Rank,capi_power_intent,power_capi); if (capi_power_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 3rd argument `power' of full_profile_profile.profile to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { power = (float *)(PyArray_DATA(capi_power_tmp)); /* Processing variable en */ en_Dims[0]=nhts; capi_en_intent |= F2PY_INTENT_IN; capi_en_tmp = array_from_pyobj(NPY_FLOAT,en_Dims,en_Rank,capi_en_intent,en_capi); if (capi_en_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 4th argument `en' of full_profile_profile.profile to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { en = (float *)(PyArray_DATA(capi_en_tmp)); /* Processing variable alag */ alag_Dims[0]=ibits; capi_alag_intent |= F2PY_INTENT_IN; capi_alag_tmp = array_from_pyobj(NPY_FLOAT,alag_Dims,alag_Rank,capi_alag_intent,alag_capi); if (capi_alag_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 5th argument `alag' of full_profile_profile.profile to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { alag = (float *)(PyArray_DATA(capi_alag_tmp)); /* Processing variable thb2 */ thb2_Dims[0]=nhts; capi_thb2_intent |= F2PY_INTENT_IN; capi_thb2_tmp = array_from_pyobj(NPY_FLOAT,thb2_Dims,thb2_Rank,capi_thb2_intent,thb2_capi); if (capi_thb2_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 6th argument `thb2' of full_profile_profile.profile to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { thb2 = (float *)(PyArray_DATA(capi_thb2_tmp)); /* Processing variable bfm2 */ bfm2_Dims[0]=nhts; capi_bfm2_intent |= F2PY_INTENT_IN; capi_bfm2_tmp = array_from_pyobj(NPY_FLOAT,bfm2_Dims,bfm2_Rank,capi_bfm2_intent,bfm2_capi); if (capi_bfm2_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 7th argument `bfm2' of full_profile_profile.profile to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { bfm2 = (float *)(PyArray_DATA(capi_bfm2_tmp)); /* Processing variable range2 */ range2_Dims[0]=nhts; capi_range2_intent |= F2PY_INTENT_IN; capi_range2_tmp = array_from_pyobj(NPY_FLOAT,range2_Dims,range2_Rank,capi_range2_intent,range2_capi); if (capi_range2_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 16th argument `range2' of full_profile_profile.profile to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { range2 = (float *)(PyArray_DATA(capi_range2_tmp)); /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(acf_sum,acf_err,power,en,alag,thb2,bfm2,ote,ete,oti,eti,oph,eph,ophe,ephe,range2,&ut,&nhts,&nacf,&ibits,acf_avg_real,status); 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(""); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ if((PyObject *)capi_range2_tmp!=range2_capi) { Py_XDECREF(capi_range2_tmp); } } /*if (capi_range2_tmp == NULL) ... else of range2*/ /* End of cleaning variable range2 */ if((PyObject *)capi_bfm2_tmp!=bfm2_capi) { Py_XDECREF(capi_bfm2_tmp); } } /*if (capi_bfm2_tmp == NULL) ... else of bfm2*/ /* End of cleaning variable bfm2 */ if((PyObject *)capi_thb2_tmp!=thb2_capi) { Py_XDECREF(capi_thb2_tmp); } } /*if (capi_thb2_tmp == NULL) ... else of thb2*/ /* End of cleaning variable thb2 */ if((PyObject *)capi_alag_tmp!=alag_capi) { Py_XDECREF(capi_alag_tmp); } } /*if (capi_alag_tmp == NULL) ... else of alag*/ /* End of cleaning variable alag */ if((PyObject *)capi_en_tmp!=en_capi) { Py_XDECREF(capi_en_tmp); } } /*if (capi_en_tmp == NULL) ... else of en*/ /* End of cleaning variable en */ if((PyObject *)capi_power_tmp!=power_capi) { Py_XDECREF(capi_power_tmp); } } /*if (capi_power_tmp == NULL) ... else of power*/ /* End of cleaning variable power */ if((PyObject *)capi_acf_err_tmp!=acf_err_capi) { Py_XDECREF(capi_acf_err_tmp); } } /*if (capi_acf_err_tmp == NULL) ... else of acf_err*/ /* End of cleaning variable acf_err */ if((PyObject *)capi_acf_avg_real_tmp!=acf_avg_real_capi) { Py_XDECREF(capi_acf_avg_real_tmp); } } /*if (capi_acf_avg_real_tmp == NULL) ... else of acf_avg_real*/ /* End of cleaning variable acf_avg_real */ } /*CHECKSCALAR(shape(acf_sum,2)==ibits)*/ } /*if (f2py_success) of ibits*/ /* End of cleaning variable ibits */ } /*CHECKSCALAR(shape(acf_sum,1)==nhts)*/ } /*if (f2py_success) of nhts*/ /* End of cleaning variable nhts */ if((PyObject *)capi_ephe_tmp!=ephe_capi) { Py_XDECREF(capi_ephe_tmp); } } /*if (capi_ephe_tmp == NULL) ... else of ephe*/ /* End of cleaning variable ephe */ if((PyObject *)capi_ophe_tmp!=ophe_capi) { Py_XDECREF(capi_ophe_tmp); } } /*if (capi_ophe_tmp == NULL) ... else of ophe*/ /* End of cleaning variable ophe */ if((PyObject *)capi_eph_tmp!=eph_capi) { Py_XDECREF(capi_eph_tmp); } } /*if (capi_eph_tmp == NULL) ... else of eph*/ /* End of cleaning variable eph */ if((PyObject *)capi_oph_tmp!=oph_capi) { Py_XDECREF(capi_oph_tmp); } } /*if (capi_oph_tmp == NULL) ... else of oph*/ /* End of cleaning variable oph */ if((PyObject *)capi_eti_tmp!=eti_capi) { Py_XDECREF(capi_eti_tmp); } } /*if (capi_eti_tmp == NULL) ... else of eti*/ /* End of cleaning variable eti */ if((PyObject *)capi_oti_tmp!=oti_capi) { Py_XDECREF(capi_oti_tmp); } } /*if (capi_oti_tmp == NULL) ... else of oti*/ /* End of cleaning variable oti */ if((PyObject *)capi_ete_tmp!=ete_capi) { Py_XDECREF(capi_ete_tmp); } } /*if (capi_ete_tmp == NULL) ... else of ete*/ /* End of cleaning variable ete */ if((PyObject *)capi_ote_tmp!=ote_capi) { Py_XDECREF(capi_ote_tmp); } } /*if (capi_ote_tmp == NULL) ... else of ote*/ /* End of cleaning variable ote */ if((PyObject *)capi_status_tmp!=status_capi) { Py_XDECREF(capi_status_tmp); } } /*if (capi_status_tmp == NULL) ... else of status*/ /* End of cleaning variable status */ } /*if (f2py_success) of nacf*/ /* End of cleaning variable nacf */ } /*if (f2py_success) of ut*/ /* End of cleaning variable ut */ if((PyObject *)capi_acf_sum_tmp!=acf_sum_capi) { Py_XDECREF(capi_acf_sum_tmp); } } /*if (capi_acf_sum_tmp == NULL) ... else of acf_sum*/ /* End of cleaning variable acf_sum */ /*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 profile *******************************/ /************************************ grid ************************************/ static char doc_f2py_rout_full_profile_profile_grid[] = "\ grid()\n\nWrapper for ``grid``.\ \n"; /* extern void F_FUNC(grid,GRID)(void); */ static PyObject *f2py_rout_full_profile_profile_grid(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(void)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ static char *capi_kwlist[] = {NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "|:full_profile_profile.grid",\ capi_kwlist)) return NULL; /*frompyobj*/ /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(); 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(""); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ /*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 grid ********************************/ /********************************* propagate *********************************/ static char doc_f2py_rout_full_profile_profile_propagate[] = "\ propagate(xe)\n\nWrapper for ``propagate``.\ \n\nParameters\n----------\n" "xe : input rank-1 array('f') with bounds (150)"; /* extern void F_FUNC(propagate,PROPAGATE)(float*); */ static PyObject *f2py_rout_full_profile_profile_propagate(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(float*)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ float *xe = NULL; npy_intp xe_Dims[1] = {-1}; const int xe_Rank = 1; PyArrayObject *capi_xe_tmp = NULL; int capi_xe_intent = 0; PyObject *xe_capi = Py_None; static char *capi_kwlist[] = {"xe",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "O|:full_profile_profile.propagate",\ capi_kwlist,&xe_capi)) return NULL; /*frompyobj*/ /* Processing variable xe */ xe_Dims[0]=150; capi_xe_intent |= F2PY_INTENT_IN; capi_xe_tmp = array_from_pyobj(NPY_FLOAT,xe_Dims,xe_Rank,capi_xe_intent,xe_capi); if (capi_xe_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 1st argument `xe' of full_profile_profile.propagate to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { xe = (float *)(PyArray_DATA(capi_xe_tmp)); /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(xe); 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(""); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ if((PyObject *)capi_xe_tmp!=xe_capi) { Py_XDECREF(capi_xe_tmp); } } /*if (capi_xe_tmp == NULL) ... else of xe*/ /* End of cleaning variable xe */ /*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 propagate ******************************/ /********************************* fcn_lpreg *********************************/ static char doc_f2py_rout_full_profile_profile_fcn_lpreg[] = "\ fcn_lpreg(x,fvec,iflag,[m,n])\n\nWrapper for ``fcn_lpreg``.\ \n\nParameters\n----------\n" "x : input rank-1 array('f') with bounds (n)\n" "fvec : input rank-1 array('f') with bounds (m)\n" "iflag : input int\n" "\nOther Parameters\n----------------\n" "m : input int, optional\n Default: len(fvec)\n" "n : input int, optional\n Default: len(x)"; /* extern void F_FUNC_US(fcn_lpreg,FCN_LPREG)(int*,int*,float*,float*,int*); */ static PyObject *f2py_rout_full_profile_profile_fcn_lpreg(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(int*,int*,float*,float*,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 *x = NULL; npy_intp x_Dims[1] = {-1}; const int x_Rank = 1; PyArrayObject *capi_x_tmp = NULL; int capi_x_intent = 0; PyObject *x_capi = Py_None; float *fvec = NULL; npy_intp fvec_Dims[1] = {-1}; const int fvec_Rank = 1; PyArrayObject *capi_fvec_tmp = NULL; int capi_fvec_intent = 0; PyObject *fvec_capi = Py_None; int iflag = 0; PyObject *iflag_capi = Py_None; static char *capi_kwlist[] = {"x","fvec","iflag","m","n",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "OOO|OO:full_profile_profile.fcn_lpreg",\ capi_kwlist,&x_capi,&fvec_capi,&iflag_capi,&m_capi,&n_capi)) return NULL; /*frompyobj*/ /* Processing variable x */ ; capi_x_intent |= F2PY_INTENT_IN; capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); if (capi_x_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 1st argument `x' of full_profile_profile.fcn_lpreg to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { x = (float *)(PyArray_DATA(capi_x_tmp)); /* Processing variable fvec */ ; capi_fvec_intent |= F2PY_INTENT_IN; capi_fvec_tmp = array_from_pyobj(NPY_FLOAT,fvec_Dims,fvec_Rank,capi_fvec_intent,fvec_capi); if (capi_fvec_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 2nd argument `fvec' of full_profile_profile.fcn_lpreg to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { fvec = (float *)(PyArray_DATA(capi_fvec_tmp)); /* Processing variable iflag */ f2py_success = int_from_pyobj(&iflag,iflag_capi,"full_profile_profile.fcn_lpreg() 3rd argument (iflag) can't be converted to int"); if (f2py_success) { /* Processing variable m */ if (m_capi == Py_None) m = len(fvec); else f2py_success = int_from_pyobj(&m,m_capi,"full_profile_profile.fcn_lpreg() 1st keyword (m) can't be converted to int"); if (f2py_success) { CHECKSCALAR(len(fvec)>=m,"len(fvec)>=m","1st keyword m","fcn_lpreg:m=%d",m) { /* Processing variable n */ if (n_capi == Py_None) n = len(x); else f2py_success = int_from_pyobj(&n,n_capi,"full_profile_profile.fcn_lpreg() 2nd keyword (n) can't be converted to int"); if (f2py_success) { CHECKSCALAR(len(x)>=n,"len(x)>=n","2nd keyword n","fcn_lpreg:n=%d",n) { /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(&m,&n,x,fvec,&iflag); 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(""); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ } /*CHECKSCALAR(len(x)>=n)*/ } /*if (f2py_success) of n*/ /* End of cleaning variable n */ } /*CHECKSCALAR(len(fvec)>=m)*/ } /*if (f2py_success) of m*/ /* End of cleaning variable m */ } /*if (f2py_success) of iflag*/ /* End of cleaning variable iflag */ if((PyObject *)capi_fvec_tmp!=fvec_capi) { Py_XDECREF(capi_fvec_tmp); } } /*if (capi_fvec_tmp == NULL) ... else of fvec*/ /* End of cleaning variable fvec */ if((PyObject *)capi_x_tmp!=x_capi) { Py_XDECREF(capi_x_tmp); } } /*if (capi_x_tmp == NULL) ... else of x*/ /* End of cleaning variable x */ /*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 fcn_lpreg ******************************/ /********************************* get_scale *********************************/ static char doc_f2py_rout_full_profile_profile_get_scale[] = "\ get_scale(plag2)\n\nWrapper for ``get_scale``.\ \n\nParameters\n----------\n" "plag2 : input rank-2 array('f') with bounds (16,75)"; /* extern void F_FUNC_US(get_scale,GET_SCALE)(float*); */ static PyObject *f2py_rout_full_profile_profile_get_scale(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(float*)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ float *plag2 = NULL; npy_intp plag2_Dims[2] = {-1, -1}; const int plag2_Rank = 2; PyArrayObject *capi_plag2_tmp = NULL; int capi_plag2_intent = 0; PyObject *plag2_capi = Py_None; static char *capi_kwlist[] = {"plag2",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "O|:full_profile_profile.get_scale",\ capi_kwlist,&plag2_capi)) return NULL; /*frompyobj*/ /* Processing variable plag2 */ plag2_Dims[0]=16,plag2_Dims[1]=75; capi_plag2_intent |= F2PY_INTENT_IN; capi_plag2_tmp = array_from_pyobj(NPY_FLOAT,plag2_Dims,plag2_Rank,capi_plag2_intent,plag2_capi); if (capi_plag2_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 1st argument `plag2' of full_profile_profile.get_scale to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { plag2 = (float *)(PyArray_DATA(capi_plag2_tmp)); /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(plag2); 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(""); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ if((PyObject *)capi_plag2_tmp!=plag2_capi) { Py_XDECREF(capi_plag2_tmp); } } /*if (capi_plag2_tmp == NULL) ... else of plag2*/ /* End of cleaning variable plag2 */ /*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 get_scale ******************************/ /*********************************** enorm ***********************************/ static char doc_f2py_rout_full_profile_profile_enorm[] = "\ enorm = enorm(x,[n])\n\nWrapper for ``enorm``.\ \n\nParameters\n----------\n" "x : input rank-1 array('f') with bounds (n)\n" "\nOther Parameters\n----------------\n" "n : input int, optional\n Default: len(x)\n" "\nReturns\n-------\n" "enorm : float"; /* extern void F_WRAPPEDFUNC(enorm,ENORM)(float*,int*,float*); */ static PyObject *f2py_rout_full_profile_profile_enorm(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(float*,int*,float*)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ float enorm = 0; int n = 0; PyObject *n_capi = Py_None; float *x = NULL; npy_intp x_Dims[1] = {-1}; const int x_Rank = 1; PyArrayObject *capi_x_tmp = NULL; int capi_x_intent = 0; PyObject *x_capi = Py_None; static char *capi_kwlist[] = {"x","n",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "O|O:full_profile_profile.enorm",\ capi_kwlist,&x_capi,&n_capi)) return NULL; /*frompyobj*/ /* Processing variable x */ ; capi_x_intent |= F2PY_INTENT_IN; capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); if (capi_x_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 1st argument `x' of full_profile_profile.enorm to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { x = (float *)(PyArray_DATA(capi_x_tmp)); /* Processing variable enorm */ /* Processing variable n */ if (n_capi == Py_None) n = len(x); else f2py_success = int_from_pyobj(&n,n_capi,"full_profile_profile.enorm() 1st keyword (n) can't be converted to int"); if (f2py_success) { CHECKSCALAR(len(x)>=n,"len(x)>=n","1st keyword n","enorm:n=%d",n) { /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(&enorm,&n,x); 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("f",enorm); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ } /*CHECKSCALAR(len(x)>=n)*/ } /*if (f2py_success) of n*/ /* End of cleaning variable n */ /* End of cleaning variable enorm */ if((PyObject *)capi_x_tmp!=x_capi) { Py_XDECREF(capi_x_tmp); } } /*if (capi_x_tmp == NULL) ... else of x*/ /* End of cleaning variable x */ /*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 enorm ********************************/ /*********************************** fdjac2 ***********************************/ static char doc_f2py_rout_full_profile_profile_fdjac2[] = "\ fdjac2(fcn,x,fvec,fjac,iflag,epsfcn,wa,[m,n,ldfjac,fcn_extra_args])\n\nWrapper for ``fdjac2``.\ \n\nParameters\n----------\n" "fcn : call-back function\n" "x : input rank-1 array('f') with bounds (n)\n" "fvec : input rank-1 array('f') with bounds (m)\n" "fjac : input rank-2 array('f') with bounds (ldfjac,n)\n" "iflag : input int\n" "epsfcn : input float\n" "wa : input rank-1 array('f') with bounds (m)\n" "\nOther Parameters\n----------------\n" "fcn_extra_args : input tuple, optional\n Default: ()\n" "m : input int, optional\n Default: len(fvec)\n" "n : input int, optional\n Default: len(x)\n" "ldfjac : input int, optional\n Default: shape(fjac,0)\n" "\nNotes\n-----\nCall-back functions::\n\n" " def fcn(x,wa,iflag,[m,n]): return \n\ Required arguments:\n" " x : input rank-1 array('f') with bounds (n)\n" " wa : input rank-1 array('f') with bounds (m)\n" " iflag : input int\n" " Optional arguments:\n" " m : input int, optional\n Default: len(wa)\n" " n : input int, optional\n Default: len(x)"; /* extern void F_FUNC(fdjac2,FDJAC2)(cb_fcn_in_fdjac2__user__routines_typedef,int*,int*,float*,float*,float*,int*,int*,float*,float*); */ static PyObject *f2py_rout_full_profile_profile_fdjac2(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(cb_fcn_in_fdjac2__user__routines_typedef,int*,int*,float*,float*,float*,int*,int*,float*,float*)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ PyObject *fcn_capi = Py_None; PyTupleObject *fcn_xa_capi = NULL; PyTupleObject *fcn_args_capi = NULL; int fcn_nofargs_capi = 0; cb_fcn_in_fdjac2__user__routines_typedef fcn_cptr; int m = 0; PyObject *m_capi = Py_None; int n = 0; PyObject *n_capi = Py_None; float *x = NULL; npy_intp x_Dims[1] = {-1}; const int x_Rank = 1; PyArrayObject *capi_x_tmp = NULL; int capi_x_intent = 0; PyObject *x_capi = Py_None; float *fvec = NULL; npy_intp fvec_Dims[1] = {-1}; const int fvec_Rank = 1; PyArrayObject *capi_fvec_tmp = NULL; int capi_fvec_intent = 0; PyObject *fvec_capi = Py_None; float *fjac = NULL; npy_intp fjac_Dims[2] = {-1, -1}; const int fjac_Rank = 2; PyArrayObject *capi_fjac_tmp = NULL; int capi_fjac_intent = 0; PyObject *fjac_capi = Py_None; int ldfjac = 0; PyObject *ldfjac_capi = Py_None; int iflag = 0; PyObject *iflag_capi = Py_None; float epsfcn = 0; PyObject *epsfcn_capi = Py_None; float *wa = NULL; npy_intp wa_Dims[1] = {-1}; const int wa_Rank = 1; PyArrayObject *capi_wa_tmp = NULL; int capi_wa_intent = 0; PyObject *wa_capi = Py_None; static char *capi_kwlist[] = {"fcn","x","fvec","fjac","iflag","epsfcn","wa","m","n","ldfjac","fcn_extra_args",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "OOOOOOO|OOOO!:full_profile_profile.fdjac2",\ capi_kwlist,&fcn_capi,&x_capi,&fvec_capi,&fjac_capi,&iflag_capi,&epsfcn_capi,&wa_capi,&m_capi,&n_capi,&ldfjac_capi,&PyTuple_Type,&fcn_xa_capi)) return NULL; /*frompyobj*/ /* Processing variable fcn */ if(F2PyCapsule_Check(fcn_capi)) { fcn_cptr = F2PyCapsule_AsVoidPtr(fcn_capi); } else { fcn_cptr = cb_fcn_in_fdjac2__user__routines; } fcn_nofargs_capi = cb_fcn_in_fdjac2__user__routines_nofargs; if (create_cb_arglist(fcn_capi,fcn_xa_capi,5,2,&cb_fcn_in_fdjac2__user__routines_nofargs,&fcn_args_capi,"failed in processing argument list for call-back fcn.")) { jmp_buf fcn_jmpbuf; CFUNCSMESS("Saving jmpbuf for `fcn`.\n"); SWAP(fcn_capi,cb_fcn_in_fdjac2__user__routines_capi,PyObject); SWAP(fcn_args_capi,cb_fcn_in_fdjac2__user__routines_args_capi,PyTupleObject); memcpy(&fcn_jmpbuf,&cb_fcn_in_fdjac2__user__routines_jmpbuf,sizeof(jmp_buf)); /* Processing variable x */ ; capi_x_intent |= F2PY_INTENT_IN; capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); if (capi_x_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 2nd argument `x' of full_profile_profile.fdjac2 to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { x = (float *)(PyArray_DATA(capi_x_tmp)); /* Processing variable fvec */ ; capi_fvec_intent |= F2PY_INTENT_IN; capi_fvec_tmp = array_from_pyobj(NPY_FLOAT,fvec_Dims,fvec_Rank,capi_fvec_intent,fvec_capi); if (capi_fvec_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 3rd argument `fvec' of full_profile_profile.fdjac2 to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { fvec = (float *)(PyArray_DATA(capi_fvec_tmp)); /* Processing variable iflag */ f2py_success = int_from_pyobj(&iflag,iflag_capi,"full_profile_profile.fdjac2() 5th argument (iflag) can't be converted to int"); if (f2py_success) { /* Processing variable epsfcn */ f2py_success = float_from_pyobj(&epsfcn,epsfcn_capi,"full_profile_profile.fdjac2() 6th argument (epsfcn) can't be converted to float"); if (f2py_success) { /* Processing variable m */ if (m_capi == Py_None) m = len(fvec); else f2py_success = int_from_pyobj(&m,m_capi,"full_profile_profile.fdjac2() 1st keyword (m) can't be converted to int"); if (f2py_success) { CHECKSCALAR(len(fvec)>=m,"len(fvec)>=m","1st keyword m","fdjac2:m=%d",m) { /* Processing variable n */ if (n_capi == Py_None) n = len(x); else f2py_success = int_from_pyobj(&n,n_capi,"full_profile_profile.fdjac2() 2nd keyword (n) can't be converted to int"); if (f2py_success) { CHECKSCALAR(len(x)>=n,"len(x)>=n","2nd keyword n","fdjac2:n=%d",n) { /* Processing variable fjac */ fjac_Dims[1]=n; capi_fjac_intent |= F2PY_INTENT_IN; capi_fjac_tmp = array_from_pyobj(NPY_FLOAT,fjac_Dims,fjac_Rank,capi_fjac_intent,fjac_capi); if (capi_fjac_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 4th argument `fjac' of full_profile_profile.fdjac2 to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { fjac = (float *)(PyArray_DATA(capi_fjac_tmp)); /* Processing variable ldfjac */ if (ldfjac_capi == Py_None) ldfjac = shape(fjac,0); else f2py_success = int_from_pyobj(&ldfjac,ldfjac_capi,"full_profile_profile.fdjac2() 3rd keyword (ldfjac) can't be converted to int"); if (f2py_success) { CHECKSCALAR(shape(fjac,0)==ldfjac,"shape(fjac,0)==ldfjac","3rd keyword ldfjac","fdjac2:ldfjac=%d",ldfjac) { /* Processing variable wa */ wa_Dims[0]=m; capi_wa_intent |= F2PY_INTENT_IN; capi_wa_tmp = array_from_pyobj(NPY_FLOAT,wa_Dims,wa_Rank,capi_wa_intent,wa_capi); if (capi_wa_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 7th argument `wa' of full_profile_profile.fdjac2 to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { wa = (float *)(PyArray_DATA(capi_wa_tmp)); /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ if ((setjmp(cb_fcn_in_fdjac2__user__routines_jmpbuf))) { f2py_success = 0; } else { (*f2py_func)(fcn_cptr,&m,&n,x,fvec,fjac,&ldfjac,&iflag,&epsfcn,wa); } 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(""); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ if((PyObject *)capi_wa_tmp!=wa_capi) { Py_XDECREF(capi_wa_tmp); } } /*if (capi_wa_tmp == NULL) ... else of wa*/ /* End of cleaning variable wa */ } /*CHECKSCALAR(shape(fjac,0)==ldfjac)*/ } /*if (f2py_success) of ldfjac*/ /* End of cleaning variable ldfjac */ if((PyObject *)capi_fjac_tmp!=fjac_capi) { Py_XDECREF(capi_fjac_tmp); } } /*if (capi_fjac_tmp == NULL) ... else of fjac*/ /* End of cleaning variable fjac */ } /*CHECKSCALAR(len(x)>=n)*/ } /*if (f2py_success) of n*/ /* End of cleaning variable n */ } /*CHECKSCALAR(len(fvec)>=m)*/ } /*if (f2py_success) of m*/ /* End of cleaning variable m */ } /*if (f2py_success) of epsfcn*/ /* End of cleaning variable epsfcn */ } /*if (f2py_success) of iflag*/ /* End of cleaning variable iflag */ if((PyObject *)capi_fvec_tmp!=fvec_capi) { Py_XDECREF(capi_fvec_tmp); } } /*if (capi_fvec_tmp == NULL) ... else of fvec*/ /* End of cleaning variable fvec */ if((PyObject *)capi_x_tmp!=x_capi) { Py_XDECREF(capi_x_tmp); } } /*if (capi_x_tmp == NULL) ... else of x*/ /* End of cleaning variable x */ CFUNCSMESS("Restoring jmpbuf for `fcn`.\n"); cb_fcn_in_fdjac2__user__routines_capi = fcn_capi; Py_DECREF(cb_fcn_in_fdjac2__user__routines_args_capi); cb_fcn_in_fdjac2__user__routines_args_capi = fcn_args_capi; cb_fcn_in_fdjac2__user__routines_nofargs = fcn_nofargs_capi; memcpy(&cb_fcn_in_fdjac2__user__routines_jmpbuf,&fcn_jmpbuf,sizeof(jmp_buf)); } /* End of cleaning variable fcn */ /*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 fdjac2 *******************************/ /*********************************** lmdif ***********************************/ static char doc_f2py_rout_full_profile_profile_lmdif[] = "\ lmdif(fcn,x,fvec,ftol,xtol,gtol,maxfev,epsfcn,diag,mode,factor,nprint,info,nfev,fjac,ipvt,qtf,wa1,wa2,wa3,wa4,[m,n,ldfjac,fcn_extra_args])\n\nWrapper for ``lmdif``.\ \n\nParameters\n----------\n" "fcn : call-back function\n" "x : input rank-1 array('f') with bounds (n)\n" "fvec : input rank-1 array('f') with bounds (m)\n" "ftol : input float\n" "xtol : input float\n" "gtol : input float\n" "maxfev : input int\n" "epsfcn : input float\n" "diag : input rank-1 array('f') with bounds (n)\n" "mode : input int\n" "factor : input float\n" "nprint : input int\n" "info : input int\n" "nfev : input int\n" "fjac : input rank-2 array('f') with bounds (ldfjac,n)\n" "ipvt : input rank-1 array('i') with bounds (n)\n" "qtf : input rank-1 array('f') with bounds (n)\n" "wa1 : input rank-1 array('f') with bounds (n)\n" "wa2 : input rank-1 array('f') with bounds (n)\n" "wa3 : input rank-1 array('f') with bounds (n)\n" "wa4 : input rank-1 array('f') with bounds (m)\n" "\nOther Parameters\n----------------\n" "fcn_extra_args : input tuple, optional\n Default: ()\n" "m : input int, optional\n Default: len(fvec)\n" "n : input int, optional\n Default: len(x)\n" "ldfjac : input int, optional\n Default: shape(fjac,0)\n" "\nNotes\n-----\nCall-back functions::\n\n" " def fcn(x,fvec,iflag,[m,n]): return \n\ Required arguments:\n" " x : input rank-1 array('f') with bounds (n)\n" " fvec : input rank-1 array('f') with bounds (m)\n" " iflag : input int\n" " Optional arguments:\n" " m : input int, optional\n Default: len(fvec)\n" " n : input int, optional\n Default: len(x)"; /* extern void F_FUNC(lmdif,LMDIF)(cb_fcn_in_lmdif__user__routines_typedef,int*,int*,float*,float*,float*,float*,float*,int*,float*,float*,int*,float*,int*,int*,int*,float*,int*,int*,float*,float*,float*,float*,float*); */ static PyObject *f2py_rout_full_profile_profile_lmdif(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(cb_fcn_in_lmdif__user__routines_typedef,int*,int*,float*,float*,float*,float*,float*,int*,float*,float*,int*,float*,int*,int*,int*,float*,int*,int*,float*,float*,float*,float*,float*)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ PyObject *fcn_capi = Py_None; PyTupleObject *fcn_xa_capi = NULL; PyTupleObject *fcn_args_capi = NULL; int fcn_nofargs_capi = 0; cb_fcn_in_lmdif__user__routines_typedef fcn_cptr; int m = 0; PyObject *m_capi = Py_None; int n = 0; PyObject *n_capi = Py_None; float *x = NULL; npy_intp x_Dims[1] = {-1}; const int x_Rank = 1; PyArrayObject *capi_x_tmp = NULL; int capi_x_intent = 0; PyObject *x_capi = Py_None; float *fvec = NULL; npy_intp fvec_Dims[1] = {-1}; const int fvec_Rank = 1; PyArrayObject *capi_fvec_tmp = NULL; int capi_fvec_intent = 0; PyObject *fvec_capi = Py_None; float ftol = 0; PyObject *ftol_capi = Py_None; float xtol = 0; PyObject *xtol_capi = Py_None; float gtol = 0; PyObject *gtol_capi = Py_None; int maxfev = 0; PyObject *maxfev_capi = Py_None; float epsfcn = 0; PyObject *epsfcn_capi = Py_None; float *diag = NULL; npy_intp diag_Dims[1] = {-1}; const int diag_Rank = 1; PyArrayObject *capi_diag_tmp = NULL; int capi_diag_intent = 0; PyObject *diag_capi = Py_None; int mode = 0; PyObject *mode_capi = Py_None; float factor = 0; PyObject *factor_capi = Py_None; int nprint = 0; PyObject *nprint_capi = Py_None; int info = 0; PyObject *info_capi = Py_None; int nfev = 0; PyObject *nfev_capi = Py_None; float *fjac = NULL; npy_intp fjac_Dims[2] = {-1, -1}; const int fjac_Rank = 2; PyArrayObject *capi_fjac_tmp = NULL; int capi_fjac_intent = 0; PyObject *fjac_capi = Py_None; int ldfjac = 0; PyObject *ldfjac_capi = Py_None; int *ipvt = NULL; npy_intp ipvt_Dims[1] = {-1}; const int ipvt_Rank = 1; PyArrayObject *capi_ipvt_tmp = NULL; int capi_ipvt_intent = 0; PyObject *ipvt_capi = Py_None; float *qtf = NULL; npy_intp qtf_Dims[1] = {-1}; const int qtf_Rank = 1; PyArrayObject *capi_qtf_tmp = NULL; int capi_qtf_intent = 0; PyObject *qtf_capi = Py_None; float *wa1 = NULL; npy_intp wa1_Dims[1] = {-1}; const int wa1_Rank = 1; PyArrayObject *capi_wa1_tmp = NULL; int capi_wa1_intent = 0; PyObject *wa1_capi = Py_None; float *wa2 = NULL; npy_intp wa2_Dims[1] = {-1}; const int wa2_Rank = 1; PyArrayObject *capi_wa2_tmp = NULL; int capi_wa2_intent = 0; PyObject *wa2_capi = Py_None; float *wa3 = NULL; npy_intp wa3_Dims[1] = {-1}; const int wa3_Rank = 1; PyArrayObject *capi_wa3_tmp = NULL; int capi_wa3_intent = 0; PyObject *wa3_capi = Py_None; float *wa4 = NULL; npy_intp wa4_Dims[1] = {-1}; const int wa4_Rank = 1; PyArrayObject *capi_wa4_tmp = NULL; int capi_wa4_intent = 0; PyObject *wa4_capi = Py_None; static char *capi_kwlist[] = {"fcn","x","fvec","ftol","xtol","gtol","maxfev","epsfcn","diag","mode","factor","nprint","info","nfev","fjac","ipvt","qtf","wa1","wa2","wa3","wa4","m","n","ldfjac","fcn_extra_args",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "OOOOOOOOOOOOOOOOOOOOO|OOOO!:full_profile_profile.lmdif",\ capi_kwlist,&fcn_capi,&x_capi,&fvec_capi,&ftol_capi,&xtol_capi,>ol_capi,&maxfev_capi,&epsfcn_capi,&diag_capi,&mode_capi,&factor_capi,&nprint_capi,&info_capi,&nfev_capi,&fjac_capi,&ipvt_capi,&qtf_capi,&wa1_capi,&wa2_capi,&wa3_capi,&wa4_capi,&m_capi,&n_capi,&ldfjac_capi,&PyTuple_Type,&fcn_xa_capi)) return NULL; /*frompyobj*/ /* Processing variable fcn */ if(F2PyCapsule_Check(fcn_capi)) { fcn_cptr = F2PyCapsule_AsVoidPtr(fcn_capi); } else { fcn_cptr = cb_fcn_in_lmdif__user__routines; } fcn_nofargs_capi = cb_fcn_in_lmdif__user__routines_nofargs; if (create_cb_arglist(fcn_capi,fcn_xa_capi,5,2,&cb_fcn_in_lmdif__user__routines_nofargs,&fcn_args_capi,"failed in processing argument list for call-back fcn.")) { jmp_buf fcn_jmpbuf; CFUNCSMESS("Saving jmpbuf for `fcn`.\n"); SWAP(fcn_capi,cb_fcn_in_lmdif__user__routines_capi,PyObject); SWAP(fcn_args_capi,cb_fcn_in_lmdif__user__routines_args_capi,PyTupleObject); memcpy(&fcn_jmpbuf,&cb_fcn_in_lmdif__user__routines_jmpbuf,sizeof(jmp_buf)); /* Processing variable x */ ; capi_x_intent |= F2PY_INTENT_IN; capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); if (capi_x_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 2nd argument `x' of full_profile_profile.lmdif to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { x = (float *)(PyArray_DATA(capi_x_tmp)); /* Processing variable fvec */ ; capi_fvec_intent |= F2PY_INTENT_IN; capi_fvec_tmp = array_from_pyobj(NPY_FLOAT,fvec_Dims,fvec_Rank,capi_fvec_intent,fvec_capi); if (capi_fvec_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 3rd argument `fvec' of full_profile_profile.lmdif to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { fvec = (float *)(PyArray_DATA(capi_fvec_tmp)); /* Processing variable ftol */ f2py_success = float_from_pyobj(&ftol,ftol_capi,"full_profile_profile.lmdif() 4th argument (ftol) can't be converted to float"); if (f2py_success) { /* Processing variable xtol */ f2py_success = float_from_pyobj(&xtol,xtol_capi,"full_profile_profile.lmdif() 5th argument (xtol) can't be converted to float"); if (f2py_success) { /* Processing variable gtol */ f2py_success = float_from_pyobj(>ol,gtol_capi,"full_profile_profile.lmdif() 6th argument (gtol) can't be converted to float"); if (f2py_success) { /* Processing variable maxfev */ f2py_success = int_from_pyobj(&maxfev,maxfev_capi,"full_profile_profile.lmdif() 7th argument (maxfev) can't be converted to int"); if (f2py_success) { /* Processing variable epsfcn */ f2py_success = float_from_pyobj(&epsfcn,epsfcn_capi,"full_profile_profile.lmdif() 8th argument (epsfcn) can't be converted to float"); if (f2py_success) { /* Processing variable mode */ f2py_success = int_from_pyobj(&mode,mode_capi,"full_profile_profile.lmdif() 10th argument (mode) can't be converted to int"); if (f2py_success) { /* Processing variable factor */ f2py_success = float_from_pyobj(&factor,factor_capi,"full_profile_profile.lmdif() 11st argument (factor) can't be converted to float"); if (f2py_success) { /* Processing variable nprint */ f2py_success = int_from_pyobj(&nprint,nprint_capi,"full_profile_profile.lmdif() 12nd argument (nprint) can't be converted to int"); if (f2py_success) { /* Processing variable info */ f2py_success = int_from_pyobj(&info,info_capi,"full_profile_profile.lmdif() 13rd argument (info) can't be converted to int"); if (f2py_success) { /* Processing variable nfev */ f2py_success = int_from_pyobj(&nfev,nfev_capi,"full_profile_profile.lmdif() 14th argument (nfev) can't be converted to int"); if (f2py_success) { /* Processing variable m */ if (m_capi == Py_None) m = len(fvec); else f2py_success = int_from_pyobj(&m,m_capi,"full_profile_profile.lmdif() 1st keyword (m) can't be converted to int"); if (f2py_success) { CHECKSCALAR(len(fvec)>=m,"len(fvec)>=m","1st keyword m","lmdif:m=%d",m) { /* Processing variable n */ if (n_capi == Py_None) n = len(x); else f2py_success = int_from_pyobj(&n,n_capi,"full_profile_profile.lmdif() 2nd keyword (n) can't be converted to int"); if (f2py_success) { CHECKSCALAR(len(x)>=n,"len(x)>=n","2nd keyword n","lmdif:n=%d",n) { /* Processing variable diag */ diag_Dims[0]=n; capi_diag_intent |= F2PY_INTENT_IN; capi_diag_tmp = array_from_pyobj(NPY_FLOAT,diag_Dims,diag_Rank,capi_diag_intent,diag_capi); if (capi_diag_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 9th argument `diag' of full_profile_profile.lmdif to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { diag = (float *)(PyArray_DATA(capi_diag_tmp)); /* Processing variable fjac */ fjac_Dims[1]=n; capi_fjac_intent |= F2PY_INTENT_IN; capi_fjac_tmp = array_from_pyobj(NPY_FLOAT,fjac_Dims,fjac_Rank,capi_fjac_intent,fjac_capi); if (capi_fjac_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 15th argument `fjac' of full_profile_profile.lmdif to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { fjac = (float *)(PyArray_DATA(capi_fjac_tmp)); /* Processing variable ldfjac */ if (ldfjac_capi == Py_None) ldfjac = shape(fjac,0); else f2py_success = int_from_pyobj(&ldfjac,ldfjac_capi,"full_profile_profile.lmdif() 3rd keyword (ldfjac) can't be converted to int"); if (f2py_success) { CHECKSCALAR(shape(fjac,0)==ldfjac,"shape(fjac,0)==ldfjac","3rd keyword ldfjac","lmdif:ldfjac=%d",ldfjac) { /* Processing variable ipvt */ ipvt_Dims[0]=n; capi_ipvt_intent |= F2PY_INTENT_IN; capi_ipvt_tmp = array_from_pyobj(NPY_INT,ipvt_Dims,ipvt_Rank,capi_ipvt_intent,ipvt_capi); if (capi_ipvt_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 16th argument `ipvt' of full_profile_profile.lmdif to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { ipvt = (int *)(PyArray_DATA(capi_ipvt_tmp)); /* Processing variable qtf */ qtf_Dims[0]=n; capi_qtf_intent |= F2PY_INTENT_IN; capi_qtf_tmp = array_from_pyobj(NPY_FLOAT,qtf_Dims,qtf_Rank,capi_qtf_intent,qtf_capi); if (capi_qtf_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 17th argument `qtf' of full_profile_profile.lmdif to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { qtf = (float *)(PyArray_DATA(capi_qtf_tmp)); /* Processing variable wa1 */ wa1_Dims[0]=n; capi_wa1_intent |= F2PY_INTENT_IN; capi_wa1_tmp = array_from_pyobj(NPY_FLOAT,wa1_Dims,wa1_Rank,capi_wa1_intent,wa1_capi); if (capi_wa1_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 18th argument `wa1' of full_profile_profile.lmdif to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { wa1 = (float *)(PyArray_DATA(capi_wa1_tmp)); /* Processing variable wa2 */ wa2_Dims[0]=n; capi_wa2_intent |= F2PY_INTENT_IN; capi_wa2_tmp = array_from_pyobj(NPY_FLOAT,wa2_Dims,wa2_Rank,capi_wa2_intent,wa2_capi); if (capi_wa2_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 19th argument `wa2' of full_profile_profile.lmdif to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { wa2 = (float *)(PyArray_DATA(capi_wa2_tmp)); /* Processing variable wa3 */ wa3_Dims[0]=n; capi_wa3_intent |= F2PY_INTENT_IN; capi_wa3_tmp = array_from_pyobj(NPY_FLOAT,wa3_Dims,wa3_Rank,capi_wa3_intent,wa3_capi); if (capi_wa3_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 20th argument `wa3' of full_profile_profile.lmdif to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { wa3 = (float *)(PyArray_DATA(capi_wa3_tmp)); /* Processing variable wa4 */ wa4_Dims[0]=m; capi_wa4_intent |= F2PY_INTENT_IN; capi_wa4_tmp = array_from_pyobj(NPY_FLOAT,wa4_Dims,wa4_Rank,capi_wa4_intent,wa4_capi); if (capi_wa4_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 21st argument `wa4' of full_profile_profile.lmdif to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { wa4 = (float *)(PyArray_DATA(capi_wa4_tmp)); /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ if ((setjmp(cb_fcn_in_lmdif__user__routines_jmpbuf))) { f2py_success = 0; } else { (*f2py_func)(fcn_cptr,&m,&n,x,fvec,&ftol,&xtol,>ol,&maxfev,&epsfcn,diag,&mode,&factor,&nprint,&info,&nfev,fjac,&ldfjac,ipvt,qtf,wa1,wa2,wa3,wa4); } 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(""); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ if((PyObject *)capi_wa4_tmp!=wa4_capi) { Py_XDECREF(capi_wa4_tmp); } } /*if (capi_wa4_tmp == NULL) ... else of wa4*/ /* End of cleaning variable wa4 */ if((PyObject *)capi_wa3_tmp!=wa3_capi) { Py_XDECREF(capi_wa3_tmp); } } /*if (capi_wa3_tmp == NULL) ... else of wa3*/ /* End of cleaning variable wa3 */ if((PyObject *)capi_wa2_tmp!=wa2_capi) { Py_XDECREF(capi_wa2_tmp); } } /*if (capi_wa2_tmp == NULL) ... else of wa2*/ /* End of cleaning variable wa2 */ if((PyObject *)capi_wa1_tmp!=wa1_capi) { Py_XDECREF(capi_wa1_tmp); } } /*if (capi_wa1_tmp == NULL) ... else of wa1*/ /* End of cleaning variable wa1 */ if((PyObject *)capi_qtf_tmp!=qtf_capi) { Py_XDECREF(capi_qtf_tmp); } } /*if (capi_qtf_tmp == NULL) ... else of qtf*/ /* End of cleaning variable qtf */ if((PyObject *)capi_ipvt_tmp!=ipvt_capi) { Py_XDECREF(capi_ipvt_tmp); } } /*if (capi_ipvt_tmp == NULL) ... else of ipvt*/ /* End of cleaning variable ipvt */ } /*CHECKSCALAR(shape(fjac,0)==ldfjac)*/ } /*if (f2py_success) of ldfjac*/ /* End of cleaning variable ldfjac */ if((PyObject *)capi_fjac_tmp!=fjac_capi) { Py_XDECREF(capi_fjac_tmp); } } /*if (capi_fjac_tmp == NULL) ... else of fjac*/ /* End of cleaning variable fjac */ if((PyObject *)capi_diag_tmp!=diag_capi) { Py_XDECREF(capi_diag_tmp); } } /*if (capi_diag_tmp == NULL) ... else of diag*/ /* End of cleaning variable diag */ } /*CHECKSCALAR(len(x)>=n)*/ } /*if (f2py_success) of n*/ /* End of cleaning variable n */ } /*CHECKSCALAR(len(fvec)>=m)*/ } /*if (f2py_success) of m*/ /* End of cleaning variable m */ } /*if (f2py_success) of nfev*/ /* End of cleaning variable nfev */ } /*if (f2py_success) of info*/ /* End of cleaning variable info */ } /*if (f2py_success) of nprint*/ /* End of cleaning variable nprint */ } /*if (f2py_success) of factor*/ /* End of cleaning variable factor */ } /*if (f2py_success) of mode*/ /* End of cleaning variable mode */ } /*if (f2py_success) of epsfcn*/ /* End of cleaning variable epsfcn */ } /*if (f2py_success) of maxfev*/ /* End of cleaning variable maxfev */ } /*if (f2py_success) of gtol*/ /* End of cleaning variable gtol */ } /*if (f2py_success) of xtol*/ /* End of cleaning variable xtol */ } /*if (f2py_success) of ftol*/ /* End of cleaning variable ftol */ if((PyObject *)capi_fvec_tmp!=fvec_capi) { Py_XDECREF(capi_fvec_tmp); } } /*if (capi_fvec_tmp == NULL) ... else of fvec*/ /* End of cleaning variable fvec */ if((PyObject *)capi_x_tmp!=x_capi) { Py_XDECREF(capi_x_tmp); } } /*if (capi_x_tmp == NULL) ... else of x*/ /* End of cleaning variable x */ CFUNCSMESS("Restoring jmpbuf for `fcn`.\n"); cb_fcn_in_lmdif__user__routines_capi = fcn_capi; Py_DECREF(cb_fcn_in_lmdif__user__routines_args_capi); cb_fcn_in_lmdif__user__routines_args_capi = fcn_args_capi; cb_fcn_in_lmdif__user__routines_nofargs = fcn_nofargs_capi; memcpy(&cb_fcn_in_lmdif__user__routines_jmpbuf,&fcn_jmpbuf,sizeof(jmp_buf)); } /* End of cleaning variable fcn */ /*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 lmdif ********************************/ /*********************************** lmpar ***********************************/ static char doc_f2py_rout_full_profile_profile_lmpar[] = "\ lmpar(r,ipvt,diag,qtb,delta,par,x,sdiag,wa1,wa2,[n,ldr])\n\nWrapper for ``lmpar``.\ \n\nParameters\n----------\n" "r : input rank-2 array('f') with bounds (ldr,n)\n" "ipvt : input rank-1 array('i') with bounds (n)\n" "diag : input rank-1 array('f') with bounds (n)\n" "qtb : input rank-1 array('f') with bounds (n)\n" "delta : input float\n" "par : input float\n" "x : input rank-1 array('f') with bounds (n)\n" "sdiag : input rank-1 array('f') with bounds (n)\n" "wa1 : input rank-1 array('f') with bounds (n)\n" "wa2 : input rank-1 array('f') with bounds (n)\n" "\nOther Parameters\n----------------\n" "n : input int, optional\n Default: shape(r,1)\n" "ldr : input int, optional\n Default: shape(r,0)"; /* extern void F_FUNC(lmpar,LMPAR)(int*,float*,int*,int*,float*,float*,float*,float*,float*,float*,float*,float*); */ static PyObject *f2py_rout_full_profile_profile_lmpar(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(int*,float*,int*,int*,float*,float*,float*,float*,float*,float*,float*,float*)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ int n = 0; PyObject *n_capi = Py_None; float *r = NULL; npy_intp r_Dims[2] = {-1, -1}; const int r_Rank = 2; PyArrayObject *capi_r_tmp = NULL; int capi_r_intent = 0; PyObject *r_capi = Py_None; int ldr = 0; PyObject *ldr_capi = Py_None; int *ipvt = NULL; npy_intp ipvt_Dims[1] = {-1}; const int ipvt_Rank = 1; PyArrayObject *capi_ipvt_tmp = NULL; int capi_ipvt_intent = 0; PyObject *ipvt_capi = Py_None; float *diag = NULL; npy_intp diag_Dims[1] = {-1}; const int diag_Rank = 1; PyArrayObject *capi_diag_tmp = NULL; int capi_diag_intent = 0; PyObject *diag_capi = Py_None; float *qtb = NULL; npy_intp qtb_Dims[1] = {-1}; const int qtb_Rank = 1; PyArrayObject *capi_qtb_tmp = NULL; int capi_qtb_intent = 0; PyObject *qtb_capi = Py_None; float delta = 0; PyObject *delta_capi = Py_None; float par = 0; PyObject *par_capi = Py_None; float *x = NULL; npy_intp x_Dims[1] = {-1}; const int x_Rank = 1; PyArrayObject *capi_x_tmp = NULL; int capi_x_intent = 0; PyObject *x_capi = Py_None; float *sdiag = NULL; npy_intp sdiag_Dims[1] = {-1}; const int sdiag_Rank = 1; PyArrayObject *capi_sdiag_tmp = NULL; int capi_sdiag_intent = 0; PyObject *sdiag_capi = Py_None; float *wa1 = NULL; npy_intp wa1_Dims[1] = {-1}; const int wa1_Rank = 1; PyArrayObject *capi_wa1_tmp = NULL; int capi_wa1_intent = 0; PyObject *wa1_capi = Py_None; float *wa2 = NULL; npy_intp wa2_Dims[1] = {-1}; const int wa2_Rank = 1; PyArrayObject *capi_wa2_tmp = NULL; int capi_wa2_intent = 0; PyObject *wa2_capi = Py_None; static char *capi_kwlist[] = {"r","ipvt","diag","qtb","delta","par","x","sdiag","wa1","wa2","n","ldr",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "OOOOOOOOOO|OO:full_profile_profile.lmpar",\ capi_kwlist,&r_capi,&ipvt_capi,&diag_capi,&qtb_capi,&delta_capi,&par_capi,&x_capi,&sdiag_capi,&wa1_capi,&wa2_capi,&n_capi,&ldr_capi)) return NULL; /*frompyobj*/ /* Processing variable r */ ; capi_r_intent |= F2PY_INTENT_IN; 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 : full_profile_profile_error,"failed in converting 1st argument `r' of full_profile_profile.lmpar to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { r = (float *)(PyArray_DATA(capi_r_tmp)); /* Processing variable delta */ f2py_success = float_from_pyobj(&delta,delta_capi,"full_profile_profile.lmpar() 5th argument (delta) can't be converted to float"); if (f2py_success) { /* Processing variable par */ f2py_success = float_from_pyobj(&par,par_capi,"full_profile_profile.lmpar() 6th argument (par) can't be converted to float"); if (f2py_success) { /* Processing variable n */ if (n_capi == Py_None) n = shape(r,1); else f2py_success = int_from_pyobj(&n,n_capi,"full_profile_profile.lmpar() 1st keyword (n) can't be converted to int"); if (f2py_success) { CHECKSCALAR(shape(r,1)==n,"shape(r,1)==n","1st keyword n","lmpar:n=%d",n) { /* Processing variable ldr */ if (ldr_capi == Py_None) ldr = shape(r,0); else f2py_success = int_from_pyobj(&ldr,ldr_capi,"full_profile_profile.lmpar() 2nd keyword (ldr) can't be converted to int"); if (f2py_success) { CHECKSCALAR(shape(r,0)==ldr,"shape(r,0)==ldr","2nd keyword ldr","lmpar:ldr=%d",ldr) { /* Processing variable ipvt */ ipvt_Dims[0]=n; capi_ipvt_intent |= F2PY_INTENT_IN; capi_ipvt_tmp = array_from_pyobj(NPY_INT,ipvt_Dims,ipvt_Rank,capi_ipvt_intent,ipvt_capi); if (capi_ipvt_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 2nd argument `ipvt' of full_profile_profile.lmpar to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { ipvt = (int *)(PyArray_DATA(capi_ipvt_tmp)); /* Processing variable diag */ diag_Dims[0]=n; capi_diag_intent |= F2PY_INTENT_IN; capi_diag_tmp = array_from_pyobj(NPY_FLOAT,diag_Dims,diag_Rank,capi_diag_intent,diag_capi); if (capi_diag_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 3rd argument `diag' of full_profile_profile.lmpar to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { diag = (float *)(PyArray_DATA(capi_diag_tmp)); /* Processing variable qtb */ qtb_Dims[0]=n; capi_qtb_intent |= F2PY_INTENT_IN; capi_qtb_tmp = array_from_pyobj(NPY_FLOAT,qtb_Dims,qtb_Rank,capi_qtb_intent,qtb_capi); if (capi_qtb_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 4th argument `qtb' of full_profile_profile.lmpar to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { qtb = (float *)(PyArray_DATA(capi_qtb_tmp)); /* Processing variable x */ x_Dims[0]=n; capi_x_intent |= F2PY_INTENT_IN; capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); if (capi_x_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 7th argument `x' of full_profile_profile.lmpar to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { x = (float *)(PyArray_DATA(capi_x_tmp)); /* Processing variable sdiag */ sdiag_Dims[0]=n; capi_sdiag_intent |= F2PY_INTENT_IN; capi_sdiag_tmp = array_from_pyobj(NPY_FLOAT,sdiag_Dims,sdiag_Rank,capi_sdiag_intent,sdiag_capi); if (capi_sdiag_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 8th argument `sdiag' of full_profile_profile.lmpar to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { sdiag = (float *)(PyArray_DATA(capi_sdiag_tmp)); /* Processing variable wa1 */ wa1_Dims[0]=n; capi_wa1_intent |= F2PY_INTENT_IN; capi_wa1_tmp = array_from_pyobj(NPY_FLOAT,wa1_Dims,wa1_Rank,capi_wa1_intent,wa1_capi); if (capi_wa1_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 9th argument `wa1' of full_profile_profile.lmpar to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { wa1 = (float *)(PyArray_DATA(capi_wa1_tmp)); /* Processing variable wa2 */ wa2_Dims[0]=n; capi_wa2_intent |= F2PY_INTENT_IN; capi_wa2_tmp = array_from_pyobj(NPY_FLOAT,wa2_Dims,wa2_Rank,capi_wa2_intent,wa2_capi); if (capi_wa2_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 10th argument `wa2' of full_profile_profile.lmpar to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { wa2 = (float *)(PyArray_DATA(capi_wa2_tmp)); /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(&n,r,&ldr,ipvt,diag,qtb,&delta,&par,x,sdiag,wa1,wa2); 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(""); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ if((PyObject *)capi_wa2_tmp!=wa2_capi) { Py_XDECREF(capi_wa2_tmp); } } /*if (capi_wa2_tmp == NULL) ... else of wa2*/ /* End of cleaning variable wa2 */ if((PyObject *)capi_wa1_tmp!=wa1_capi) { Py_XDECREF(capi_wa1_tmp); } } /*if (capi_wa1_tmp == NULL) ... else of wa1*/ /* End of cleaning variable wa1 */ if((PyObject *)capi_sdiag_tmp!=sdiag_capi) { Py_XDECREF(capi_sdiag_tmp); } } /*if (capi_sdiag_tmp == NULL) ... else of sdiag*/ /* End of cleaning variable sdiag */ if((PyObject *)capi_x_tmp!=x_capi) { Py_XDECREF(capi_x_tmp); } } /*if (capi_x_tmp == NULL) ... else of x*/ /* End of cleaning variable x */ if((PyObject *)capi_qtb_tmp!=qtb_capi) { Py_XDECREF(capi_qtb_tmp); } } /*if (capi_qtb_tmp == NULL) ... else of qtb*/ /* End of cleaning variable qtb */ if((PyObject *)capi_diag_tmp!=diag_capi) { Py_XDECREF(capi_diag_tmp); } } /*if (capi_diag_tmp == NULL) ... else of diag*/ /* End of cleaning variable diag */ if((PyObject *)capi_ipvt_tmp!=ipvt_capi) { Py_XDECREF(capi_ipvt_tmp); } } /*if (capi_ipvt_tmp == NULL) ... else of ipvt*/ /* End of cleaning variable ipvt */ } /*CHECKSCALAR(shape(r,0)==ldr)*/ } /*if (f2py_success) of ldr*/ /* End of cleaning variable ldr */ } /*CHECKSCALAR(shape(r,1)==n)*/ } /*if (f2py_success) of n*/ /* End of cleaning variable n */ } /*if (f2py_success) of par*/ /* End of cleaning variable par */ } /*if (f2py_success) of delta*/ /* End of cleaning variable delta */ if((PyObject *)capi_r_tmp!=r_capi) { Py_XDECREF(capi_r_tmp); } } /*if (capi_r_tmp == NULL) ... else of r*/ /* End of cleaning variable r */ /*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 lmpar ********************************/ /*********************************** qrfac ***********************************/ static char doc_f2py_rout_full_profile_profile_qrfac[] = "\ qrfac(m,a,pivot,ipvt,rdiag,acnorm,wa,[n,lda,lipvt])\n\nWrapper for ``qrfac``.\ \n\nParameters\n----------\n" "m : input int\n" "a : input rank-2 array('f') with bounds (lda,n)\n" "pivot : input int\n" "ipvt : input rank-1 array('i') with bounds (lipvt)\n" "rdiag : input rank-1 array('f') with bounds (n)\n" "acnorm : input rank-1 array('f') with bounds (n)\n" "wa : input rank-1 array('f') with bounds (n)\n" "\nOther Parameters\n----------------\n" "n : input int, optional\n Default: shape(a,1)\n" "lda : input int, optional\n Default: shape(a,0)\n" "lipvt : input int, optional\n Default: len(ipvt)"; /* extern void F_FUNC(qrfac,QRFAC)(int*,int*,float*,int*,int*,int*,int*,float*,float*,float*); */ static PyObject *f2py_rout_full_profile_profile_qrfac(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(int*,int*,float*,int*,int*,int*,int*,float*,float*,float*)) { 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 = 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; PyObject *lda_capi = Py_None; int pivot = 0; PyObject *pivot_capi = Py_None; int *ipvt = NULL; npy_intp ipvt_Dims[1] = {-1}; const int ipvt_Rank = 1; PyArrayObject *capi_ipvt_tmp = NULL; int capi_ipvt_intent = 0; PyObject *ipvt_capi = Py_None; int lipvt = 0; PyObject *lipvt_capi = Py_None; float *rdiag = NULL; npy_intp rdiag_Dims[1] = {-1}; const int rdiag_Rank = 1; PyArrayObject *capi_rdiag_tmp = NULL; int capi_rdiag_intent = 0; PyObject *rdiag_capi = Py_None; float *acnorm = NULL; npy_intp acnorm_Dims[1] = {-1}; const int acnorm_Rank = 1; PyArrayObject *capi_acnorm_tmp = NULL; int capi_acnorm_intent = 0; PyObject *acnorm_capi = Py_None; float *wa = NULL; npy_intp wa_Dims[1] = {-1}; const int wa_Rank = 1; PyArrayObject *capi_wa_tmp = NULL; int capi_wa_intent = 0; PyObject *wa_capi = Py_None; static char *capi_kwlist[] = {"m","a","pivot","ipvt","rdiag","acnorm","wa","n","lda","lipvt",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "OOOOOOO|OOO:full_profile_profile.qrfac",\ capi_kwlist,&m_capi,&a_capi,&pivot_capi,&ipvt_capi,&rdiag_capi,&acnorm_capi,&wa_capi,&n_capi,&lda_capi,&lipvt_capi)) return NULL; /*frompyobj*/ /* Processing variable m */ f2py_success = int_from_pyobj(&m,m_capi,"full_profile_profile.qrfac() 1st argument (m) can't be converted to int"); if (f2py_success) { /* 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 : full_profile_profile_error,"failed in converting 2nd argument `a' of full_profile_profile.qrfac to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { a = (float *)(PyArray_DATA(capi_a_tmp)); /* Processing variable pivot */ pivot = (int)PyObject_IsTrue(pivot_capi); f2py_success = 1; if (f2py_success) { /* Processing variable ipvt */ ; capi_ipvt_intent |= F2PY_INTENT_IN; capi_ipvt_tmp = array_from_pyobj(NPY_INT,ipvt_Dims,ipvt_Rank,capi_ipvt_intent,ipvt_capi); if (capi_ipvt_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 4th argument `ipvt' of full_profile_profile.qrfac to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { ipvt = (int *)(PyArray_DATA(capi_ipvt_tmp)); /* Processing variable n */ if (n_capi == Py_None) n = shape(a,1); else f2py_success = int_from_pyobj(&n,n_capi,"full_profile_profile.qrfac() 1st keyword (n) can't be converted to int"); if (f2py_success) { CHECKSCALAR(shape(a,1)==n,"shape(a,1)==n","1st keyword n","qrfac:n=%d",n) { /* Processing variable lda */ if (lda_capi == Py_None) lda = shape(a,0); else f2py_success = int_from_pyobj(&lda,lda_capi,"full_profile_profile.qrfac() 2nd keyword (lda) can't be converted to int"); if (f2py_success) { CHECKSCALAR(shape(a,0)==lda,"shape(a,0)==lda","2nd keyword lda","qrfac:lda=%d",lda) { /* Processing variable lipvt */ if (lipvt_capi == Py_None) lipvt = len(ipvt); else f2py_success = int_from_pyobj(&lipvt,lipvt_capi,"full_profile_profile.qrfac() 3rd keyword (lipvt) can't be converted to int"); if (f2py_success) { CHECKSCALAR(len(ipvt)>=lipvt,"len(ipvt)>=lipvt","3rd keyword lipvt","qrfac:lipvt=%d",lipvt) { /* Processing variable rdiag */ rdiag_Dims[0]=n; capi_rdiag_intent |= F2PY_INTENT_IN; capi_rdiag_tmp = array_from_pyobj(NPY_FLOAT,rdiag_Dims,rdiag_Rank,capi_rdiag_intent,rdiag_capi); if (capi_rdiag_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 5th argument `rdiag' of full_profile_profile.qrfac to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { rdiag = (float *)(PyArray_DATA(capi_rdiag_tmp)); /* Processing variable acnorm */ acnorm_Dims[0]=n; capi_acnorm_intent |= F2PY_INTENT_IN; capi_acnorm_tmp = array_from_pyobj(NPY_FLOAT,acnorm_Dims,acnorm_Rank,capi_acnorm_intent,acnorm_capi); if (capi_acnorm_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 6th argument `acnorm' of full_profile_profile.qrfac to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { acnorm = (float *)(PyArray_DATA(capi_acnorm_tmp)); /* Processing variable wa */ wa_Dims[0]=n; capi_wa_intent |= F2PY_INTENT_IN; capi_wa_tmp = array_from_pyobj(NPY_FLOAT,wa_Dims,wa_Rank,capi_wa_intent,wa_capi); if (capi_wa_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 7th argument `wa' of full_profile_profile.qrfac to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { wa = (float *)(PyArray_DATA(capi_wa_tmp)); /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(&m,&n,a,&lda,&pivot,ipvt,&lipvt,rdiag,acnorm,wa); 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(""); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ if((PyObject *)capi_wa_tmp!=wa_capi) { Py_XDECREF(capi_wa_tmp); } } /*if (capi_wa_tmp == NULL) ... else of wa*/ /* End of cleaning variable wa */ if((PyObject *)capi_acnorm_tmp!=acnorm_capi) { Py_XDECREF(capi_acnorm_tmp); } } /*if (capi_acnorm_tmp == NULL) ... else of acnorm*/ /* End of cleaning variable acnorm */ if((PyObject *)capi_rdiag_tmp!=rdiag_capi) { Py_XDECREF(capi_rdiag_tmp); } } /*if (capi_rdiag_tmp == NULL) ... else of rdiag*/ /* End of cleaning variable rdiag */ } /*CHECKSCALAR(len(ipvt)>=lipvt)*/ } /*if (f2py_success) of lipvt*/ /* End of cleaning variable lipvt */ } /*CHECKSCALAR(shape(a,0)==lda)*/ } /*if (f2py_success) of lda*/ /* End of cleaning variable lda */ } /*CHECKSCALAR(shape(a,1)==n)*/ } /*if (f2py_success) of n*/ /* End of cleaning variable n */ if((PyObject *)capi_ipvt_tmp!=ipvt_capi) { Py_XDECREF(capi_ipvt_tmp); } } /*if (capi_ipvt_tmp == NULL) ... else of ipvt*/ /* End of cleaning variable ipvt */ } /*if (f2py_success) of pivot*/ /* End of cleaning variable pivot */ 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 */ } /*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 qrfac ********************************/ /*********************************** qrsolv ***********************************/ static char doc_f2py_rout_full_profile_profile_qrsolv[] = "\ qrsolv(r,ipvt,diag,qtb,x,sdiag,wa,[n,ldr])\n\nWrapper for ``qrsolv``.\ \n\nParameters\n----------\n" "r : input rank-2 array('f') with bounds (ldr,n)\n" "ipvt : input rank-1 array('i') with bounds (n)\n" "diag : input rank-1 array('f') with bounds (n)\n" "qtb : input rank-1 array('f') with bounds (n)\n" "x : input rank-1 array('f') with bounds (n)\n" "sdiag : input rank-1 array('f') with bounds (n)\n" "wa : input rank-1 array('f') with bounds (n)\n" "\nOther Parameters\n----------------\n" "n : input int, optional\n Default: shape(r,1)\n" "ldr : input int, optional\n Default: shape(r,0)"; /* extern void F_FUNC(qrsolv,QRSOLV)(int*,float*,int*,int*,float*,float*,float*,float*,float*); */ static PyObject *f2py_rout_full_profile_profile_qrsolv(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(int*,float*,int*,int*,float*,float*,float*,float*,float*)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ int n = 0; PyObject *n_capi = Py_None; float *r = NULL; npy_intp r_Dims[2] = {-1, -1}; const int r_Rank = 2; PyArrayObject *capi_r_tmp = NULL; int capi_r_intent = 0; PyObject *r_capi = Py_None; int ldr = 0; PyObject *ldr_capi = Py_None; int *ipvt = NULL; npy_intp ipvt_Dims[1] = {-1}; const int ipvt_Rank = 1; PyArrayObject *capi_ipvt_tmp = NULL; int capi_ipvt_intent = 0; PyObject *ipvt_capi = Py_None; float *diag = NULL; npy_intp diag_Dims[1] = {-1}; const int diag_Rank = 1; PyArrayObject *capi_diag_tmp = NULL; int capi_diag_intent = 0; PyObject *diag_capi = Py_None; float *qtb = NULL; npy_intp qtb_Dims[1] = {-1}; const int qtb_Rank = 1; PyArrayObject *capi_qtb_tmp = NULL; int capi_qtb_intent = 0; PyObject *qtb_capi = Py_None; float *x = NULL; npy_intp x_Dims[1] = {-1}; const int x_Rank = 1; PyArrayObject *capi_x_tmp = NULL; int capi_x_intent = 0; PyObject *x_capi = Py_None; float *sdiag = NULL; npy_intp sdiag_Dims[1] = {-1}; const int sdiag_Rank = 1; PyArrayObject *capi_sdiag_tmp = NULL; int capi_sdiag_intent = 0; PyObject *sdiag_capi = Py_None; float *wa = NULL; npy_intp wa_Dims[1] = {-1}; const int wa_Rank = 1; PyArrayObject *capi_wa_tmp = NULL; int capi_wa_intent = 0; PyObject *wa_capi = Py_None; static char *capi_kwlist[] = {"r","ipvt","diag","qtb","x","sdiag","wa","n","ldr",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "OOOOOOO|OO:full_profile_profile.qrsolv",\ capi_kwlist,&r_capi,&ipvt_capi,&diag_capi,&qtb_capi,&x_capi,&sdiag_capi,&wa_capi,&n_capi,&ldr_capi)) return NULL; /*frompyobj*/ /* Processing variable r */ ; capi_r_intent |= F2PY_INTENT_IN; 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 : full_profile_profile_error,"failed in converting 1st argument `r' of full_profile_profile.qrsolv to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { r = (float *)(PyArray_DATA(capi_r_tmp)); /* Processing variable n */ if (n_capi == Py_None) n = shape(r,1); else f2py_success = int_from_pyobj(&n,n_capi,"full_profile_profile.qrsolv() 1st keyword (n) can't be converted to int"); if (f2py_success) { CHECKSCALAR(shape(r,1)==n,"shape(r,1)==n","1st keyword n","qrsolv:n=%d",n) { /* Processing variable ldr */ if (ldr_capi == Py_None) ldr = shape(r,0); else f2py_success = int_from_pyobj(&ldr,ldr_capi,"full_profile_profile.qrsolv() 2nd keyword (ldr) can't be converted to int"); if (f2py_success) { CHECKSCALAR(shape(r,0)==ldr,"shape(r,0)==ldr","2nd keyword ldr","qrsolv:ldr=%d",ldr) { /* Processing variable ipvt */ ipvt_Dims[0]=n; capi_ipvt_intent |= F2PY_INTENT_IN; capi_ipvt_tmp = array_from_pyobj(NPY_INT,ipvt_Dims,ipvt_Rank,capi_ipvt_intent,ipvt_capi); if (capi_ipvt_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 2nd argument `ipvt' of full_profile_profile.qrsolv to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { ipvt = (int *)(PyArray_DATA(capi_ipvt_tmp)); /* Processing variable diag */ diag_Dims[0]=n; capi_diag_intent |= F2PY_INTENT_IN; capi_diag_tmp = array_from_pyobj(NPY_FLOAT,diag_Dims,diag_Rank,capi_diag_intent,diag_capi); if (capi_diag_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 3rd argument `diag' of full_profile_profile.qrsolv to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { diag = (float *)(PyArray_DATA(capi_diag_tmp)); /* Processing variable qtb */ qtb_Dims[0]=n; capi_qtb_intent |= F2PY_INTENT_IN; capi_qtb_tmp = array_from_pyobj(NPY_FLOAT,qtb_Dims,qtb_Rank,capi_qtb_intent,qtb_capi); if (capi_qtb_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 4th argument `qtb' of full_profile_profile.qrsolv to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { qtb = (float *)(PyArray_DATA(capi_qtb_tmp)); /* Processing variable x */ x_Dims[0]=n; capi_x_intent |= F2PY_INTENT_IN; capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); if (capi_x_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 5th argument `x' of full_profile_profile.qrsolv to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { x = (float *)(PyArray_DATA(capi_x_tmp)); /* Processing variable sdiag */ sdiag_Dims[0]=n; capi_sdiag_intent |= F2PY_INTENT_IN; capi_sdiag_tmp = array_from_pyobj(NPY_FLOAT,sdiag_Dims,sdiag_Rank,capi_sdiag_intent,sdiag_capi); if (capi_sdiag_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 6th argument `sdiag' of full_profile_profile.qrsolv to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { sdiag = (float *)(PyArray_DATA(capi_sdiag_tmp)); /* Processing variable wa */ wa_Dims[0]=n; capi_wa_intent |= F2PY_INTENT_IN; capi_wa_tmp = array_from_pyobj(NPY_FLOAT,wa_Dims,wa_Rank,capi_wa_intent,wa_capi); if (capi_wa_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 7th argument `wa' of full_profile_profile.qrsolv to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { wa = (float *)(PyArray_DATA(capi_wa_tmp)); /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(&n,r,&ldr,ipvt,diag,qtb,x,sdiag,wa); 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(""); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ if((PyObject *)capi_wa_tmp!=wa_capi) { Py_XDECREF(capi_wa_tmp); } } /*if (capi_wa_tmp == NULL) ... else of wa*/ /* End of cleaning variable wa */ if((PyObject *)capi_sdiag_tmp!=sdiag_capi) { Py_XDECREF(capi_sdiag_tmp); } } /*if (capi_sdiag_tmp == NULL) ... else of sdiag*/ /* End of cleaning variable sdiag */ if((PyObject *)capi_x_tmp!=x_capi) { Py_XDECREF(capi_x_tmp); } } /*if (capi_x_tmp == NULL) ... else of x*/ /* End of cleaning variable x */ if((PyObject *)capi_qtb_tmp!=qtb_capi) { Py_XDECREF(capi_qtb_tmp); } } /*if (capi_qtb_tmp == NULL) ... else of qtb*/ /* End of cleaning variable qtb */ if((PyObject *)capi_diag_tmp!=diag_capi) { Py_XDECREF(capi_diag_tmp); } } /*if (capi_diag_tmp == NULL) ... else of diag*/ /* End of cleaning variable diag */ if((PyObject *)capi_ipvt_tmp!=ipvt_capi) { Py_XDECREF(capi_ipvt_tmp); } } /*if (capi_ipvt_tmp == NULL) ... else of ipvt*/ /* End of cleaning variable ipvt */ } /*CHECKSCALAR(shape(r,0)==ldr)*/ } /*if (f2py_success) of ldr*/ /* End of cleaning variable ldr */ } /*CHECKSCALAR(shape(r,1)==n)*/ } /*if (f2py_success) of n*/ /* End of cleaning variable n */ if((PyObject *)capi_r_tmp!=r_capi) { Py_XDECREF(capi_r_tmp); } } /*if (capi_r_tmp == NULL) ... else of r*/ /* End of cleaning variable r */ /*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 qrsolv *******************************/ /*********************************** spmpar ***********************************/ static char doc_f2py_rout_full_profile_profile_spmpar[] = "\ spmpar = spmpar(i)\n\nWrapper for ``spmpar``.\ \n\nParameters\n----------\n" "i : input int\n" "\nReturns\n-------\n" "spmpar : float"; /* extern void F_WRAPPEDFUNC(spmpar,SPMPAR)(float*,int*); */ static PyObject *f2py_rout_full_profile_profile_spmpar(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(float*,int*)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ float spmpar = 0; int i = 0; PyObject *i_capi = Py_None; static char *capi_kwlist[] = {"i",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "O|:full_profile_profile.spmpar",\ capi_kwlist,&i_capi)) return NULL; /*frompyobj*/ /* Processing variable i */ f2py_success = int_from_pyobj(&i,i_capi,"full_profile_profile.spmpar() 1st argument (i) can't be converted to int"); if (f2py_success) { /* Processing variable spmpar */ /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(&spmpar,&i); 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("f",spmpar); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ /* End of cleaning variable spmpar */ } /*if (f2py_success) of i*/ /* End of cleaning variable i */ /*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 spmpar *******************************/ /*********************************** cdtr1 ***********************************/ static char doc_f2py_rout_full_profile_profile_cdtr1[] = "\ cdtr1 = cdtr1(depth)\n\nWrapper for ``cdtr1``.\ \n\nParameters\n----------\n" "depth : input float\n" "\nReturns\n-------\n" "cdtr1 : float"; /* extern void F_WRAPPEDFUNC(cdtr1,CDTR1)(float*,float*); */ static PyObject *f2py_rout_full_profile_profile_cdtr1(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(float*,float*)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ float cdtr1 = 0; float depth = 0; PyObject *depth_capi = Py_None; static char *capi_kwlist[] = {"depth",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "O|:full_profile_profile.cdtr1",\ capi_kwlist,&depth_capi)) return NULL; /*frompyobj*/ /* Processing variable depth */ f2py_success = float_from_pyobj(&depth,depth_capi,"full_profile_profile.cdtr1() 1st argument (depth) can't be converted to float"); if (f2py_success) { /* Processing variable cdtr1 */ /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(&cdtr1,&depth); 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("f",cdtr1); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ /* End of cleaning variable cdtr1 */ } /*if (f2py_success) of depth*/ /* End of cleaning variable depth */ /*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 cdtr1 ********************************/ /*********************************** czte1 ***********************************/ static char doc_f2py_rout_full_profile_profile_czte1[] = "\ czte1 = czte1(zlag,tr)\n\nWrapper for ``czte1``.\ \n\nParameters\n----------\n" "zlag : input float\n" "tr : input float\n" "\nReturns\n-------\n" "czte1 : float"; /* extern void F_WRAPPEDFUNC(czte1,CZTE1)(float*,float*,float*); */ static PyObject *f2py_rout_full_profile_profile_czte1(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(float*,float*,float*)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ float czte1 = 0; float zlag = 0; PyObject *zlag_capi = Py_None; float tr = 0; PyObject *tr_capi = Py_None; static char *capi_kwlist[] = {"zlag","tr",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "OO|:full_profile_profile.czte1",\ capi_kwlist,&zlag_capi,&tr_capi)) return NULL; /*frompyobj*/ /* Processing variable zlag */ f2py_success = float_from_pyobj(&zlag,zlag_capi,"full_profile_profile.czte1() 1st argument (zlag) can't be converted to float"); if (f2py_success) { /* Processing variable tr */ f2py_success = float_from_pyobj(&tr,tr_capi,"full_profile_profile.czte1() 2nd argument (tr) can't be converted to float"); if (f2py_success) { /* Processing variable czte1 */ /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(&czte1,&zlag,&tr); 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("f",czte1); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ /* End of cleaning variable czte1 */ } /*if (f2py_success) of tr*/ /* End of cleaning variable tr */ } /*if (f2py_success) of zlag*/ /* End of cleaning variable zlag */ /*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 czte1 ********************************/ /************************************ fcn ************************************/ static char doc_f2py_rout_full_profile_profile_fcn[] = "\ fcn(x,fvec,iflag,[m,n])\n\nWrapper for ``fcn``.\ \n\nParameters\n----------\n" "x : input rank-1 array('f') with bounds (n)\n" "fvec : input rank-1 array('f') with bounds (m)\n" "iflag : input int\n" "\nOther Parameters\n----------------\n" "m : input int, optional\n Default: len(fvec)\n" "n : input int, optional\n Default: len(x)"; /* extern void F_FUNC(fcn,FCN)(int*,int*,float*,float*,int*); */ static PyObject *f2py_rout_full_profile_profile_fcn(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(int*,int*,float*,float*,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 *x = NULL; npy_intp x_Dims[1] = {-1}; const int x_Rank = 1; PyArrayObject *capi_x_tmp = NULL; int capi_x_intent = 0; PyObject *x_capi = Py_None; float *fvec = NULL; npy_intp fvec_Dims[1] = {-1}; const int fvec_Rank = 1; PyArrayObject *capi_fvec_tmp = NULL; int capi_fvec_intent = 0; PyObject *fvec_capi = Py_None; int iflag = 0; PyObject *iflag_capi = Py_None; static char *capi_kwlist[] = {"x","fvec","iflag","m","n",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "OOO|OO:full_profile_profile.fcn",\ capi_kwlist,&x_capi,&fvec_capi,&iflag_capi,&m_capi,&n_capi)) return NULL; /*frompyobj*/ /* Processing variable x */ ; capi_x_intent |= F2PY_INTENT_IN; capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); if (capi_x_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 1st argument `x' of full_profile_profile.fcn to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { x = (float *)(PyArray_DATA(capi_x_tmp)); /* Processing variable fvec */ ; capi_fvec_intent |= F2PY_INTENT_IN; capi_fvec_tmp = array_from_pyobj(NPY_FLOAT,fvec_Dims,fvec_Rank,capi_fvec_intent,fvec_capi); if (capi_fvec_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 2nd argument `fvec' of full_profile_profile.fcn to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { fvec = (float *)(PyArray_DATA(capi_fvec_tmp)); /* Processing variable iflag */ f2py_success = int_from_pyobj(&iflag,iflag_capi,"full_profile_profile.fcn() 3rd argument (iflag) can't be converted to int"); if (f2py_success) { /* Processing variable m */ if (m_capi == Py_None) m = len(fvec); else f2py_success = int_from_pyobj(&m,m_capi,"full_profile_profile.fcn() 1st keyword (m) can't be converted to int"); if (f2py_success) { CHECKSCALAR(len(fvec)>=m,"len(fvec)>=m","1st keyword m","fcn:m=%d",m) { /* Processing variable n */ if (n_capi == Py_None) n = len(x); else f2py_success = int_from_pyobj(&n,n_capi,"full_profile_profile.fcn() 2nd keyword (n) can't be converted to int"); if (f2py_success) { CHECKSCALAR(len(x)>=n,"len(x)>=n","2nd keyword n","fcn:n=%d",n) { /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(&m,&n,x,fvec,&iflag); 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(""); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ } /*CHECKSCALAR(len(x)>=n)*/ } /*if (f2py_success) of n*/ /* End of cleaning variable n */ } /*CHECKSCALAR(len(fvec)>=m)*/ } /*if (f2py_success) of m*/ /* End of cleaning variable m */ } /*if (f2py_success) of iflag*/ /* End of cleaning variable iflag */ if((PyObject *)capi_fvec_tmp!=fvec_capi) { Py_XDECREF(capi_fvec_tmp); } } /*if (capi_fvec_tmp == NULL) ... else of fvec*/ /* End of cleaning variable fvec */ if((PyObject *)capi_x_tmp!=x_capi) { Py_XDECREF(capi_x_tmp); } } /*if (capi_x_tmp == NULL) ... else of x*/ /* End of cleaning variable x */ /*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 fcn *********************************/ /*********************************** cj_ion ***********************************/ static char doc_f2py_rout_full_profile_profile_cj_ion[] = "\ cj_ion = cj_ion(theta,psi)\n\nWrapper for ``cj_ion``.\ \n\nParameters\n----------\n" "theta : input float\n" "psi : input float\n" "\nReturns\n-------\n" "cj_ion : complex"; /* extern void F_WRAPPEDFUNC_US(cj_ion,CJ_ION)(complex_float*,float*,float*); */ static PyObject *f2py_rout_full_profile_profile_cj_ion(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(complex_float*,float*,float*)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ complex_float cj_ion; PyObject *cj_ion_capi = Py_None; float theta = 0; PyObject *theta_capi = Py_None; float psi = 0; PyObject *psi_capi = Py_None; static char *capi_kwlist[] = {"theta","psi",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "OO|:full_profile_profile.cj_ion",\ capi_kwlist,&theta_capi,&psi_capi)) return NULL; /*frompyobj*/ /* Processing variable theta */ f2py_success = float_from_pyobj(&theta,theta_capi,"full_profile_profile.cj_ion() 1st argument (theta) can't be converted to float"); if (f2py_success) { /* Processing variable psi */ f2py_success = float_from_pyobj(&psi,psi_capi,"full_profile_profile.cj_ion() 2nd argument (psi) can't be converted to float"); if (f2py_success) { /* Processing variable cj_ion */ /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(&cj_ion,&theta,&psi); if (PyErr_Occurred()) f2py_success = 0; #ifdef F2PY_REPORT_ATEXIT f2py_stop_call_clock(); #endif /*end of callfortranroutine*/ if (f2py_success) { /*pyobjfrom*/ cj_ion_capi = pyobj_from_complex_float1(cj_ion); /*end of pyobjfrom*/ CFUNCSMESS("Building return value.\n"); capi_buildvalue = Py_BuildValue("N",cj_ion_capi); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ /* End of cleaning variable cj_ion */ } /*if (f2py_success) of psi*/ /* End of cleaning variable psi */ } /*if (f2py_success) of theta*/ /* End of cleaning variable theta */ /*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 cj_ion *******************************/ /******************************** cj_electron ********************************/ static char doc_f2py_rout_full_profile_profile_cj_electron[] = "\ cj_electron = cj_electron(theta,phi,psi,alpha)\n\nWrapper for ``cj_electron``.\ \n\nParameters\n----------\n" "theta : input float\n" "phi : input float\n" "psi : input float\n" "alpha : input float\n" "\nReturns\n-------\n" "cj_electron : complex"; /* extern void F_WRAPPEDFUNC_US(cj_electron,CJ_ELECTRON)(complex_float*,float*,float*,float*,float*); */ static PyObject *f2py_rout_full_profile_profile_cj_electron(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(complex_float*,float*,float*,float*,float*)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ complex_float cj_electron; PyObject *cj_electron_capi = Py_None; float theta = 0; PyObject *theta_capi = Py_None; float phi = 0; PyObject *phi_capi = Py_None; float psi = 0; PyObject *psi_capi = Py_None; float alpha = 0; PyObject *alpha_capi = Py_None; static char *capi_kwlist[] = {"theta","phi","psi","alpha",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "OOOO|:full_profile_profile.cj_electron",\ capi_kwlist,&theta_capi,&phi_capi,&psi_capi,&alpha_capi)) return NULL; /*frompyobj*/ /* Processing variable theta */ f2py_success = float_from_pyobj(&theta,theta_capi,"full_profile_profile.cj_electron() 1st argument (theta) can't be converted to float"); if (f2py_success) { /* Processing variable phi */ f2py_success = float_from_pyobj(&phi,phi_capi,"full_profile_profile.cj_electron() 2nd argument (phi) can't be converted to float"); if (f2py_success) { /* Processing variable psi */ f2py_success = float_from_pyobj(&psi,psi_capi,"full_profile_profile.cj_electron() 3rd argument (psi) can't be converted to float"); if (f2py_success) { /* Processing variable alpha */ f2py_success = float_from_pyobj(&alpha,alpha_capi,"full_profile_profile.cj_electron() 4th argument (alpha) can't be converted to float"); if (f2py_success) { /* Processing variable cj_electron */ /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(&cj_electron,&theta,&phi,&psi,&alpha); if (PyErr_Occurred()) f2py_success = 0; #ifdef F2PY_REPORT_ATEXIT f2py_stop_call_clock(); #endif /*end of callfortranroutine*/ if (f2py_success) { /*pyobjfrom*/ cj_electron_capi = pyobj_from_complex_float1(cj_electron); /*end of pyobjfrom*/ CFUNCSMESS("Building return value.\n"); capi_buildvalue = Py_BuildValue("N",cj_electron_capi); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ /* End of cleaning variable cj_electron */ } /*if (f2py_success) of alpha*/ /* End of cleaning variable alpha */ } /*if (f2py_success) of psi*/ /* End of cleaning variable psi */ } /*if (f2py_success) of phi*/ /* End of cleaning variable phi */ } /*if (f2py_success) of theta*/ /* End of cleaning variable theta */ /*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 cj_electron *****************************/ /*********************************** y_ion ***********************************/ static char doc_f2py_rout_full_profile_profile_y_ion[] = "\ y_ion = y_ion(theta,psi)\n\nWrapper for ``y_ion``.\ \n\nParameters\n----------\n" "theta : input float\n" "psi : input float\n" "\nReturns\n-------\n" "y_ion : complex"; /* extern void F_WRAPPEDFUNC_US(y_ion,Y_ION)(complex_float*,float*,float*); */ static PyObject *f2py_rout_full_profile_profile_y_ion(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(complex_float*,float*,float*)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ complex_float y_ion; PyObject *y_ion_capi = Py_None; float theta = 0; PyObject *theta_capi = Py_None; float psi = 0; PyObject *psi_capi = Py_None; static char *capi_kwlist[] = {"theta","psi",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "OO|:full_profile_profile.y_ion",\ capi_kwlist,&theta_capi,&psi_capi)) return NULL; /*frompyobj*/ /* Processing variable theta */ f2py_success = float_from_pyobj(&theta,theta_capi,"full_profile_profile.y_ion() 1st argument (theta) can't be converted to float"); if (f2py_success) { /* Processing variable psi */ f2py_success = float_from_pyobj(&psi,psi_capi,"full_profile_profile.y_ion() 2nd argument (psi) can't be converted to float"); if (f2py_success) { /* Processing variable y_ion */ /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(&y_ion,&theta,&psi); if (PyErr_Occurred()) f2py_success = 0; #ifdef F2PY_REPORT_ATEXIT f2py_stop_call_clock(); #endif /*end of callfortranroutine*/ if (f2py_success) { /*pyobjfrom*/ y_ion_capi = pyobj_from_complex_float1(y_ion); /*end of pyobjfrom*/ CFUNCSMESS("Building return value.\n"); capi_buildvalue = Py_BuildValue("N",y_ion_capi); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ /* End of cleaning variable y_ion */ } /*if (f2py_success) of psi*/ /* End of cleaning variable psi */ } /*if (f2py_success) of theta*/ /* End of cleaning variable theta */ /*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 y_ion ********************************/ /********************************* y_electron *********************************/ static char doc_f2py_rout_full_profile_profile_y_electron[] = "\ y_electron = y_electron(theta,phi,psi,alpha)\n\nWrapper for ``y_electron``.\ \n\nParameters\n----------\n" "theta : input float\n" "phi : input float\n" "psi : input float\n" "alpha : input float\n" "\nReturns\n-------\n" "y_electron : complex"; /* extern void F_WRAPPEDFUNC_US(y_electron,Y_ELECTRON)(complex_float*,float*,float*,float*,float*); */ static PyObject *f2py_rout_full_profile_profile_y_electron(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(complex_float*,float*,float*,float*,float*)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ complex_float y_electron; PyObject *y_electron_capi = Py_None; float theta = 0; PyObject *theta_capi = Py_None; float phi = 0; PyObject *phi_capi = Py_None; float psi = 0; PyObject *psi_capi = Py_None; float alpha = 0; PyObject *alpha_capi = Py_None; static char *capi_kwlist[] = {"theta","phi","psi","alpha",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "OOOO|:full_profile_profile.y_electron",\ capi_kwlist,&theta_capi,&phi_capi,&psi_capi,&alpha_capi)) return NULL; /*frompyobj*/ /* Processing variable theta */ f2py_success = float_from_pyobj(&theta,theta_capi,"full_profile_profile.y_electron() 1st argument (theta) can't be converted to float"); if (f2py_success) { /* Processing variable phi */ f2py_success = float_from_pyobj(&phi,phi_capi,"full_profile_profile.y_electron() 2nd argument (phi) can't be converted to float"); if (f2py_success) { /* Processing variable psi */ f2py_success = float_from_pyobj(&psi,psi_capi,"full_profile_profile.y_electron() 3rd argument (psi) can't be converted to float"); if (f2py_success) { /* Processing variable alpha */ f2py_success = float_from_pyobj(&alpha,alpha_capi,"full_profile_profile.y_electron() 4th argument (alpha) can't be converted to float"); if (f2py_success) { /* Processing variable y_electron */ /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(&y_electron,&theta,&phi,&psi,&alpha); if (PyErr_Occurred()) f2py_success = 0; #ifdef F2PY_REPORT_ATEXIT f2py_stop_call_clock(); #endif /*end of callfortranroutine*/ if (f2py_success) { /*pyobjfrom*/ y_electron_capi = pyobj_from_complex_float1(y_electron); /*end of pyobjfrom*/ CFUNCSMESS("Building return value.\n"); capi_buildvalue = Py_BuildValue("N",y_electron_capi); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ /* End of cleaning variable y_electron */ } /*if (f2py_success) of alpha*/ /* End of cleaning variable alpha */ } /*if (f2py_success) of psi*/ /* End of cleaning variable psi */ } /*if (f2py_success) of phi*/ /* End of cleaning variable phi */ } /*if (f2py_success) of theta*/ /* End of cleaning variable theta */ /*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 y_electron *****************************/ /*********************************** spect1 ***********************************/ static char doc_f2py_rout_full_profile_profile_spect1[] = "\ spect1 = spect1(omega)\n\nWrapper for ``spect1``.\ \n\nParameters\n----------\n" "omega : input float\n" "\nReturns\n-------\n" "spect1 : float"; /* extern void F_WRAPPEDFUNC(spect1,SPECT1)(float*,float*); */ static PyObject *f2py_rout_full_profile_profile_spect1(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(float*,float*)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ float spect1 = 0; float omega = 0; PyObject *omega_capi = Py_None; static char *capi_kwlist[] = {"omega",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "O|:full_profile_profile.spect1",\ capi_kwlist,&omega_capi)) return NULL; /*frompyobj*/ /* Processing variable omega */ f2py_success = float_from_pyobj(&omega,omega_capi,"full_profile_profile.spect1() 1st argument (omega) can't be converted to float"); if (f2py_success) { /* Processing variable spect1 */ /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(&spect1,&omega); 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("f",spect1); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ /* End of cleaning variable spect1 */ } /*if (f2py_success) of omega*/ /* End of cleaning variable omega */ /*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 spect1 *******************************/ /************************************ acf2 ************************************/ static char doc_f2py_rout_full_profile_profile_acf2[] = "\ acf2(wl,tau,te1,ti1,fi1,ven1,vin1,wi1,alpha1,dens1,bfld1,acf,[nion1])\n\nWrapper for ``acf2``.\ \n\nParameters\n----------\n" "wl : input float\n" "tau : input float\n" "te1 : input float\n" "ti1 : input rank-1 array('f') with bounds (nion1)\n" "fi1 : input rank-1 array('f') with bounds (nion1)\n" "ven1 : input float\n" "vin1 : input rank-1 array('f') with bounds (nion1)\n" "wi1 : input rank-1 array('i') with bounds (nion1)\n" "alpha1 : input float\n" "dens1 : input float\n" "bfld1 : input float\n" "acf : input float\n" "\nOther Parameters\n----------------\n" "nion1 : input int, optional\n Default: len(ti1)"; /* extern void F_FUNC(acf2,ACF2)(float*,float*,float*,float*,float*,float*,float*,int*,int*,float*,float*,float*,float*); */ static PyObject *f2py_rout_full_profile_profile_acf2(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(float*,float*,float*,float*,float*,float*,float*,int*,int*,float*,float*,float*,float*)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ float wl = 0; PyObject *wl_capi = Py_None; float tau = 0; PyObject *tau_capi = Py_None; float te1 = 0; PyObject *te1_capi = Py_None; float *ti1 = NULL; npy_intp ti1_Dims[1] = {-1}; const int ti1_Rank = 1; PyArrayObject *capi_ti1_tmp = NULL; int capi_ti1_intent = 0; PyObject *ti1_capi = Py_None; float *fi1 = NULL; npy_intp fi1_Dims[1] = {-1}; const int fi1_Rank = 1; PyArrayObject *capi_fi1_tmp = NULL; int capi_fi1_intent = 0; PyObject *fi1_capi = Py_None; float ven1 = 0; PyObject *ven1_capi = Py_None; float *vin1 = NULL; npy_intp vin1_Dims[1] = {-1}; const int vin1_Rank = 1; PyArrayObject *capi_vin1_tmp = NULL; int capi_vin1_intent = 0; PyObject *vin1_capi = Py_None; int *wi1 = NULL; npy_intp wi1_Dims[1] = {-1}; const int wi1_Rank = 1; PyArrayObject *capi_wi1_tmp = NULL; int capi_wi1_intent = 0; PyObject *wi1_capi = Py_None; int nion1 = 0; PyObject *nion1_capi = Py_None; float alpha1 = 0; PyObject *alpha1_capi = Py_None; float dens1 = 0; PyObject *dens1_capi = Py_None; float bfld1 = 0; PyObject *bfld1_capi = Py_None; float acf = 0; PyObject *acf_capi = Py_None; static char *capi_kwlist[] = {"wl","tau","te1","ti1","fi1","ven1","vin1","wi1","alpha1","dens1","bfld1","acf","nion1",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "OOOOOOOOOOOO|O:full_profile_profile.acf2",\ capi_kwlist,&wl_capi,&tau_capi,&te1_capi,&ti1_capi,&fi1_capi,&ven1_capi,&vin1_capi,&wi1_capi,&alpha1_capi,&dens1_capi,&bfld1_capi,&acf_capi,&nion1_capi)) return NULL; /*frompyobj*/ /* Processing variable wl */ f2py_success = float_from_pyobj(&wl,wl_capi,"full_profile_profile.acf2() 1st argument (wl) can't be converted to float"); if (f2py_success) { /* Processing variable tau */ f2py_success = float_from_pyobj(&tau,tau_capi,"full_profile_profile.acf2() 2nd argument (tau) can't be converted to float"); if (f2py_success) { /* Processing variable te1 */ f2py_success = float_from_pyobj(&te1,te1_capi,"full_profile_profile.acf2() 3rd argument (te1) can't be converted to float"); if (f2py_success) { /* Processing variable ti1 */ ; capi_ti1_intent |= F2PY_INTENT_IN; capi_ti1_tmp = array_from_pyobj(NPY_FLOAT,ti1_Dims,ti1_Rank,capi_ti1_intent,ti1_capi); if (capi_ti1_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 4th argument `ti1' of full_profile_profile.acf2 to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { ti1 = (float *)(PyArray_DATA(capi_ti1_tmp)); /* Processing variable ven1 */ f2py_success = float_from_pyobj(&ven1,ven1_capi,"full_profile_profile.acf2() 6th argument (ven1) can't be converted to float"); if (f2py_success) { /* Processing variable alpha1 */ f2py_success = float_from_pyobj(&alpha1,alpha1_capi,"full_profile_profile.acf2() 9th argument (alpha1) can't be converted to float"); if (f2py_success) { /* Processing variable dens1 */ f2py_success = float_from_pyobj(&dens1,dens1_capi,"full_profile_profile.acf2() 10th argument (dens1) can't be converted to float"); if (f2py_success) { /* Processing variable bfld1 */ f2py_success = float_from_pyobj(&bfld1,bfld1_capi,"full_profile_profile.acf2() 11st argument (bfld1) can't be converted to float"); if (f2py_success) { /* Processing variable acf */ f2py_success = float_from_pyobj(&acf,acf_capi,"full_profile_profile.acf2() 12nd argument (acf) can't be converted to float"); if (f2py_success) { /* Processing variable nion1 */ if (nion1_capi == Py_None) nion1 = len(ti1); else f2py_success = int_from_pyobj(&nion1,nion1_capi,"full_profile_profile.acf2() 1st keyword (nion1) can't be converted to int"); if (f2py_success) { CHECKSCALAR(len(ti1)>=nion1,"len(ti1)>=nion1","1st keyword nion1","acf2:nion1=%d",nion1) { /* Processing variable fi1 */ fi1_Dims[0]=nion1; capi_fi1_intent |= F2PY_INTENT_IN; capi_fi1_tmp = array_from_pyobj(NPY_FLOAT,fi1_Dims,fi1_Rank,capi_fi1_intent,fi1_capi); if (capi_fi1_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 5th argument `fi1' of full_profile_profile.acf2 to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { fi1 = (float *)(PyArray_DATA(capi_fi1_tmp)); /* Processing variable vin1 */ vin1_Dims[0]=nion1; capi_vin1_intent |= F2PY_INTENT_IN; capi_vin1_tmp = array_from_pyobj(NPY_FLOAT,vin1_Dims,vin1_Rank,capi_vin1_intent,vin1_capi); if (capi_vin1_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 7th argument `vin1' of full_profile_profile.acf2 to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { vin1 = (float *)(PyArray_DATA(capi_vin1_tmp)); /* Processing variable wi1 */ wi1_Dims[0]=nion1; capi_wi1_intent |= F2PY_INTENT_IN; capi_wi1_tmp = array_from_pyobj(NPY_INT,wi1_Dims,wi1_Rank,capi_wi1_intent,wi1_capi); if (capi_wi1_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 8th argument `wi1' of full_profile_profile.acf2 to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { wi1 = (int *)(PyArray_DATA(capi_wi1_tmp)); /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(&wl,&tau,&te1,ti1,fi1,&ven1,vin1,wi1,&nion1,&alpha1,&dens1,&bfld1,&acf); 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(""); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ if((PyObject *)capi_wi1_tmp!=wi1_capi) { Py_XDECREF(capi_wi1_tmp); } } /*if (capi_wi1_tmp == NULL) ... else of wi1*/ /* End of cleaning variable wi1 */ if((PyObject *)capi_vin1_tmp!=vin1_capi) { Py_XDECREF(capi_vin1_tmp); } } /*if (capi_vin1_tmp == NULL) ... else of vin1*/ /* End of cleaning variable vin1 */ if((PyObject *)capi_fi1_tmp!=fi1_capi) { Py_XDECREF(capi_fi1_tmp); } } /*if (capi_fi1_tmp == NULL) ... else of fi1*/ /* End of cleaning variable fi1 */ } /*CHECKSCALAR(len(ti1)>=nion1)*/ } /*if (f2py_success) of nion1*/ /* End of cleaning variable nion1 */ } /*if (f2py_success) of acf*/ /* End of cleaning variable acf */ } /*if (f2py_success) of bfld1*/ /* End of cleaning variable bfld1 */ } /*if (f2py_success) of dens1*/ /* End of cleaning variable dens1 */ } /*if (f2py_success) of alpha1*/ /* End of cleaning variable alpha1 */ } /*if (f2py_success) of ven1*/ /* End of cleaning variable ven1 */ if((PyObject *)capi_ti1_tmp!=ti1_capi) { Py_XDECREF(capi_ti1_tmp); } } /*if (capi_ti1_tmp == NULL) ... else of ti1*/ /* End of cleaning variable ti1 */ } /*if (f2py_success) of te1*/ /* End of cleaning variable te1 */ } /*if (f2py_success) of tau*/ /* End of cleaning variable tau */ } /*if (f2py_success) of wl*/ /* End of cleaning variable wl */ /*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 acf2 ********************************/ /*********************************** gaussq ***********************************/ static char doc_f2py_rout_full_profile_profile_gaussq[] = "\ gaussq(tau,acf)\n\nWrapper for ``gaussq``.\ \n\nParameters\n----------\n" "tau : input float\n" "acf : input float"; /* extern void F_FUNC(gaussq,GAUSSQ)(float*,float*); */ static PyObject *f2py_rout_full_profile_profile_gaussq(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(float*,float*)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ float tau = 0; PyObject *tau_capi = Py_None; float acf = 0; PyObject *acf_capi = Py_None; static char *capi_kwlist[] = {"tau","acf",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "OO|:full_profile_profile.gaussq",\ capi_kwlist,&tau_capi,&acf_capi)) return NULL; /*frompyobj*/ /* Processing variable tau */ f2py_success = float_from_pyobj(&tau,tau_capi,"full_profile_profile.gaussq() 1st argument (tau) can't be converted to float"); if (f2py_success) { /* Processing variable acf */ f2py_success = float_from_pyobj(&acf,acf_capi,"full_profile_profile.gaussq() 2nd argument (acf) can't be converted to float"); if (f2py_success) { /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(&tau,&acf); 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(""); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ } /*if (f2py_success) of acf*/ /* End of cleaning variable acf */ } /*if (f2py_success) of tau*/ /* End of cleaning variable tau */ /*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 gaussq *******************************/ /************************************ lagp ************************************/ static char doc_f2py_rout_full_profile_profile_lagp[] = "\ lagp(plag,wl,r0,dr,[nl,nrange])\n\nWrapper for ``lagp``.\ \n\nParameters\n----------\n" "plag : input rank-2 array('f') with bounds (nl,nrange)\n" "wl : input float\n" "r0 : input float\n" "dr : input float\n" "\nOther Parameters\n----------------\n" "nl : input int, optional\n Default: shape(plag,0)\n" "nrange : input int, optional\n Default: shape(plag,1)"; /* extern void F_FUNC(lagp,LAGP)(float*,float*,float*,float*,int*,int*); */ static PyObject *f2py_rout_full_profile_profile_lagp(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(float*,float*,float*,float*,int*,int*)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ float *plag = NULL; npy_intp plag_Dims[2] = {-1, -1}; const int plag_Rank = 2; PyArrayObject *capi_plag_tmp = NULL; int capi_plag_intent = 0; PyObject *plag_capi = Py_None; float wl = 0; PyObject *wl_capi = Py_None; float r0 = 0; PyObject *r0_capi = Py_None; float dr = 0; PyObject *dr_capi = Py_None; int nl = 0; PyObject *nl_capi = Py_None; int nrange = 0; PyObject *nrange_capi = Py_None; static char *capi_kwlist[] = {"plag","wl","r0","dr","nl","nrange",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "OOOO|OO:full_profile_profile.lagp",\ capi_kwlist,&plag_capi,&wl_capi,&r0_capi,&dr_capi,&nl_capi,&nrange_capi)) return NULL; /*frompyobj*/ /* Processing variable plag */ ; capi_plag_intent |= F2PY_INTENT_IN; capi_plag_tmp = array_from_pyobj(NPY_FLOAT,plag_Dims,plag_Rank,capi_plag_intent,plag_capi); if (capi_plag_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 1st argument `plag' of full_profile_profile.lagp to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { plag = (float *)(PyArray_DATA(capi_plag_tmp)); /* Processing variable wl */ f2py_success = float_from_pyobj(&wl,wl_capi,"full_profile_profile.lagp() 2nd argument (wl) can't be converted to float"); if (f2py_success) { /* Processing variable r0 */ f2py_success = float_from_pyobj(&r0,r0_capi,"full_profile_profile.lagp() 3rd argument (r0) can't be converted to float"); if (f2py_success) { /* Processing variable dr */ f2py_success = float_from_pyobj(&dr,dr_capi,"full_profile_profile.lagp() 4th argument (dr) can't be converted to float"); if (f2py_success) { /* Processing variable nl */ if (nl_capi == Py_None) nl = shape(plag,0); else f2py_success = int_from_pyobj(&nl,nl_capi,"full_profile_profile.lagp() 1st keyword (nl) can't be converted to int"); if (f2py_success) { CHECKSCALAR(shape(plag,0)==nl,"shape(plag,0)==nl","1st keyword nl","lagp:nl=%d",nl) { /* Processing variable nrange */ if (nrange_capi == Py_None) nrange = shape(plag,1); else f2py_success = int_from_pyobj(&nrange,nrange_capi,"full_profile_profile.lagp() 2nd keyword (nrange) can't be converted to int"); if (f2py_success) { CHECKSCALAR(shape(plag,1)==nrange,"shape(plag,1)==nrange","2nd keyword nrange","lagp:nrange=%d",nrange) { /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(plag,&wl,&r0,&dr,&nl,&nrange); 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(""); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ } /*CHECKSCALAR(shape(plag,1)==nrange)*/ } /*if (f2py_success) of nrange*/ /* End of cleaning variable nrange */ } /*CHECKSCALAR(shape(plag,0)==nl)*/ } /*if (f2py_success) of nl*/ /* End of cleaning variable nl */ } /*if (f2py_success) of dr*/ /* End of cleaning variable dr */ } /*if (f2py_success) of r0*/ /* End of cleaning variable r0 */ } /*if (f2py_success) of wl*/ /* End of cleaning variable wl */ if((PyObject *)capi_plag_tmp!=plag_capi) { Py_XDECREF(capi_plag_tmp); } } /*if (capi_plag_tmp == NULL) ... else of plag*/ /* End of cleaning variable plag */ /*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 lagp ********************************/ /*********************************** atanh ***********************************/ static char doc_f2py_rout_full_profile_profile_atanh[] = "\ atanh = atanh(x)\n\nWrapper for ``atanh``.\ \n\nParameters\n----------\n" "x : input float\n" "\nReturns\n-------\n" "atanh : float"; /* extern void F_WRAPPEDFUNC(atanh,ATANH)(float*,float*); */ static PyObject *f2py_rout_full_profile_profile_atanh(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(float*,float*)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ float atanh = 0; float x = 0; PyObject *x_capi = Py_None; static char *capi_kwlist[] = {"x",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "O|:full_profile_profile.atanh",\ capi_kwlist,&x_capi)) return NULL; /*frompyobj*/ /* Processing variable x */ f2py_success = float_from_pyobj(&x,x_capi,"full_profile_profile.atanh() 1st argument (x) can't be converted to float"); if (f2py_success) { /* Processing variable atanh */ /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(&atanh,&x); 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("f",atanh); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ /* End of cleaning variable atanh */ } /*if (f2py_success) of x*/ /* End of cleaning variable x */ /*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 atanh ********************************/ /********************************* get_spline *********************************/ static char doc_f2py_rout_full_profile_profile_get_spline[] = "\ get_spline(alt,dens,te,ti,hf,hef)\n\nWrapper for ``get_spline``.\ \n\nParameters\n----------\n" "alt : input float\n" "dens : input float\n" "te : input float\n" "ti : input float\n" "hf : input float\n" "hef : input float"; /* extern void F_FUNC_US(get_spline,GET_SPLINE)(float*,float*,float*,float*,float*,float*); */ static PyObject *f2py_rout_full_profile_profile_get_spline(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(float*,float*,float*,float*,float*,float*)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ float alt = 0; PyObject *alt_capi = Py_None; float dens = 0; PyObject *dens_capi = Py_None; float te = 0; PyObject *te_capi = Py_None; float ti = 0; PyObject *ti_capi = Py_None; float hf = 0; PyObject *hf_capi = Py_None; float hef = 0; PyObject *hef_capi = Py_None; static char *capi_kwlist[] = {"alt","dens","te","ti","hf","hef",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "OOOOOO|:full_profile_profile.get_spline",\ capi_kwlist,&alt_capi,&dens_capi,&te_capi,&ti_capi,&hf_capi,&hef_capi)) return NULL; /*frompyobj*/ /* Processing variable alt */ f2py_success = float_from_pyobj(&alt,alt_capi,"full_profile_profile.get_spline() 1st argument (alt) can't be converted to float"); if (f2py_success) { /* Processing variable dens */ f2py_success = float_from_pyobj(&dens,dens_capi,"full_profile_profile.get_spline() 2nd argument (dens) can't be converted to float"); if (f2py_success) { /* Processing variable te */ f2py_success = float_from_pyobj(&te,te_capi,"full_profile_profile.get_spline() 3rd argument (te) can't be converted to float"); if (f2py_success) { /* Processing variable ti */ f2py_success = float_from_pyobj(&ti,ti_capi,"full_profile_profile.get_spline() 4th argument (ti) can't be converted to float"); if (f2py_success) { /* Processing variable hf */ f2py_success = float_from_pyobj(&hf,hf_capi,"full_profile_profile.get_spline() 5th argument (hf) can't be converted to float"); if (f2py_success) { /* Processing variable hef */ f2py_success = float_from_pyobj(&hef,hef_capi,"full_profile_profile.get_spline() 6th argument (hef) can't be converted to float"); if (f2py_success) { /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(&alt,&dens,&te,&ti,&hf,&hef); 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(""); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ } /*if (f2py_success) of hef*/ /* End of cleaning variable hef */ } /*if (f2py_success) of hf*/ /* End of cleaning variable hf */ } /*if (f2py_success) of ti*/ /* End of cleaning variable ti */ } /*if (f2py_success) of te*/ /* End of cleaning variable te */ } /*if (f2py_success) of dens*/ /* End of cleaning variable dens */ } /*if (f2py_success) of alt*/ /* End of cleaning variable alt */ /*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 get_spline *****************************/ /*********************************** bvalue ***********************************/ static char doc_f2py_rout_full_profile_profile_bvalue[] = "\ bvalue = bvalue(t,bcoef,k,x,jderiv,[n])\n\nWrapper for ``bvalue``.\ \n\nParameters\n----------\n" "t : input rank-1 array('f') with bounds (n+k)\n" "bcoef : input rank-1 array('f') with bounds (n)\n" "k : input int\n" "x : input float\n" "jderiv : input int\n" "\nOther Parameters\n----------------\n" "n : input int, optional\n Default: len(bcoef)\n" "\nReturns\n-------\n" "bvalue : float"; /* extern void F_WRAPPEDFUNC(bvalue,BVALUE)(float*,float*,float*,int*,int*,float*,int*); */ static PyObject *f2py_rout_full_profile_profile_bvalue(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(float*,float*,float*,int*,int*,float*,int*)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ float bvalue = 0; float *t = NULL; npy_intp t_Dims[1] = {-1}; const int t_Rank = 1; PyArrayObject *capi_t_tmp = NULL; int capi_t_intent = 0; PyObject *t_capi = Py_None; float *bcoef = NULL; npy_intp bcoef_Dims[1] = {-1}; const int bcoef_Rank = 1; PyArrayObject *capi_bcoef_tmp = NULL; int capi_bcoef_intent = 0; PyObject *bcoef_capi = Py_None; int n = 0; PyObject *n_capi = Py_None; int k = 0; PyObject *k_capi = Py_None; float x = 0; PyObject *x_capi = Py_None; int jderiv = 0; PyObject *jderiv_capi = Py_None; static char *capi_kwlist[] = {"t","bcoef","k","x","jderiv","n",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "OOOOO|O:full_profile_profile.bvalue",\ capi_kwlist,&t_capi,&bcoef_capi,&k_capi,&x_capi,&jderiv_capi,&n_capi)) return NULL; /*frompyobj*/ /* Processing variable bcoef */ ; capi_bcoef_intent |= F2PY_INTENT_IN; capi_bcoef_tmp = array_from_pyobj(NPY_FLOAT,bcoef_Dims,bcoef_Rank,capi_bcoef_intent,bcoef_capi); if (capi_bcoef_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 2nd argument `bcoef' of full_profile_profile.bvalue to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { bcoef = (float *)(PyArray_DATA(capi_bcoef_tmp)); /* Processing variable k */ f2py_success = int_from_pyobj(&k,k_capi,"full_profile_profile.bvalue() 3rd argument (k) can't be converted to int"); if (f2py_success) { /* Processing variable x */ f2py_success = float_from_pyobj(&x,x_capi,"full_profile_profile.bvalue() 4th argument (x) can't be converted to float"); if (f2py_success) { /* Processing variable jderiv */ f2py_success = int_from_pyobj(&jderiv,jderiv_capi,"full_profile_profile.bvalue() 5th argument (jderiv) can't be converted to int"); if (f2py_success) { /* Processing variable bvalue */ /* Processing variable n */ if (n_capi == Py_None) n = len(bcoef); else f2py_success = int_from_pyobj(&n,n_capi,"full_profile_profile.bvalue() 1st keyword (n) can't be converted to int"); if (f2py_success) { CHECKSCALAR(len(bcoef)>=n,"len(bcoef)>=n","1st keyword n","bvalue:n=%d",n) { /* Processing variable t */ t_Dims[0]=n+k; capi_t_intent |= F2PY_INTENT_IN; capi_t_tmp = array_from_pyobj(NPY_FLOAT,t_Dims,t_Rank,capi_t_intent,t_capi); if (capi_t_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 1st argument `t' of full_profile_profile.bvalue to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { t = (float *)(PyArray_DATA(capi_t_tmp)); /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(&bvalue,t,bcoef,&n,&k,&x,&jderiv); 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("f",bvalue); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ if((PyObject *)capi_t_tmp!=t_capi) { Py_XDECREF(capi_t_tmp); } } /*if (capi_t_tmp == NULL) ... else of t*/ /* End of cleaning variable t */ } /*CHECKSCALAR(len(bcoef)>=n)*/ } /*if (f2py_success) of n*/ /* End of cleaning variable n */ /* End of cleaning variable bvalue */ } /*if (f2py_success) of jderiv*/ /* End of cleaning variable jderiv */ } /*if (f2py_success) of x*/ /* End of cleaning variable x */ } /*if (f2py_success) of k*/ /* End of cleaning variable k */ if((PyObject *)capi_bcoef_tmp!=bcoef_capi) { Py_XDECREF(capi_bcoef_tmp); } } /*if (capi_bcoef_tmp == NULL) ... else of bcoef*/ /* End of cleaning variable bcoef */ /*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 bvalue *******************************/ /*********************************** interv ***********************************/ static char doc_f2py_rout_full_profile_profile_interv[] = "\ interv(xt,x,left,mflag,[lxt])\n\nWrapper for ``interv``.\ \n\nParameters\n----------\n" "xt : input rank-1 array('f') with bounds (lxt)\n" "x : input float\n" "left : input int\n" "mflag : input int\n" "\nOther Parameters\n----------------\n" "lxt : input int, optional\n Default: len(xt)"; /* extern void F_FUNC(interv,INTERV)(float*,int*,float*,int*,int*); */ static PyObject *f2py_rout_full_profile_profile_interv(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(float*,int*,float*,int*,int*)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ float *xt = NULL; npy_intp xt_Dims[1] = {-1}; const int xt_Rank = 1; PyArrayObject *capi_xt_tmp = NULL; int capi_xt_intent = 0; PyObject *xt_capi = Py_None; int lxt = 0; PyObject *lxt_capi = Py_None; float x = 0; PyObject *x_capi = Py_None; int left = 0; PyObject *left_capi = Py_None; int mflag = 0; PyObject *mflag_capi = Py_None; static char *capi_kwlist[] = {"xt","x","left","mflag","lxt",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "OOOO|O:full_profile_profile.interv",\ capi_kwlist,&xt_capi,&x_capi,&left_capi,&mflag_capi,&lxt_capi)) return NULL; /*frompyobj*/ /* Processing variable xt */ ; capi_xt_intent |= F2PY_INTENT_IN; capi_xt_tmp = array_from_pyobj(NPY_FLOAT,xt_Dims,xt_Rank,capi_xt_intent,xt_capi); if (capi_xt_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : full_profile_profile_error,"failed in converting 1st argument `xt' of full_profile_profile.interv to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } else { xt = (float *)(PyArray_DATA(capi_xt_tmp)); /* Processing variable x */ f2py_success = float_from_pyobj(&x,x_capi,"full_profile_profile.interv() 2nd argument (x) can't be converted to float"); if (f2py_success) { /* Processing variable left */ f2py_success = int_from_pyobj(&left,left_capi,"full_profile_profile.interv() 3rd argument (left) can't be converted to int"); if (f2py_success) { /* Processing variable mflag */ f2py_success = int_from_pyobj(&mflag,mflag_capi,"full_profile_profile.interv() 4th argument (mflag) can't be converted to int"); if (f2py_success) { /* Processing variable lxt */ if (lxt_capi == Py_None) lxt = len(xt); else f2py_success = int_from_pyobj(&lxt,lxt_capi,"full_profile_profile.interv() 1st keyword (lxt) can't be converted to int"); if (f2py_success) { CHECKSCALAR(len(xt)>=lxt,"len(xt)>=lxt","1st keyword lxt","interv:lxt=%d",lxt) { /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(xt,&lxt,&x,&left,&mflag); 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(""); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ } /*CHECKSCALAR(len(xt)>=lxt)*/ } /*if (f2py_success) of lxt*/ /* End of cleaning variable lxt */ } /*if (f2py_success) of mflag*/ /* End of cleaning variable mflag */ } /*if (f2py_success) of left*/ /* End of cleaning variable left */ } /*if (f2py_success) of x*/ /* End of cleaning variable x */ if((PyObject *)capi_xt_tmp!=xt_capi) { Py_XDECREF(capi_xt_tmp); } } /*if (capi_xt_tmp == NULL) ... else of xt*/ /* End of cleaning variable xt */ /*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 interv *******************************/ /*********************************** r1mach ***********************************/ static char doc_f2py_rout_full_profile_profile_r1mach[] = "\ r1mach = r1mach(i)\n\nWrapper for ``r1mach``.\ \n\nParameters\n----------\n" "i : input int\n" "\nReturns\n-------\n" "r1mach : float"; /* extern void F_WRAPPEDFUNC(r1mach,R1MACH)(float*,int*); */ static PyObject *f2py_rout_full_profile_profile_r1mach(const PyObject *capi_self, PyObject *capi_args, PyObject *capi_keywds, void (*f2py_func)(float*,int*)) { PyObject * volatile capi_buildvalue = NULL; volatile int f2py_success = 1; /*decl*/ float r1mach = 0; int i = 0; PyObject *i_capi = Py_None; static char *capi_kwlist[] = {"i",NULL}; /*routdebugenter*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_clock(); #endif if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ "O|:full_profile_profile.r1mach",\ capi_kwlist,&i_capi)) return NULL; /*frompyobj*/ /* Processing variable i */ f2py_success = int_from_pyobj(&i,i_capi,"full_profile_profile.r1mach() 1st argument (i) can't be converted to int"); if (f2py_success) { /* Processing variable r1mach */ /*end of frompyobj*/ #ifdef F2PY_REPORT_ATEXIT f2py_start_call_clock(); #endif /*callfortranroutine*/ (*f2py_func)(&r1mach,&i); 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("f",r1mach); /*closepyobjfrom*/ /*end of closepyobjfrom*/ } /*if (f2py_success) after callfortranroutine*/ /*cleanupfrompyobj*/ /* End of cleaning variable r1mach */ } /*if (f2py_success) of i*/ /* End of cleaning variable i */ /*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 r1mach *******************************/ /*eof body*/ /******************* See f2py2e/f90mod_rules.py: buildhooks *******************/ /*need_f90modhooks*/ /************** See f2py2e/rules.py: module_rules['modulebody'] **************/ /******************* See f2py2e/common_rules.py: buildhooks *******************/ static FortranDataDef f2py_chisq_def[] = { {"chi2",0,{{-1}},NPY_FLOAT}, {NULL} }; static void f2py_setup_chisq(char *chi2) { int i_f2py=0; f2py_chisq_def[i_f2py++].data = chi2; } extern void F_FUNC(f2pyinitchisq,F2PYINITCHISQ)(void(*)(char*)); static void f2py_init_chisq(void) { F_FUNC(f2pyinitchisq,F2PYINITCHISQ)(f2py_setup_chisq); } static FortranDataDef f2py_fpa_def[] = { {"densp",1,{{91}},NPY_FLOAT}, {"tep",1,{{91}},NPY_FLOAT}, {"trp",1,{{91}},NPY_FLOAT}, {"tip",1,{{91}},NPY_FLOAT}, {"hfp",1,{{91}},NPY_FLOAT}, {"hefp",1,{{91}},NPY_FLOAT}, {"altp",1,{{91}},NPY_FLOAT}, {"r0",0,{{-1}},NPY_FLOAT}, {"dr",0,{{-1}},NPY_FLOAT}, {"wl",0,{{-1}},NPY_FLOAT}, {NULL} }; static void f2py_setup_fpa(char *densp,char *tep,char *trp,char *tip,char *hfp,char *hefp,char *altp,char *r0,char *dr,char *wl) { int i_f2py=0; f2py_fpa_def[i_f2py++].data = densp; f2py_fpa_def[i_f2py++].data = tep; f2py_fpa_def[i_f2py++].data = trp; f2py_fpa_def[i_f2py++].data = tip; f2py_fpa_def[i_f2py++].data = hfp; f2py_fpa_def[i_f2py++].data = hefp; f2py_fpa_def[i_f2py++].data = altp; f2py_fpa_def[i_f2py++].data = r0; f2py_fpa_def[i_f2py++].data = dr; f2py_fpa_def[i_f2py++].data = wl; } extern void F_FUNC(f2pyinitfpa,F2PYINITFPA)(void(*)(char*,char*,char*,char*,char*,char*,char*,char*,char*,char*)); static void f2py_init_fpa(void) { F_FUNC(f2pyinitfpa,F2PYINITFPA)(f2py_setup_fpa); } static FortranDataDef f2py_data_def[] = { {"plag",2,{{16,91}},NPY_FLOAT}, {"plag_errors",2,{{16,91}},NPY_FLOAT}, {NULL} }; static void f2py_setup_data(char *plag,char *plag_errors) { int i_f2py=0; f2py_data_def[i_f2py++].data = plag; f2py_data_def[i_f2py++].data = plag_errors; } extern void F_FUNC(f2pyinitdata,F2PYINITDATA)(void(*)(char*,char*)); static void f2py_init_data(void) { F_FUNC(f2pyinitdata,F2PYINITDATA)(f2py_setup_data); } static FortranDataDef f2py_sys_def[] = { {"sconst",0,{{-1}},NPY_FLOAT}, {NULL} }; static void f2py_setup_sys(char *sconst) { int i_f2py=0; f2py_sys_def[i_f2py++].data = sconst; } extern void F_FUNC(f2pyinitsys,F2PYINITSYS)(void(*)(char*)); static void f2py_init_sys(void) { F_FUNC(f2pyinitsys,F2PYINITSYS)(f2py_setup_sys); } static FortranDataDef f2py_errs_def[] = { {"edensp",1,{{91}},NPY_FLOAT}, {"etep",1,{{91}},NPY_FLOAT}, {"etip",1,{{91}},NPY_FLOAT}, {"ehfp",1,{{91}},NPY_FLOAT}, {"ehefp",1,{{91}},NPY_FLOAT}, {NULL} }; static void f2py_setup_errs(char *edensp,char *etep,char *etip,char *ehfp,char *ehefp) { int i_f2py=0; f2py_errs_def[i_f2py++].data = edensp; f2py_errs_def[i_f2py++].data = etep; f2py_errs_def[i_f2py++].data = etip; f2py_errs_def[i_f2py++].data = ehfp; f2py_errs_def[i_f2py++].data = ehefp; } extern void F_FUNC(f2pyiniterrs,F2PYINITERRS)(void(*)(char*,char*,char*,char*,char*)); static void f2py_init_errs(void) { F_FUNC(f2pyiniterrs,F2PYINITERRS)(f2py_setup_errs); } static FortranDataDef f2py_mag_def[] = { {"bfld_prof",1,{{85}},NPY_FLOAT}, {"alpha_prof",1,{{85}},NPY_FLOAT}, {NULL} }; static void f2py_setup_mag(char *bfld_prof,char *alpha_prof) { int i_f2py=0; f2py_mag_def[i_f2py++].data = bfld_prof; f2py_mag_def[i_f2py++].data = alpha_prof; } extern void F_FUNC(f2pyinitmag,F2PYINITMAG)(void(*)(char*,char*)); static void f2py_init_mag(void) { F_FUNC(f2pyinitmag,F2PYINITMAG)(f2py_setup_mag); } static FortranDataDef f2py_mode_def[] = { {"imode",0,{{-1}},NPY_INT}, {NULL} }; static void f2py_setup_mode(char *imode) { int i_f2py=0; f2py_mode_def[i_f2py++].data = imode; } extern void F_FUNC(f2pyinitmode,F2PYINITMODE)(void(*)(char*)); static void f2py_init_mode(void) { F_FUNC(f2pyinitmode,F2PYINITMODE)(f2py_setup_mode); } static FortranDataDef f2py_utime_def[] = { {"uttime",0,{{-1}},NPY_FLOAT}, {NULL} }; static void f2py_setup_utime(char *uttime) { int i_f2py=0; f2py_utime_def[i_f2py++].data = uttime; } extern void F_FUNC(f2pyinitutime,F2PYINITUTIME)(void(*)(char*)); static void f2py_init_utime(void) { F_FUNC(f2pyinitutime,F2PYINITUTIME)(f2py_setup_utime); } static FortranDataDef f2py_spline_def[] = { {"ta",1,{{34}},NPY_FLOAT}, {"bcoef",2,{{30,5}},NPY_FLOAT}, {NULL} }; static void f2py_setup_spline(char *ta,char *bcoef) { int i_f2py=0; f2py_spline_def[i_f2py++].data = ta; f2py_spline_def[i_f2py++].data = bcoef; } extern void F_FUNC(f2pyinitspline,F2PYINITSPLINE)(void(*)(char*,char*)); static void f2py_init_spline(void) { F_FUNC(f2pyinitspline,F2PYINITSPLINE)(f2py_setup_spline); } static FortranDataDef f2py_spec_def[] = { {"te",0,{{-1}},NPY_FLOAT}, {"ti",1,{{10}},NPY_FLOAT}, {"fi",1,{{10}},NPY_FLOAT}, {"ven",0,{{-1}},NPY_FLOAT}, {"vin",1,{{10}},NPY_FLOAT}, {"alpha",0,{{-1}},NPY_FLOAT}, {"dens",0,{{-1}},NPY_FLOAT}, {"bfld",0,{{-1}},NPY_FLOAT}, {"nion",0,{{-1}},NPY_INT}, {"wi",1,{{10}},NPY_INT}, {"ak",0,{{-1}},NPY_FLOAT}, {NULL} }; static void f2py_setup_spec(char *te,char *ti,char *fi,char *ven,char *vin,char *alpha,char *dens,char *bfld,char *nion,char *wi,char *ak) { int i_f2py=0; f2py_spec_def[i_f2py++].data = te; f2py_spec_def[i_f2py++].data = ti; f2py_spec_def[i_f2py++].data = fi; f2py_spec_def[i_f2py++].data = ven; f2py_spec_def[i_f2py++].data = vin; f2py_spec_def[i_f2py++].data = alpha; f2py_spec_def[i_f2py++].data = dens; f2py_spec_def[i_f2py++].data = bfld; f2py_spec_def[i_f2py++].data = nion; f2py_spec_def[i_f2py++].data = wi; f2py_spec_def[i_f2py++].data = ak; } extern void F_FUNC(f2pyinitspec,F2PYINITSPEC)(void(*)(char*,char*,char*,char*,char*,char*,char*,char*,char*,char*,char*)); static void f2py_init_spec(void) { F_FUNC(f2pyinitspec,F2PYINITSPEC)(f2py_setup_spec); } static FortranDataDef f2py_fitter_def[] = { {"tau",1,{{100}},NPY_FLOAT}, {"rho",1,{{100}},NPY_FLOAT}, {"sigma2",1,{{100}},NPY_FLOAT}, {"params",1,{{10}},NPY_FLOAT}, {"ifit",1,{{10}},NPY_INT}, {NULL} }; static void f2py_setup_fitter(char *tau,char *rho,char *sigma2,char *params,char *ifit) { int i_f2py=0; f2py_fitter_def[i_f2py++].data = tau; f2py_fitter_def[i_f2py++].data = rho; f2py_fitter_def[i_f2py++].data = sigma2; f2py_fitter_def[i_f2py++].data = params; f2py_fitter_def[i_f2py++].data = ifit; } extern void F_FUNC(f2pyinitfitter,F2PYINITFITTER)(void(*)(char*,char*,char*,char*,char*)); static void f2py_init_fitter(void) { F_FUNC(f2pyinitfitter,F2PYINITFITTER)(f2py_setup_fitter); } static FortranDataDef f2py_trans_def[] = { {"ev",1,{{10000}},NPY_FLOAT}, {NULL} }; static void f2py_setup_trans(char *ev) { int i_f2py=0; f2py_trans_def[i_f2py++].data = ev; } extern void F_FUNC(f2pyinittrans,F2PYINITTRANS)(void(*)(char*)); static void f2py_init_trans(void) { F_FUNC(f2pyinittrans,F2PYINITTRANS)(f2py_setup_trans); } static FortranDataDef f2py_d8mach_def[] = { {"cray1",0,{{-1}},NPY_INT}, {NULL} }; static void f2py_setup_d8mach(char *cray1) { int i_f2py=0; f2py_d8mach_def[i_f2py++].data = cray1; } extern void F_FUNC(f2pyinitd8mach,F2PYINITD8MACH)(void(*)(char*)); static void f2py_init_d8mach(void) { F_FUNC(f2pyinitd8mach,F2PYINITD8MACH)(f2py_setup_d8mach); } /*need_commonhooks*/ /**************************** See f2py2e/rules.py ****************************/ static FortranDataDef f2py_routine_defs[] = { {"profile",-1,{{-1}},0,(char *)F_FUNC(profile,PROFILE),(f2py_init_func)f2py_rout_full_profile_profile_profile,doc_f2py_rout_full_profile_profile_profile}, {"grid",-1,{{-1}},0,(char *)F_FUNC(grid,GRID),(f2py_init_func)f2py_rout_full_profile_profile_grid,doc_f2py_rout_full_profile_profile_grid}, {"propagate",-1,{{-1}},0,(char *)F_FUNC(propagate,PROPAGATE),(f2py_init_func)f2py_rout_full_profile_profile_propagate,doc_f2py_rout_full_profile_profile_propagate}, {"fcn_lpreg",-1,{{-1}},0,(char *)F_FUNC_US(fcn_lpreg,FCN_LPREG),(f2py_init_func)f2py_rout_full_profile_profile_fcn_lpreg,doc_f2py_rout_full_profile_profile_fcn_lpreg}, {"get_scale",-1,{{-1}},0,(char *)F_FUNC_US(get_scale,GET_SCALE),(f2py_init_func)f2py_rout_full_profile_profile_get_scale,doc_f2py_rout_full_profile_profile_get_scale}, {"enorm",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(enorm,ENORM),(f2py_init_func)f2py_rout_full_profile_profile_enorm,doc_f2py_rout_full_profile_profile_enorm}, {"fdjac2",-1,{{-1}},0,(char *)F_FUNC(fdjac2,FDJAC2),(f2py_init_func)f2py_rout_full_profile_profile_fdjac2,doc_f2py_rout_full_profile_profile_fdjac2}, {"lmdif",-1,{{-1}},0,(char *)F_FUNC(lmdif,LMDIF),(f2py_init_func)f2py_rout_full_profile_profile_lmdif,doc_f2py_rout_full_profile_profile_lmdif}, {"lmpar",-1,{{-1}},0,(char *)F_FUNC(lmpar,LMPAR),(f2py_init_func)f2py_rout_full_profile_profile_lmpar,doc_f2py_rout_full_profile_profile_lmpar}, {"qrfac",-1,{{-1}},0,(char *)F_FUNC(qrfac,QRFAC),(f2py_init_func)f2py_rout_full_profile_profile_qrfac,doc_f2py_rout_full_profile_profile_qrfac}, {"qrsolv",-1,{{-1}},0,(char *)F_FUNC(qrsolv,QRSOLV),(f2py_init_func)f2py_rout_full_profile_profile_qrsolv,doc_f2py_rout_full_profile_profile_qrsolv}, {"spmpar",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(spmpar,SPMPAR),(f2py_init_func)f2py_rout_full_profile_profile_spmpar,doc_f2py_rout_full_profile_profile_spmpar}, {"cdtr1",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(cdtr1,CDTR1),(f2py_init_func)f2py_rout_full_profile_profile_cdtr1,doc_f2py_rout_full_profile_profile_cdtr1}, {"czte1",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(czte1,CZTE1),(f2py_init_func)f2py_rout_full_profile_profile_czte1,doc_f2py_rout_full_profile_profile_czte1}, {"fcn",-1,{{-1}},0,(char *)F_FUNC(fcn,FCN),(f2py_init_func)f2py_rout_full_profile_profile_fcn,doc_f2py_rout_full_profile_profile_fcn}, {"cj_ion",-1,{{-1}},0,(char *)F_WRAPPEDFUNC_US(cj_ion,CJ_ION),(f2py_init_func)f2py_rout_full_profile_profile_cj_ion,doc_f2py_rout_full_profile_profile_cj_ion}, {"cj_electron",-1,{{-1}},0,(char *)F_WRAPPEDFUNC_US(cj_electron,CJ_ELECTRON),(f2py_init_func)f2py_rout_full_profile_profile_cj_electron,doc_f2py_rout_full_profile_profile_cj_electron}, {"y_ion",-1,{{-1}},0,(char *)F_WRAPPEDFUNC_US(y_ion,Y_ION),(f2py_init_func)f2py_rout_full_profile_profile_y_ion,doc_f2py_rout_full_profile_profile_y_ion}, {"y_electron",-1,{{-1}},0,(char *)F_WRAPPEDFUNC_US(y_electron,Y_ELECTRON),(f2py_init_func)f2py_rout_full_profile_profile_y_electron,doc_f2py_rout_full_profile_profile_y_electron}, {"spect1",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(spect1,SPECT1),(f2py_init_func)f2py_rout_full_profile_profile_spect1,doc_f2py_rout_full_profile_profile_spect1}, {"acf2",-1,{{-1}},0,(char *)F_FUNC(acf2,ACF2),(f2py_init_func)f2py_rout_full_profile_profile_acf2,doc_f2py_rout_full_profile_profile_acf2}, {"gaussq",-1,{{-1}},0,(char *)F_FUNC(gaussq,GAUSSQ),(f2py_init_func)f2py_rout_full_profile_profile_gaussq,doc_f2py_rout_full_profile_profile_gaussq}, {"lagp",-1,{{-1}},0,(char *)F_FUNC(lagp,LAGP),(f2py_init_func)f2py_rout_full_profile_profile_lagp,doc_f2py_rout_full_profile_profile_lagp}, {"atanh",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(atanh,ATANH),(f2py_init_func)f2py_rout_full_profile_profile_atanh,doc_f2py_rout_full_profile_profile_atanh}, {"get_spline",-1,{{-1}},0,(char *)F_FUNC_US(get_spline,GET_SPLINE),(f2py_init_func)f2py_rout_full_profile_profile_get_spline,doc_f2py_rout_full_profile_profile_get_spline}, {"bvalue",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(bvalue,BVALUE),(f2py_init_func)f2py_rout_full_profile_profile_bvalue,doc_f2py_rout_full_profile_profile_bvalue}, {"interv",-1,{{-1}},0,(char *)F_FUNC(interv,INTERV),(f2py_init_func)f2py_rout_full_profile_profile_interv,doc_f2py_rout_full_profile_profile_interv}, {"r1mach",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(r1mach,R1MACH),(f2py_init_func)f2py_rout_full_profile_profile_r1mach,doc_f2py_rout_full_profile_profile_r1mach}, /*eof routine_defs*/ {NULL} }; static PyMethodDef f2py_module_methods[] = { {NULL,NULL} }; static struct PyModuleDef moduledef = { PyModuleDef_HEAD_INIT, "full_profile_profile", NULL, -1, f2py_module_methods, NULL, NULL, NULL, NULL }; PyMODINIT_FUNC PyInit_full_profile_profile(void) { int i; PyObject *m,*d, *s, *tmp; m = full_profile_profile_module = PyModule_Create(&moduledef); Py_SET_TYPE(&PyFortran_Type, &PyType_Type); import_array(); if (PyErr_Occurred()) {PyErr_SetString(PyExc_ImportError, "can't initialize module full_profile_profile (failed to import numpy)"); return m;} d = PyModule_GetDict(m); s = PyString_FromString("$Revision: $"); PyDict_SetItemString(d, "__version__", s); Py_DECREF(s); s = PyUnicode_FromString( "This module 'full_profile_profile' is auto-generated with f2py (version:2).\nFunctions:\n" " profile(acf_sum,acf_err,power,en,alag,thb2,bfm2,ote,ete,oti,eti,oph,eph,ophe,ephe,range2,ut,nacf,acf_avg_real,status,nhts=shape(acf_sum,1),ibits=shape(acf_sum,2))\n" " grid()\n" " propagate(xe)\n" " fcn_lpreg(x,fvec,iflag,m=len(fvec),n=len(x))\n" " get_scale(plag2)\n" " enorm = enorm(x,n=len(x))\n" " fdjac2(fcn,x,fvec,fjac,iflag,epsfcn,wa,m=len(fvec),n=len(x),ldfjac=shape(fjac,0),fcn_extra_args=())\n" " lmdif(fcn,x,fvec,ftol,xtol,gtol,maxfev,epsfcn,diag,mode,factor,nprint,info,nfev,fjac,ipvt,qtf,wa1,wa2,wa3,wa4,m=len(fvec),n=len(x),ldfjac=shape(fjac,0),fcn_extra_args=())\n" " lmpar(r,ipvt,diag,qtb,delta,par,x,sdiag,wa1,wa2,n=shape(r,1),ldr=shape(r,0))\n" " qrfac(m,a,pivot,ipvt,rdiag,acnorm,wa,n=shape(a,1),lda=shape(a,0),lipvt=len(ipvt))\n" " qrsolv(r,ipvt,diag,qtb,x,sdiag,wa,n=shape(r,1),ldr=shape(r,0))\n" " spmpar = spmpar(i)\n" " cdtr1 = cdtr1(depth)\n" " czte1 = czte1(zlag,tr)\n" " fcn(x,fvec,iflag,m=len(fvec),n=len(x))\n" " cj_ion = cj_ion(theta,psi)\n" " cj_electron = cj_electron(theta,phi,psi,alpha)\n" " y_ion = y_ion(theta,psi)\n" " y_electron = y_electron(theta,phi,psi,alpha)\n" " spect1 = spect1(omega)\n" " acf2(wl,tau,te1,ti1,fi1,ven1,vin1,wi1,alpha1,dens1,bfld1,acf,nion1=len(ti1))\n" " gaussq(tau,acf)\n" " lagp(plag,wl,r0,dr,nl=shape(plag,0),nrange=shape(plag,1))\n" " atanh = atanh(x)\n" " get_spline(alt,dens,te,ti,hf,hef)\n" " bvalue = bvalue(t,bcoef,k,x,jderiv,n=len(bcoef))\n" " interv(xt,x,left,mflag,lxt=len(xt))\n" " r1mach = r1mach(i)\n" "COMMON blocks:\n"" /chisq/ chi2\n"" /fpa/ densp(91),tep(91),trp(91),tip(91),hfp(91),hefp(91),altp(91),r0,dr,wl\n"" /data/ plag(16,91),plag_errors(16,91)\n"" /sys/ sconst\n"" /errs/ edensp(91),etep(91),etip(91),ehfp(91),ehefp(91)\n"" /mag/ bfld_prof(85),alpha_prof(85)\n"" /mode/ imode\n"" /utime/ uttime\n"" /spline/ ta(34),bcoef(30,5)\n"" /spec/ te,ti(10),fi(10),ven,vin(10),alpha,dens,bfld,nion,wi(10),ak\n"" /fitter/ tau(100),rho(100),sigma2(100),params(10),ifit(10)\n"" /trans/ ev(10000)\n"" /d8mach/ cray1\n""."); PyDict_SetItemString(d, "__doc__", s); Py_DECREF(s); full_profile_profile_error = PyErr_NewException ("full_profile_profile.error", NULL, NULL); /* * Store the error object inside the dict, so that it could get deallocated. * (in practice, this is a module, so it likely will not and cannot.) */ PyDict_SetItemString(d, "_full_profile_profile_error", full_profile_profile_error); Py_DECREF(full_profile_profile_error); for(i=0;f2py_routine_defs[i].name!=NULL;i++) { tmp = PyFortranObject_NewAsAttr(&f2py_routine_defs[i]); PyDict_SetItemString(d, f2py_routine_defs[i].name, tmp); Py_DECREF(tmp); } { extern float F_FUNC(enorm,ENORM)(void); PyObject* o = PyDict_GetItemString(d,"enorm"); tmp = F2PyCapsule_FromVoidPtr((void*)F_FUNC(enorm,ENORM),NULL); PyObject_SetAttrString(o,"_cpointer", tmp); Py_DECREF(tmp); s = PyUnicode_FromString("enorm"); PyObject_SetAttrString(o,"__name__", s); Py_DECREF(s); } { extern float F_FUNC(spmpar,SPMPAR)(void); PyObject* o = PyDict_GetItemString(d,"spmpar"); tmp = F2PyCapsule_FromVoidPtr((void*)F_FUNC(spmpar,SPMPAR),NULL); PyObject_SetAttrString(o,"_cpointer", tmp); Py_DECREF(tmp); s = PyUnicode_FromString("spmpar"); PyObject_SetAttrString(o,"__name__", s); Py_DECREF(s); } { extern float F_FUNC(cdtr1,CDTR1)(void); PyObject* o = PyDict_GetItemString(d,"cdtr1"); tmp = F2PyCapsule_FromVoidPtr((void*)F_FUNC(cdtr1,CDTR1),NULL); PyObject_SetAttrString(o,"_cpointer", tmp); Py_DECREF(tmp); s = PyUnicode_FromString("cdtr1"); PyObject_SetAttrString(o,"__name__", s); Py_DECREF(s); } { extern float F_FUNC(czte1,CZTE1)(void); PyObject* o = PyDict_GetItemString(d,"czte1"); tmp = F2PyCapsule_FromVoidPtr((void*)F_FUNC(czte1,CZTE1),NULL); PyObject_SetAttrString(o,"_cpointer", tmp); Py_DECREF(tmp); s = PyUnicode_FromString("czte1"); PyObject_SetAttrString(o,"__name__", s); Py_DECREF(s); } { extern complex_float F_FUNC_US(cj_ion,CJ_ION)(void); PyObject* o = PyDict_GetItemString(d,"cj_ion"); tmp = F2PyCapsule_FromVoidPtr((void*)F_FUNC_US(cj_ion,CJ_ION),NULL); PyObject_SetAttrString(o,"_cpointer", tmp); Py_DECREF(tmp); s = PyUnicode_FromString("cj_ion"); PyObject_SetAttrString(o,"__name__", s); Py_DECREF(s); } { extern complex_float F_FUNC_US(cj_electron,CJ_ELECTRON)(void); PyObject* o = PyDict_GetItemString(d,"cj_electron"); tmp = F2PyCapsule_FromVoidPtr((void*)F_FUNC_US(cj_electron,CJ_ELECTRON),NULL); PyObject_SetAttrString(o,"_cpointer", tmp); Py_DECREF(tmp); s = PyUnicode_FromString("cj_electron"); PyObject_SetAttrString(o,"__name__", s); Py_DECREF(s); } { extern complex_float F_FUNC_US(y_ion,Y_ION)(void); PyObject* o = PyDict_GetItemString(d,"y_ion"); tmp = F2PyCapsule_FromVoidPtr((void*)F_FUNC_US(y_ion,Y_ION),NULL); PyObject_SetAttrString(o,"_cpointer", tmp); Py_DECREF(tmp); s = PyUnicode_FromString("y_ion"); PyObject_SetAttrString(o,"__name__", s); Py_DECREF(s); } { extern complex_float F_FUNC_US(y_electron,Y_ELECTRON)(void); PyObject* o = PyDict_GetItemString(d,"y_electron"); tmp = F2PyCapsule_FromVoidPtr((void*)F_FUNC_US(y_electron,Y_ELECTRON),NULL); PyObject_SetAttrString(o,"_cpointer", tmp); Py_DECREF(tmp); s = PyUnicode_FromString("y_electron"); PyObject_SetAttrString(o,"__name__", s); Py_DECREF(s); } { extern float F_FUNC(spect1,SPECT1)(void); PyObject* o = PyDict_GetItemString(d,"spect1"); tmp = F2PyCapsule_FromVoidPtr((void*)F_FUNC(spect1,SPECT1),NULL); PyObject_SetAttrString(o,"_cpointer", tmp); Py_DECREF(tmp); s = PyUnicode_FromString("spect1"); PyObject_SetAttrString(o,"__name__", s); Py_DECREF(s); } { extern float F_FUNC(atanh,ATANH)(void); PyObject* o = PyDict_GetItemString(d,"atanh"); tmp = F2PyCapsule_FromVoidPtr((void*)F_FUNC(atanh,ATANH),NULL); PyObject_SetAttrString(o,"_cpointer", tmp); Py_DECREF(tmp); s = PyUnicode_FromString("atanh"); PyObject_SetAttrString(o,"__name__", s); Py_DECREF(s); } { extern float F_FUNC(bvalue,BVALUE)(void); PyObject* o = PyDict_GetItemString(d,"bvalue"); tmp = F2PyCapsule_FromVoidPtr((void*)F_FUNC(bvalue,BVALUE),NULL); PyObject_SetAttrString(o,"_cpointer", tmp); Py_DECREF(tmp); s = PyUnicode_FromString("bvalue"); PyObject_SetAttrString(o,"__name__", s); Py_DECREF(s); } { extern float F_FUNC(r1mach,R1MACH)(void); PyObject* o = PyDict_GetItemString(d,"r1mach"); tmp = F2PyCapsule_FromVoidPtr((void*)F_FUNC(r1mach,R1MACH),NULL); PyObject_SetAttrString(o,"_cpointer", tmp); Py_DECREF(tmp); s = PyUnicode_FromString("r1mach"); PyObject_SetAttrString(o,"__name__", s); Py_DECREF(s); } /*eof initf2pywraphooks*/ /*eof initf90modhooks*/ tmp = PyFortranObject_New(f2py_chisq_def,f2py_init_chisq); F2PyDict_SetItemString(d, "chisq", tmp); Py_DECREF(tmp); tmp = PyFortranObject_New(f2py_fpa_def,f2py_init_fpa); F2PyDict_SetItemString(d, "fpa", tmp); Py_DECREF(tmp); tmp = PyFortranObject_New(f2py_data_def,f2py_init_data); F2PyDict_SetItemString(d, "data", tmp); Py_DECREF(tmp); tmp = PyFortranObject_New(f2py_sys_def,f2py_init_sys); F2PyDict_SetItemString(d, "sys", tmp); Py_DECREF(tmp); tmp = PyFortranObject_New(f2py_errs_def,f2py_init_errs); F2PyDict_SetItemString(d, "errs", tmp); Py_DECREF(tmp); tmp = PyFortranObject_New(f2py_mag_def,f2py_init_mag); F2PyDict_SetItemString(d, "mag", tmp); Py_DECREF(tmp); tmp = PyFortranObject_New(f2py_mode_def,f2py_init_mode); F2PyDict_SetItemString(d, "mode", tmp); Py_DECREF(tmp); tmp = PyFortranObject_New(f2py_utime_def,f2py_init_utime); F2PyDict_SetItemString(d, "utime", tmp); Py_DECREF(tmp); tmp = PyFortranObject_New(f2py_spline_def,f2py_init_spline); F2PyDict_SetItemString(d, "spline", tmp); Py_DECREF(tmp); tmp = PyFortranObject_New(f2py_spec_def,f2py_init_spec); F2PyDict_SetItemString(d, "spec", tmp); Py_DECREF(tmp); tmp = PyFortranObject_New(f2py_fitter_def,f2py_init_fitter); F2PyDict_SetItemString(d, "fitter", tmp); Py_DECREF(tmp); tmp = PyFortranObject_New(f2py_trans_def,f2py_init_trans); F2PyDict_SetItemString(d, "trans", tmp); Py_DECREF(tmp); tmp = PyFortranObject_New(f2py_d8mach_def,f2py_init_d8mach); F2PyDict_SetItemString(d, "d8mach", tmp); Py_DECREF(tmp); /*eof initcommonhooks*/ #ifdef F2PY_REPORT_ATEXIT if (! PyErr_Occurred()) on_exit(f2py_report_on_exit,(void*)"full_profile_profile"); #endif return m; } #ifdef __cplusplus } #endif