diff --git a/pywafo/src/wafo/source/c_codes/build_all.py b/pywafo/src/wafo/source/c_codes/build_all.py deleted file mode 100644 index 43b93a2..0000000 --- a/pywafo/src/wafo/source/c_codes/build_all.py +++ /dev/null @@ -1,98 +0,0 @@ -""" -f2py c_library.pyf c_functions.c -c - -See also http://www.scipy.org/Cookbook/CompilingExtensionsOnWindowsWithMinGW -""" -import os -import sys - -def which(program): - """ - Test if program exists - ====================== - - In order to test if a certain executable exists, it will search for the - program name in the environment variables. - If program is a full path to an executable, it will check it exists - - Copied from: - http://stackoverflow.com/questions/377017/test-if-executable-exists-in-python/ - It is supposed to mimic the UNIX command "which" - """ - - def is_exe(fpath): - return os.path.exists(fpath) and os.access(fpath, os.X_OK) - - fpath, unused_fname = os.path.split(program) - if fpath: - if is_exe(program): - return program - else: - for path in os.environ["PATH"].split(os.pathsep): - exe_file = os.path.join(path, program) - if is_exe(exe_file): - return exe_file - - return None - -def f2py_call_str(): - # regardless of platform, try to figure out which f2py call is in the path - # define possible options - - # on Arch Linux, python and f2py are the calls corresponding to python 3 - # and python2/f2py2 for python 2 - # other Linux versions might still use python/f2py for python 2 - if os.path.basename(sys.executable).endswith('2'): - for k in ('f2py2','f2py2.6','f2py2.7',): - # if we found the f2py path, no need to look further - if which(k): - f2py_call = k - f2py_path = which(k) - break - # on Windows and other Linux using python/f2py - else: - for k in ('f2py','f2py2.6','f2py2.7','f2py.py',): - # if we found the f2py path, no need to look further - if which(k): - f2py_call = k - f2py_path = which(k) - break - - try: - print 'found f2py in:', f2py_path - return f2py_call - # raise exception if f2py is not found, f2py_path variable will not exist - except NameError: - raise UserWarning, \ - 'Couldn\'t locate f2py. Should be part of NumPy installation.' -# # this might vary among specific cases: f2py, f2py2.7, f2py3.2, ... -# # TODO: more robust approach, find out what f2py is in the users path -# if os.name == 'posix': -# compile_format = 'f2py2.6 %s %s -c' -# -# # Install microsoft visual c++ .NET 2003 and run the following to build the module: -# elif os.name == 'nt': -# # compile_format = 'f2py.py %s %s -c --fcompiler=gnu95 --compiler=mingw32 -lmsvcr71' -# compile_format = 'f2py.py %s %s -c' -# -# # give an Error for other OS-es -# else: -# raise UserWarning, \ -# 'Untested platform:', os.name - -def compile_all(): - f2py_call = f2py_call_str() - print '='*75 - print 'compiling c_codes' - print '='*75 - - compile_format = f2py_call + ' %s %s -c' - - pyfs = ('c_library.pyf',) - files =('c_functions.c',) - - for pyf,file in zip(pyfs,files): - os.system(compile_format % (pyf,file)) - -if __name__=='__main__': - compile_all() diff --git a/pywafo/src/wafo/source/c_codes/old/build_all_.py b/pywafo/src/wafo/source/c_codes/old/build_all_.py deleted file mode 100644 index 95251bc..0000000 --- a/pywafo/src/wafo/source/c_codes/old/build_all_.py +++ /dev/null @@ -1,16 +0,0 @@ -import os - -def compile_all(): - # Install gfortran and run the following to build the module: - #compile_format = 'f2py %s %s -c --fcompiler=gnu95 --compiler=mingw32 -lmsvcr71' - - # Install microsoft visual c++ .NET 2003 and run the following to build the module: - compile_format = 'f2py %s %s -c' - pyfs = ('rfc.pyf','diffsumfunq.pyf') - files =('findrfc.c','disufq1.c') - - for pyf,file in zip(pyfs,files): - os.system(compile_format % (pyf,file)) - -if __name__=='__main__': - compile_all() diff --git a/pywafo/src/wafo/source/c_codes/old/diffsumfunq.pyd b/pywafo/src/wafo/source/c_codes/old/diffsumfunq.pyd deleted file mode 100644 index 92ed473..0000000 Binary files a/pywafo/src/wafo/source/c_codes/old/diffsumfunq.pyd and /dev/null differ diff --git a/pywafo/src/wafo/source/c_codes/old/diffsumfunq.pyf b/pywafo/src/wafo/source/c_codes/old/diffsumfunq.pyf deleted file mode 100644 index 7ce7719..0000000 --- a/pywafo/src/wafo/source/c_codes/old/diffsumfunq.pyf +++ /dev/null @@ -1,30 +0,0 @@ -! File diffsumfunq.pyf -python module diffsumfunq -interface - subroutine disufq(rvec, ivec, rA, iA, w, kw, h, g,nmin,nmax, m, n) - intent(c) disufq ! disufq is a C function - intent(c) ! all disufq arguments are considered as C based - !integer intent(hide), depend(rA),check(n*m==len(iA)) :: n=len(rA)/m - !integer intent(hide), depend(rA), check(m==shape(iA,1)) :: m=shape(rA,1) - double precision dimension(n*m), intent(in) :: rA, iA ! input array - double precision dimension(n/2+1), intent(in) :: w, kw ! input array - double precision intent(in) :: h, g - integer intent(in) :: nmin, nmax - double precision dimension(n*m), intent(out) :: rvec, ivec ! output array, - end subroutine disufq - - subroutine disufq2(rsvec, isvec,rdvec, idvec, rA, iA, w, kw, h, g,nmin,nmax, m, n) - intent(c) disufq2 ! disufq2 is a C function - intent(c) ! all disufq2 arguments are considered as C based - !integer intent(hide), depend(rA),check(n*m==len(iA)) :: n=len(rA)/m - !integer intent(hide), depend(rA), check(m==shape(iA,1)) :: m=shape(rA,1) - double precision dimension(n*m), intent(in) :: rA, iA ! input array - double precision dimension(n/2+1), intent(in) :: w, kw ! input array - double precision intent(in) :: h, g - integer intent(in) :: nmin, nmax - double precision dimension(n*m), intent(out) :: rsvec, isvec, rdvec, idvec ! output array, - - end subroutine disufq - -end interface -end python module diffsumfunq \ No newline at end of file diff --git a/pywafo/src/wafo/source/c_codes/old/disufq.pyf b/pywafo/src/wafo/source/c_codes/old/disufq.pyf deleted file mode 100644 index c8eb2c0..0000000 --- a/pywafo/src/wafo/source/c_codes/old/disufq.pyf +++ /dev/null @@ -1,30 +0,0 @@ -! File diffsumfunq.pyf -python module diffsumfunq -interface - subroutine disufq(rvec, ivec, rA, iA, w, kw, h, g,nmin,nmax, m, n) - intent(c) disufq ! disufq is a C function - intent(c) ! all disufq arguments are considered as C based - integer intent(hide), depend(rA),check(n==shape(iA,0)) :: n=shape(rA,0) - integer intent(hide), depend(rA), check(m==shape(iA,1)) :: m=shape(rA,1) - double precision dimension(n,m), intent(in) :: rA, iA ! input array - double precision dimension(n), intent(in) :: w, kw ! input array - double precision intent(in) :: h, g - integer intent(in) :: nmin, nmax - double precision dimension(n,m), intent(out) :: rvec, ivec ! output array, - end subroutine disufq - - subroutine disufq2(rsvec, isvec,rdvec, idvec, rA, iA, w, kw, h, g,nmin,nmax, m, n) - intent(c) disufq2 ! disufq2 is a C function - intent(c) ! all disufq2 arguments are considered as C based - integer intent(hide), depend(rA),check(n==shape(iA,0)) :: n=shape(rA,0) - integer intent(hide), depend(rA), check(m==shape(iA,1)) :: m=shape(rA,1) - double precision dimension(n,m), intent(in) :: rA, iA ! input array - double precision dimension(n), intent(in) :: w, kw ! input array - double precision intent(in) :: h, g - integer intent(in) :: nmin, nmax - double precision dimension(n,m), intent(out) :: rsvec, isvec, rdvec, idvec ! output array, - - end subroutine disufq - -end interface -end python module diffsumfunq \ No newline at end of file diff --git a/pywafo/src/wafo/source/c_codes/old/disufq1.c b/pywafo/src/wafo/source/c_codes/old/disufq1.c deleted file mode 100644 index cae7868..0000000 --- a/pywafo/src/wafo/source/c_codes/old/disufq1.c +++ /dev/null @@ -1,446 +0,0 @@ -#include "math.h" -/* - * DISUFQ Is an internal function to spec2nlsdat - * - * CALL: disufq(rvec,ivec,rA,iA, w,kw,h,g,nmin,nmax,m,n) - * - * rvec, ivec = real and imaginary parts of the resultant (size m X n). - * rA, iA = real and imaginary parts of the amplitudes (size m X n). - * w = vector with angular frequencies (w>=0) - * kw = vector with wavenumbers (kw>=0) - * h = water depth (h >=0) - * g = constant acceleration of gravity - * nmin = minimum index where rA(:,nmin) and iA(:,nmin) is - * greater than zero. - * nmax = maximum index where rA(:,nmax) and iA(:,nmax) is - * greater than zero. - * m = size(rA,1),size(iA,1) - * n = size(rA,2),size(iA,2), or size(rvec,2),size(ivec,2) - * - * DISUFQ returns the summation of difference frequency and sum - * frequency effects in the vector vec = rvec +sqrt(-1)*ivec. - * The 2'nd order contribution to the Stokes wave is then calculated by - * a simple 1D Fourier transform, real(FFT(vec)). - * - * Install gfortran and run the following to build the module: - * f2py diffsumfunq.pyf disufq1.c -c --fcompiler=gnu95 --compiler=mingw32 -lmsvcr71 - * - * by Per Andreas Brodtkorb 15.08.2001 - * revised pab 14.03.2002, 01.05.2002 22.07.2002, oct 2008 - */ - -void disufq(double *rvec, double *ivec, - double *rA, double *iA, - double *w, double *kw, - double h, double g, - int nmin, int nmax, - int m, int n) -{ - double Epij, Edij; - double tmp1, tmp2, tmp3, tmp4, kfact; - double w1, w2, kw1, kw2, Cg; - double rrA, iiA, riA, irA; - int i,jy,ix,iz1,iv1,ixi,jyi; - //int iz2, iv2; - //Initialize rvec and ivec to zero - for (ix=0;ix10000){ /* deep water /Inifinite water depth */ - for (ix = nmin-1;ix=0) - * kw = vector with wavenumbers (kw>=0) - * h = water depth (h >=0) - * g = constant acceleration of gravity - * nmin = minimum index where rA(:,nmin) and iA(:,nmin) is - * greater than zero. - * nmax = maximum index where rA(:,nmax) and iA(:,nmax) is - * greater than zero. - * m = size(rA,1),size(iA,1) - * n = size(rA,2),size(iA,2), or size(rvec,2),size(ivec,2) - * - * DISUFQ2 returns the summation of sum and difference frequency - * frequency effects in the vectors svec = rsvec +sqrt(-1)*isvec and - * dvec = rdvec +sqrt(-1)*idvec. - * The 2'nd order contribution to the Stokes wave is then calculated by - * a simple 1D Fourier transform, real(FFT(svec+dvec)). - * - * - * This is a MEX-file for MATLAB. - * by Per Andreas Brodtkorb 15.08.2001 - * revised pab 14.03.2002, 01.05.2002 - */ - -void disufq2(double *rsvec, double *isvec, - double *rdvec, double *idvec, - double *rA, double *iA, - double *w, double *kw, - double h, double g, - int nmin, int nmax, - int m, int n) -{ - double Epij, Edij; - double tmp1, tmp2, tmp3, tmp4, kfact; - double w1, w2, kw1, kw2, Cg; - double rrA, iiA, riA, irA; - int i,jy,ix,iz1,iv1,ixi,jyi; - //int iz2,iv2 - - //Initialize rvec and ivec to zero - for (ix=0;ix10000){ /* deep water /Inifinite water depth */ - for (ix = nmin-1;ix v){ - dcross=1; /* first is a down-crossing*/ - } - start=0; - if ( *(y +0)== v){ - /* Find out what type of crossing we have next time.. */ - for (i=1; i v){ - *(ind + ix) = i; /* first crossing is a up-crossing*/ - ix++; - dcross=1; /*The next crossing is a down-crossing*/ - break; - } - } - } - - for (i=start; i h) ) || ((dcross==1 ) && (*(y +i)>=h) && (*(y+i+1) < h) ) ) { - - *(ind + ix) = i+1 ; - ix++; - dcross=-dcross; - } - } - info = ix - return; -} - - diff --git a/pywafo/src/wafo/source/c_codes/old/findrfc.c b/pywafo/src/wafo/source/c_codes/old/findrfc.c deleted file mode 100644 index ac0b7d2..0000000 --- a/pywafo/src/wafo/source/c_codes/old/findrfc.c +++ /dev/null @@ -1,118 +0,0 @@ -#include "math.h" -/* - * findrfc.c - - * - * Returns indices to RFC turningpoints of a vector - * of turningpoints - * - * Install gfortran and run the following to build the module: - * f2py rfc.pyf findrfc.c -c --fcompiler=gnu95 --compiler=mingw32 -lmsvcr71 -* - * 1998 by Per Andreas Brodtkorb. - */ - -void findrfc(double *y1,double hmin, int *ind, int n,int info) { - double xminus,xplus,Tpl,Tmi,*y,Tstart; - int i,j,ix=0,NC,iy; - - if (*(y1+0)> *(y1+1)){ - /* if first is a max , ignore the first max*/ - y=&(*(y1+1)); - NC=floor((n-1)/2); - Tstart=2; - } - else { - y=y1; - NC=floor(n/2); - Tstart=1; - } - - if (NC<1){ - info = 0; - return; /* No RFC cycles*/ - } - - - if (( *(y+0) > *(y+1)) && ( *(y+1) > *(y+2)) ){ - info = -1; - return; /*This is not a sequence of turningpoints, exit */ - } - if ((*(y+0) < *(y+1)) && (*(y+1)< *(y+2))){ - info=-1; - return; /*This is not a sequence of turningpoints, exit */ - } - - - for (i=0; i=0) && (*(y+2*j+1)<=*(y+2*i+1))){ - if( (*(y+2*j)= xplus){ - if ( (*(y+2*i+1)-xminus) >= hmin){ - *(ind+ix)=Tmi; - ix++; - *(ind+ix)=(Tstart+2*i+1); - ix++; - } /*if*/ - goto L180; - } - - j=i+1; - while((j= *(y+2*i+1)) goto L170; - if( (*(y+2*j+2) <= xplus) ){ - xplus=*(y+2*j+2); - Tpl=(Tstart+2*j+2); - }/*if*/ - j++; - } /*while*/ - - - if ( (*(y+2*i+1)-xminus) >= hmin) { - *(ind+ix)=Tmi; - ix++; - *(ind+ix)=(Tstart+2*i+1); - ix++; - - } /*if*/ - goto L180; - L170: - if (xplus <= xminus ) { - if ( (*(y+2*i+1)-xminus) >= hmin){ - *(ind+ix)=Tmi; - ix++; - *(ind+ix)=(Tstart+2*i+1); - ix++; - } /*if*/ - /*goto L180;*/ - } - else{ - if ( (*(y+2*i+1)-xplus) >= hmin) { - *(ind+ix)=(Tstart+2*i+1); - ix++; - *(ind+ix)=Tpl; - ix++; - } /*if*/ - } /*elseif*/ - L180: - iy=i; - } /* for i */ - info = ix; - return ; -} - - - diff --git a/pywafo/src/wafo/source/c_codes/old/rfc.pyd b/pywafo/src/wafo/source/c_codes/old/rfc.pyd deleted file mode 100644 index 89343f3..0000000 Binary files a/pywafo/src/wafo/source/c_codes/old/rfc.pyd and /dev/null differ diff --git a/pywafo/src/wafo/source/c_codes/old/rfc.pyf b/pywafo/src/wafo/source/c_codes/old/rfc.pyf deleted file mode 100644 index e129557..0000000 --- a/pywafo/src/wafo/source/c_codes/old/rfc.pyf +++ /dev/null @@ -1,14 +0,0 @@ -! File rfc.pyf -python module rfc -interface - subroutine findrfc(y1,hmin, ind, n,info) - intent(c) findrfc ! findrfc is a C function - intent(c) ! all findrfc arguments are considered as C based - integer intent(hide), depend(y1) :: n=len(y1) - double precision dimension(n), intent(in) :: y1 ! input array - double precision intent(in) :: hmin - integer dimension(n), intent(out) :: ind ! output array, - integer intent(out) :: info - end subroutine findrfc -end interface -end python module rfc \ No newline at end of file diff --git a/pywafo/src/wafo/source/c_library/build_all.py b/pywafo/src/wafo/source/c_library/build_all.py new file mode 100644 index 0000000..49ee1eb --- /dev/null +++ b/pywafo/src/wafo/source/c_library/build_all.py @@ -0,0 +1,25 @@ +""" +f2py c_library.pyf c_functions.c -c + +See also http://www.scipy.org/Cookbook/CompilingExtensionsOnWindowsWithMinGW +""" +import os +import sys +from wafo.f2py_tools import f2py_call_str + +def compile_all(): + f2py_call = f2py_call_str() + print '=' * 75 + print 'compiling c_codes' + print '=' * 75 + + compile_format = f2py_call + ' %s %s -c' + + pyfs = ('c_library.pyf',) + files = ('c_functions.c',) + + for pyf, file_ in zip(pyfs, files): + os.system(compile_format % (pyf, file_)) + +if __name__ == '__main__': + compile_all() diff --git a/pywafo/src/wafo/source/c_codes/c_functions.c b/pywafo/src/wafo/source/c_library/c_functions.c similarity index 100% rename from pywafo/src/wafo/source/c_codes/c_functions.c rename to pywafo/src/wafo/source/c_library/c_functions.c diff --git a/pywafo/src/wafo/source/c_codes/c_library rf3 rf5 license.txt b/pywafo/src/wafo/source/c_library/c_library rf3 rf5 license.txt similarity index 100% rename from pywafo/src/wafo/source/c_codes/c_library rf3 rf5 license.txt rename to pywafo/src/wafo/source/c_library/c_library rf3 rf5 license.txt diff --git a/pywafo/src/wafo/source/c_codes/c_library.pyd b/pywafo/src/wafo/source/c_library/c_library.pyd similarity index 99% rename from pywafo/src/wafo/source/c_codes/c_library.pyd rename to pywafo/src/wafo/source/c_library/c_library.pyd index 57f0ea8..8aca5a7 100644 Binary files a/pywafo/src/wafo/source/c_codes/c_library.pyd and b/pywafo/src/wafo/source/c_library/c_library.pyd differ diff --git a/pywafo/src/wafo/source/c_codes/c_library.pyf b/pywafo/src/wafo/source/c_library/c_library.pyf similarity index 100% rename from pywafo/src/wafo/source/c_codes/c_library.pyf rename to pywafo/src/wafo/source/c_library/c_library.pyf diff --git a/pywafo/src/wafo/source/c_library/c_librarymodule.c b/pywafo/src/wafo/source/c_library/c_librarymodule.c new file mode 100644 index 0000000..efacace --- /dev/null +++ b/pywafo/src/wafo/source/c_library/c_librarymodule.c @@ -0,0 +1,1359 @@ +/* File: c_librarymodule.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 . + * See http://cens.ioc.ee/projects/f2py2e/ + * Generation date: Thu Jan 29 22:06:57 2015 + * $Revision:$ + * $Date:$ + * 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 + +/**************** See f2py2e/rules.py: mod_rules['modulebody'] ****************/ +static PyObject *c_library_error; +static PyObject *c_library_module; + +/*********************** See f2py2e/cfuncs.py: typedefs ***********************/ +/*need_typedefs*/ + +/****************** See f2py2e/cfuncs.py: typedefs_generated ******************/ +/*need_typedefs_generated*/ + +/********************** See f2py2e/cfuncs.py: cppmacros **********************/ +#define rank(var) var ## _Rank +#define shape(var,dim) var ## _Dims[dim] +#define old_rank(var) (((PyArrayObject *)(capi_ ## var ## _tmp))->nd) +#define old_shape(var,dim) (((PyArrayObject *)(capi_ ## var ## _tmp))->dimensions[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) + +#ifdef DEBUGCFUNCS +#define CFUNCSMESS(mess) fprintf(stderr,"debug-capi:"mess); +#define CFUNCSMESSPY(mess,obj) CFUNCSMESS(mess) \ + PyObject_Print((PyObject *)obj,stderr,Py_PRINT_RAW);\ + fprintf(stderr,"\n"); +#else +#define CFUNCSMESS(mess) +#define CFUNCSMESSPY(mess,obj) +#endif + +#ifndef max +#define max(a,b) ((a > b) ? (a) : (b)) +#endif +#ifndef min +#define min(a,b) ((a < b) ? (a) : (b)) +#endif +#ifndef MAX +#define MAX(a,b) ((a > b) ? (a) : (b)) +#endif +#ifndef MIN +#define MIN(a,b) ((a < b) ? (a) : (b)) +#endif + +#define CHECKSCALAR(check,tcheck,name,show,var)\ + if (!(check)) {\ + char errstring[256];\ + sprintf(errstring, "%s: "show, "("tcheck") failed for "name, var);\ + PyErr_SetString(c_library_error,errstring);\ + /*goto capi_fail;*/\ + } else +#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 + + +/************************ See f2py2e/cfuncs.py: cfuncs ************************/ +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 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 = c_library_error; + PyErr_SetString(err,errmess); + } + 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 = c_library_error; + PyErr_SetString(err,errmess); + } + return 0; +} + + +/********************* See f2py2e/cfuncs.py: userincludes *********************/ +/*need_userincludes*/ + +/********************* See f2py2e/capi_rules.py: usercode *********************/ + + +/* See f2py2e/rules.py */ +extern void findrfc(double*,double,int*,int,int*); +extern void findcross(double*,double,int*,int,int*); +extern void disufq(double*,double*,double*,double*,double*,double*,double,double,int,int,int,int); +extern void disufq2(double*,double*,double*,double*,double*,double*,double*,double*,double,double,int,int,int,int); +extern void findrfc3_astm(double*,double*,int,int*); +extern void findrfc5_astm(double*,double*,double*,int,int*); +/*eof externroutines*/ + +/******************** See f2py2e/capi_rules.py: usercode1 ********************/ + + +/******************* See f2py2e/cb_rules.py: buildcallback *******************/ +/*need_callbacks*/ + +/*********************** See f2py2e/rules.py: buildapi ***********************/ + +/********************************** findrfc **********************************/ +static char doc_f2py_rout_c_library_findrfc[] = "\ +ind,info = findrfc(y1,hmin)\n\nWrapper for ``findrfc``.\ +\n\nParameters\n----------\n" +"y1 : input rank-1 array('d') with bounds (n)\n" +"hmin : input float\n" +"\nReturns\n-------\n" +"ind : rank-1 array('i') with bounds (n)\n" +"info : rank-1 array('i') with bounds (1)"; +/* extern void findrfc(double*,double,int*,int,int*); */ +static PyObject *f2py_rout_c_library_findrfc(const PyObject *capi_self, + PyObject *capi_args, + PyObject *capi_keywds, + void (*f2py_func)(double*,double,int*,int,int*)) { + PyObject * volatile capi_buildvalue = NULL; + volatile int f2py_success = 1; +/*decl*/ + + double *y1 = NULL; + npy_intp y1_Dims[1] = {-1}; + const int y1_Rank = 1; + PyArrayObject *capi_y1_tmp = NULL; + int capi_y1_intent = 0; + PyObject *y1_capi = Py_None; + double hmin = 0; + PyObject *hmin_capi = Py_None; + int *ind = NULL; + npy_intp ind_Dims[1] = {-1}; + const int ind_Rank = 1; + PyArrayObject *capi_ind_tmp = NULL; + int capi_ind_intent = 0; + int n = 0; + int *info = NULL; + npy_intp info_Dims[1] = {-1}; + const int info_Rank = 1; + PyArrayObject *capi_info_tmp = NULL; + int capi_info_intent = 0; + static char *capi_kwlist[] = {"y1","hmin",NULL}; + +/*routdebugenter*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_start_clock(); +#endif + if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ + "OO:c_library.findrfc",\ + capi_kwlist,&y1_capi,&hmin_capi)) + return NULL; +/*frompyobj*/ + /* Processing variable info */ + info_Dims[0]=1; + capi_info_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_info_tmp = array_from_pyobj(NPY_INT,info_Dims,info_Rank,capi_info_intent,Py_None); + if (capi_info_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `info' of c_library.findrfc to C/Fortran array" ); + } else { + info = (int *)(capi_info_tmp->data); + + /* Processing variable y1 */ + ; + capi_y1_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_y1_tmp = array_from_pyobj(NPY_DOUBLE,y1_Dims,y1_Rank,capi_y1_intent,y1_capi); + if (capi_y1_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 1st argument `y1' of c_library.findrfc to C/Fortran array" ); + } else { + y1 = (double *)(capi_y1_tmp->data); + + /* Processing variable hmin */ + f2py_success = double_from_pyobj(&hmin,hmin_capi,"c_library.findrfc() 2nd argument (hmin) can't be converted to double"); + if (f2py_success) { + /* Processing variable n */ + n = len(y1); + /* Processing variable ind */ + ind_Dims[0]=n; + capi_ind_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_ind_tmp = array_from_pyobj(NPY_INT,ind_Dims,ind_Rank,capi_ind_intent,Py_None); + if (capi_ind_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `ind' of c_library.findrfc to C/Fortran array" ); + } else { + ind = (int *)(capi_ind_tmp->data); + +/*end of frompyobj*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_start_call_clock(); +#endif +/*callfortranroutine*/ + (*f2py_func)(y1,hmin,ind,n,info); +if (PyErr_Occurred()) + f2py_success = 0; +#ifdef F2PY_REPORT_ATEXIT +f2py_stop_call_clock(); +#endif +/*end of callfortranroutine*/ + if (f2py_success) { +/*pyobjfrom*/ +/*end of pyobjfrom*/ + CFUNCSMESS("Building return value.\n"); + capi_buildvalue = Py_BuildValue("NN",capi_ind_tmp,capi_info_tmp); +/*closepyobjfrom*/ +/*end of closepyobjfrom*/ + } /*if (f2py_success) after callfortranroutine*/ +/*cleanupfrompyobj*/ + } /*if (capi_ind_tmp == NULL) ... else of ind*/ + /* End of cleaning variable ind */ + /* End of cleaning variable n */ + } /*if (f2py_success) of hmin*/ + /* End of cleaning variable hmin */ + if((PyObject *)capi_y1_tmp!=y1_capi) { + Py_XDECREF(capi_y1_tmp); } + } /*if (capi_y1_tmp == NULL) ... else of y1*/ + /* End of cleaning variable y1 */ + } /*if (capi_info_tmp == NULL) ... else of info*/ + /* End of cleaning variable info */ +/*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 findrfc *******************************/ + +/********************************* findcross *********************************/ +static char doc_f2py_rout_c_library_findcross[] = "\ +ind,info = findcross(y,v)\n\nWrapper for ``findcross``.\ +\n\nParameters\n----------\n" +"y : input rank-1 array('d') with bounds (n)\n" +"v : input float\n" +"\nReturns\n-------\n" +"ind : rank-1 array('i') with bounds (n)\n" +"info : rank-1 array('i') with bounds (1)"; +/* extern void findcross(double*,double,int*,int,int*); */ +static PyObject *f2py_rout_c_library_findcross(const PyObject *capi_self, + PyObject *capi_args, + PyObject *capi_keywds, + void (*f2py_func)(double*,double,int*,int,int*)) { + PyObject * volatile capi_buildvalue = NULL; + volatile int f2py_success = 1; +/*decl*/ + + double *y = NULL; + npy_intp y_Dims[1] = {-1}; + const int y_Rank = 1; + PyArrayObject *capi_y_tmp = NULL; + int capi_y_intent = 0; + PyObject *y_capi = Py_None; + double v = 0; + PyObject *v_capi = Py_None; + int *ind = NULL; + npy_intp ind_Dims[1] = {-1}; + const int ind_Rank = 1; + PyArrayObject *capi_ind_tmp = NULL; + int capi_ind_intent = 0; + int n = 0; + int *info = NULL; + npy_intp info_Dims[1] = {-1}; + const int info_Rank = 1; + PyArrayObject *capi_info_tmp = NULL; + int capi_info_intent = 0; + static char *capi_kwlist[] = {"y","v",NULL}; + +/*routdebugenter*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_start_clock(); +#endif + if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ + "OO:c_library.findcross",\ + capi_kwlist,&y_capi,&v_capi)) + return NULL; +/*frompyobj*/ + /* Processing variable info */ + info_Dims[0]=1; + capi_info_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_info_tmp = array_from_pyobj(NPY_INT,info_Dims,info_Rank,capi_info_intent,Py_None); + if (capi_info_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `info' of c_library.findcross to C/Fortran array" ); + } else { + info = (int *)(capi_info_tmp->data); + + /* Processing variable y */ + ; + capi_y_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); + if (capi_y_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 1st argument `y' of c_library.findcross to C/Fortran array" ); + } else { + y = (double *)(capi_y_tmp->data); + + /* Processing variable v */ + f2py_success = double_from_pyobj(&v,v_capi,"c_library.findcross() 2nd argument (v) can't be converted to double"); + if (f2py_success) { + /* Processing variable n */ + n = len(y); + /* Processing variable ind */ + ind_Dims[0]=n; + capi_ind_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_ind_tmp = array_from_pyobj(NPY_INT,ind_Dims,ind_Rank,capi_ind_intent,Py_None); + if (capi_ind_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `ind' of c_library.findcross to C/Fortran array" ); + } else { + ind = (int *)(capi_ind_tmp->data); + +/*end of frompyobj*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_start_call_clock(); +#endif +/*callfortranroutine*/ + (*f2py_func)(y,v,ind,n,info); +if (PyErr_Occurred()) + f2py_success = 0; +#ifdef F2PY_REPORT_ATEXIT +f2py_stop_call_clock(); +#endif +/*end of callfortranroutine*/ + if (f2py_success) { +/*pyobjfrom*/ +/*end of pyobjfrom*/ + CFUNCSMESS("Building return value.\n"); + capi_buildvalue = Py_BuildValue("NN",capi_ind_tmp,capi_info_tmp); +/*closepyobjfrom*/ +/*end of closepyobjfrom*/ + } /*if (f2py_success) after callfortranroutine*/ +/*cleanupfrompyobj*/ + } /*if (capi_ind_tmp == NULL) ... else of ind*/ + /* End of cleaning variable ind */ + /* End of cleaning variable n */ + } /*if (f2py_success) of v*/ + /* End of cleaning variable v */ + if((PyObject *)capi_y_tmp!=y_capi) { + Py_XDECREF(capi_y_tmp); } + } /*if (capi_y_tmp == NULL) ... else of y*/ + /* End of cleaning variable y */ + } /*if (capi_info_tmp == NULL) ... else of info*/ + /* End of cleaning variable info */ +/*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 findcross ******************************/ + +/*********************************** disufq ***********************************/ +static char doc_f2py_rout_c_library_disufq[] = "\ +rvec,ivec = disufq(rA,iA,w,kw,h,g,nmin,nmax,m,[n])\n\nWrapper for ``disufq``.\ +\n\nParameters\n----------\n" +"rA : input rank-1 array('d') with bounds (n*m)\n" +"iA : input rank-1 array('d') with bounds (n*m)\n" +"w : input rank-1 array('d') with bounds (0.5 * n + 1.0)\n" +"kw : input rank-1 array('d') with bounds (0.5 * n + 1.0)\n" +"h : input float\n" +"g : input float\n" +"nmin : input int\n" +"nmax : input int\n" +"m : input int\n" +"\nOther Parameters\n----------------\n" +"n : input int, optional\n Default: (len(w)-1.0)/(0.5)\n" +"\nReturns\n-------\n" +"rvec : rank-1 array('d') with bounds (n*m)\n" +"ivec : rank-1 array('d') with bounds (n*m)"; +/* extern void disufq(double*,double*,double*,double*,double*,double*,double,double,int,int,int,int); */ +static PyObject *f2py_rout_c_library_disufq(const PyObject *capi_self, + PyObject *capi_args, + PyObject *capi_keywds, + void (*f2py_func)(double*,double*,double*,double*,double*,double*,double,double,int,int,int,int)) { + PyObject * volatile capi_buildvalue = NULL; + volatile int f2py_success = 1; +/*decl*/ + + double *rvec = NULL; + npy_intp rvec_Dims[1] = {-1}; + const int rvec_Rank = 1; + PyArrayObject *capi_rvec_tmp = NULL; + int capi_rvec_intent = 0; + double *ivec = NULL; + npy_intp ivec_Dims[1] = {-1}; + const int ivec_Rank = 1; + PyArrayObject *capi_ivec_tmp = NULL; + int capi_ivec_intent = 0; + double *rA = NULL; + npy_intp rA_Dims[1] = {-1}; + const int rA_Rank = 1; + PyArrayObject *capi_rA_tmp = NULL; + int capi_rA_intent = 0; + PyObject *rA_capi = Py_None; + double *iA = NULL; + npy_intp iA_Dims[1] = {-1}; + const int iA_Rank = 1; + PyArrayObject *capi_iA_tmp = NULL; + int capi_iA_intent = 0; + PyObject *iA_capi = Py_None; + double *w = NULL; + npy_intp w_Dims[1] = {-1}; + const int w_Rank = 1; + PyArrayObject *capi_w_tmp = NULL; + int capi_w_intent = 0; + PyObject *w_capi = Py_None; + double *kw = NULL; + npy_intp kw_Dims[1] = {-1}; + const int kw_Rank = 1; + PyArrayObject *capi_kw_tmp = NULL; + int capi_kw_intent = 0; + PyObject *kw_capi = Py_None; + double h = 0; + PyObject *h_capi = Py_None; + double g = 0; + PyObject *g_capi = Py_None; + int nmin = 0; + PyObject *nmin_capi = Py_None; + int nmax = 0; + PyObject *nmax_capi = Py_None; + int m = 0; + PyObject *m_capi = Py_None; + int n = 0; + PyObject *n_capi = Py_None; + static char *capi_kwlist[] = {"rA","iA","w","kw","h","g","nmin","nmax","m","n",NULL}; + +/*routdebugenter*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_start_clock(); +#endif + if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ + "OOOOOOOOO|O:c_library.disufq",\ + capi_kwlist,&rA_capi,&iA_capi,&w_capi,&kw_capi,&h_capi,&g_capi,&nmin_capi,&nmax_capi,&m_capi,&n_capi)) + return NULL; +/*frompyobj*/ + /* Processing variable nmax */ + f2py_success = int_from_pyobj(&nmax,nmax_capi,"c_library.disufq() 8th argument (nmax) can't be converted to int"); + if (f2py_success) { + /* Processing variable g */ + f2py_success = double_from_pyobj(&g,g_capi,"c_library.disufq() 6th argument (g) can't be converted to double"); + if (f2py_success) { + /* Processing variable h */ + f2py_success = double_from_pyobj(&h,h_capi,"c_library.disufq() 5th argument (h) can't be converted to double"); + if (f2py_success) { + /* Processing variable m */ + f2py_success = int_from_pyobj(&m,m_capi,"c_library.disufq() 9th argument (m) can't be converted to int"); + if (f2py_success) { + /* Processing variable w */ + ; + capi_w_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_w_tmp = array_from_pyobj(NPY_DOUBLE,w_Dims,w_Rank,capi_w_intent,w_capi); + if (capi_w_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 3rd argument `w' of c_library.disufq to C/Fortran array" ); + } else { + w = (double *)(capi_w_tmp->data); + + /* Processing variable nmin */ + f2py_success = int_from_pyobj(&nmin,nmin_capi,"c_library.disufq() 7th argument (nmin) can't be converted to int"); + if (f2py_success) { + /* Processing variable n */ + if (n_capi == Py_None) n = (len(w)-1.0)/(0.5); else + f2py_success = int_from_pyobj(&n,n_capi,"c_library.disufq() 1st keyword (n) can't be converted to int"); + if (f2py_success) { + CHECKSCALAR((len(w)-1.0)/(0.5)>=n,"(len(w)-1.0)/(0.5)>=n","1st keyword n","disufq:n=%d",n) { + /* Processing variable kw */ + kw_Dims[0]=0.5 * n + 1.0; + capi_kw_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_kw_tmp = array_from_pyobj(NPY_DOUBLE,kw_Dims,kw_Rank,capi_kw_intent,kw_capi); + if (capi_kw_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 4th argument `kw' of c_library.disufq to C/Fortran array" ); + } else { + kw = (double *)(capi_kw_tmp->data); + + /* Processing variable rA */ + rA_Dims[0]=n*m; + capi_rA_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_rA_tmp = array_from_pyobj(NPY_DOUBLE,rA_Dims,rA_Rank,capi_rA_intent,rA_capi); + if (capi_rA_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 1st argument `rA' of c_library.disufq to C/Fortran array" ); + } else { + rA = (double *)(capi_rA_tmp->data); + + /* Processing variable iA */ + iA_Dims[0]=n*m; + capi_iA_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_iA_tmp = array_from_pyobj(NPY_DOUBLE,iA_Dims,iA_Rank,capi_iA_intent,iA_capi); + if (capi_iA_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 2nd argument `iA' of c_library.disufq to C/Fortran array" ); + } else { + iA = (double *)(capi_iA_tmp->data); + + /* Processing variable ivec */ + ivec_Dims[0]=n*m; + capi_ivec_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_ivec_tmp = array_from_pyobj(NPY_DOUBLE,ivec_Dims,ivec_Rank,capi_ivec_intent,Py_None); + if (capi_ivec_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `ivec' of c_library.disufq to C/Fortran array" ); + } else { + ivec = (double *)(capi_ivec_tmp->data); + + /* Processing variable rvec */ + rvec_Dims[0]=n*m; + capi_rvec_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_rvec_tmp = array_from_pyobj(NPY_DOUBLE,rvec_Dims,rvec_Rank,capi_rvec_intent,Py_None); + if (capi_rvec_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `rvec' of c_library.disufq to C/Fortran array" ); + } else { + rvec = (double *)(capi_rvec_tmp->data); + +/*end of frompyobj*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_start_call_clock(); +#endif +/*callfortranroutine*/ + (*f2py_func)(rvec,ivec,rA,iA,w,kw,h,g,nmin,nmax,m,n); +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("NN",capi_rvec_tmp,capi_ivec_tmp); +/*closepyobjfrom*/ +/*end of closepyobjfrom*/ + } /*if (f2py_success) after callfortranroutine*/ +/*cleanupfrompyobj*/ + } /*if (capi_rvec_tmp == NULL) ... else of rvec*/ + /* End of cleaning variable rvec */ + } /*if (capi_ivec_tmp == NULL) ... else of ivec*/ + /* End of cleaning variable ivec */ + if((PyObject *)capi_iA_tmp!=iA_capi) { + Py_XDECREF(capi_iA_tmp); } + } /*if (capi_iA_tmp == NULL) ... else of iA*/ + /* End of cleaning variable iA */ + if((PyObject *)capi_rA_tmp!=rA_capi) { + Py_XDECREF(capi_rA_tmp); } + } /*if (capi_rA_tmp == NULL) ... else of rA*/ + /* End of cleaning variable rA */ + if((PyObject *)capi_kw_tmp!=kw_capi) { + Py_XDECREF(capi_kw_tmp); } + } /*if (capi_kw_tmp == NULL) ... else of kw*/ + /* End of cleaning variable kw */ + } /*CHECKSCALAR((len(w)-1.0)/(0.5)>=n)*/ + } /*if (f2py_success) of n*/ + /* End of cleaning variable n */ + } /*if (f2py_success) of nmin*/ + /* End of cleaning variable nmin */ + if((PyObject *)capi_w_tmp!=w_capi) { + Py_XDECREF(capi_w_tmp); } + } /*if (capi_w_tmp == NULL) ... else of w*/ + /* End of cleaning variable w */ + } /*if (f2py_success) of m*/ + /* End of cleaning variable m */ + } /*if (f2py_success) of h*/ + /* End of cleaning variable h */ + } /*if (f2py_success) of g*/ + /* End of cleaning variable g */ + } /*if (f2py_success) of nmax*/ + /* End of cleaning variable nmax */ +/*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 disufq *******************************/ + +/********************************** disufq2 **********************************/ +static char doc_f2py_rout_c_library_disufq2[] = "\ +rsvec,isvec,rdvec,idvec = disufq2(rA,iA,w,kw,h,g,nmin,nmax,m,[n])\n\nWrapper for ``disufq2``.\ +\n\nParameters\n----------\n" +"rA : input rank-1 array('d') with bounds (n*m)\n" +"iA : input rank-1 array('d') with bounds (n*m)\n" +"w : input rank-1 array('d') with bounds (0.5 * n + 1.0)\n" +"kw : input rank-1 array('d') with bounds (0.5 * n + 1.0)\n" +"h : input float\n" +"g : input float\n" +"nmin : input int\n" +"nmax : input int\n" +"m : input int\n" +"\nOther Parameters\n----------------\n" +"n : input int, optional\n Default: (len(w)-1.0)/(0.5)\n" +"\nReturns\n-------\n" +"rsvec : rank-1 array('d') with bounds (n*m)\n" +"isvec : rank-1 array('d') with bounds (n*m)\n" +"rdvec : rank-1 array('d') with bounds (n*m)\n" +"idvec : rank-1 array('d') with bounds (n*m)"; +/* extern void disufq2(double*,double*,double*,double*,double*,double*,double*,double*,double,double,int,int,int,int); */ +static PyObject *f2py_rout_c_library_disufq2(const PyObject *capi_self, + PyObject *capi_args, + PyObject *capi_keywds, + void (*f2py_func)(double*,double*,double*,double*,double*,double*,double*,double*,double,double,int,int,int,int)) { + PyObject * volatile capi_buildvalue = NULL; + volatile int f2py_success = 1; +/*decl*/ + + double *rsvec = NULL; + npy_intp rsvec_Dims[1] = {-1}; + const int rsvec_Rank = 1; + PyArrayObject *capi_rsvec_tmp = NULL; + int capi_rsvec_intent = 0; + double *isvec = NULL; + npy_intp isvec_Dims[1] = {-1}; + const int isvec_Rank = 1; + PyArrayObject *capi_isvec_tmp = NULL; + int capi_isvec_intent = 0; + double *rdvec = NULL; + npy_intp rdvec_Dims[1] = {-1}; + const int rdvec_Rank = 1; + PyArrayObject *capi_rdvec_tmp = NULL; + int capi_rdvec_intent = 0; + double *idvec = NULL; + npy_intp idvec_Dims[1] = {-1}; + const int idvec_Rank = 1; + PyArrayObject *capi_idvec_tmp = NULL; + int capi_idvec_intent = 0; + double *rA = NULL; + npy_intp rA_Dims[1] = {-1}; + const int rA_Rank = 1; + PyArrayObject *capi_rA_tmp = NULL; + int capi_rA_intent = 0; + PyObject *rA_capi = Py_None; + double *iA = NULL; + npy_intp iA_Dims[1] = {-1}; + const int iA_Rank = 1; + PyArrayObject *capi_iA_tmp = NULL; + int capi_iA_intent = 0; + PyObject *iA_capi = Py_None; + double *w = NULL; + npy_intp w_Dims[1] = {-1}; + const int w_Rank = 1; + PyArrayObject *capi_w_tmp = NULL; + int capi_w_intent = 0; + PyObject *w_capi = Py_None; + double *kw = NULL; + npy_intp kw_Dims[1] = {-1}; + const int kw_Rank = 1; + PyArrayObject *capi_kw_tmp = NULL; + int capi_kw_intent = 0; + PyObject *kw_capi = Py_None; + double h = 0; + PyObject *h_capi = Py_None; + double g = 0; + PyObject *g_capi = Py_None; + int nmin = 0; + PyObject *nmin_capi = Py_None; + int nmax = 0; + PyObject *nmax_capi = Py_None; + int m = 0; + PyObject *m_capi = Py_None; + int n = 0; + PyObject *n_capi = Py_None; + static char *capi_kwlist[] = {"rA","iA","w","kw","h","g","nmin","nmax","m","n",NULL}; + +/*routdebugenter*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_start_clock(); +#endif + if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ + "OOOOOOOOO|O:c_library.disufq2",\ + capi_kwlist,&rA_capi,&iA_capi,&w_capi,&kw_capi,&h_capi,&g_capi,&nmin_capi,&nmax_capi,&m_capi,&n_capi)) + return NULL; +/*frompyobj*/ + /* Processing variable nmax */ + f2py_success = int_from_pyobj(&nmax,nmax_capi,"c_library.disufq2() 8th argument (nmax) can't be converted to int"); + if (f2py_success) { + /* Processing variable g */ + f2py_success = double_from_pyobj(&g,g_capi,"c_library.disufq2() 6th argument (g) can't be converted to double"); + if (f2py_success) { + /* Processing variable m */ + f2py_success = int_from_pyobj(&m,m_capi,"c_library.disufq2() 9th argument (m) can't be converted to int"); + if (f2py_success) { + /* Processing variable w */ + ; + capi_w_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_w_tmp = array_from_pyobj(NPY_DOUBLE,w_Dims,w_Rank,capi_w_intent,w_capi); + if (capi_w_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 3rd argument `w' of c_library.disufq2 to C/Fortran array" ); + } else { + w = (double *)(capi_w_tmp->data); + + /* Processing variable h */ + f2py_success = double_from_pyobj(&h,h_capi,"c_library.disufq2() 5th argument (h) can't be converted to double"); + if (f2py_success) { + /* Processing variable nmin */ + f2py_success = int_from_pyobj(&nmin,nmin_capi,"c_library.disufq2() 7th argument (nmin) can't be converted to int"); + if (f2py_success) { + /* Processing variable n */ + if (n_capi == Py_None) n = (len(w)-1.0)/(0.5); else + f2py_success = int_from_pyobj(&n,n_capi,"c_library.disufq2() 1st keyword (n) can't be converted to int"); + if (f2py_success) { + CHECKSCALAR((len(w)-1.0)/(0.5)>=n,"(len(w)-1.0)/(0.5)>=n","1st keyword n","disufq2:n=%d",n) { + /* Processing variable rdvec */ + rdvec_Dims[0]=n*m; + capi_rdvec_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_rdvec_tmp = array_from_pyobj(NPY_DOUBLE,rdvec_Dims,rdvec_Rank,capi_rdvec_intent,Py_None); + if (capi_rdvec_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `rdvec' of c_library.disufq2 to C/Fortran array" ); + } else { + rdvec = (double *)(capi_rdvec_tmp->data); + + /* Processing variable idvec */ + idvec_Dims[0]=n*m; + capi_idvec_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_idvec_tmp = array_from_pyobj(NPY_DOUBLE,idvec_Dims,idvec_Rank,capi_idvec_intent,Py_None); + if (capi_idvec_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `idvec' of c_library.disufq2 to C/Fortran array" ); + } else { + idvec = (double *)(capi_idvec_tmp->data); + + /* Processing variable isvec */ + isvec_Dims[0]=n*m; + capi_isvec_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_isvec_tmp = array_from_pyobj(NPY_DOUBLE,isvec_Dims,isvec_Rank,capi_isvec_intent,Py_None); + if (capi_isvec_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `isvec' of c_library.disufq2 to C/Fortran array" ); + } else { + isvec = (double *)(capi_isvec_tmp->data); + + /* Processing variable rsvec */ + rsvec_Dims[0]=n*m; + capi_rsvec_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_rsvec_tmp = array_from_pyobj(NPY_DOUBLE,rsvec_Dims,rsvec_Rank,capi_rsvec_intent,Py_None); + if (capi_rsvec_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `rsvec' of c_library.disufq2 to C/Fortran array" ); + } else { + rsvec = (double *)(capi_rsvec_tmp->data); + + /* Processing variable kw */ + kw_Dims[0]=0.5 * n + 1.0; + capi_kw_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_kw_tmp = array_from_pyobj(NPY_DOUBLE,kw_Dims,kw_Rank,capi_kw_intent,kw_capi); + if (capi_kw_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 4th argument `kw' of c_library.disufq2 to C/Fortran array" ); + } else { + kw = (double *)(capi_kw_tmp->data); + + /* Processing variable rA */ + rA_Dims[0]=n*m; + capi_rA_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_rA_tmp = array_from_pyobj(NPY_DOUBLE,rA_Dims,rA_Rank,capi_rA_intent,rA_capi); + if (capi_rA_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 1st argument `rA' of c_library.disufq2 to C/Fortran array" ); + } else { + rA = (double *)(capi_rA_tmp->data); + + /* Processing variable iA */ + iA_Dims[0]=n*m; + capi_iA_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_iA_tmp = array_from_pyobj(NPY_DOUBLE,iA_Dims,iA_Rank,capi_iA_intent,iA_capi); + if (capi_iA_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 2nd argument `iA' of c_library.disufq2 to C/Fortran array" ); + } else { + iA = (double *)(capi_iA_tmp->data); + +/*end of frompyobj*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_start_call_clock(); +#endif +/*callfortranroutine*/ + (*f2py_func)(rsvec,isvec,rdvec,idvec,rA,iA,w,kw,h,g,nmin,nmax,m,n); +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("NNNN",capi_rsvec_tmp,capi_isvec_tmp,capi_rdvec_tmp,capi_idvec_tmp); +/*closepyobjfrom*/ +/*end of closepyobjfrom*/ + } /*if (f2py_success) after callfortranroutine*/ +/*cleanupfrompyobj*/ + if((PyObject *)capi_iA_tmp!=iA_capi) { + Py_XDECREF(capi_iA_tmp); } + } /*if (capi_iA_tmp == NULL) ... else of iA*/ + /* End of cleaning variable iA */ + if((PyObject *)capi_rA_tmp!=rA_capi) { + Py_XDECREF(capi_rA_tmp); } + } /*if (capi_rA_tmp == NULL) ... else of rA*/ + /* End of cleaning variable rA */ + if((PyObject *)capi_kw_tmp!=kw_capi) { + Py_XDECREF(capi_kw_tmp); } + } /*if (capi_kw_tmp == NULL) ... else of kw*/ + /* End of cleaning variable kw */ + } /*if (capi_rsvec_tmp == NULL) ... else of rsvec*/ + /* End of cleaning variable rsvec */ + } /*if (capi_isvec_tmp == NULL) ... else of isvec*/ + /* End of cleaning variable isvec */ + } /*if (capi_idvec_tmp == NULL) ... else of idvec*/ + /* End of cleaning variable idvec */ + } /*if (capi_rdvec_tmp == NULL) ... else of rdvec*/ + /* End of cleaning variable rdvec */ + } /*CHECKSCALAR((len(w)-1.0)/(0.5)>=n)*/ + } /*if (f2py_success) of n*/ + /* End of cleaning variable n */ + } /*if (f2py_success) of nmin*/ + /* End of cleaning variable nmin */ + } /*if (f2py_success) of h*/ + /* End of cleaning variable h */ + if((PyObject *)capi_w_tmp!=w_capi) { + Py_XDECREF(capi_w_tmp); } + } /*if (capi_w_tmp == NULL) ... else of w*/ + /* End of cleaning variable w */ + } /*if (f2py_success) of m*/ + /* End of cleaning variable m */ + } /*if (f2py_success) of g*/ + /* End of cleaning variable g */ + } /*if (f2py_success) of nmax*/ + /* End of cleaning variable nmax */ +/*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 disufq2 *******************************/ + +/******************************* findrfc3_astm *******************************/ +static char doc_f2py_rout_c_library_findrfc3_astm[] = "\ +array_out,nout = findrfc3_astm(array_ext)\n\nWrapper for ``findrfc3_astm``.\ +\n\nParameters\n----------\n" +"array_ext : input rank-1 array('d') with bounds (n)\n" +"\nReturns\n-------\n" +"array_out : rank-2 array('d') with bounds (n,3)\n" +"nout : rank-1 array('i') with bounds (2)"; +/* extern void findrfc3_astm(double*,double*,int,int*); */ +static PyObject *f2py_rout_c_library_findrfc3_astm(const PyObject *capi_self, + PyObject *capi_args, + PyObject *capi_keywds, + void (*f2py_func)(double*,double*,int,int*)) { + PyObject * volatile capi_buildvalue = NULL; + volatile int f2py_success = 1; +/*decl*/ + + double *array_ext = NULL; + npy_intp array_ext_Dims[1] = {-1}; + const int array_ext_Rank = 1; + PyArrayObject *capi_array_ext_tmp = NULL; + int capi_array_ext_intent = 0; + PyObject *array_ext_capi = Py_None; + double *array_out = NULL; + npy_intp array_out_Dims[2] = {-1, -1}; + const int array_out_Rank = 2; + PyArrayObject *capi_array_out_tmp = NULL; + int capi_array_out_intent = 0; + int n = 0; + int *nout = NULL; + npy_intp nout_Dims[1] = {-1}; + const int nout_Rank = 1; + PyArrayObject *capi_nout_tmp = NULL; + int capi_nout_intent = 0; + static char *capi_kwlist[] = {"array_ext",NULL}; + +/*routdebugenter*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_start_clock(); +#endif + if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ + "O:c_library.findrfc3_astm",\ + capi_kwlist,&array_ext_capi)) + return NULL; +/*frompyobj*/ + /* Processing variable array_ext */ + ; + capi_array_ext_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_array_ext_tmp = array_from_pyobj(NPY_DOUBLE,array_ext_Dims,array_ext_Rank,capi_array_ext_intent,array_ext_capi); + if (capi_array_ext_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 1st argument `array_ext' of c_library.findrfc3_astm to C/Fortran array" ); + } else { + array_ext = (double *)(capi_array_ext_tmp->data); + + /* Processing variable nout */ + nout_Dims[0]=2; + capi_nout_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_nout_tmp = array_from_pyobj(NPY_INT,nout_Dims,nout_Rank,capi_nout_intent,Py_None); + if (capi_nout_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `nout' of c_library.findrfc3_astm to C/Fortran array" ); + } else { + nout = (int *)(capi_nout_tmp->data); + + /* Processing variable n */ + n = len(array_ext); + /* Processing variable array_out */ + array_out_Dims[0]=n,array_out_Dims[1]=3; + capi_array_out_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_array_out_tmp = array_from_pyobj(NPY_DOUBLE,array_out_Dims,array_out_Rank,capi_array_out_intent,Py_None); + if (capi_array_out_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `array_out' of c_library.findrfc3_astm to C/Fortran array" ); + } else { + array_out = (double *)(capi_array_out_tmp->data); + +/*end of frompyobj*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_start_call_clock(); +#endif +/*callfortranroutine*/ + (*f2py_func)(array_ext,array_out,n,nout); +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("NN",capi_array_out_tmp,capi_nout_tmp); +/*closepyobjfrom*/ +/*end of closepyobjfrom*/ + } /*if (f2py_success) after callfortranroutine*/ +/*cleanupfrompyobj*/ + } /*if (capi_array_out_tmp == NULL) ... else of array_out*/ + /* End of cleaning variable array_out */ + /* End of cleaning variable n */ + } /*if (capi_nout_tmp == NULL) ... else of nout*/ + /* End of cleaning variable nout */ + if((PyObject *)capi_array_ext_tmp!=array_ext_capi) { + Py_XDECREF(capi_array_ext_tmp); } + } /*if (capi_array_ext_tmp == NULL) ... else of array_ext*/ + /* End of cleaning variable array_ext */ +/*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 findrfc3_astm ****************************/ + +/******************************* findrfc5_astm *******************************/ +static char doc_f2py_rout_c_library_findrfc5_astm[] = "\ +array_out,nout = findrfc5_astm(array_ext,array_t)\n\nWrapper for ``findrfc5_astm``.\ +\n\nParameters\n----------\n" +"array_ext : input rank-1 array('d') with bounds (n)\n" +"array_t : input rank-1 array('d') with bounds (n)\n" +"\nReturns\n-------\n" +"array_out : rank-2 array('d') with bounds (n,5)\n" +"nout : rank-1 array('i') with bounds (2)"; +/* extern void findrfc5_astm(double*,double*,double*,int,int*); */ +static PyObject *f2py_rout_c_library_findrfc5_astm(const PyObject *capi_self, + PyObject *capi_args, + PyObject *capi_keywds, + void (*f2py_func)(double*,double*,double*,int,int*)) { + PyObject * volatile capi_buildvalue = NULL; + volatile int f2py_success = 1; +/*decl*/ + + double *array_ext = NULL; + npy_intp array_ext_Dims[1] = {-1}; + const int array_ext_Rank = 1; + PyArrayObject *capi_array_ext_tmp = NULL; + int capi_array_ext_intent = 0; + PyObject *array_ext_capi = Py_None; + double *array_t = NULL; + npy_intp array_t_Dims[1] = {-1}; + const int array_t_Rank = 1; + PyArrayObject *capi_array_t_tmp = NULL; + int capi_array_t_intent = 0; + PyObject *array_t_capi = Py_None; + double *array_out = NULL; + npy_intp array_out_Dims[2] = {-1, -1}; + const int array_out_Rank = 2; + PyArrayObject *capi_array_out_tmp = NULL; + int capi_array_out_intent = 0; + int n = 0; + int *nout = NULL; + npy_intp nout_Dims[1] = {-1}; + const int nout_Rank = 1; + PyArrayObject *capi_nout_tmp = NULL; + int capi_nout_intent = 0; + static char *capi_kwlist[] = {"array_ext","array_t",NULL}; + +/*routdebugenter*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_start_clock(); +#endif + if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ + "OO:c_library.findrfc5_astm",\ + capi_kwlist,&array_ext_capi,&array_t_capi)) + return NULL; +/*frompyobj*/ + /* Processing variable nout */ + nout_Dims[0]=2; + capi_nout_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_nout_tmp = array_from_pyobj(NPY_INT,nout_Dims,nout_Rank,capi_nout_intent,Py_None); + if (capi_nout_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `nout' of c_library.findrfc5_astm to C/Fortran array" ); + } else { + nout = (int *)(capi_nout_tmp->data); + + /* Processing variable array_ext */ + ; + capi_array_ext_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_array_ext_tmp = array_from_pyobj(NPY_DOUBLE,array_ext_Dims,array_ext_Rank,capi_array_ext_intent,array_ext_capi); + if (capi_array_ext_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 1st argument `array_ext' of c_library.findrfc5_astm to C/Fortran array" ); + } else { + array_ext = (double *)(capi_array_ext_tmp->data); + + /* Processing variable n */ + n = len(array_ext); + /* Processing variable array_t */ + array_t_Dims[0]=n; + capi_array_t_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_array_t_tmp = array_from_pyobj(NPY_DOUBLE,array_t_Dims,array_t_Rank,capi_array_t_intent,array_t_capi); + if (capi_array_t_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 2nd argument `array_t' of c_library.findrfc5_astm to C/Fortran array" ); + } else { + array_t = (double *)(capi_array_t_tmp->data); + + /* Processing variable array_out */ + array_out_Dims[0]=n,array_out_Dims[1]=5; + capi_array_out_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_array_out_tmp = array_from_pyobj(NPY_DOUBLE,array_out_Dims,array_out_Rank,capi_array_out_intent,Py_None); + if (capi_array_out_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `array_out' of c_library.findrfc5_astm to C/Fortran array" ); + } else { + array_out = (double *)(capi_array_out_tmp->data); + +/*end of frompyobj*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_start_call_clock(); +#endif +/*callfortranroutine*/ + (*f2py_func)(array_ext,array_t,array_out,n,nout); +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("NN",capi_array_out_tmp,capi_nout_tmp); +/*closepyobjfrom*/ +/*end of closepyobjfrom*/ + } /*if (f2py_success) after callfortranroutine*/ +/*cleanupfrompyobj*/ + } /*if (capi_array_out_tmp == NULL) ... else of array_out*/ + /* End of cleaning variable array_out */ + if((PyObject *)capi_array_t_tmp!=array_t_capi) { + Py_XDECREF(capi_array_t_tmp); } + } /*if (capi_array_t_tmp == NULL) ... else of array_t*/ + /* End of cleaning variable array_t */ + /* End of cleaning variable n */ + if((PyObject *)capi_array_ext_tmp!=array_ext_capi) { + Py_XDECREF(capi_array_ext_tmp); } + } /*if (capi_array_ext_tmp == NULL) ... else of array_ext*/ + /* End of cleaning variable array_ext */ + } /*if (capi_nout_tmp == NULL) ... else of nout*/ + /* End of cleaning variable nout */ +/*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 findrfc5_astm ****************************/ +/*eof body*/ + +/******************* See f2py2e/f90mod_rules.py: buildhooks *******************/ +/*need_f90modhooks*/ + +/************** See f2py2e/rules.py: module_rules['modulebody'] **************/ + +/******************* See f2py2e/common_rules.py: buildhooks *******************/ + +/*need_commonhooks*/ + +/**************************** See f2py2e/rules.py ****************************/ + +static FortranDataDef f2py_routine_defs[] = { + {"findrfc",-1,{{-1}},0,(char *)findrfc,(f2py_init_func)f2py_rout_c_library_findrfc,doc_f2py_rout_c_library_findrfc}, + {"findcross",-1,{{-1}},0,(char *)findcross,(f2py_init_func)f2py_rout_c_library_findcross,doc_f2py_rout_c_library_findcross}, + {"disufq",-1,{{-1}},0,(char *)disufq,(f2py_init_func)f2py_rout_c_library_disufq,doc_f2py_rout_c_library_disufq}, + {"disufq2",-1,{{-1}},0,(char *)disufq2,(f2py_init_func)f2py_rout_c_library_disufq2,doc_f2py_rout_c_library_disufq2}, + {"findrfc3_astm",-1,{{-1}},0,(char *)findrfc3_astm,(f2py_init_func)f2py_rout_c_library_findrfc3_astm,doc_f2py_rout_c_library_findrfc3_astm}, + {"findrfc5_astm",-1,{{-1}},0,(char *)findrfc5_astm,(f2py_init_func)f2py_rout_c_library_findrfc5_astm,doc_f2py_rout_c_library_findrfc5_astm}, + +/*eof routine_defs*/ + {NULL} +}; + +static PyMethodDef f2py_module_methods[] = { + + {NULL,NULL} +}; + +#if PY_VERSION_HEX >= 0x03000000 +static struct PyModuleDef moduledef = { + PyModuleDef_HEAD_INIT, + "c_library", + NULL, + -1, + f2py_module_methods, + NULL, + NULL, + NULL, + NULL +}; +#endif + +#if PY_VERSION_HEX >= 0x03000000 +#define RETVAL m +PyMODINIT_FUNC PyInit_c_library(void) { +#else +#define RETVAL +PyMODINIT_FUNC initc_library(void) { +#endif + int i; + PyObject *m,*d, *s; +#if PY_VERSION_HEX >= 0x03000000 + m = c_library_module = PyModule_Create(&moduledef); +#else + m = c_library_module = Py_InitModule("c_library", f2py_module_methods); +#endif + Py_TYPE(&PyFortran_Type) = &PyType_Type; + import_array(); + if (PyErr_Occurred()) + {PyErr_SetString(PyExc_ImportError, "can't initialize module c_library (failed to import numpy)"); return RETVAL;} + d = PyModule_GetDict(m); + s = PyString_FromString("$Revision: $"); + PyDict_SetItemString(d, "__version__", s); +#if PY_VERSION_HEX >= 0x03000000 + s = PyUnicode_FromString( +#else + s = PyString_FromString( +#endif + "This module 'c_library' is auto-generated with f2py (version:2).\nFunctions:\n" +" ind,info = findrfc(y1,hmin)\n" +" ind,info = findcross(y,v)\n" +" rvec,ivec = disufq(rA,iA,w,kw,h,g,nmin,nmax,m,n=(len(w)-1.0)/(0.5))\n" +" rsvec,isvec,rdvec,idvec = disufq2(rA,iA,w,kw,h,g,nmin,nmax,m,n=(len(w)-1.0)/(0.5))\n" +" array_out,nout = findrfc3_astm(array_ext)\n" +" array_out,nout = findrfc5_astm(array_ext,array_t)\n" +"."); + PyDict_SetItemString(d, "__doc__", s); + c_library_error = PyErr_NewException ("c_library.error", NULL, NULL); + Py_DECREF(s); + for(i=0;f2py_routine_defs[i].name!=NULL;i++) + PyDict_SetItemString(d, f2py_routine_defs[i].name,PyFortranObject_NewAsAttr(&f2py_routine_defs[i])); + + + + + + +/*eof initf2pywraphooks*/ +/*eof initf90modhooks*/ + +/*eof initcommonhooks*/ + + +#ifdef F2PY_REPORT_ATEXIT + if (! PyErr_Occurred()) + on_exit(f2py_report_on_exit,(void*)"c_library"); +#endif + + return RETVAL; +} +#ifdef __cplusplus +} +#endif diff --git a/pywafo/src/wafo/source/c_codes/setup.py b/pywafo/src/wafo/source/c_library/setup.py similarity index 57% rename from pywafo/src/wafo/source/c_codes/setup.py rename to pywafo/src/wafo/source/c_library/setup.py index 966aded..d6d9242 100644 --- a/pywafo/src/wafo/source/c_codes/setup.py +++ b/pywafo/src/wafo/source/c_library/setup.py @@ -1,16 +1,18 @@ -''' -python setup.py build_src build_ext --inplace - -See also http://www.scipy.org/Cookbook/CompilingExtensionsOnWindowsWithMinGW -''' -# File setup.py -def configuration(parent_package='',top_path=None): - from numpy.distutils.misc_util import Configuration - config = Configuration('',parent_package,top_path) - - config.add_extension('c_library', - sources = ['c_library.pyf','c_functions.c']) - return config -if __name__ == "__main__": - from numpy.distutils.core import setup - setup(**configuration(top_path='').todict()) \ No newline at end of file +''' +python setup.py build_src build_ext --inplace + +See also http://www.scipy.org/Cookbook/CompilingExtensionsOnWindowsWithMinGW +''' +# File setup.py + + +def configuration(parent_package='', top_path=None): + from numpy.distutils.misc_util import Configuration + config = Configuration('', parent_package, top_path) + + config.add_extension('c_library', + sources=['c_library.pyf', 'c_functions.c']) + return config +if __name__ == "__main__": + from numpy.distutils.core import setup + setup(**configuration(top_path='').todict()) diff --git a/pywafo/src/wafo/source/mreg/build_all.py b/pywafo/src/wafo/source/mreg/build_all.py index a3ebb32..335ccdc 100644 --- a/pywafo/src/wafo/source/mreg/build_all.py +++ b/pywafo/src/wafo/source/mreg/build_all.py @@ -6,96 +6,25 @@ gfortran -W -Wall -pedantic-errors -fbounds-check -Werror -c dsvdc.f mregmodule. """ import os import sys +from wafo.f2py_tools import f2py_call_str -def which(program): - """ - Test if program exists - ====================== - - In order to test if a certain executable exists, it will search for the - program name in the environment variables. - If program is a full path to an executable, it will check it exists - - Copied from: - http://stackoverflow.com/questions/377017/test-if-executable-exists-in-python/ - It is supposed to mimic the UNIX command "which" - """ - - def is_exe(fpath): - return os.path.exists(fpath) and os.access(fpath, os.X_OK) - fpath, fname = os.path.split(program) - if fpath: - if is_exe(program): - return program - else: - for path in os.environ["PATH"].split(os.pathsep): - exe_file = os.path.join(path, program) - if is_exe(exe_file): - return exe_file - - return None - -def f2py_call_str(): - # regardless of platform, try to figure out which f2py call is in the path - # define possible options - - # on Arch Linux, python and f2py are the calls corresponding to python 3 - # and python2/f2py2 for python 2 - # other Linux versions might still use python/f2py for python 2 - if os.path.basename(sys.executable).endswith('2'): - for k in ('f2py2','f2py2.6','f2py2.7',): - # if we found the f2py path, no need to look further - if which(k): - f2py_call = k - f2py_path = which(k) - break - # on Windows and other Linux using python/f2py - else: - for k in ('f2py','f2py2.6','f2py2.7','f2py.py',): - # if we found the f2py path, no need to look further - if which(k): - f2py_call = k - f2py_path = which(k) - break - - try: - print 'found f2py in:', f2py_path - return f2py_call - # raise exception if f2py is not found, f2py_path variable will not exist - except NameError: - raise UserWarning, \ - 'Couldn\'t locate f2py. Should be part of NumPy installation.' -# # this might vary among specific cases: f2py, f2py2.7, f2py3.2, ... -# # TODO: more robust approach, find out what f2py is in the users path -# if os.name == 'posix': -# compile_format = 'f2py2.6 %s %s -c' -# -# # Install microsoft visual c++ .NET 2003 and run the following to build the module: -# elif os.name == 'nt': -# # compile_format = 'f2py.py %s %s -c --fcompiler=gnu95 --compiler=mingw32 -lmsvcr71' -# compile_format = 'f2py.py %s %s -c' -# -# # give an Error for other OS-es -# else: -# raise UserWarning, \ -# 'Untested platform:', os.name def compile_all(): - f2py_call = f2py_call_str() - print '='*75 + f2py_call = f2py_call_str() + print '=' * 75 print 'compiling cov2mod' - print '='*75 - - - files = ['dsvdc','mregmodule', 'intfcmod'] + print '=' * 75 + + files = ['dsvdc', 'mregmodule', 'intfcmod'] compile1_format = 'gfortran -fPIC -c %s.f' format1 = '%s.o ' * len(files) - for file in files: - os.system(compile1_format % file) - file_objects = format1 % tuple(files) - - os.system(f2py_call + ' -m cov2mod -c %s cov2mmpdfreg_intfc.f' % file_objects) - - -if __name__=='__main__': + for file_ in files: + os.system(compile1_format % file_) + file_objects = format1 % tuple(files) + + os.system(f2py_call + ' -m cov2mod -c %s cov2mmpdfreg_intfc.f' % + file_objects) + + +if __name__ == '__main__': compile_all() diff --git a/pywafo/src/wafo/source/mvn/build_all.py b/pywafo/src/wafo/source/mvn/build_all.py index 1b1228d..d856c6b 100644 --- a/pywafo/src/wafo/source/mvn/build_all.py +++ b/pywafo/src/wafo/source/mvn/build_all.py @@ -4,89 +4,17 @@ builds mvn.pyd import os import sys -def which(program): - """ - Test if program exists - ====================== - - In order to test if a certain executable exists, it will search for the - program name in the environment variables. - If program is a full path to an executable, it will check it exists - - Copied from: - http://stackoverflow.com/questions/377017/test-if-executable-exists-in-python/ - It is supposed to mimic the UNIX command "which" - """ - - def is_exe(fpath): - return os.path.exists(fpath) and os.access(fpath, os.X_OK) - fpath, fname = os.path.split(program) - if fpath: - if is_exe(program): - return program - else: - for path in os.environ["PATH"].split(os.pathsep): - exe_file = os.path.join(path, program) - if is_exe(exe_file): - return exe_file - - return None - - -def f2py_call_str(): - # regardless of platform, try to figure out which f2py call is in the path - # define possible options - - # on Arch Linux, python and f2py are the calls corresponding to python 3 - # and python2/f2py2 for python 2 - # other Linux versions might still use python/f2py for python 2 - if os.path.basename(sys.executable).endswith('2'): - for k in ('f2py2','f2py2.6','f2py2.7',): - # if we found the f2py path, no need to look further - if which(k): - f2py_call = k - f2py_path = which(k) - break - # on Windows and other Linux using python/f2py - else: - for k in ('f2py','f2py2.6','f2py2.7','f2py.py',): - # if we found the f2py path, no need to look further - if which(k): - f2py_call = k - f2py_path = which(k) - break - - try: - print 'found f2py in:', f2py_path - return f2py_call - # raise exception if f2py is not found, f2py_path variable will not exist - except NameError: - raise UserWarning, \ - 'Couldn\'t locate f2py. Should be part of NumPy installation.' -# # this might vary among specific cases: f2py, f2py2.7, f2py3.2, ... -# # TODO: more robust approach, find out what f2py is in the users path -# if os.name == 'posix': -# compile_format = 'f2py2.6 %s %s -c' -# -# # Install microsoft visual c++ .NET 2003 and run the following to build the module: -# elif os.name == 'nt': -# # compile_format = 'f2py.py %s %s -c --fcompiler=gnu95 --compiler=mingw32 -lmsvcr71' -# compile_format = 'f2py.py %s %s -c' -# -# # give an Error for other OS-es -# else: -# raise UserWarning, \ -# 'Untested platform:', os.name +from wafo.f2py_tools import f2py_call_str def compile_all(): - f2py_call = f2py_call_str() - print '='*75 + f2py_call = f2py_call_str() + print '=' * 75 print 'compiling mvn' - print '='*75 - + print '=' * 75 + os.system(f2py_call + ' mvn.pyf mvndst.f -c ') - - -if __name__=='__main__': + + +if __name__ == '__main__': compile_all() diff --git a/pywafo/src/wafo/source/mvn/mvn.pyd b/pywafo/src/wafo/source/mvn/mvn.pyd index c76f9e2..3fba514 100644 Binary files a/pywafo/src/wafo/source/mvn/mvn.pyd and b/pywafo/src/wafo/source/mvn/mvn.pyd differ diff --git a/pywafo/src/wafo/source/mvnprd/build_all.py b/pywafo/src/wafo/source/mvnprd/build_all.py index bdc92b7..5092b9d 100644 --- a/pywafo/src/wafo/source/mvnprd/build_all.py +++ b/pywafo/src/wafo/source/mvnprd/build_all.py @@ -1,99 +1,25 @@ -""" -builds mvnprdmod.pyd -""" +"""builds mvnprdmod.pyd.""" import os import sys - -def which(program): - """ - Test if program exists - ====================== - - In order to test if a certain executable exists, it will search for the - program name in the environment variables. - If program is a full path to an executable, it will check it exists - - Copied from: - http://stackoverflow.com/questions/377017/test-if-executable-exists-in-python/ - It is supposed to mimic the UNIX command "which" - """ - - def is_exe(fpath): - return os.path.exists(fpath) and os.access(fpath, os.X_OK) - - fpath, fname = os.path.split(program) - if fpath: - if is_exe(program): - return program - else: - for path in os.environ["PATH"].split(os.pathsep): - exe_file = os.path.join(path, program) - if is_exe(exe_file): - return exe_file - - return None - - -def f2py_call_str(): - # regardless of platform, try to figure out which f2py call is in the path - # define possible options - - # on Arch Linux, python and f2py are the calls corresponding to python 3 - # and python2/f2py2 for python 2 - # other Linux versions might still use python/f2py for python 2 - if os.path.basename(sys.executable).endswith('2'): - for k in ('f2py2','f2py2.6','f2py2.7',): - # if we found the f2py path, no need to look further - if which(k): - f2py_call = k - f2py_path = which(k) - break - # on Windows and other Linux using python/f2py - else: - for k in ('f2py','f2py2.6','f2py2.7','f2py.py',): - # if we found the f2py path, no need to look further - if which(k): - f2py_call = k - f2py_path = which(k) - break - - try: - print 'found f2py in:', f2py_path - return f2py_call - # raise exception if f2py is not found, f2py_path variable will not exist - except NameError: - raise UserWarning, \ - 'Couldn\'t locate f2py. Should be part of NumPy installation.' -# # this might vary among specific cases: f2py, f2py2.7, f2py3.2, ... -# # TODO: more robust approach, find out what f2py is in the users path -# if os.name == 'posix': -# compile_format = 'f2py2.6 %s %s -c' -# -# # Install microsoft visual c++ .NET 2003 and run the following to build the module: -# elif os.name == 'nt': -# # compile_format = 'f2py.py %s %s -c --fcompiler=gnu95 --compiler=mingw32 -lmsvcr71' -# compile_format = 'f2py.py %s %s -c' -# -# # give an Error for other OS-es -# else: -# raise UserWarning, \ -# 'Untested platform:', os.name +from wafo.f2py_tools import f2py_call_str + def compile_all(): - f2py_call = f2py_call_str() - print '='*75 + f2py_call = f2py_call_str() + print '=' * 75 print 'compiling mvnprd' - print '='*75 - + print '=' * 75 + files = ['mvnprd', 'mvnprodcorrprb'] compile1_format = 'gfortran -fPIC -c %s.f' - for file in files: - os.system(compile1_format % file) + for file_ in files: + os.system(compile1_format % file_) file_objects = '%s.o %s.o' % tuple(files) - - - #os.system('f2py.py -m mvnprdmod -c %s mvnprd_interface.f --fcompiler=gnu95 --compiler=mingw32 -lmsvcr71' % file_objects) - os.system(f2py_call + ' -m mvnprdmod -c %s mvnprd_interface.f ' % file_objects) -if __name__=='__main__': + # os.system('f2py.py -m mvnprdmod -c %s mvnprd_interface.f + # --fcompiler=gnu95 --compiler=mingw32 -lmsvcr71' % file_objects) + os.system(f2py_call + ' -m mvnprdmod -c %s mvnprd_interface.f ' % + file_objects) + +if __name__ == '__main__': compile_all() diff --git a/pywafo/src/wafo/source/mvnprd/mvnprd.f b/pywafo/src/wafo/source/mvnprd/mvnprd.f index 0dd7766..d0eb788 100644 --- a/pywafo/src/wafo/source/mvnprd/mvnprd.f +++ b/pywafo/src/wafo/source/mvnprd/mvnprd.f @@ -881,7 +881,7 @@ C C C STUDENTIZES A MULTIVARIATE INTEGRAL USING SIMPSON'S RULE. C - double precision :: A,B,BPD,INF,D, + double precision :: A,B,BPD,D, * FV,F1T,F2T,F3T, * LDIR,PSUM,ESTT,ERRR,GV,G1T,G2T, * G3T,GSUM @@ -889,7 +889,7 @@ C $ EPS1, F0,G0, HNC, ERROR,DA,Z3,WT, CONTRG,DX,Z2,Z4,ESTL,ESTR, $ ESTGL,ESTGR,CONTRB,TSUM,SUMG,DLG,ERRL,EXCESS,BND double precision :: ZERO,HALF,ONE,ONEP5,TWO,FOUR,SIX,DXMIN - INTEGER :: IFLAG, IER, NDF,N, IERC,LVL,IFLT + INTEGER :: IFLAG, IER, NDF,N, INF, IERC,LVL,IFLT DIMENSION A(*),B(*),BPD(*),INF(*),D(*), * FV(5),F1T(30),F2T(30),F3T(30), * LDIR(30),PSUM(30),ESTT(30),ERRR(30),GV(5),G1T(30),G2T(30), diff --git a/pywafo/src/wafo/source/mvnprd/mvnprdmod.pyd b/pywafo/src/wafo/source/mvnprd/mvnprdmod.pyd index 8a50904..72085f6 100644 Binary files a/pywafo/src/wafo/source/mvnprd/mvnprdmod.pyd and b/pywafo/src/wafo/source/mvnprd/mvnprdmod.pyd differ diff --git a/pywafo/src/wafo/source/mvnprd/setup.py b/pywafo/src/wafo/source/mvnprd/setup.py index 6a993bb..cbf6e05 100644 --- a/pywafo/src/wafo/source/mvnprd/setup.py +++ b/pywafo/src/wafo/source/mvnprd/setup.py @@ -5,26 +5,28 @@ See also http://www.scipy.org/Cookbook/CompilingExtensionsOnWindowsWithMinGW ''' # File setup.py + + def compile_all(): - import os - files = ['mvnprd', 'mvnprodcorrprb'] - compile1_format = 'gfortran -fPIC -c %s.f' - for file in files: - os.system(compile1_format % file) - file_objects = ['%s.o' % file for file in files] - return file_objects - - -def configuration(parent_package='',top_path=None): + import os + files = ['mvnprd', 'mvnprodcorrprb'] + compile1_format = 'gfortran -fPIC -c %s.f' + for file_ in files: + os.system(compile1_format % file_) + file_objects = ['%s.o' % file_ for file_ in files] + return file_objects + + +def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration libs = compile_all() - config = Configuration('',parent_package,top_path) + config = Configuration('', parent_package, top_path) config.add_extension('mvnprdmod', - libraries = libs, - sources = ['mvnprd_interface.f']) + libraries=libs, + sources=['mvnprd_interface.f']) return config if __name__ == "__main__": from numpy.distutils.core import setup - setup(**configuration(top_path='').todict()) \ No newline at end of file + setup(**configuration(top_path='').todict()) diff --git a/pywafo/src/wafo/source/rind2007/build_all.py b/pywafo/src/wafo/source/rind2007/build_all.py index 134088e..f143f99 100644 --- a/pywafo/src/wafo/source/rind2007/build_all.py +++ b/pywafo/src/wafo/source/rind2007/build_all.py @@ -7,95 +7,25 @@ http://www.scipy.org/Cookbook/CompilingExtensionsOnWindowsWithMinGW """ import os import sys +from wafo.f2py_tools import f2py_call_str -def which(program): - """ - Test if program exists - ====================== - - In order to test if a certain executable exists, it will search for the - program name in the environment variables. - If program is a full path to an executable, it will check it exists - - Copied from: - http://stackoverflow.com/questions/377017/test-if-executable-exists-in-python/ - It is supposed to mimic the UNIX command "which" - """ - - def is_exe(fpath): - return os.path.exists(fpath) and os.access(fpath, os.X_OK) - - fpath, fname = os.path.split(program) - if fpath: - if is_exe(program): - return program - else: - for path in os.environ["PATH"].split(os.pathsep): - exe_file = os.path.join(path, program) - if is_exe(exe_file): - return exe_file - - return None - -def f2py_call_str(): - # regardless of platform, try to figure out which f2py call is in the path - # define possible options - - # on Arch Linux, python and f2py are the calls corresponding to python 3 - # and python2/f2py2 for python 2 - # other Linux versions might still use python/f2py for python 2 - if os.path.basename(sys.executable).endswith('2'): - for k in ('f2py2','f2py2.6','f2py2.7',): - # if we found the f2py path, no need to look further - if which(k): - f2py_call = k - f2py_path = which(k) - break - # on Windows and other Linux using python/f2py - else: - for k in ('f2py','f2py2.6','f2py2.7','f2py.py',): - # if we found the f2py path, no need to look further - if which(k): - f2py_call = k - f2py_path = which(k) - break - - try: - print 'found f2py in:', f2py_path - return f2py_call - # raise exception if f2py is not found, f2py_path variable will not exist - except NameError: - raise UserWarning, \ - 'Couldn\'t locate f2py. Should be part of NumPy installation.' -# # this might vary among specific cases: f2py, f2py2.7, f2py3.2, ... -# # TODO: more robust approach, find out what f2py is in the users path -# if os.name == 'posix': -# compile_format = 'f2py2.6 %s %s -c' -# -# # Install microsoft visual c++ .NET 2003 and run the following to build the module: -# elif os.name == 'nt': -# # compile_format = 'f2py.py %s %s -c --fcompiler=gnu95 --compiler=mingw32 -lmsvcr71' -# compile_format = 'f2py.py %s %s -c' -# -# # give an Error for other OS-es -# else: -# raise UserWarning, \ -# 'Untested platform:', os.name def compile_all(): - f2py_call = f2py_call_str() - print '='*75 + f2py_call = f2py_call_str() + print '=' * 75 print 'compiling rind2007' - print '='*75 - - files = ['intmodule', 'jacobmod', 'swapmod', 'fimod','rindmod','rind71mod'] + print '=' * 75 + + files = ['intmodule', 'jacobmod', 'swapmod', + 'fimod', 'rindmod', 'rind71mod'] compile1_format = 'gfortran -fPIC -c %s.f' format1 = '%s.o ' * len(files) - for file in files: - os.system(compile1_format % file) - file_objects = format1 % tuple(files) - - os.system(f2py_call + ' -m rindmod -c %s rind_interface.f ' % file_objects) - -if __name__=='__main__': + for file_ in files: + os.system(compile1_format % file_) + file_objects = format1 % tuple(files) + + os.system(f2py_call + ' -m rindmod -c %s rind_interface.f ' % + file_objects) + +if __name__ == '__main__': compile_all() diff --git a/pywafo/src/wafo/source/rind2007/rindmod.pyd b/pywafo/src/wafo/source/rind2007/rindmod.pyd index 2c9c0c0..a038fca 100644 Binary files a/pywafo/src/wafo/source/rind2007/rindmod.pyd and b/pywafo/src/wafo/source/rind2007/rindmod.pyd differ