[Scipy-svn] r4546 - in branches: . Interpolate1D Interpolate1D/build Interpolate1D/build/lib.win32-2.5 Interpolate1D/build/src.win32-2.5 Interpolate1D/build/temp.win32-2.5 Interpolate1D/build/temp.win32-2.5/Release Interpolate1D/build/temp.win32-2.5/Release/build

scipy-svn@scip... scipy-svn@scip...
Wed Jul 16 17:08:53 CDT 2008


Author: fcady
Date: 2008-07-16 17:08:51 -0500 (Wed, 16 Jul 2008)
New Revision: 4546

Added:
   branches/Interpolate1D/
   branches/Interpolate1D/build/
   branches/Interpolate1D/build/lib.win32-2.5/
   branches/Interpolate1D/build/lib.win32-2.5/_interpolate.pyd
   branches/Interpolate1D/build/src.win32-2.5/
   branches/Interpolate1D/build/src.win32-2.5/dfitpack-f2pywrappers.f
   branches/Interpolate1D/build/src.win32-2.5/dfitpackmodule.c
   branches/Interpolate1D/build/src.win32-2.5/fitpack.pyf
   branches/Interpolate1D/build/src.win32-2.5/fortranobject.c
   branches/Interpolate1D/build/src.win32-2.5/fortranobject.h
   branches/Interpolate1D/build/temp.win32-2.5/
   branches/Interpolate1D/build/temp.win32-2.5/Release/
   branches/Interpolate1D/build/temp.win32-2.5/Release/build/
   branches/Interpolate1D/build/temp.win32-2.5/Release/build/src.win32-2.5/
   branches/Interpolate1D/dfitpack.py
   branches/Interpolate1D/dfitpack.pyd
Removed:
   branches/interpolate2/
Log:
wrapped most functionality of enthought.interpolate in _interpolate.c_module
wrapper most functionality of scipy.interpolate in fitpack_module
combined functionalities in Interpolate1D module, on which I am currently working.

still VERY much a work in progress.  But code works for basic purposes, and
there is some unit testing included.

Added: branches/Interpolate1D/build/lib.win32-2.5/_interpolate.pyd
===================================================================
(Binary files differ)


Property changes on: branches/Interpolate1D/build/lib.win32-2.5/_interpolate.pyd
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/Interpolate1D/build/src.win32-2.5/dfitpack-f2pywrappers.f
===================================================================
--- branches/Interpolate1D/build/src.win32-2.5/dfitpack-f2pywrappers.f	2008-07-16 00:26:23 UTC (rev 4545)
+++ branches/Interpolate1D/build/src.win32-2.5/dfitpack-f2pywrappers.f	2008-07-16 22:08:51 UTC (rev 4546)
@@ -0,0 +1,39 @@
+C     -*- fortran -*-
+C     This file is autogenerated with f2py (version:2_4422)
+C     It contains Fortran 77 wrappers to fortran functions.
+
+      subroutine f2pywrapsplint (splintf2pywrap, t, n, c, k, a, b,
+     & wrk)
+      external splint
+      integer n
+      integer k
+      real*8 a
+      real*8 b
+      real*8 t(n)
+      real*8 c(n)
+      real*8 wrk(n)
+      real*8 splintf2pywrap, splint
+      splintf2pywrap = splint(t, n, c, k, a, b, wrk)
+      end
+
+
+      subroutine f2pywrapdblint (dblintf2pywrap, tx, nx, ty, ny, c
+     &, kx, ky, xb, xe, yb, ye, wrk)
+      external dblint
+      integer nx
+      integer ny
+      integer kx
+      integer ky
+      real*8 xb
+      real*8 xe
+      real*8 yb
+      real*8 ye
+      real*8 tx(nx)
+      real*8 ty(ny)
+      real*8 c((nx-kx-1)*(ny-ky-1))
+      real*8 wrk(nx+ny-kx-ky-2)
+      real*8 dblintf2pywrap, dblint
+      dblintf2pywrap = dblint(tx, nx, ty, ny, c, kx, ky, xb, xe, y
+     &b, ye, wrk)
+      end
+

Added: branches/Interpolate1D/build/src.win32-2.5/dfitpackmodule.c
===================================================================
--- branches/Interpolate1D/build/src.win32-2.5/dfitpackmodule.c	2008-07-16 00:26:23 UTC (rev 4545)
+++ branches/Interpolate1D/build/src.win32-2.5/dfitpackmodule.c	2008-07-16 22:08:51 UTC (rev 4546)
@@ -0,0 +1,4809 @@
+/* File: dfitpackmodule.c
+ * This file is auto-generated with f2py (version:2_4422).
+ * f2py is a Fortran to Python Interface Generator (FPIG), Second Edition,
+ * written by Pearu Peterson <pearu@cens.ioc.ee>.
+ * See http://cens.ioc.ee/projects/f2py2e/
+ * Generation date: Tue Jul 15 14:23:30 2008
+ * $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 "fortranobject.h"
+#include <math.h>
+
+/**************** See f2py2e/rules.py: mod_rules['modulebody'] ****************/
+static PyObject *dfitpack_error;
+static PyObject *dfitpack_module;
+
+/*********************** See f2py2e/cfuncs.py: typedefs ***********************/
+/*need_typedefs*/
+
+/****************** See f2py2e/cfuncs.py: typedefs_generated ******************/
+/*need_typedefs_generated*/
+
+/********************** See f2py2e/cfuncs.py: cppmacros **********************/
+#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) (((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 size(var) PyArray_SIZE((PyArrayObject *)(capi_ ## var ## _tmp))
+/* #define index(i) capi_i ## i */
+#define slen(var) capi_ ## var ## _len
+
+#define CHECKARRAY(check,tcheck,name) \
+  if (!(check)) {\
+    PyErr_SetString(dfitpack_error,"("tcheck") failed for "name);\
+    /*goto capi_fail;*/\
+  } else 
+#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
+
+#define CHECKSCALAR(check,tcheck,name,show,var)\
+  if (!(check)) {\
+    PyErr_SetString(dfitpack_error,"("tcheck") failed for "name);\
+    fprintf(stderr,show"\n",var);\
+    /*goto capi_fail;*/\
+  } else 
+#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
+
+
+/************************ See f2py2e/cfuncs.py: cfuncs ************************/
+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))
+    /*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 = dfitpack_error;
+    PyErr_SetString(err,errmess);
+  }
+  return 0;
+}
+
+static int double_from_pyobj(double* v,PyObject *obj,const char *errmess) {
+  PyObject* tmp = NULL;
+  if (PyFloat_Check(obj)) {
+#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))
+    /*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 = dfitpack_error;
+    PyErr_SetString(err,errmess);
+  }
+  return 0;
+}
+
+static struct { int nd;npy_intp *d;int *i,*i_tr,tr; } forcombcache;
+static int initforcomb(npy_intp *dims,int nd,int tr) {
+  int k;
+  if (dims==NULL) return 0;
+  if (nd<0) return 0;
+  forcombcache.nd = nd;
+  forcombcache.d = dims;
+  forcombcache.tr = tr;
+  if ((forcombcache.i = (int *)malloc(sizeof(int)*nd))==NULL) return 0;
+  if ((forcombcache.i_tr = (int *)malloc(sizeof(int)*nd))==NULL) return 0;
+  for (k=1;k<nd;k++) {
+    forcombcache.i[k] = forcombcache.i_tr[nd-k-1] = 0;
+  }
+  forcombcache.i[0] = forcombcache.i_tr[nd-1] = -1;
+  return 1;
+}
+static int *nextforcomb(void) {
+  int j,*i,*i_tr,k;
+  int nd=forcombcache.nd;
+  if ((i=forcombcache.i) == NULL) return NULL;
+  if ((i_tr=forcombcache.i_tr) == NULL) return NULL;
+  if (forcombcache.d == NULL) return NULL;
+  i[0]++;
+  if (i[0]==forcombcache.d[0]) {
+    j=1;
+    while ((j<nd) && (i[j]==forcombcache.d[j]-1)) j++;
+    if (j==nd) {
+      free(i);
+      free(i_tr);
+      return NULL;
+    }
+    for (k=0;k<j;k++) i[k] = i_tr[nd-k-1] = 0;
+    i[j]++;
+    i_tr[nd-j-1]++;
+  } else
+    i_tr[nd-1]++;
+  if (forcombcache.tr) return i_tr;
+  return i;
+}
+
+/********************* See f2py2e/cfuncs.py: userincludes *********************/
+/*need_userincludes*/
+
+/********************* See f2py2e/capi_rules.py: usercode *********************/
+  /* start usercode multiline (0) */
+
+
+static double dmax(double* seq,int len) {
+  double val;
+  int i;
+  if (len<1)
+    return -1e308;
+  val = seq[0];
+  for(i=1;i<len;++i)
+    if (seq[i]>val) val = seq[i];
+  return val;
+}
+static double dmin(double* seq,int len) {
+  double val;
+  int i;
+  if (len<1)
+    return 1e308;
+  val = seq[0];
+  for(i=1;i<len;++i)
+    if (seq[i]<val) val = seq[i];
+  return val;
+}
+static double calc_b(double* x,int m,double* tx,int nx) {
+  double val1 = dmin(x,m);
+  double val2 = dmin(tx,nx);
+  if (val2>val1) return val1;
+  val1 = dmax(tx,nx);
+  return val2 - (val1-val2)/nx;
+}
+static double calc_e(double* x,int m,double* tx,int nx) {
+  double val1 = dmax(x,m);
+  double val2 = dmax(tx,nx);
+  if (val2<val1) return val1;
+  val1 = dmin(tx,nx);
+  return val2 + (val2-val1)/nx;
+}
+static int imax(int i1,int i2) {
+  return MAX(i1,i2);
+}
+
+static int calc_surfit_lwrk1(int m, int kx, int ky, int nxest, int nyest) {
+ int u = nxest-kx-1;
+ int v = nyest-ky-1;
+ int km = MAX(kx,ky)+1;
+ int ne = MAX(nxest,nyest);
+ int bx = kx*v+ky+1;
+ int by = ky*u+kx+1;
+ int b1,b2;
+ if (bx<=by) {b1=bx;b2=bx+v-ky;}
+ else {b1=by;b2=by+u-kx;}
+ return u*v*(2+b1+b2)+2*(u+v+km*(m+ne)+ne-kx-ky)+b2+1;
+}
+static int calc_surfit_lwrk2(int m, int kx, int ky, int nxest, int nyest) {
+ int u = nxest-kx-1;
+ int v = nyest-ky-1;
+ int bx = kx*v+ky+1;
+ int by = ky*u+kx+1;
+ int b2 = (bx<=by?bx+v-ky:by+u-kx);
+ return u*v*(b2+1)+b2;
+}
+
+static int calc_regrid_lwrk(int mx, int my, int kx, int ky, 
+                            int nxest, int nyest) {
+ int u = MAX(my, nxest);
+ return 4+nxest*(my+2*kx+5)+nyest*(2*ky+5)+mx*(kx+1)+my*(ky+1)+u;
+}
+
+  /* end multiline (0)*/
+
+/* See f2py2e/rules.py */
+extern void F_FUNC(splev,SPLEV)(double*,int*,double*,int*,double*,double*,int*,int*);
+extern void F_FUNC(splder,SPLDER)(double*,int*,double*,int*,int*,double*,double*,int*,double*,int*);
+extern void F_WRAPPEDFUNC(splint,SPLINT)(double*,double*,int*,double*,int*,double*,double*,double*);
+extern void F_FUNC(sproot,SPROOT)(double*,int*,double*,double*,int*,int*,int*);
+extern void F_FUNC(spalde,SPALDE)(double*,int*,double*,int*,double*,double*,int*);
+extern void F_FUNC(curfit,CURFIT)(int*,int*,double*,double*,double*,double*,double*,int*,double*,int*,int*,double*,double*,double*,double*,int*,int*,int*);
+extern void F_FUNC(percur,PERCUR)(int*,int*,double*,double*,double*,int*,double*,int*,int*,double*,double*,double*,double*,int*,int*,int*);
+extern void F_FUNC(parcur,PARCUR)(int*,int*,int*,int*,double*,int*,double*,double*,double*,double*,int*,double*,int*,int*,double*,int*,double*,double*,double*,int*,int*,int*);
+extern void F_FUNC(fpcurf,FPCURF)(int*,double*,double*,double*,int*,double*,double*,int*,double*,int*,double*,int*,int*,int*,int*,double*,double*,double*,double*,double*,double*,double*,double*,double*,int*,int*);
+extern void F_FUNC(fpcurf,FPCURF)(int*,double*,double*,double*,int*,double*,double*,int*,double*,int*,double*,int*,int*,int*,int*,double*,double*,double*,double*,double*,double*,double*,double*,double*,int*,int*);
+extern void F_FUNC(fpcurf,FPCURF)(int*,double*,double*,double*,int*,double*,double*,int*,double*,int*,double*,int*,int*,int*,int*,double*,double*,double*,double*,double*,double*,double*,double*,double*,int*,int*);
+extern void F_FUNC(bispev,BISPEV)(double*,int*,double*,int*,double*,int*,int*,double*,int*,double*,int*,double*,double*,int*,int*,int*,int*);
+extern void F_FUNC(surfit,SURFIT)(int*,int*,double*,double*,double*,double*,double*,double*,double*,double*,int*,int*,double*,int*,int*,int*,double*,int*,double*,int*,double*,double*,double*,double*,int*,double*,int*,int*,int*,int*);
+extern void F_FUNC(surfit,SURFIT)(int*,int*,double*,double*,double*,double*,double*,double*,double*,double*,int*,int*,double*,int*,int*,int*,double*,int*,double*,int*,double*,double*,double*,double*,int*,double*,int*,int*,int*,int*);
+extern void F_FUNC(regrid,REGRID)(int*,int*,double*,int*,double*,double*,double*,double*,double*,double*,int*,int*,double*,int*,int*,int*,double*,int*,double*,double*,double*,double*,int*,int*,int*,int*);
+extern void F_WRAPPEDFUNC(dblint,DBLINT)(double*,double*,int*,double*,int*,double*,int*,int*,double*,double*,double*,double*,double*);
+/*eof externroutines*/
+
+/******************** See f2py2e/capi_rules.py: usercode1 ********************/
+
+
+/******************* See f2py2e/cb_rules.py: buildcallback *******************/
+/*need_callbacks*/
+
+/*********************** See f2py2e/rules.py: buildapi ***********************/
+
+/*********************************** splev ***********************************/
+static char doc_f2py_rout_dfitpack_splev[] = "\
+Function signature:\n\
+  y = splev(t,c,k,x)\n\
+Required arguments:\n"
+"  t : input rank-1 array('d') with bounds (n)\n"
+"  c : input rank-1 array('d') with bounds (n)\n"
+"  k : input int\n"
+"  x : input rank-1 array('d') with bounds (m)\n"
+"Return objects:\n"
+"  y : rank-1 array('d') with bounds (m)";
+/* extern void F_FUNC(splev,SPLEV)(double*,int*,double*,int*,double*,double*,int*,int*); */
+static PyObject *f2py_rout_dfitpack_splev(const PyObject *capi_self,
+                           PyObject *capi_args,
+                           PyObject *capi_keywds,
+                           void (*f2py_func)(double*,int*,double*,int*,double*,double*,int*,int*)) {
+  PyObject * volatile capi_buildvalue = NULL;
+  volatile int f2py_success = 1;
+/*decl*/
+
+  double *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;
+  int n = 0;
+  double *c = NULL;
+  npy_intp c_Dims[1] = {-1};
+  const int c_Rank = 1;
+  PyArrayObject *capi_c_tmp = NULL;
+  int capi_c_intent = 0;
+  PyObject *c_capi = Py_None;
+  int k = 0;
+  PyObject *k_capi = Py_None;
+  double *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;
+  double *y = NULL;
+  npy_intp y_Dims[1] = {-1};
+  const int y_Rank = 1;
+  PyArrayObject *capi_y_tmp = NULL;
+  int capi_y_intent = 0;
+  int m = 0;
+  int ier = 0;
+  static char *capi_kwlist[] = {"t","c","k","x",NULL};
+
+/*routdebugenter*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_clock();
+#endif
+  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
+    "OOOO|:dfitpack.splev",\
+    capi_kwlist,&t_capi,&c_capi,&k_capi,&x_capi))
+    return NULL;
+/*frompyobj*/
+  /* Processing variable k */
+    f2py_success = int_from_pyobj(&k,k_capi,"dfitpack.splev() 3rd argument (k) can't be converted to int");
+  if (f2py_success) {
+  /* Processing variable ier */
+  /* Processing variable t */
+  ;
+  capi_t_intent |= F2PY_INTENT_IN;
+  capi_t_tmp = array_from_pyobj(PyArray_DOUBLE,t_Dims,t_Rank,capi_t_intent,t_capi);
+  if (capi_t_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 1st argument `t' of dfitpack.splev to C/Fortran array" );
+  } else {
+    t = (double *)(capi_t_tmp->data);
+
+  /* Processing variable x */
+  ;
+  capi_x_intent |= F2PY_INTENT_IN;
+  capi_x_tmp = array_from_pyobj(PyArray_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
+  if (capi_x_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 4th argument `x' of dfitpack.splev to C/Fortran array" );
+  } else {
+    x = (double *)(capi_x_tmp->data);
+
+  /* Processing variable m */
+  m = len(x);
+  /* Processing variable n */
+  n = len(t);
+  /* Processing variable y */
+  y_Dims[0]=m;
+  capi_y_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
+  capi_y_tmp = array_from_pyobj(PyArray_DOUBLE,y_Dims,y_Rank,capi_y_intent,Py_None);
+  if (capi_y_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `y' of dfitpack.splev to C/Fortran array" );
+  } else {
+    y = (double *)(capi_y_tmp->data);
+
+  /* Processing variable c */
+  c_Dims[0]=n;
+  capi_c_intent |= F2PY_INTENT_IN;
+  capi_c_tmp = array_from_pyobj(PyArray_DOUBLE,c_Dims,c_Rank,capi_c_intent,c_capi);
+  if (capi_c_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 2nd argument `c' of dfitpack.splev to C/Fortran array" );
+  } else {
+    c = (double *)(capi_c_tmp->data);
+
+  CHECKARRAY(len(c)==n,"len(c)==n","2nd argument c") {
+/*end of frompyobj*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_call_clock();
+#endif
+/*callfortranroutine*/
+        (*f2py_func)(t,&n,c,&k,x,y,&m,&ier);
+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("N",capi_y_tmp);
+/*closepyobjfrom*/
+/*end of closepyobjfrom*/
+    } /*if (f2py_success) after callfortranroutine*/
+/*cleanupfrompyobj*/
+  } /*CHECKARRAY(len(c)==n)*/
+  if((PyObject *)capi_c_tmp!=c_capi) {
+    Py_XDECREF(capi_c_tmp); }
+  }  /*if (capi_c_tmp == NULL) ... else of c*/
+  /* End of cleaning variable c */
+  }  /*if (capi_y_tmp == NULL) ... else of y*/
+  /* End of cleaning variable y */
+  /* End of cleaning variable n */
+  /* End of cleaning variable m */
+  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_t_tmp!=t_capi) {
+    Py_XDECREF(capi_t_tmp); }
+  }  /*if (capi_t_tmp == NULL) ... else of t*/
+  /* End of cleaning variable t */
+  /* End of cleaning variable ier */
+  } /*if (f2py_success) of k*/
+  /* End of cleaning variable k */
+/*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 splev ********************************/
+
+/*********************************** splder ***********************************/
+static char doc_f2py_rout_dfitpack_splder[] = "\
+Function signature:\n\
+  y = splder(t,c,k,x,[nu])\n\
+Required arguments:\n"
+"  t : input rank-1 array('d') with bounds (n)\n"
+"  c : input rank-1 array('d') with bounds (n)\n"
+"  k : input int\n"
+"  x : input rank-1 array('d') with bounds (m)\n"
+"Optional arguments:\n"
+"  nu := 1 input int\n"
+"Return objects:\n"
+"  y : rank-1 array('d') with bounds (m)";
+/* extern void F_FUNC(splder,SPLDER)(double*,int*,double*,int*,int*,double*,double*,int*,double*,int*); */
+static PyObject *f2py_rout_dfitpack_splder(const PyObject *capi_self,
+                           PyObject *capi_args,
+                           PyObject *capi_keywds,
+                           void (*f2py_func)(double*,int*,double*,int*,int*,double*,double*,int*,double*,int*)) {
+  PyObject * volatile capi_buildvalue = NULL;
+  volatile int f2py_success = 1;
+/*decl*/
+
+  double *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;
+  int n = 0;
+  double *c = NULL;
+  npy_intp c_Dims[1] = {-1};
+  const int c_Rank = 1;
+  PyArrayObject *capi_c_tmp = NULL;
+  int capi_c_intent = 0;
+  PyObject *c_capi = Py_None;
+  int k = 0;
+  PyObject *k_capi = Py_None;
+  int nu = 0;
+  PyObject *nu_capi = Py_None;
+  double *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;
+  double *y = NULL;
+  npy_intp y_Dims[1] = {-1};
+  const int y_Rank = 1;
+  PyArrayObject *capi_y_tmp = NULL;
+  int capi_y_intent = 0;
+  int m = 0;
+  double *wrk = NULL;
+  npy_intp wrk_Dims[1] = {-1};
+  const int wrk_Rank = 1;
+  PyArrayObject *capi_wrk_tmp = NULL;
+  int capi_wrk_intent = 0;
+  int ier = 0;
+  static char *capi_kwlist[] = {"t","c","k","x","nu",NULL};
+
+/*routdebugenter*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_clock();
+#endif
+  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
+    "OOOO|O:dfitpack.splder",\
+    capi_kwlist,&t_capi,&c_capi,&k_capi,&x_capi,&nu_capi))
+    return NULL;
+/*frompyobj*/
+  /* Processing variable k */
+    f2py_success = int_from_pyobj(&k,k_capi,"dfitpack.splder() 3rd argument (k) can't be converted to int");
+  if (f2py_success) {
+  /* Processing variable ier */
+  /* Processing variable t */
+  ;
+  capi_t_intent |= F2PY_INTENT_IN;
+  capi_t_tmp = array_from_pyobj(PyArray_DOUBLE,t_Dims,t_Rank,capi_t_intent,t_capi);
+  if (capi_t_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 1st argument `t' of dfitpack.splder to C/Fortran array" );
+  } else {
+    t = (double *)(capi_t_tmp->data);
+
+  /* Processing variable x */
+  ;
+  capi_x_intent |= F2PY_INTENT_IN;
+  capi_x_tmp = array_from_pyobj(PyArray_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
+  if (capi_x_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 4th argument `x' of dfitpack.splder to C/Fortran array" );
+  } else {
+    x = (double *)(capi_x_tmp->data);
+
+  /* Processing variable m */
+  m = len(x);
+  /* Processing variable n */
+  n = len(t);
+  /* Processing variable y */
+  y_Dims[0]=m;
+  capi_y_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
+  capi_y_tmp = array_from_pyobj(PyArray_DOUBLE,y_Dims,y_Rank,capi_y_intent,Py_None);
+  if (capi_y_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `y' of dfitpack.splder to C/Fortran array" );
+  } else {
+    y = (double *)(capi_y_tmp->data);
+
+  /* Processing variable nu */
+  if (nu_capi == Py_None) nu = 1; else
+    f2py_success = int_from_pyobj(&nu,nu_capi,"dfitpack.splder() 1st keyword (nu) can't be converted to int");
+  if (f2py_success) {
+  CHECKSCALAR(0<=nu && nu<=k,"0<=nu && nu<=k","1st keyword nu","splder:nu=%d",nu) {
+  /* Processing variable c */
+  c_Dims[0]=n;
+  capi_c_intent |= F2PY_INTENT_IN;
+  capi_c_tmp = array_from_pyobj(PyArray_DOUBLE,c_Dims,c_Rank,capi_c_intent,c_capi);
+  if (capi_c_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 2nd argument `c' of dfitpack.splder to C/Fortran array" );
+  } else {
+    c = (double *)(capi_c_tmp->data);
+
+  CHECKARRAY(len(c)==n,"len(c)==n","2nd argument c") {
+  /* Processing variable wrk */
+  wrk_Dims[0]=n;
+  capi_wrk_intent |= F2PY_INTENT_CACHE|F2PY_INTENT_HIDE;
+  capi_wrk_tmp = array_from_pyobj(PyArray_DOUBLE,wrk_Dims,wrk_Rank,capi_wrk_intent,Py_None);
+  if (capi_wrk_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `wrk' of dfitpack.splder to C/Fortran array" );
+  } else {
+    wrk = (double *)(capi_wrk_tmp->data);
+
+/*end of frompyobj*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_call_clock();
+#endif
+/*callfortranroutine*/
+        (*f2py_func)(t,&n,c,&k,&nu,x,y,&m,wrk,&ier);
+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("N",capi_y_tmp);
+/*closepyobjfrom*/
+/*end of closepyobjfrom*/
+    } /*if (f2py_success) after callfortranroutine*/
+/*cleanupfrompyobj*/
+    Py_XDECREF(capi_wrk_tmp);
+  }  /*if (capi_wrk_tmp == NULL) ... else of wrk*/
+  /* End of cleaning variable wrk */
+  } /*CHECKARRAY(len(c)==n)*/
+  if((PyObject *)capi_c_tmp!=c_capi) {
+    Py_XDECREF(capi_c_tmp); }
+  }  /*if (capi_c_tmp == NULL) ... else of c*/
+  /* End of cleaning variable c */
+  } /*CHECKSCALAR(0<=nu && nu<=k)*/
+  } /*if (f2py_success) of nu*/
+  /* End of cleaning variable nu */
+  }  /*if (capi_y_tmp == NULL) ... else of y*/
+  /* End of cleaning variable y */
+  /* End of cleaning variable n */
+  /* End of cleaning variable m */
+  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_t_tmp!=t_capi) {
+    Py_XDECREF(capi_t_tmp); }
+  }  /*if (capi_t_tmp == NULL) ... else of t*/
+  /* End of cleaning variable t */
+  /* End of cleaning variable ier */
+  } /*if (f2py_success) of k*/
+  /* End of cleaning variable k */
+/*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 splder *******************************/
+
+/*********************************** splint ***********************************/
+static char doc_f2py_rout_dfitpack_splint[] = "\
+Function signature:\n\
+  splint = splint(t,c,k,a,b)\n\
+Required arguments:\n"
+"  t : input rank-1 array('d') with bounds (n)\n"
+"  c : input rank-1 array('d') with bounds (n)\n"
+"  k : input int\n"
+"  a : input float\n"
+"  b : input float\n"
+"Return objects:\n"
+"  splint : float";
+/* extern void F_WRAPPEDFUNC(splint,SPLINT)(double*,double*,int*,double*,int*,double*,double*,double*); */
+static PyObject *f2py_rout_dfitpack_splint(const PyObject *capi_self,
+                           PyObject *capi_args,
+                           PyObject *capi_keywds,
+                           void (*f2py_func)(double*,double*,int*,double*,int*,double*,double*,double*)) {
+  PyObject * volatile capi_buildvalue = NULL;
+  volatile int f2py_success = 1;
+/*decl*/
+
+  double splint = 0;
+  double *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;
+  int n = 0;
+  double *c = NULL;
+  npy_intp c_Dims[1] = {-1};
+  const int c_Rank = 1;
+  PyArrayObject *capi_c_tmp = NULL;
+  int capi_c_intent = 0;
+  PyObject *c_capi = Py_None;
+  int k = 0;
+  PyObject *k_capi = Py_None;
+  double a = 0;
+  PyObject *a_capi = Py_None;
+  double b = 0;
+  PyObject *b_capi = Py_None;
+  double *wrk = NULL;
+  npy_intp wrk_Dims[1] = {-1};
+  const int wrk_Rank = 1;
+  PyArrayObject *capi_wrk_tmp = NULL;
+  int capi_wrk_intent = 0;
+  static char *capi_kwlist[] = {"t","c","k","a","b",NULL};
+
+/*routdebugenter*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_clock();
+#endif
+  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
+    "OOOOO|:dfitpack.splint",\
+    capi_kwlist,&t_capi,&c_capi,&k_capi,&a_capi,&b_capi))
+    return NULL;
+/*frompyobj*/
+  /* Processing variable a */
+    f2py_success = double_from_pyobj(&a,a_capi,"dfitpack.splint() 4th argument (a) can't be converted to double");
+  if (f2py_success) {
+  /* Processing variable b */
+    f2py_success = double_from_pyobj(&b,b_capi,"dfitpack.splint() 5th argument (b) can't be converted to double");
+  if (f2py_success) {
+  /* Processing variable k */
+    f2py_success = int_from_pyobj(&k,k_capi,"dfitpack.splint() 3rd argument (k) can't be converted to int");
+  if (f2py_success) {
+  /* Processing variable splint */
+  /* Processing variable t */
+  ;
+  capi_t_intent |= F2PY_INTENT_IN;
+  capi_t_tmp = array_from_pyobj(PyArray_DOUBLE,t_Dims,t_Rank,capi_t_intent,t_capi);
+  if (capi_t_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 1st argument `t' of dfitpack.splint to C/Fortran array" );
+  } else {
+    t = (double *)(capi_t_tmp->data);
+
+  /* Processing variable n */
+  n = len(t);
+  /* Processing variable c */
+  c_Dims[0]=n;
+  capi_c_intent |= F2PY_INTENT_IN;
+  capi_c_tmp = array_from_pyobj(PyArray_DOUBLE,c_Dims,c_Rank,capi_c_intent,c_capi);
+  if (capi_c_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 2nd argument `c' of dfitpack.splint to C/Fortran array" );
+  } else {
+    c = (double *)(capi_c_tmp->data);
+
+  CHECKARRAY(len(c)==n,"len(c)==n","2nd argument c") {
+  /* Processing variable wrk */
+  wrk_Dims[0]=n;
+  capi_wrk_intent |= F2PY_INTENT_CACHE|F2PY_INTENT_HIDE;
+  capi_wrk_tmp = array_from_pyobj(PyArray_DOUBLE,wrk_Dims,wrk_Rank,capi_wrk_intent,Py_None);
+  if (capi_wrk_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `wrk' of dfitpack.splint to C/Fortran array" );
+  } else {
+    wrk = (double *)(capi_wrk_tmp->data);
+
+/*end of frompyobj*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_call_clock();
+#endif
+/*callfortranroutine*/
+  (*f2py_func)(&splint,t,&n,c,&k,&a,&b,wrk);
+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("d",splint);
+/*closepyobjfrom*/
+/*end of closepyobjfrom*/
+    } /*if (f2py_success) after callfortranroutine*/
+/*cleanupfrompyobj*/
+    Py_XDECREF(capi_wrk_tmp);
+  }  /*if (capi_wrk_tmp == NULL) ... else of wrk*/
+  /* End of cleaning variable wrk */
+  } /*CHECKARRAY(len(c)==n)*/
+  if((PyObject *)capi_c_tmp!=c_capi) {
+    Py_XDECREF(capi_c_tmp); }
+  }  /*if (capi_c_tmp == NULL) ... else of c*/
+  /* End of cleaning variable c */
+  /* End of cleaning variable n */
+  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 */
+  /* End of cleaning variable splint */
+  } /*if (f2py_success) of k*/
+  /* End of cleaning variable k */
+  } /*if (f2py_success) of b*/
+  /* End of cleaning variable b */
+  } /*if (f2py_success) of a*/
+  /* End of cleaning variable a */
+/*end of cleanupfrompyobj*/
+  if (capi_buildvalue == NULL) {
+/*routdebugfailure*/
+  } else {
+/*routdebugleave*/
+  }
+  CFUNCSMESS("Freeing memory.\n");
+/*freemem*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_stop_clock();
+#endif
+  return capi_buildvalue;
+}
+/******************************* end of splint *******************************/
+
+/*********************************** sproot ***********************************/
+static char doc_f2py_rout_dfitpack_sproot[] = "\
+Function signature:\n\
+  zero,m,ier = sproot(t,c,[mest])\n\
+Required arguments:\n"
+"  t : input rank-1 array('d') with bounds (n)\n"
+"  c : input rank-1 array('d') with bounds (n)\n"
+"Optional arguments:\n"
+"  mest := 3*(n-7) input int\n"
+"Return objects:\n"
+"  zero : rank-1 array('d') with bounds (mest)\n"
+"  m : int\n"
+"  ier : int";
+/* extern void F_FUNC(sproot,SPROOT)(double*,int*,double*,double*,int*,int*,int*); */
+static PyObject *f2py_rout_dfitpack_sproot(const PyObject *capi_self,
+                           PyObject *capi_args,
+                           PyObject *capi_keywds,
+                           void (*f2py_func)(double*,int*,double*,double*,int*,int*,int*)) {
+  PyObject * volatile capi_buildvalue = NULL;
+  volatile int f2py_success = 1;
+/*decl*/
+
+  double *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;
+  int n = 0;
+  double *c = NULL;
+  npy_intp c_Dims[1] = {-1};
+  const int c_Rank = 1;
+  PyArrayObject *capi_c_tmp = NULL;
+  int capi_c_intent = 0;
+  PyObject *c_capi = Py_None;
+  double *zero = NULL;
+  npy_intp zero_Dims[1] = {-1};
+  const int zero_Rank = 1;
+  PyArrayObject *capi_zero_tmp = NULL;
+  int capi_zero_intent = 0;
+  int mest = 0;
+  PyObject *mest_capi = Py_None;
+  int m = 0;
+  int ier = 0;
+  static char *capi_kwlist[] = {"t","c","mest",NULL};
+
+/*routdebugenter*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_clock();
+#endif
+  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
+    "OO|O:dfitpack.sproot",\
+    capi_kwlist,&t_capi,&c_capi,&mest_capi))
+    return NULL;
+/*frompyobj*/
+  /* Processing variable t */
+  ;
+  capi_t_intent |= F2PY_INTENT_IN;
+  capi_t_tmp = array_from_pyobj(PyArray_DOUBLE,t_Dims,t_Rank,capi_t_intent,t_capi);
+  if (capi_t_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 1st argument `t' of dfitpack.sproot to C/Fortran array" );
+  } else {
+    t = (double *)(capi_t_tmp->data);
+
+  /* Processing variable ier */
+  /* Processing variable m */
+  /* Processing variable n */
+  n = len(t);
+  CHECKSCALAR(n>=8,"n>=8","hidden n","sproot:n=%d",n) {
+  /* Processing variable mest */
+  if (mest_capi == Py_None) mest = 3*(n-7); else
+    f2py_success = int_from_pyobj(&mest,mest_capi,"dfitpack.sproot() 1st keyword (mest) can't be converted to int");
+  if (f2py_success) {
+  /* Processing variable c */
+  c_Dims[0]=n;
+  capi_c_intent |= F2PY_INTENT_IN;
+  capi_c_tmp = array_from_pyobj(PyArray_DOUBLE,c_Dims,c_Rank,capi_c_intent,c_capi);
+  if (capi_c_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 2nd argument `c' of dfitpack.sproot to C/Fortran array" );
+  } else {
+    c = (double *)(capi_c_tmp->data);
+
+  CHECKARRAY(len(c)==n,"len(c)==n","2nd argument c") {
+  /* Processing variable zero */
+  zero_Dims[0]=mest;
+  capi_zero_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
+  capi_zero_tmp = array_from_pyobj(PyArray_DOUBLE,zero_Dims,zero_Rank,capi_zero_intent,Py_None);
+  if (capi_zero_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `zero' of dfitpack.sproot to C/Fortran array" );
+  } else {
+    zero = (double *)(capi_zero_tmp->data);
+
+/*end of frompyobj*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_call_clock();
+#endif
+/*callfortranroutine*/
+        (*f2py_func)(t,&n,c,zero,&mest,&m,&ier);
+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("Nii",capi_zero_tmp,m,ier);
+/*closepyobjfrom*/
+/*end of closepyobjfrom*/
+    } /*if (f2py_success) after callfortranroutine*/
+/*cleanupfrompyobj*/
+  }  /*if (capi_zero_tmp == NULL) ... else of zero*/
+  /* End of cleaning variable zero */
+  } /*CHECKARRAY(len(c)==n)*/
+  if((PyObject *)capi_c_tmp!=c_capi) {
+    Py_XDECREF(capi_c_tmp); }
+  }  /*if (capi_c_tmp == NULL) ... else of c*/
+  /* End of cleaning variable c */
+  } /*if (f2py_success) of mest*/
+  /* End of cleaning variable mest */
+  } /*CHECKSCALAR(n>=8)*/
+  /* End of cleaning variable n */
+  /* End of cleaning variable m */
+  /* End of cleaning variable ier */
+  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 */
+/*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 sproot *******************************/
+
+/*********************************** spalde ***********************************/
+static char doc_f2py_rout_dfitpack_spalde[] = "\
+Function signature:\n\
+  d,ier = spalde(t,c,k,x)\n\
+Required arguments:\n"
+"  t : input rank-1 array('d') with bounds (n)\n"
+"  c : input rank-1 array('d') with bounds (n)\n"
+"  k : input int\n"
+"  x : input float\n"
+"Return objects:\n"
+"  d : rank-1 array('d') with bounds (k + 1)\n"
+"  ier : int";
+/* extern void F_FUNC(spalde,SPALDE)(double*,int*,double*,int*,double*,double*,int*); */
+static PyObject *f2py_rout_dfitpack_spalde(const PyObject *capi_self,
+                           PyObject *capi_args,
+                           PyObject *capi_keywds,
+                           void (*f2py_func)(double*,int*,double*,int*,double*,double*,int*)) {
+  PyObject * volatile capi_buildvalue = NULL;
+  volatile int f2py_success = 1;
+/*decl*/
+
+  double *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;
+  int n = 0;
+  double *c = NULL;
+  npy_intp c_Dims[1] = {-1};
+  const int c_Rank = 1;
+  PyArrayObject *capi_c_tmp = NULL;
+  int capi_c_intent = 0;
+  PyObject *c_capi = Py_None;
+  int k = 0;
+  PyObject *k_capi = Py_None;
+  double x = 0;
+  PyObject *x_capi = Py_None;
+  double *d = NULL;
+  npy_intp d_Dims[1] = {-1};
+  const int d_Rank = 1;
+  PyArrayObject *capi_d_tmp = NULL;
+  int capi_d_intent = 0;
+  int ier = 0;
+  static char *capi_kwlist[] = {"t","c","k","x",NULL};
+
+/*routdebugenter*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_clock();
+#endif
+  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
+    "OOOO|:dfitpack.spalde",\
+    capi_kwlist,&t_capi,&c_capi,&k_capi,&x_capi))
+    return NULL;
+/*frompyobj*/
+  /* Processing variable t */
+  ;
+  capi_t_intent |= F2PY_INTENT_IN;
+  capi_t_tmp = array_from_pyobj(PyArray_DOUBLE,t_Dims,t_Rank,capi_t_intent,t_capi);
+  if (capi_t_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 1st argument `t' of dfitpack.spalde to C/Fortran array" );
+  } else {
+    t = (double *)(capi_t_tmp->data);
+
+  /* Processing variable x */
+    f2py_success = double_from_pyobj(&x,x_capi,"dfitpack.spalde() 4th argument (x) can't be converted to double");
+  if (f2py_success) {
+  /* Processing variable k */
+    f2py_success = int_from_pyobj(&k,k_capi,"dfitpack.spalde() 3rd argument (k) can't be converted to int");
+  if (f2py_success) {
+  /* Processing variable ier */
+  /* Processing variable d */
+  d_Dims[0]=k + 1;
+  capi_d_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
+  capi_d_tmp = array_from_pyobj(PyArray_DOUBLE,d_Dims,d_Rank,capi_d_intent,Py_None);
+  if (capi_d_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `d' of dfitpack.spalde to C/Fortran array" );
+  } else {
+    d = (double *)(capi_d_tmp->data);
+
+  /* Processing variable n */
+  n = len(t);
+  /* Processing variable c */
+  c_Dims[0]=n;
+  capi_c_intent |= F2PY_INTENT_IN;
+  capi_c_tmp = array_from_pyobj(PyArray_DOUBLE,c_Dims,c_Rank,capi_c_intent,c_capi);
+  if (capi_c_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 2nd argument `c' of dfitpack.spalde to C/Fortran array" );
+  } else {
+    c = (double *)(capi_c_tmp->data);
+
+  CHECKARRAY(len(c)==n,"len(c)==n","2nd argument c") {
+/*end of frompyobj*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_call_clock();
+#endif
+/*callfortranroutine*/
+        {int k1=k+1; (*f2py_func)(t,&n,c,&k1,&x,d,&ier); };
+        /*(*f2py_func)(t,&n,c,&k,&x,d,&ier);*/
+if (PyErr_Occurred())
+  f2py_success = 0;
+#ifdef F2PY_REPORT_ATEXIT
+f2py_stop_call_clock();
+#endif
+/*end of callfortranroutine*/
+    if (f2py_success) {
+/*pyobjfrom*/
+/*end of pyobjfrom*/
+    CFUNCSMESS("Building return value.\n");
+    capi_buildvalue = Py_BuildValue("Ni",capi_d_tmp,ier);
+/*closepyobjfrom*/
+/*end of closepyobjfrom*/
+    } /*if (f2py_success) after callfortranroutine*/
+/*cleanupfrompyobj*/
+  } /*CHECKARRAY(len(c)==n)*/
+  if((PyObject *)capi_c_tmp!=c_capi) {
+    Py_XDECREF(capi_c_tmp); }
+  }  /*if (capi_c_tmp == NULL) ... else of c*/
+  /* End of cleaning variable c */
+  /* End of cleaning variable n */
+  }  /*if (capi_d_tmp == NULL) ... else of d*/
+  /* End of cleaning variable d */
+  /* End of cleaning variable ier */
+  } /*if (f2py_success) of k*/
+  /* End of cleaning variable k */
+  } /*if (f2py_success) of x*/
+  /* End of cleaning variable x */
+  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 */
+/*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 spalde *******************************/
+
+/*********************************** curfit ***********************************/
+static char doc_f2py_rout_dfitpack_curfit[] = "\
+Function signature:\n\
+  n,c,fp,ier = curfit(iopt,x,y,w,t,wrk,iwrk,[xb,xe,k,s])\n\
+Required arguments:\n"
+"  iopt : input int\n"
+"  x : input rank-1 array('d') with bounds (m)\n"
+"  y : input rank-1 array('d') with bounds (m)\n"
+"  w : input rank-1 array('d') with bounds (m)\n"
+"  t : in/output rank-1 array('d') with bounds (nest)\n"
+"  wrk : in/output rank-1 array('d') with bounds (lwrk)\n"
+"  iwrk : in/output rank-1 array('i') with bounds (nest)\n"
+"Optional arguments:\n"
+"  xb := x[0] input float\n"
+"  xe := x[m-1] input float\n"
+"  k := 3 input int\n"
+"  s := 0.0 input float\n"
+"Return objects:\n"
+"  n : int\n"
+"  c : rank-1 array('d') with bounds (n)\n"
+"  fp : float\n"
+"  ier : int";
+/* extern void F_FUNC(curfit,CURFIT)(int*,int*,double*,double*,double*,double*,double*,int*,double*,int*,int*,double*,double*,double*,double*,int*,int*,int*); */
+static PyObject *f2py_rout_dfitpack_curfit(const PyObject *capi_self,
+                           PyObject *capi_args,
+                           PyObject *capi_keywds,
+                           void (*f2py_func)(int*,int*,double*,double*,double*,double*,double*,int*,double*,int*,int*,double*,double*,double*,double*,int*,int*,int*)) {
+  PyObject * volatile capi_buildvalue = NULL;
+  volatile int f2py_success = 1;
+/*decl*/
+
+  int iopt = 0;
+  PyObject *iopt_capi = Py_None;
+  int m = 0;
+  double *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;
+  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 *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 xb = 0;
+  PyObject *xb_capi = Py_None;
+  double xe = 0;
+  PyObject *xe_capi = Py_None;
+  int k = 0;
+  PyObject *k_capi = Py_None;
+  double s = 0;
+  PyObject *s_capi = Py_None;
+  int nest = 0;
+  int n = 0;
+  double *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;
+  double *c = NULL;
+  npy_intp c_Dims[1] = {-1};
+  const int c_Rank = 1;
+  PyArrayObject *capi_c_tmp = NULL;
+  int capi_c_intent = 0;
+  double fp = 0;
+  double *wrk = NULL;
+  npy_intp wrk_Dims[1] = {-1};
+  const int wrk_Rank = 1;
+  PyArrayObject *capi_wrk_tmp = NULL;
+  int capi_wrk_intent = 0;
+  PyObject *wrk_capi = Py_None;
+  int lwrk = 0;
+  int *iwrk = NULL;
+  npy_intp iwrk_Dims[1] = {-1};
+  const int iwrk_Rank = 1;
+  PyArrayObject *capi_iwrk_tmp = NULL;
+  int capi_iwrk_intent = 0;
+  PyObject *iwrk_capi = Py_None;
+  int ier = 0;
+  static char *capi_kwlist[] = {"iopt","x","y","w","t","wrk","iwrk","xb","xe","k","s",NULL};
+
+/*routdebugenter*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_clock();
+#endif
+  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
+    "OOOOOOO|OOOO:dfitpack.curfit",\
+    capi_kwlist,&iopt_capi,&x_capi,&y_capi,&w_capi,&t_capi,&wrk_capi,&iwrk_capi,&xb_capi,&xe_capi,&k_capi,&s_capi))
+    return NULL;
+/*frompyobj*/
+  /* Processing variable fp */
+  /* Processing variable iopt */
+    f2py_success = int_from_pyobj(&iopt,iopt_capi,"dfitpack.curfit() 1st argument (iopt) can't be converted to int");
+  if (f2py_success) {
+  /* Processing variable k */
+  if (k_capi == Py_None) k = 3; else
+    f2py_success = int_from_pyobj(&k,k_capi,"dfitpack.curfit() 3rd keyword (k) can't be converted to int");
+  if (f2py_success) {
+  CHECKSCALAR(1<=k && k <=5,"1<=k && k <=5","3rd keyword k","curfit:k=%d",k) {
+  /* Processing variable ier */
+  /* Processing variable wrk */
+  ;
+  capi_wrk_intent |= F2PY_INTENT_INOUT;
+  capi_wrk_tmp = array_from_pyobj(PyArray_DOUBLE,wrk_Dims,wrk_Rank,capi_wrk_intent,wrk_capi);
+  if (capi_wrk_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 6th argument `wrk' of dfitpack.curfit to C/Fortran array" );
+  } else {
+    wrk = (double *)(capi_wrk_tmp->data);
+
+  /* Processing variable s */
+  if (s_capi == Py_None) s = 0.0; else
+    f2py_success = double_from_pyobj(&s,s_capi,"dfitpack.curfit() 4th keyword (s) can't be converted to double");
+  if (f2py_success) {
+  CHECKSCALAR(s>=0.0,"s>=0.0","4th keyword s","curfit:s=%g",s) {
+  /* Processing variable t */
+  ;
+  capi_t_intent |= F2PY_INTENT_INOUT;
+  capi_t_tmp = array_from_pyobj(PyArray_DOUBLE,t_Dims,t_Rank,capi_t_intent,t_capi);
+  if (capi_t_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 5th argument `t' of dfitpack.curfit to C/Fortran array" );
+  } else {
+    t = (double *)(capi_t_tmp->data);
+
+  /* Processing variable x */
+  ;
+  capi_x_intent |= F2PY_INTENT_IN;
+  capi_x_tmp = array_from_pyobj(PyArray_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
+  if (capi_x_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 2nd argument `x' of dfitpack.curfit to C/Fortran array" );
+  } else {
+    x = (double *)(capi_x_tmp->data);
+
+  /* Processing variable xb */
+  if (xb_capi == Py_None) xb = x[0]; else
+    f2py_success = double_from_pyobj(&xb,xb_capi,"dfitpack.curfit() 1st keyword (xb) can't be converted to double");
+  if (f2py_success) {
+  CHECKSCALAR(xb<=x[0],"xb<=x[0]","1st keyword xb","curfit:xb=%g",xb) {
+  /* Processing variable nest */
+  nest = len(t);
+  /* Processing variable m */
+  m = len(x);
+  CHECKSCALAR(m>k,"m>k","hidden m","curfit:m=%d",m) {
+  /* Processing variable lwrk */
+  lwrk = len(wrk);
+  /* Processing variable n */
+  n = nest;
+  /* Processing variable w */
+  w_Dims[0]=m;
+  capi_w_intent |= F2PY_INTENT_IN;
+  capi_w_tmp = array_from_pyobj(PyArray_DOUBLE,w_Dims,w_Rank,capi_w_intent,w_capi);
+  if (capi_w_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 4th argument `w' of dfitpack.curfit to C/Fortran array" );
+  } else {
+    w = (double *)(capi_w_tmp->data);
+
+  CHECKARRAY(len(w)==m,"len(w)==m","4th argument w") {
+  /* Processing variable iwrk */
+  iwrk_Dims[0]=nest;
+  capi_iwrk_intent |= F2PY_INTENT_INOUT;
+  capi_iwrk_tmp = array_from_pyobj(PyArray_INT,iwrk_Dims,iwrk_Rank,capi_iwrk_intent,iwrk_capi);
+  if (capi_iwrk_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 7th argument `iwrk' of dfitpack.curfit to C/Fortran array" );
+  } else {
+    iwrk = (int *)(capi_iwrk_tmp->data);
+
+  /* Processing variable y */
+  y_Dims[0]=m;
+  capi_y_intent |= F2PY_INTENT_IN;
+  capi_y_tmp = array_from_pyobj(PyArray_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi);
+  if (capi_y_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 3rd argument `y' of dfitpack.curfit to C/Fortran array" );
+  } else {
+    y = (double *)(capi_y_tmp->data);
+
+  CHECKARRAY(len(y)==m,"len(y)==m","3rd argument y") {
+  /* Processing variable xe */
+  if (xe_capi == Py_None) xe = x[m-1]; else
+    f2py_success = double_from_pyobj(&xe,xe_capi,"dfitpack.curfit() 2nd keyword (xe) can't be converted to double");
+  if (f2py_success) {
+  CHECKSCALAR(xe>=x[m-1],"xe>=x[m-1]","2nd keyword xe","curfit:xe=%g",xe) {
+  /* Processing variable c */
+  c_Dims[0]=n;
+  capi_c_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
+  capi_c_tmp = array_from_pyobj(PyArray_DOUBLE,c_Dims,c_Rank,capi_c_intent,Py_None);
+  if (capi_c_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `c' of dfitpack.curfit to C/Fortran array" );
+  } else {
+    c = (double *)(capi_c_tmp->data);
+
+/*end of frompyobj*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_call_clock();
+#endif
+/*callfortranroutine*/
+        (*f2py_func)(&iopt,&m,x,y,w,&xb,&xe,&k,&s,&nest,&n,t,c,&fp,wrk,&lwrk,iwrk,&ier);
+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("iNdi",n,capi_c_tmp,fp,ier);
+/*closepyobjfrom*/
+/*end of closepyobjfrom*/
+    } /*if (f2py_success) after callfortranroutine*/
+/*cleanupfrompyobj*/
+  }  /*if (capi_c_tmp == NULL) ... else of c*/
+  /* End of cleaning variable c */
+  } /*CHECKSCALAR(xe>=x[m-1])*/
+  } /*if (f2py_success) of xe*/
+  /* End of cleaning variable xe */
+  } /*CHECKARRAY(len(y)==m)*/
+  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((PyObject *)capi_iwrk_tmp!=iwrk_capi) {
+    Py_XDECREF(capi_iwrk_tmp); }
+  }  /*if (capi_iwrk_tmp == NULL) ... else of iwrk*/
+  /* End of cleaning variable iwrk */
+  } /*CHECKARRAY(len(w)==m)*/
+  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 */
+  /* End of cleaning variable n */
+  /* End of cleaning variable lwrk */
+  } /*CHECKSCALAR(m>k)*/
+  /* End of cleaning variable m */
+  /* End of cleaning variable nest */
+  } /*CHECKSCALAR(xb<=x[0])*/
+  } /*if (f2py_success) of xb*/
+  /* End of cleaning variable xb */
+  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_t_tmp!=t_capi) {
+    Py_XDECREF(capi_t_tmp); }
+  }  /*if (capi_t_tmp == NULL) ... else of t*/
+  /* End of cleaning variable t */
+  } /*CHECKSCALAR(s>=0.0)*/
+  } /*if (f2py_success) of s*/
+  /* End of cleaning variable s */
+  if((PyObject *)capi_wrk_tmp!=wrk_capi) {
+    Py_XDECREF(capi_wrk_tmp); }
+  }  /*if (capi_wrk_tmp == NULL) ... else of wrk*/
+  /* End of cleaning variable wrk */
+  /* End of cleaning variable ier */
+  } /*CHECKSCALAR(1<=k && k <=5)*/
+  } /*if (f2py_success) of k*/
+  /* End of cleaning variable k */
+  } /*if (f2py_success) of iopt*/
+  /* End of cleaning variable iopt */
+  /* End of cleaning variable fp */
+/*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 curfit *******************************/
+
+/*********************************** percur ***********************************/
+static char doc_f2py_rout_dfitpack_percur[] = "\
+Function signature:\n\
+  n,c,fp,ier = percur(iopt,x,y,w,t,wrk,iwrk,[k,s])\n\
+Required arguments:\n"
+"  iopt : input int\n"
+"  x : input rank-1 array('d') with bounds (m)\n"
+"  y : input rank-1 array('d') with bounds (m)\n"
+"  w : input rank-1 array('d') with bounds (m)\n"
+"  t : in/output rank-1 array('d') with bounds (nest)\n"
+"  wrk : in/output rank-1 array('d') with bounds (lwrk)\n"
+"  iwrk : in/output rank-1 array('i') with bounds (nest)\n"
+"Optional arguments:\n"
+"  k := 3 input int\n"
+"  s := 0.0 input float\n"
+"Return objects:\n"
+"  n : int\n"
+"  c : rank-1 array('d') with bounds (n)\n"
+"  fp : float\n"
+"  ier : int";
+/* extern void F_FUNC(percur,PERCUR)(int*,int*,double*,double*,double*,int*,double*,int*,int*,double*,double*,double*,double*,int*,int*,int*); */
+static PyObject *f2py_rout_dfitpack_percur(const PyObject *capi_self,
+                           PyObject *capi_args,
+                           PyObject *capi_keywds,
+                           void (*f2py_func)(int*,int*,double*,double*,double*,int*,double*,int*,int*,double*,double*,double*,double*,int*,int*,int*)) {
+  PyObject * volatile capi_buildvalue = NULL;
+  volatile int f2py_success = 1;
+/*decl*/
+
+  int iopt = 0;
+  PyObject *iopt_capi = Py_None;
+  int m = 0;
+  double *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;
+  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 *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;
+  int k = 0;
+  PyObject *k_capi = Py_None;
+  double s = 0;
+  PyObject *s_capi = Py_None;
+  int nest = 0;
+  int n = 0;
+  double *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;
+  double *c = NULL;
+  npy_intp c_Dims[1] = {-1};
+  const int c_Rank = 1;
+  PyArrayObject *capi_c_tmp = NULL;
+  int capi_c_intent = 0;
+  double fp = 0;
+  double *wrk = NULL;
+  npy_intp wrk_Dims[1] = {-1};
+  const int wrk_Rank = 1;
+  PyArrayObject *capi_wrk_tmp = NULL;
+  int capi_wrk_intent = 0;
+  PyObject *wrk_capi = Py_None;
+  int lwrk = 0;
+  int *iwrk = NULL;
+  npy_intp iwrk_Dims[1] = {-1};
+  const int iwrk_Rank = 1;
+  PyArrayObject *capi_iwrk_tmp = NULL;
+  int capi_iwrk_intent = 0;
+  PyObject *iwrk_capi = Py_None;
+  int ier = 0;
+  static char *capi_kwlist[] = {"iopt","x","y","w","t","wrk","iwrk","k","s",NULL};
+
+/*routdebugenter*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_clock();
+#endif
+  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
+    "OOOOOOO|OO:dfitpack.percur",\
+    capi_kwlist,&iopt_capi,&x_capi,&y_capi,&w_capi,&t_capi,&wrk_capi,&iwrk_capi,&k_capi,&s_capi))
+    return NULL;
+/*frompyobj*/
+  /* Processing variable fp */
+  /* Processing variable iopt */
+    f2py_success = int_from_pyobj(&iopt,iopt_capi,"dfitpack.percur() 1st argument (iopt) can't be converted to int");
+  if (f2py_success) {
+  /* Processing variable k */
+  if (k_capi == Py_None) k = 3; else
+    f2py_success = int_from_pyobj(&k,k_capi,"dfitpack.percur() 1st keyword (k) can't be converted to int");
+  if (f2py_success) {
+  CHECKSCALAR(1<=k && k <=5,"1<=k && k <=5","1st keyword k","percur:k=%d",k) {
+  /* Processing variable ier */
+  /* Processing variable wrk */
+  ;
+  capi_wrk_intent |= F2PY_INTENT_INOUT;
+  capi_wrk_tmp = array_from_pyobj(PyArray_DOUBLE,wrk_Dims,wrk_Rank,capi_wrk_intent,wrk_capi);
+  if (capi_wrk_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 6th argument `wrk' of dfitpack.percur to C/Fortran array" );
+  } else {
+    wrk = (double *)(capi_wrk_tmp->data);
+
+  /* Processing variable s */
+  if (s_capi == Py_None) s = 0.0; else
+    f2py_success = double_from_pyobj(&s,s_capi,"dfitpack.percur() 2nd keyword (s) can't be converted to double");
+  if (f2py_success) {
+  CHECKSCALAR(s>=0.0,"s>=0.0","2nd keyword s","percur:s=%g",s) {
+  /* Processing variable t */
+  ;
+  capi_t_intent |= F2PY_INTENT_INOUT;
+  capi_t_tmp = array_from_pyobj(PyArray_DOUBLE,t_Dims,t_Rank,capi_t_intent,t_capi);
+  if (capi_t_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 5th argument `t' of dfitpack.percur to C/Fortran array" );
+  } else {
+    t = (double *)(capi_t_tmp->data);
+
+  /* Processing variable x */
+  ;
+  capi_x_intent |= F2PY_INTENT_IN;
+  capi_x_tmp = array_from_pyobj(PyArray_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
+  if (capi_x_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 2nd argument `x' of dfitpack.percur to C/Fortran array" );
+  } else {
+    x = (double *)(capi_x_tmp->data);
+
+  /* Processing variable nest */
+  nest = len(t);
+  /* Processing variable iwrk */
+  iwrk_Dims[0]=nest;
+  capi_iwrk_intent |= F2PY_INTENT_INOUT;
+  capi_iwrk_tmp = array_from_pyobj(PyArray_INT,iwrk_Dims,iwrk_Rank,capi_iwrk_intent,iwrk_capi);
+  if (capi_iwrk_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 7th argument `iwrk' of dfitpack.percur to C/Fortran array" );
+  } else {
+    iwrk = (int *)(capi_iwrk_tmp->data);
+
+  /* Processing variable m */
+  m = len(x);
+  CHECKSCALAR(m>k,"m>k","hidden m","percur:m=%d",m) {
+  /* Processing variable lwrk */
+  lwrk = len(wrk);
+  /* Processing variable n */
+  n = nest;
+  /* Processing variable w */
+  w_Dims[0]=m;
+  capi_w_intent |= F2PY_INTENT_IN;
+  capi_w_tmp = array_from_pyobj(PyArray_DOUBLE,w_Dims,w_Rank,capi_w_intent,w_capi);
+  if (capi_w_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 4th argument `w' of dfitpack.percur to C/Fortran array" );
+  } else {
+    w = (double *)(capi_w_tmp->data);
+
+  CHECKARRAY(len(w)==m,"len(w)==m","4th argument w") {
+  /* Processing variable y */
+  y_Dims[0]=m;
+  capi_y_intent |= F2PY_INTENT_IN;
+  capi_y_tmp = array_from_pyobj(PyArray_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi);
+  if (capi_y_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 3rd argument `y' of dfitpack.percur to C/Fortran array" );
+  } else {
+    y = (double *)(capi_y_tmp->data);
+
+  CHECKARRAY(len(y)==m,"len(y)==m","3rd argument y") {
+  /* Processing variable c */
+  c_Dims[0]=n;
+  capi_c_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
+  capi_c_tmp = array_from_pyobj(PyArray_DOUBLE,c_Dims,c_Rank,capi_c_intent,Py_None);
+  if (capi_c_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `c' of dfitpack.percur to C/Fortran array" );
+  } else {
+    c = (double *)(capi_c_tmp->data);
+
+/*end of frompyobj*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_call_clock();
+#endif
+/*callfortranroutine*/
+        (*f2py_func)(&iopt,&m,x,y,w,&k,&s,&nest,&n,t,c,&fp,wrk,&lwrk,iwrk,&ier);
+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("iNdi",n,capi_c_tmp,fp,ier);
+/*closepyobjfrom*/
+/*end of closepyobjfrom*/
+    } /*if (f2py_success) after callfortranroutine*/
+/*cleanupfrompyobj*/
+  }  /*if (capi_c_tmp == NULL) ... else of c*/
+  /* End of cleaning variable c */
+  } /*CHECKARRAY(len(y)==m)*/
+  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 */
+  } /*CHECKARRAY(len(w)==m)*/
+  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 */
+  /* End of cleaning variable n */
+  /* End of cleaning variable lwrk */
+  } /*CHECKSCALAR(m>k)*/
+  /* End of cleaning variable m */
+  if((PyObject *)capi_iwrk_tmp!=iwrk_capi) {
+    Py_XDECREF(capi_iwrk_tmp); }
+  }  /*if (capi_iwrk_tmp == NULL) ... else of iwrk*/
+  /* End of cleaning variable iwrk */
+  /* End of cleaning variable nest */
+  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_t_tmp!=t_capi) {
+    Py_XDECREF(capi_t_tmp); }
+  }  /*if (capi_t_tmp == NULL) ... else of t*/
+  /* End of cleaning variable t */
+  } /*CHECKSCALAR(s>=0.0)*/
+  } /*if (f2py_success) of s*/
+  /* End of cleaning variable s */
+  if((PyObject *)capi_wrk_tmp!=wrk_capi) {
+    Py_XDECREF(capi_wrk_tmp); }
+  }  /*if (capi_wrk_tmp == NULL) ... else of wrk*/
+  /* End of cleaning variable wrk */
+  /* End of cleaning variable ier */
+  } /*CHECKSCALAR(1<=k && k <=5)*/
+  } /*if (f2py_success) of k*/
+  /* End of cleaning variable k */
+  } /*if (f2py_success) of iopt*/
+  /* End of cleaning variable iopt */
+  /* End of cleaning variable fp */
+/*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 percur *******************************/
+
+/*********************************** parcur ***********************************/
+static char doc_f2py_rout_dfitpack_parcur[] = "\
+Function signature:\n\
+  n,c,fp,ier = parcur(iopt,ipar,idim,u,x,w,ub,ue,t,wrk,iwrk,[k,s])\n\
+Required arguments:\n"
+"  iopt : input int\n"
+"  ipar : input int\n"
+"  idim : input int\n"
+"  u : in/output rank-1 array('d') with bounds (m)\n"
+"  x : input rank-1 array('d') with bounds (mx)\n"
+"  w : input rank-1 array('d') with bounds (m)\n"
+"  ub : input float\n"
+"  ue : input float\n"
+"  t : in/output rank-1 array('d') with bounds (nest)\n"
+"  wrk : in/output rank-1 array('d') with bounds (lwrk)\n"
+"  iwrk : in/output rank-1 array('i') with bounds (nest)\n"
+"Optional arguments:\n"
+"  k := 3.0 input int\n"
+"  s := 0.0 input float\n"
+"Return objects:\n"
+"  n : int\n"
+"  c : rank-1 array('d') with bounds (nc)\n"
+"  fp : float\n"
+"  ier : int";
+/* extern void F_FUNC(parcur,PARCUR)(int*,int*,int*,int*,double*,int*,double*,double*,double*,double*,int*,double*,int*,int*,double*,int*,double*,double*,double*,int*,int*,int*); */
+static PyObject *f2py_rout_dfitpack_parcur(const PyObject *capi_self,
+                           PyObject *capi_args,
+                           PyObject *capi_keywds,
+                           void (*f2py_func)(int*,int*,int*,int*,double*,int*,double*,double*,double*,double*,int*,double*,int*,int*,double*,int*,double*,double*,double*,int*,int*,int*)) {
+  PyObject * volatile capi_buildvalue = NULL;
+  volatile int f2py_success = 1;
+/*decl*/
+
+  int iopt = 0;
+  PyObject *iopt_capi = Py_None;
+  int ipar = 0;
+  PyObject *ipar_capi = Py_None;
+  int idim = 0;
+  PyObject *idim_capi = Py_None;
+  int m = 0;
+  double *u = NULL;
+  npy_intp u_Dims[1] = {-1};
+  const int u_Rank = 1;
+  PyArrayObject *capi_u_tmp = NULL;
+  int capi_u_intent = 0;
+  PyObject *u_capi = Py_None;
+  int mx = 0;
+  double *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;
+  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 ub = 0;
+  PyObject *ub_capi = Py_None;
+  double ue = 0;
+  PyObject *ue_capi = Py_None;
+  int k = 0;
+  PyObject *k_capi = Py_None;
+  double s = 0;
+  PyObject *s_capi = Py_None;
+  int nest = 0;
+  int n = 0;
+  double *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;
+  int nc = 0;
+  double *c = NULL;
+  npy_intp c_Dims[1] = {-1};
+  const int c_Rank = 1;
+  PyArrayObject *capi_c_tmp = NULL;
+  int capi_c_intent = 0;
+  double fp = 0;
+  double *wrk = NULL;
+  npy_intp wrk_Dims[1] = {-1};
+  const int wrk_Rank = 1;
+  PyArrayObject *capi_wrk_tmp = NULL;
+  int capi_wrk_intent = 0;
+  PyObject *wrk_capi = Py_None;
+  int lwrk = 0;
+  int *iwrk = NULL;
+  npy_intp iwrk_Dims[1] = {-1};
+  const int iwrk_Rank = 1;
+  PyArrayObject *capi_iwrk_tmp = NULL;
+  int capi_iwrk_intent = 0;
+  PyObject *iwrk_capi = Py_None;
+  int ier = 0;
+  static char *capi_kwlist[] = {"iopt","ipar","idim","u","x","w","ub","ue","t","wrk","iwrk","k","s",NULL};
+
+/*routdebugenter*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_clock();
+#endif
+  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
+    "OOOOOOOOOOO|OO:dfitpack.parcur",\
+    capi_kwlist,&iopt_capi,&ipar_capi,&idim_capi,&u_capi,&x_capi,&w_capi,&ub_capi,&ue_capi,&t_capi,&wrk_capi,&iwrk_capi,&k_capi,&s_capi))
+    return NULL;
+/*frompyobj*/
+  /* Processing variable fp */
+  /* Processing variable ier */
+  /* Processing variable iopt */
+    f2py_success = int_from_pyobj(&iopt,iopt_capi,"dfitpack.parcur() 1st argument (iopt) can't be converted to int");
+  if (f2py_success) {
+  CHECKSCALAR(iopt>=-1 && iopt <= 1,"iopt>=-1 && iopt <= 1","1st argument iopt","parcur:iopt=%d",iopt) {
+  /* Processing variable c */
+  ;
+  capi_c_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
+  capi_c_tmp = array_from_pyobj(PyArray_DOUBLE,c_Dims,c_Rank,capi_c_intent,Py_None);
+  if (capi_c_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `c' of dfitpack.parcur to C/Fortran array" );
+  } else {
+    c = (double *)(capi_c_tmp->data);
+
+  /* Processing variable k */
+  if (k_capi == Py_None) k = 3.0; else
+    f2py_success = int_from_pyobj(&k,k_capi,"dfitpack.parcur() 1st keyword (k) can't be converted to int");
+  if (f2py_success) {
+  CHECKSCALAR(1<=k && k<=5,"1<=k && k<=5","1st keyword k","parcur:k=%d",k) {
+  /* Processing variable wrk */
+  ;
+  capi_wrk_intent |= F2PY_INTENT_INOUT;
+  capi_wrk_tmp = array_from_pyobj(PyArray_DOUBLE,wrk_Dims,wrk_Rank,capi_wrk_intent,wrk_capi);
+  if (capi_wrk_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 10th argument `wrk' of dfitpack.parcur to C/Fortran array" );
+  } else {
+    wrk = (double *)(capi_wrk_tmp->data);
+
+  /* Processing variable s */
+  if (s_capi == Py_None) s = 0.0; else
+    f2py_success = double_from_pyobj(&s,s_capi,"dfitpack.parcur() 2nd keyword (s) can't be converted to double");
+  if (f2py_success) {
+  CHECKSCALAR(s>=0.0,"s>=0.0","2nd keyword s","parcur:s=%g",s) {
+  /* Processing variable u */
+  ;
+  capi_u_intent |= F2PY_INTENT_INOUT;
+  capi_u_tmp = array_from_pyobj(PyArray_DOUBLE,u_Dims,u_Rank,capi_u_intent,u_capi);
+  if (capi_u_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 4th argument `u' of dfitpack.parcur to C/Fortran array" );
+  } else {
+    u = (double *)(capi_u_tmp->data);
+
+  /* Processing variable idim */
+    f2py_success = int_from_pyobj(&idim,idim_capi,"dfitpack.parcur() 3rd argument (idim) can't be converted to int");
+  if (f2py_success) {
+  CHECKSCALAR(idim > 0 && idim < 11,"idim > 0 && idim < 11","3rd argument idim","parcur:idim=%d",idim) {
+  /* Processing variable ipar */
+    f2py_success = int_from_pyobj(&ipar,ipar_capi,"dfitpack.parcur() 2nd argument (ipar) can't be converted to int");
+  if (f2py_success) {
+  CHECKSCALAR(ipar == 1 || ipar == 0,"ipar == 1 || ipar == 0","2nd argument ipar","parcur:ipar=%d",ipar) {
+  /* Processing variable ue */
+    f2py_success = double_from_pyobj(&ue,ue_capi,"dfitpack.parcur() 8th argument (ue) can't be converted to double");
+  if (f2py_success) {
+  /* Processing variable x */
+  ;
+  capi_x_intent |= F2PY_INTENT_IN;
+  capi_x_tmp = array_from_pyobj(PyArray_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
+  if (capi_x_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 5th argument `x' of dfitpack.parcur to C/Fortran array" );
+  } else {
+    x = (double *)(capi_x_tmp->data);
+
+  /* Processing variable ub */
+    f2py_success = double_from_pyobj(&ub,ub_capi,"dfitpack.parcur() 7th argument (ub) can't be converted to double");
+  if (f2py_success) {
+  /* Processing variable t */
+  ;
+  capi_t_intent |= F2PY_INTENT_INOUT;
+  capi_t_tmp = array_from_pyobj(PyArray_DOUBLE,t_Dims,t_Rank,capi_t_intent,t_capi);
+  if (capi_t_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 9th argument `t' of dfitpack.parcur to C/Fortran array" );
+  } else {
+    t = (double *)(capi_t_tmp->data);
+
+  /* Processing variable nest */
+  nest = len(t);
+  /* Processing variable iwrk */
+  iwrk_Dims[0]=nest;
+  capi_iwrk_intent |= F2PY_INTENT_INOUT;
+  capi_iwrk_tmp = array_from_pyobj(PyArray_INT,iwrk_Dims,iwrk_Rank,capi_iwrk_intent,iwrk_capi);
+  if (capi_iwrk_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 11st argument `iwrk' of dfitpack.parcur to C/Fortran array" );
+  } else {
+    iwrk = (int *)(capi_iwrk_tmp->data);
+
+  /* Processing variable nc */
+  nc = len(c);
+  CHECKSCALAR(nc>=idim*nest,"nc>=idim*nest","hidden nc","parcur:nc=%d",nc) {
+  /* Processing variable m */
+  m = len(u);
+  CHECKSCALAR(m>k,"m>k","hidden m","parcur:m=%d",m) {
+  /* Processing variable lwrk */
+  lwrk = len(wrk);
+  /* Processing variable n */
+  n = nest;
+  /* Processing variable mx */
+  mx = len(x);
+  CHECKSCALAR(mx>=idim*m,"mx>=idim*m","hidden mx","parcur:mx=%d",mx) {
+  /* Processing variable w */
+  w_Dims[0]=m;
+  capi_w_intent |= F2PY_INTENT_IN;
+  capi_w_tmp = array_from_pyobj(PyArray_DOUBLE,w_Dims,w_Rank,capi_w_intent,w_capi);
+  if (capi_w_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 6th argument `w' of dfitpack.parcur to C/Fortran array" );
+  } else {
+    w = (double *)(capi_w_tmp->data);
+
+/*end of frompyobj*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_call_clock();
+#endif
+/*callfortranroutine*/
+        (*f2py_func)(&iopt,&ipar,&idim,&m,u,&mx,x,w,&ub,&ue,&k,&s,&nest,&n,t,&nc,c,&fp,wrk,&lwrk,iwrk,&ier);
+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("iNdi",n,capi_c_tmp,fp,ier);
+/*closepyobjfrom*/
+/*end of closepyobjfrom*/
+    } /*if (f2py_success) after callfortranroutine*/
+/*cleanupfrompyobj*/
+  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 */
+  } /*CHECKSCALAR(mx>=idim*m)*/
+  /* End of cleaning variable mx */
+  /* End of cleaning variable n */
+  /* End of cleaning variable lwrk */
+  } /*CHECKSCALAR(m>k)*/
+  /* End of cleaning variable m */
+  } /*CHECKSCALAR(nc>=idim*nest)*/
+  /* End of cleaning variable nc */
+  if((PyObject *)capi_iwrk_tmp!=iwrk_capi) {
+    Py_XDECREF(capi_iwrk_tmp); }
+  }  /*if (capi_iwrk_tmp == NULL) ... else of iwrk*/
+  /* End of cleaning variable iwrk */
+  /* End of cleaning variable nest */
+  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 */
+  } /*if (f2py_success) of ub*/
+  /* End of cleaning variable ub */
+  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 (f2py_success) of ue*/
+  /* End of cleaning variable ue */
+  } /*CHECKSCALAR(ipar == 1 || ipar == 0)*/
+  } /*if (f2py_success) of ipar*/
+  /* End of cleaning variable ipar */
+  } /*CHECKSCALAR(idim > 0 && idim < 11)*/
+  } /*if (f2py_success) of idim*/
+  /* End of cleaning variable idim */
+  if((PyObject *)capi_u_tmp!=u_capi) {
+    Py_XDECREF(capi_u_tmp); }
+  }  /*if (capi_u_tmp == NULL) ... else of u*/
+  /* End of cleaning variable u */
+  } /*CHECKSCALAR(s>=0.0)*/
+  } /*if (f2py_success) of s*/
+  /* End of cleaning variable s */
+  if((PyObject *)capi_wrk_tmp!=wrk_capi) {
+    Py_XDECREF(capi_wrk_tmp); }
+  }  /*if (capi_wrk_tmp == NULL) ... else of wrk*/
+  /* End of cleaning variable wrk */
+  } /*CHECKSCALAR(1<=k && k<=5)*/
+  } /*if (f2py_success) of k*/
+  /* End of cleaning variable k */
+  }  /*if (capi_c_tmp == NULL) ... else of c*/
+  /* End of cleaning variable c */
+  } /*CHECKSCALAR(iopt>=-1 && iopt <= 1)*/
+  } /*if (f2py_success) of iopt*/
+  /* End of cleaning variable iopt */
+  /* End of cleaning variable ier */
+  /* End of cleaning variable fp */
+/*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 parcur *******************************/
+
+/********************************** fpcurf0 **********************************/
+static char doc_f2py_rout_dfitpack_fpcurf0[] = "\
+Function signature:\n\
+  x,y,w,xb,xe,k,s,n,t,c,fp,fpint,nrdata,ier = fpcurf0(x,y,k,[w,xb,xe,s,nest])\n\
+Required arguments:\n"
+"  x : input rank-1 array('d') with bounds (m)\n"
+"  y : input rank-1 array('d') with bounds (m)\n"
+"  k : input int\n"
+"Optional arguments:\n"
+"  w := 1.0 input rank-1 array('d') with bounds (m)\n"
+"  xb := x[0] input float\n"
+"  xe := x[m-1] input float\n"
+"  s := m input float\n"
+"  nest := (s==0.0?m+k+1:MAX(m/2,2*k1)) input int\n"
+"Return objects:\n"
+"  x : rank-1 array('d') with bounds (m)\n"
+"  y : rank-1 array('d') with bounds (m)\n"
+"  w : rank-1 array('d') with bounds (m)\n"
+"  xb : float\n"
+"  xe : float\n"
+"  k : int\n"
+"  s : float\n"
+"  n : int\n"
+"  t : rank-1 array('d') with bounds (nest)\n"
+"  c : rank-1 array('d') with bounds (nest)\n"
+"  fp : float\n"
+"  fpint : rank-1 array('d') with bounds (nest)\n"
+"  nrdata : rank-1 array('i') with bounds (nest)\n"
+"  ier : int";
+/* extern void F_FUNC(fpcurf,FPCURF)(int*,double*,double*,double*,int*,double*,double*,int*,double*,int*,double*,int*,int*,int*,int*,double*,double*,double*,double*,double*,double*,double*,double*,double*,int*,int*); */
+static PyObject *f2py_rout_dfitpack_fpcurf0(const PyObject *capi_self,
+                           PyObject *capi_args,
+                           PyObject *capi_keywds,
+                           void (*f2py_func)(int*,double*,double*,double*,int*,double*,double*,int*,double*,int*,double*,int*,int*,int*,int*,double*,double*,double*,double*,double*,double*,double*,double*,double*,int*,int*)) {
+  PyObject * volatile capi_buildvalue = NULL;
+  volatile int f2py_success = 1;
+/*decl*/
+
+  int iopt = 0;
+  double *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;
+  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 *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;
+  int m = 0;
+  double xb = 0;
+  PyObject *xb_capi = Py_None;
+  double xe = 0;
+  PyObject *xe_capi = Py_None;
+  int k = 0;
+  PyObject *k_capi = Py_None;
+  double s = 0;
+  PyObject *s_capi = Py_None;
+  int nest = 0;
+  PyObject *nest_capi = Py_None;
+  double tol = 0;
+  int maxit = 0;
+  int k1 = 0;
+  int k2 = 0;
+  int n = 0;
+  double *t = NULL;
+  npy_intp t_Dims[1] = {-1};
+  const int t_Rank = 1;
+  PyArrayObject *capi_t_tmp = NULL;
+  int capi_t_intent = 0;
+  double *c = NULL;
+  npy_intp c_Dims[1] = {-1};
+  const int c_Rank = 1;
+  PyArrayObject *capi_c_tmp = NULL;
+  int capi_c_intent = 0;
+  double fp = 0;
+  double *fpint = NULL;
+  npy_intp fpint_Dims[1] = {-1};
+  const int fpint_Rank = 1;
+  PyArrayObject *capi_fpint_tmp = NULL;
+  int capi_fpint_intent = 0;
+  double *wrk = NULL;
+  npy_intp wrk_Dims[1] = {-1};
+  const int wrk_Rank = 1;
+  PyArrayObject *capi_wrk_tmp = NULL;
+  int capi_wrk_intent = 0;
+  int *nrdata = NULL;
+  npy_intp nrdata_Dims[1] = {-1};
+  const int nrdata_Rank = 1;
+  PyArrayObject *capi_nrdata_tmp = NULL;
+  int capi_nrdata_intent = 0;
+  int ier = 0;
+  static char *capi_kwlist[] = {"x","y","k","w","xb","xe","s","nest",NULL};
+
+/*routdebugenter*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_clock();
+#endif
+  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
+    "OOO|OOOOO:dfitpack.fpcurf0",\
+    capi_kwlist,&x_capi,&y_capi,&k_capi,&w_capi,&xb_capi,&xe_capi,&s_capi,&nest_capi))
+    return NULL;
+/*frompyobj*/
+  /* Processing variable fp */
+  /* Processing variable maxit */
+  maxit = 20;
+  /* Processing variable k */
+    f2py_success = int_from_pyobj(&k,k_capi,"dfitpack.fpcurf0() 3rd argument (k) can't be converted to int");
+  if (f2py_success) {
+  CHECKSCALAR(1<=k && k<=5,"1<=k && k<=5","3rd argument k","fpcurf0:k=%d",k) {
+  /* Processing variable ier */
+  /* Processing variable n */
+  /* Processing variable tol */
+  tol = 0.001;
+  /* Processing variable x */
+  ;
+  capi_x_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
+  capi_x_tmp = array_from_pyobj(PyArray_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
+  if (capi_x_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 1st argument `x' of dfitpack.fpcurf0 to C/Fortran array" );
+  } else {
+    x = (double *)(capi_x_tmp->data);
+
+  /* Processing variable iopt */
+  iopt = 0;
+  /* Processing variable xb */
+  if (xb_capi == Py_None) xb = x[0]; else
+    f2py_success = double_from_pyobj(&xb,xb_capi,"dfitpack.fpcurf0() 2nd keyword (xb) can't be converted to double");
+  if (f2py_success) {
+  CHECKSCALAR(xb<=x[0],"xb<=x[0]","2nd keyword xb","fpcurf0:xb=%g",xb) {
+  /* Processing variable m */
+  m = len(x);
+  CHECKSCALAR(m>k,"m>k","hidden m","fpcurf0:m=%d",m) {
+  /* Processing variable k2 */
+  k2 = k+2;
+  /* Processing variable k1 */
+  k1 = k+1;
+  /* Processing variable y */
+  y_Dims[0]=m;
+  capi_y_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
+  capi_y_tmp = array_from_pyobj(PyArray_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi);
+  if (capi_y_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 2nd argument `y' of dfitpack.fpcurf0 to C/Fortran array" );
+  } else {
+    y = (double *)(capi_y_tmp->data);
+
+  CHECKARRAY(len(y)==m,"len(y)==m","2nd argument y") {
+  /* Processing variable w */
+  w_Dims[0]=m;
+  capi_w_intent |= F2PY_INTENT_IN|F2PY_OPTIONAL|F2PY_INTENT_OUT;
+  capi_w_tmp = array_from_pyobj(PyArray_DOUBLE,w_Dims,w_Rank,capi_w_intent,w_capi);
+  if (capi_w_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 1st keyword `w' of dfitpack.fpcurf0 to C/Fortran array" );
+  } else {
+    w = (double *)(capi_w_tmp->data);
+
+  if (w_capi == Py_None) {
+
+
+    int *_i,capi_i=0;
+    CFUNCSMESS("fpcurf0: Initializing w=1.0\n");
+    if (initforcomb(capi_w_tmp->dimensions,capi_w_tmp->nd,1)) {
+      while ((_i = nextforcomb()))
+        w[capi_i++] = 1.0; /* fortran way */
+    } else {
+      if (!PyErr_Occurred())
+        PyErr_SetString(dfitpack_error,"Initialization of 1st keyword w failed (initforcomb).");
+      f2py_success = 0;
+    }
+  }
+  if (f2py_success) {
+  CHECKARRAY(len(w)==m,"len(w)==m","1st keyword w") {
+  /* Processing variable s */
+  if (s_capi == Py_None) s = m; else
+    f2py_success = double_from_pyobj(&s,s_capi,"dfitpack.fpcurf0() 4th keyword (s) can't be converted to double");
+  if (f2py_success) {
+  CHECKSCALAR(s>=0.0,"s>=0.0","4th keyword s","fpcurf0:s=%g",s) {
+  /* Processing variable nest */
+  if (nest_capi == Py_None) nest = (s==0.0?m+k+1:MAX(m/2,2*k1)); else
+    f2py_success = int_from_pyobj(&nest,nest_capi,"dfitpack.fpcurf0() 5th keyword (nest) can't be converted to int");
+  if (f2py_success) {
+  CHECKSCALAR(nest>=2*k1,"nest>=2*k1","5th keyword nest","fpcurf0:nest=%d",nest) {
+  /* Processing variable xe */
+  if (xe_capi == Py_None) xe = x[m-1]; else
+    f2py_success = double_from_pyobj(&xe,xe_capi,"dfitpack.fpcurf0() 3rd keyword (xe) can't be converted to double");
+  if (f2py_success) {
+  CHECKSCALAR(xe>=x[m-1],"xe>=x[m-1]","3rd keyword xe","fpcurf0:xe=%g",xe) {
+  /* Processing variable nrdata */
+  nrdata_Dims[0]=nest;
+  capi_nrdata_intent |= F2PY_INTENT_CACHE|F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
+  capi_nrdata_tmp = array_from_pyobj(PyArray_INT,nrdata_Dims,nrdata_Rank,capi_nrdata_intent,Py_None);
+  if (capi_nrdata_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `nrdata' of dfitpack.fpcurf0 to C/Fortran array" );
+  } else {
+    nrdata = (int *)(capi_nrdata_tmp->data);
+
+  /* Processing variable fpint */
+  fpint_Dims[0]=nest;
+  capi_fpint_intent |= F2PY_INTENT_CACHE|F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
+  capi_fpint_tmp = array_from_pyobj(PyArray_DOUBLE,fpint_Dims,fpint_Rank,capi_fpint_intent,Py_None);
+  if (capi_fpint_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `fpint' of dfitpack.fpcurf0 to C/Fortran array" );
+  } else {
+    fpint = (double *)(capi_fpint_tmp->data);
+
+  /* Processing variable c */
+  c_Dims[0]=nest;
+  capi_c_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
+  capi_c_tmp = array_from_pyobj(PyArray_DOUBLE,c_Dims,c_Rank,capi_c_intent,Py_None);
+  if (capi_c_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `c' of dfitpack.fpcurf0 to C/Fortran array" );
+  } else {
+    c = (double *)(capi_c_tmp->data);
+
+  /* Processing variable wrk */
+  wrk_Dims[0]=nest*3*k2+m*k1;
+  capi_wrk_intent |= F2PY_INTENT_CACHE|F2PY_INTENT_HIDE;
+  capi_wrk_tmp = array_from_pyobj(PyArray_DOUBLE,wrk_Dims,wrk_Rank,capi_wrk_intent,Py_None);
+  if (capi_wrk_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `wrk' of dfitpack.fpcurf0 to C/Fortran array" );
+  } else {
+    wrk = (double *)(capi_wrk_tmp->data);
+
+  /* Processing variable t */
+  t_Dims[0]=nest;
+  capi_t_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
+  capi_t_tmp = array_from_pyobj(PyArray_DOUBLE,t_Dims,t_Rank,capi_t_intent,Py_None);
+  if (capi_t_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `t' of dfitpack.fpcurf0 to C/Fortran array" );
+  } else {
+    t = (double *)(capi_t_tmp->data);
+
+/*end of frompyobj*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_call_clock();
+#endif
+/*callfortranroutine*/
+        (*f2py_func)(&iopt,x,y,w,&m,&xb,&xe,&k,&s,&nest,&tol,&maxit,&k1,&k2,&n,t,c,&fp,fpint,wrk,wrk+nest,wrk+nest*k2,wrk+nest*2*k2,wrk+nest*3*k2,nrdata,&ier);
+        /*(*f2py_func)(&iopt,x,y,w,&m,&xb,&xe,&k,&s,&nest,&tol,&maxit,&k1,&k2,&n,t,c,&fp,fpint,wrk,nrdata,&ier);*/
+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("NNNddidiNNdNNi",capi_x_tmp,capi_y_tmp,capi_w_tmp,xb,xe,k,s,n,capi_t_tmp,capi_c_tmp,fp,capi_fpint_tmp,capi_nrdata_tmp,ier);
+/*closepyobjfrom*/
+/*end of closepyobjfrom*/
+    } /*if (f2py_success) after callfortranroutine*/
+/*cleanupfrompyobj*/
+  }  /*if (capi_t_tmp == NULL) ... else of t*/
+  /* End of cleaning variable t */
+    Py_XDECREF(capi_wrk_tmp);
+  }  /*if (capi_wrk_tmp == NULL) ... else of wrk*/
+  /* End of cleaning variable wrk */
+  }  /*if (capi_c_tmp == NULL) ... else of c*/
+  /* End of cleaning variable c */
+  }  /*if (capi_fpint_tmp == NULL) ... else of fpint*/
+  /* End of cleaning variable fpint */
+  }  /*if (capi_nrdata_tmp == NULL) ... else of nrdata*/
+  /* End of cleaning variable nrdata */
+  } /*CHECKSCALAR(xe>=x[m-1])*/
+  } /*if (f2py_success) of xe*/
+  /* End of cleaning variable xe */
+  } /*CHECKSCALAR(nest>=2*k1)*/
+  } /*if (f2py_success) of nest*/
+  /* End of cleaning variable nest */
+  } /*CHECKSCALAR(s>=0.0)*/
+  } /*if (f2py_success) of s*/
+  /* End of cleaning variable s */
+  } /*CHECKARRAY(len(w)==m)*/
+  }  /*if (f2py_success) of w init*/
+  }  /*if (capi_w_tmp == NULL) ... else of w*/
+  /* End of cleaning variable w */
+  } /*CHECKARRAY(len(y)==m)*/
+  }  /*if (capi_y_tmp == NULL) ... else of y*/
+  /* End of cleaning variable y */
+  /* End of cleaning variable k1 */
+  /* End of cleaning variable k2 */
+  } /*CHECKSCALAR(m>k)*/
+  /* End of cleaning variable m */
+  } /*CHECKSCALAR(xb<=x[0])*/
+  } /*if (f2py_success) of xb*/
+  /* End of cleaning variable xb */
+  /* End of cleaning variable iopt */
+  }  /*if (capi_x_tmp == NULL) ... else of x*/
+  /* End of cleaning variable x */
+  /* End of cleaning variable tol */
+  /* End of cleaning variable n */
+  /* End of cleaning variable ier */
+  } /*CHECKSCALAR(1<=k && k<=5)*/
+  } /*if (f2py_success) of k*/
+  /* End of cleaning variable k */
+  /* End of cleaning variable maxit */
+  /* End of cleaning variable fp */
+/*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 fpcurf0 *******************************/
+
+/********************************** fpcurf1 **********************************/
+static char doc_f2py_rout_dfitpack_fpcurf1[] = "\
+Function signature:\n\
+  x,y,w,xb,xe,k,s,n,t,c,fp,fpint,nrdata,ier = fpcurf1(x,y,w,xb,xe,k,s,n,t,c,fp,fpint,nrdata,ier,[overwrite_x,overwrite_y,overwrite_w,overwrite_t,overwrite_c,overwrite_fpint,overwrite_nrdata])\n\
+Required arguments:\n"
+"  x : input rank-1 array('d') with bounds (m)\n"
+"  y : input rank-1 array('d') with bounds (m)\n"
+"  w : input rank-1 array('d') with bounds (m)\n"
+"  xb : input float\n"
+"  xe : input float\n"
+"  k : input int\n"
+"  s : input float\n"
+"  n : input int\n"
+"  t : input rank-1 array('d') with bounds (nest)\n"
+"  c : input rank-1 array('d') with bounds (nest)\n"
+"  fp : input float\n"
+"  fpint : input rank-1 array('d') with bounds (nest)\n"
+"  nrdata : input rank-1 array('i') with bounds (nest)\n"
+"  ier : input int\n"
+"Optional arguments:\n"
+"  overwrite_x := 1 input int\n"
+"  overwrite_y := 1 input int\n"
+"  overwrite_w := 1 input int\n"
+"  overwrite_t := 1 input int\n"
+"  overwrite_c := 1 input int\n"
+"  overwrite_fpint := 1 input int\n"
+"  overwrite_nrdata := 1 input int\n"
+"Return objects:\n"
+"  x : rank-1 array('d') with bounds (m)\n"
+"  y : rank-1 array('d') with bounds (m)\n"
+"  w : rank-1 array('d') with bounds (m)\n"
+"  xb : float\n"
+"  xe : float\n"
+"  k : int\n"
+"  s : float\n"
+"  n : int\n"
+"  t : rank-1 array('d') with bounds (nest)\n"
+"  c : rank-1 array('d') with bounds (nest)\n"
+"  fp : float\n"
+"  fpint : rank-1 array('d') with bounds (nest)\n"
+"  nrdata : rank-1 array('i') with bounds (nest)\n"
+"  ier : int";
+/* extern void F_FUNC(fpcurf,FPCURF)(int*,double*,double*,double*,int*,double*,double*,int*,double*,int*,double*,int*,int*,int*,int*,double*,double*,double*,double*,double*,double*,double*,double*,double*,int*,int*); */
+static PyObject *f2py_rout_dfitpack_fpcurf1(const PyObject *capi_self,
+                           PyObject *capi_args,
+                           PyObject *capi_keywds,
+                           void (*f2py_func)(int*,double*,double*,double*,int*,double*,double*,int*,double*,int*,double*,int*,int*,int*,int*,double*,double*,double*,double*,double*,double*,double*,double*,double*,int*,int*)) {
+  PyObject * volatile capi_buildvalue = NULL;
+  volatile int f2py_success = 1;
+/*decl*/
+
+  int iopt = 0;
+  double *x = NULL;
+  npy_intp x_Dims[1] = {-1};
+  const int x_Rank = 1;
+  PyArrayObject *capi_x_tmp = NULL;
+  int capi_x_intent = 0;
+  int capi_overwrite_x = 1;
+  PyObject *x_capi = Py_None;
+  double *y = NULL;
+  npy_intp y_Dims[1] = {-1};
+  const int y_Rank = 1;
+  PyArrayObject *capi_y_tmp = NULL;
+  int capi_y_intent = 0;
+  int capi_overwrite_y = 1;
+  PyObject *y_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;
+  int capi_overwrite_w = 1;
+  PyObject *w_capi = Py_None;
+  int m = 0;
+  double xb = 0;
+  PyObject *xb_capi = Py_None;
+  double xe = 0;
+  PyObject *xe_capi = Py_None;
+  int k = 0;
+  PyObject *k_capi = Py_None;
+  double s = 0;
+  PyObject *s_capi = Py_None;
+  int nest = 0;
+  double tol = 0;
+  int maxit = 0;
+  int k1 = 0;
+  int k2 = 0;
+  int n = 0;
+  PyObject *n_capi = Py_None;
+  double *t = NULL;
+  npy_intp t_Dims[1] = {-1};
+  const int t_Rank = 1;
+  PyArrayObject *capi_t_tmp = NULL;
+  int capi_t_intent = 0;
+  int capi_overwrite_t = 1;
+  PyObject *t_capi = Py_None;
+  double *c = NULL;
+  npy_intp c_Dims[1] = {-1};
+  const int c_Rank = 1;
+  PyArrayObject *capi_c_tmp = NULL;
+  int capi_c_intent = 0;
+  int capi_overwrite_c = 1;
+  PyObject *c_capi = Py_None;
+  double fp = 0;
+  PyObject *fp_capi = Py_None;
+  double *fpint = NULL;
+  npy_intp fpint_Dims[1] = {-1};
+  const int fpint_Rank = 1;
+  PyArrayObject *capi_fpint_tmp = NULL;
+  int capi_fpint_intent = 0;
+  int capi_overwrite_fpint = 1;
+  PyObject *fpint_capi = Py_None;
+  double *wrk = NULL;
+  npy_intp wrk_Dims[1] = {-1};
+  const int wrk_Rank = 1;
+  PyArrayObject *capi_wrk_tmp = NULL;
+  int capi_wrk_intent = 0;
+  int *nrdata = NULL;
+  npy_intp nrdata_Dims[1] = {-1};
+  const int nrdata_Rank = 1;
+  PyArrayObject *capi_nrdata_tmp = NULL;
+  int capi_nrdata_intent = 0;
+  int capi_overwrite_nrdata = 1;
+  PyObject *nrdata_capi = Py_None;
+  int ier = 0;
+  PyObject *ier_capi = Py_None;
+  static char *capi_kwlist[] = {"x","y","w","xb","xe","k","s","n","t","c","fp","fpint","nrdata","ier","overwrite_x","overwrite_y","overwrite_w","overwrite_t","overwrite_c","overwrite_fpint","overwrite_nrdata",NULL};
+
+/*routdebugenter*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_clock();
+#endif
+  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
+    "OOOOOOOOOOOOOO|iiiiiii:dfitpack.fpcurf1",\
+    capi_kwlist,&x_capi,&y_capi,&w_capi,&xb_capi,&xe_capi,&k_capi,&s_capi,&n_capi,&t_capi,&c_capi,&fp_capi,&fpint_capi,&nrdata_capi,&ier_capi,&capi_overwrite_x,&capi_overwrite_y,&capi_overwrite_w,&capi_overwrite_t,&capi_overwrite_c,&capi_overwrite_fpint,&capi_overwrite_nrdata))
+    return NULL;
+/*frompyobj*/
+  /* Processing variable fp */
+    f2py_success = double_from_pyobj(&fp,fp_capi,"dfitpack.fpcurf1() 11st argument (fp) can't be converted to double");
+  if (f2py_success) {
+  /* Processing variable xb */
+    f2py_success = double_from_pyobj(&xb,xb_capi,"dfitpack.fpcurf1() 4th argument (xb) can't be converted to double");
+  if (f2py_success) {
+  /* Processing variable s */
+    f2py_success = double_from_pyobj(&s,s_capi,"dfitpack.fpcurf1() 7th argument (s) can't be converted to double");
+  if (f2py_success) {
+  CHECKSCALAR(s>=0.0,"s>=0.0","7th argument s","fpcurf1:s=%g",s) {
+  /* Processing variable xe */
+    f2py_success = double_from_pyobj(&xe,xe_capi,"dfitpack.fpcurf1() 5th argument (xe) can't be converted to double");
+  if (f2py_success) {
+  /* Processing variable maxit */
+  maxit = 20;
+  /* Processing variable k */
+    f2py_success = int_from_pyobj(&k,k_capi,"dfitpack.fpcurf1() 6th argument (k) can't be converted to int");
+  if (f2py_success) {
+  CHECKSCALAR(1<=k && k<=5,"1<=k && k<=5","6th argument k","fpcurf1:k=%d",k) {
+  /* Processing variable ier */
+    f2py_success = int_from_pyobj(&ier,ier_capi,"dfitpack.fpcurf1() 14th argument (ier) can't be converted to int");
+  if (f2py_success) {
+  /* Processing variable n */
+    f2py_success = int_from_pyobj(&n,n_capi,"dfitpack.fpcurf1() 8th argument (n) can't be converted to int");
+  if (f2py_success) {
+  /* Processing variable t */
+  capi_t_intent |= (capi_overwrite_t?0:F2PY_INTENT_COPY);
+  ;
+  capi_t_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
+  capi_t_tmp = array_from_pyobj(PyArray_DOUBLE,t_Dims,t_Rank,capi_t_intent,t_capi);
+  if (capi_t_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 9th argument `t' of dfitpack.fpcurf1 to C/Fortran array" );
+  } else {
+    t = (double *)(capi_t_tmp->data);
+
+  /* Processing variable tol */
+  tol = 0.001;
+  /* Processing variable x */
+  capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY);
+  ;
+  capi_x_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
+  capi_x_tmp = array_from_pyobj(PyArray_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
+  if (capi_x_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 1st argument `x' of dfitpack.fpcurf1 to C/Fortran array" );
+  } else {
+    x = (double *)(capi_x_tmp->data);
+
+  /* Processing variable iopt */
+  iopt = 1;
+  /* Processing variable nest */
+  nest = len(t);
+  /* Processing variable nrdata */
+  capi_nrdata_intent |= (capi_overwrite_nrdata?0:F2PY_INTENT_COPY);
+  nrdata_Dims[0]=nest;
+  capi_nrdata_intent |= F2PY_INTENT_CACHE|F2PY_INTENT_IN|F2PY_INTENT_OUT;
+  capi_nrdata_tmp = array_from_pyobj(PyArray_INT,nrdata_Dims,nrdata_Rank,capi_nrdata_intent,nrdata_capi);
+  if (capi_nrdata_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 13rd argument `nrdata' of dfitpack.fpcurf1 to C/Fortran array" );
+  } else {
+    nrdata = (int *)(capi_nrdata_tmp->data);
+
+  CHECKARRAY(len(nrdata)==nest,"len(nrdata)==nest","13rd argument nrdata") {
+  /* Processing variable fpint */
+  capi_fpint_intent |= (capi_overwrite_fpint?0:F2PY_INTENT_COPY);
+  fpint_Dims[0]=nest;
+  capi_fpint_intent |= F2PY_INTENT_CACHE|F2PY_INTENT_IN|F2PY_INTENT_OUT;
+  capi_fpint_tmp = array_from_pyobj(PyArray_DOUBLE,fpint_Dims,fpint_Rank,capi_fpint_intent,fpint_capi);
+  if (capi_fpint_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 12nd argument `fpint' of dfitpack.fpcurf1 to C/Fortran array" );
+  } else {
+    fpint = (double *)(capi_fpint_tmp->data);
+
+  CHECKARRAY(len(fpint)==nest,"len(fpint)==nest","12nd argument fpint") {
+  /* Processing variable c */
+  capi_c_intent |= (capi_overwrite_c?0:F2PY_INTENT_COPY);
+  c_Dims[0]=nest;
+  capi_c_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
+  capi_c_tmp = array_from_pyobj(PyArray_DOUBLE,c_Dims,c_Rank,capi_c_intent,c_capi);
+  if (capi_c_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 10th argument `c' of dfitpack.fpcurf1 to C/Fortran array" );
+  } else {
+    c = (double *)(capi_c_tmp->data);
+
+  CHECKARRAY(len(c)==nest,"len(c)==nest","10th argument c") {
+  /* Processing variable m */
+  m = len(x);
+  CHECKSCALAR(m>k,"m>k","hidden m","fpcurf1:m=%d",m) {
+  /* Processing variable k2 */
+  k2 = k+2;
+  /* Processing variable k1 */
+  k1 = k+1;
+  /* Processing variable y */
+  capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY);
+  y_Dims[0]=m;
+  capi_y_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
+  capi_y_tmp = array_from_pyobj(PyArray_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi);
+  if (capi_y_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 2nd argument `y' of dfitpack.fpcurf1 to C/Fortran array" );
+  } else {
+    y = (double *)(capi_y_tmp->data);
+
+  CHECKARRAY(len(y)==m,"len(y)==m","2nd argument y") {
+  /* Processing variable w */
+  capi_w_intent |= (capi_overwrite_w?0:F2PY_INTENT_COPY);
+  w_Dims[0]=m;
+  capi_w_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
+  capi_w_tmp = array_from_pyobj(PyArray_DOUBLE,w_Dims,w_Rank,capi_w_intent,w_capi);
+  if (capi_w_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 3rd argument `w' of dfitpack.fpcurf1 to C/Fortran array" );
+  } else {
+    w = (double *)(capi_w_tmp->data);
+
+  CHECKARRAY(len(w)==m,"len(w)==m","3rd argument w") {
+  /* Processing variable wrk */
+  wrk_Dims[0]=nest*3*k2+m*k1;
+  capi_wrk_intent |= F2PY_INTENT_CACHE|F2PY_INTENT_HIDE;
+  capi_wrk_tmp = array_from_pyobj(PyArray_DOUBLE,wrk_Dims,wrk_Rank,capi_wrk_intent,Py_None);
+  if (capi_wrk_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `wrk' of dfitpack.fpcurf1 to C/Fortran array" );
+  } else {
+    wrk = (double *)(capi_wrk_tmp->data);
+
+/*end of frompyobj*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_call_clock();
+#endif
+/*callfortranroutine*/
+        (*f2py_func)(&iopt,x,y,w,&m,&xb,&xe,&k,&s,&nest,&tol,&maxit,&k1,&k2,&n,t,c,&fp,fpint,wrk,wrk+nest,wrk+nest*k2,wrk+nest*2*k2,wrk+nest*3*k2,nrdata,&ier);
+        /*(*f2py_func)(&iopt,x,y,w,&m,&xb,&xe,&k,&s,&nest,&tol,&maxit,&k1,&k2,&n,t,c,&fp,fpint,wrk,nrdata,&ier);*/
+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("NNNddidiNNdNNi",capi_x_tmp,capi_y_tmp,capi_w_tmp,xb,xe,k,s,n,capi_t_tmp,capi_c_tmp,fp,capi_fpint_tmp,capi_nrdata_tmp,ier);
+/*closepyobjfrom*/
+/*end of closepyobjfrom*/
+    } /*if (f2py_success) after callfortranroutine*/
+/*cleanupfrompyobj*/
+    Py_XDECREF(capi_wrk_tmp);
+  }  /*if (capi_wrk_tmp == NULL) ... else of wrk*/
+  /* End of cleaning variable wrk */
+  } /*CHECKARRAY(len(w)==m)*/
+  }  /*if (capi_w_tmp == NULL) ... else of w*/
+  /* End of cleaning variable w */
+  } /*CHECKARRAY(len(y)==m)*/
+  }  /*if (capi_y_tmp == NULL) ... else of y*/
+  /* End of cleaning variable y */
+  /* End of cleaning variable k1 */
+  /* End of cleaning variable k2 */
+  } /*CHECKSCALAR(m>k)*/
+  /* End of cleaning variable m */
+  } /*CHECKARRAY(len(c)==nest)*/
+  }  /*if (capi_c_tmp == NULL) ... else of c*/
+  /* End of cleaning variable c */
+  } /*CHECKARRAY(len(fpint)==nest)*/
+  }  /*if (capi_fpint_tmp == NULL) ... else of fpint*/
+  /* End of cleaning variable fpint */
+  } /*CHECKARRAY(len(nrdata)==nest)*/
+  }  /*if (capi_nrdata_tmp == NULL) ... else of nrdata*/
+  /* End of cleaning variable nrdata */
+  /* End of cleaning variable nest */
+  /* End of cleaning variable iopt */
+  }  /*if (capi_x_tmp == NULL) ... else of x*/
+  /* End of cleaning variable x */
+  /* End of cleaning variable tol */
+  }  /*if (capi_t_tmp == NULL) ... else of t*/
+  /* End of cleaning variable t */
+  } /*if (f2py_success) of n*/
+  /* End of cleaning variable n */
+  } /*if (f2py_success) of ier*/
+  /* End of cleaning variable ier */
+  } /*CHECKSCALAR(1<=k && k<=5)*/
+  } /*if (f2py_success) of k*/
+  /* End of cleaning variable k */
+  /* End of cleaning variable maxit */
+  } /*if (f2py_success) of xe*/
+  /* End of cleaning variable xe */
+  } /*CHECKSCALAR(s>=0.0)*/
+  } /*if (f2py_success) of s*/
+  /* End of cleaning variable s */
+  } /*if (f2py_success) of xb*/
+  /* End of cleaning variable xb */
+  } /*if (f2py_success) of fp*/
+  /* End of cleaning variable fp */
+/*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 fpcurf1 *******************************/
+
+/********************************** fpcurfm1 **********************************/
+static char doc_f2py_rout_dfitpack_fpcurfm1[] = "\
+Function signature:\n\
+  x,y,w,xb,xe,k,s,n,t,c,fp,fpint,nrdata,ier = fpcurfm1(x,y,k,t,[w,xb,xe,overwrite_t])\n\
+Required arguments:\n"
+"  x : input rank-1 array('d') with bounds (m)\n"
+"  y : input rank-1 array('d') with bounds (m)\n"
+"  k : input int\n"
+"  t : input rank-1 array('d') with bounds (n)\n"
+"Optional arguments:\n"
+"  w := 1.0 input rank-1 array('d') with bounds (m)\n"
+"  xb := x[0] input float\n"
+"  xe := x[m-1] input float\n"
+"  overwrite_t := 1 input int\n"
+"Return objects:\n"
+"  x : rank-1 array('d') with bounds (m)\n"
+"  y : rank-1 array('d') with bounds (m)\n"
+"  w : rank-1 array('d') with bounds (m)\n"
+"  xb : float\n"
+"  xe : float\n"
+"  k : int\n"
+"  s : float\n"
+"  n : int\n"
+"  t : rank-1 array('d') with bounds (n)\n"
+"  c : rank-1 array('d') with bounds (nest)\n"
+"  fp : float\n"
+"  fpint : rank-1 array('d') with bounds (nest)\n"
+"  nrdata : rank-1 array('i') with bounds (nest)\n"
+"  ier : int";
+/* extern void F_FUNC(fpcurf,FPCURF)(int*,double*,double*,double*,int*,double*,double*,int*,double*,int*,double*,int*,int*,int*,int*,double*,double*,double*,double*,double*,double*,double*,double*,double*,int*,int*); */
+static PyObject *f2py_rout_dfitpack_fpcurfm1(const PyObject *capi_self,
+                           PyObject *capi_args,
+                           PyObject *capi_keywds,
+                           void (*f2py_func)(int*,double*,double*,double*,int*,double*,double*,int*,double*,int*,double*,int*,int*,int*,int*,double*,double*,double*,double*,double*,double*,double*,double*,double*,int*,int*)) {
+  PyObject * volatile capi_buildvalue = NULL;
+  volatile int f2py_success = 1;
+/*decl*/
+
+  int iopt = 0;
+  double *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;
+  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 *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;
+  int m = 0;
+  double xb = 0;
+  PyObject *xb_capi = Py_None;
+  double xe = 0;
+  PyObject *xe_capi = Py_None;
+  int k = 0;
+  PyObject *k_capi = Py_None;
+  double s = 0;
+  int nest = 0;
+  double tol = 0;
+  int maxit = 0;
+  int k1 = 0;
+  int k2 = 0;
+  int n = 0;
+  double *t = NULL;
+  npy_intp t_Dims[1] = {-1};
+  const int t_Rank = 1;
+  PyArrayObject *capi_t_tmp = NULL;
+  int capi_t_intent = 0;
+  int capi_overwrite_t = 1;
+  PyObject *t_capi = Py_None;
+  double *c = NULL;
+  npy_intp c_Dims[1] = {-1};
+  const int c_Rank = 1;
+  PyArrayObject *capi_c_tmp = NULL;
+  int capi_c_intent = 0;
+  double fp = 0;
+  double *fpint = NULL;
+  npy_intp fpint_Dims[1] = {-1};
+  const int fpint_Rank = 1;
+  PyArrayObject *capi_fpint_tmp = NULL;
+  int capi_fpint_intent = 0;
+  double *wrk = NULL;
+  npy_intp wrk_Dims[1] = {-1};
+  const int wrk_Rank = 1;
+  PyArrayObject *capi_wrk_tmp = NULL;
+  int capi_wrk_intent = 0;
+  int *nrdata = NULL;
+  npy_intp nrdata_Dims[1] = {-1};
+  const int nrdata_Rank = 1;
+  PyArrayObject *capi_nrdata_tmp = NULL;
+  int capi_nrdata_intent = 0;
+  int ier = 0;
+  static char *capi_kwlist[] = {"x","y","k","t","w","xb","xe","overwrite_t",NULL};
+
+/*routdebugenter*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_clock();
+#endif
+  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
+    "OOOO|OOOi:dfitpack.fpcurfm1",\
+    capi_kwlist,&x_capi,&y_capi,&k_capi,&t_capi,&w_capi,&xb_capi,&xe_capi,&capi_overwrite_t))
+    return NULL;
+/*frompyobj*/
+  /* Processing variable fp */
+  /* Processing variable s */
+  s = -1;
+  /* Processing variable maxit */
+  maxit = 20;
+  /* Processing variable k */
+    f2py_success = int_from_pyobj(&k,k_capi,"dfitpack.fpcurfm1() 3rd argument (k) can't be converted to int");
+  if (f2py_success) {
+  CHECKSCALAR(1<=k && k<=5,"1<=k && k<=5","3rd argument k","fpcurfm1:k=%d",k) {
+  /* Processing variable ier */
+  /* Processing variable t */
+  capi_t_intent |= (capi_overwrite_t?0:F2PY_INTENT_COPY);
+  ;
+  capi_t_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
+  capi_t_tmp = array_from_pyobj(PyArray_DOUBLE,t_Dims,t_Rank,capi_t_intent,t_capi);
+  if (capi_t_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 4th argument `t' of dfitpack.fpcurfm1 to C/Fortran array" );
+  } else {
+    t = (double *)(capi_t_tmp->data);
+
+  /* Processing variable tol */
+  tol = 0.001;
+  /* Processing variable x */
+  ;
+  capi_x_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
+  capi_x_tmp = array_from_pyobj(PyArray_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
+  if (capi_x_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 1st argument `x' of dfitpack.fpcurfm1 to C/Fortran array" );
+  } else {
+    x = (double *)(capi_x_tmp->data);
+
+  /* Processing variable iopt */
+  iopt = -1;
+  /* Processing variable xb */
+  if (xb_capi == Py_None) xb = x[0]; else
+    f2py_success = double_from_pyobj(&xb,xb_capi,"dfitpack.fpcurfm1() 2nd keyword (xb) can't be converted to double");
+  if (f2py_success) {
+  CHECKSCALAR(xb<=x[0],"xb<=x[0]","2nd keyword xb","fpcurfm1:xb=%g",xb) {
+  /* Processing variable m */
+  m = len(x);
+  CHECKSCALAR(m>k,"m>k","hidden m","fpcurfm1:m=%d",m) {
+  /* Processing variable n */
+  n = len(t);
+  /* Processing variable k2 */
+  k2 = k+2;
+  /* Processing variable k1 */
+  k1 = k+1;
+  /* Processing variable y */
+  y_Dims[0]=m;
+  capi_y_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
+  capi_y_tmp = array_from_pyobj(PyArray_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi);
+  if (capi_y_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 2nd argument `y' of dfitpack.fpcurfm1 to C/Fortran array" );
+  } else {
+    y = (double *)(capi_y_tmp->data);
+
+  CHECKARRAY(len(y)==m,"len(y)==m","2nd argument y") {
+  /* Processing variable w */
+  w_Dims[0]=m;
+  capi_w_intent |= F2PY_INTENT_IN|F2PY_OPTIONAL|F2PY_INTENT_OUT;
+  capi_w_tmp = array_from_pyobj(PyArray_DOUBLE,w_Dims,w_Rank,capi_w_intent,w_capi);
+  if (capi_w_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 1st keyword `w' of dfitpack.fpcurfm1 to C/Fortran array" );
+  } else {
+    w = (double *)(capi_w_tmp->data);
+
+  if (w_capi == Py_None) {
+
+
+    int *_i,capi_i=0;
+    CFUNCSMESS("fpcurfm1: Initializing w=1.0\n");
+    if (initforcomb(capi_w_tmp->dimensions,capi_w_tmp->nd,1)) {
+      while ((_i = nextforcomb()))
+        w[capi_i++] = 1.0; /* fortran way */
+    } else {
+      if (!PyErr_Occurred())
+        PyErr_SetString(dfitpack_error,"Initialization of 1st keyword w failed (initforcomb).");
+      f2py_success = 0;
+    }
+  }
+  if (f2py_success) {
+  CHECKARRAY(len(w)==m,"len(w)==m","1st keyword w") {
+  /* Processing variable nest */
+  nest = n;
+  /* Processing variable xe */
+  if (xe_capi == Py_None) xe = x[m-1]; else
+    f2py_success = double_from_pyobj(&xe,xe_capi,"dfitpack.fpcurfm1() 3rd keyword (xe) can't be converted to double");
+  if (f2py_success) {
+  CHECKSCALAR(xe>=x[m-1],"xe>=x[m-1]","3rd keyword xe","fpcurfm1:xe=%g",xe) {
+  /* Processing variable nrdata */
+  nrdata_Dims[0]=nest;
+  capi_nrdata_intent |= F2PY_INTENT_CACHE|F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
+  capi_nrdata_tmp = array_from_pyobj(PyArray_INT,nrdata_Dims,nrdata_Rank,capi_nrdata_intent,Py_None);
+  if (capi_nrdata_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `nrdata' of dfitpack.fpcurfm1 to C/Fortran array" );
+  } else {
+    nrdata = (int *)(capi_nrdata_tmp->data);
+
+  /* Processing variable fpint */
+  fpint_Dims[0]=nest;
+  capi_fpint_intent |= F2PY_INTENT_CACHE|F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
+  capi_fpint_tmp = array_from_pyobj(PyArray_DOUBLE,fpint_Dims,fpint_Rank,capi_fpint_intent,Py_None);
+  if (capi_fpint_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `fpint' of dfitpack.fpcurfm1 to C/Fortran array" );
+  } else {
+    fpint = (double *)(capi_fpint_tmp->data);
+
+  /* Processing variable c */
+  c_Dims[0]=nest;
+  capi_c_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
+  capi_c_tmp = array_from_pyobj(PyArray_DOUBLE,c_Dims,c_Rank,capi_c_intent,Py_None);
+  if (capi_c_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `c' of dfitpack.fpcurfm1 to C/Fortran array" );
+  } else {
+    c = (double *)(capi_c_tmp->data);
+
+  /* Processing variable wrk */
+  wrk_Dims[0]=nest*3*k2+m*k1;
+  capi_wrk_intent |= F2PY_INTENT_CACHE|F2PY_INTENT_HIDE;
+  capi_wrk_tmp = array_from_pyobj(PyArray_DOUBLE,wrk_Dims,wrk_Rank,capi_wrk_intent,Py_None);
+  if (capi_wrk_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `wrk' of dfitpack.fpcurfm1 to C/Fortran array" );
+  } else {
+    wrk = (double *)(capi_wrk_tmp->data);
+
+/*end of frompyobj*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_call_clock();
+#endif
+/*callfortranroutine*/
+        (*f2py_func)(&iopt,x,y,w,&m,&xb,&xe,&k,&s,&nest,&tol,&maxit,&k1,&k2,&n,t,c,&fp,fpint,wrk,wrk+nest,wrk+nest*k2,wrk+nest*2*k2,wrk+nest*3*k2,nrdata,&ier);
+        /*(*f2py_func)(&iopt,x,y,w,&m,&xb,&xe,&k,&s,&nest,&tol,&maxit,&k1,&k2,&n,t,c,&fp,fpint,wrk,nrdata,&ier);*/
+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("NNNddidiNNdNNi",capi_x_tmp,capi_y_tmp,capi_w_tmp,xb,xe,k,s,n,capi_t_tmp,capi_c_tmp,fp,capi_fpint_tmp,capi_nrdata_tmp,ier);
+/*closepyobjfrom*/
+/*end of closepyobjfrom*/
+    } /*if (f2py_success) after callfortranroutine*/
+/*cleanupfrompyobj*/
+    Py_XDECREF(capi_wrk_tmp);
+  }  /*if (capi_wrk_tmp == NULL) ... else of wrk*/
+  /* End of cleaning variable wrk */
+  }  /*if (capi_c_tmp == NULL) ... else of c*/
+  /* End of cleaning variable c */
+  }  /*if (capi_fpint_tmp == NULL) ... else of fpint*/
+  /* End of cleaning variable fpint */
+  }  /*if (capi_nrdata_tmp == NULL) ... else of nrdata*/
+  /* End of cleaning variable nrdata */
+  } /*CHECKSCALAR(xe>=x[m-1])*/
+  } /*if (f2py_success) of xe*/
+  /* End of cleaning variable xe */
+  /* End of cleaning variable nest */
+  } /*CHECKARRAY(len(w)==m)*/
+  }  /*if (f2py_success) of w init*/
+  }  /*if (capi_w_tmp == NULL) ... else of w*/
+  /* End of cleaning variable w */
+  } /*CHECKARRAY(len(y)==m)*/
+  }  /*if (capi_y_tmp == NULL) ... else of y*/
+  /* End of cleaning variable y */
+  /* End of cleaning variable k1 */
+  /* End of cleaning variable k2 */
+  /* End of cleaning variable n */
+  } /*CHECKSCALAR(m>k)*/
+  /* End of cleaning variable m */
+  } /*CHECKSCALAR(xb<=x[0])*/
+  } /*if (f2py_success) of xb*/
+  /* End of cleaning variable xb */
+  /* End of cleaning variable iopt */
+  }  /*if (capi_x_tmp == NULL) ... else of x*/
+  /* End of cleaning variable x */
+  /* End of cleaning variable tol */
+  }  /*if (capi_t_tmp == NULL) ... else of t*/
+  /* End of cleaning variable t */
+  /* End of cleaning variable ier */
+  } /*CHECKSCALAR(1<=k && k<=5)*/
+  } /*if (f2py_success) of k*/
+  /* End of cleaning variable k */
+  /* End of cleaning variable maxit */
+  /* End of cleaning variable s */
+  /* End of cleaning variable fp */
+/*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 fpcurfm1 ******************************/
+
+/*********************************** bispev ***********************************/
+static char doc_f2py_rout_dfitpack_bispev[] = "\
+Function signature:\n\
+  z,ier = bispev(tx,ty,c,kx,ky,x,y)\n\
+Required arguments:\n"
+"  tx : input rank-1 array('d') with bounds (nx)\n"
+"  ty : input rank-1 array('d') with bounds (ny)\n"
+"  c : input rank-1 array('d') with bounds ((nx-kx-1)*(ny-ky-1))\n"
+"  kx : input int\n"
+"  ky : input int\n"
+"  x : input rank-1 array('d') with bounds (mx)\n"
+"  y : input rank-1 array('d') with bounds (my)\n"
+"Return objects:\n"
+"  z : rank-2 array('d') with bounds (mx,my)\n"
+"  ier : int";
+/* extern void F_FUNC(bispev,BISPEV)(double*,int*,double*,int*,double*,int*,int*,double*,int*,double*,int*,double*,double*,int*,int*,int*,int*); */
+static PyObject *f2py_rout_dfitpack_bispev(const PyObject *capi_self,
+                           PyObject *capi_args,
+                           PyObject *capi_keywds,
+                           void (*f2py_func)(double*,int*,double*,int*,double*,int*,int*,double*,int*,double*,int*,double*,double*,int*,int*,int*,int*)) {
+  PyObject * volatile capi_buildvalue = NULL;
+  volatile int f2py_success = 1;
+/*decl*/
+
+  double *tx = NULL;
+  npy_intp tx_Dims[1] = {-1};
+  const int tx_Rank = 1;
+  PyArrayObject *capi_tx_tmp = NULL;
+  int capi_tx_intent = 0;
+  PyObject *tx_capi = Py_None;
+  int nx = 0;
+  double *ty = NULL;
+  npy_intp ty_Dims[1] = {-1};
+  const int ty_Rank = 1;
+  PyArrayObject *capi_ty_tmp = NULL;
+  int capi_ty_intent = 0;
+  PyObject *ty_capi = Py_None;
+  int ny = 0;
+  double *c = NULL;
+  npy_intp c_Dims[1] = {-1};
+  const int c_Rank = 1;
+  PyArrayObject *capi_c_tmp = NULL;
+  int capi_c_intent = 0;
+  PyObject *c_capi = Py_None;
+  int kx = 0;
+  PyObject *kx_capi = Py_None;
+  int ky = 0;
+  PyObject *ky_capi = Py_None;
+  double *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;
+  int mx = 0;
+  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;
+  int my = 0;
+  double *z = NULL;
+  npy_intp z_Dims[2] = {-1, -1};
+  const int z_Rank = 2;
+  PyArrayObject *capi_z_tmp = NULL;
+  int capi_z_intent = 0;
+  double *wrk = NULL;
+  npy_intp wrk_Dims[1] = {-1};
+  const int wrk_Rank = 1;
+  PyArrayObject *capi_wrk_tmp = NULL;
+  int capi_wrk_intent = 0;
+  int lwrk = 0;
+  int *iwrk = NULL;
+  npy_intp iwrk_Dims[1] = {-1};
+  const int iwrk_Rank = 1;
+  PyArrayObject *capi_iwrk_tmp = NULL;
+  int capi_iwrk_intent = 0;
+  int kwrk = 0;
+  int ier = 0;
+  static char *capi_kwlist[] = {"tx","ty","c","kx","ky","x","y",NULL};
+
+/*routdebugenter*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_clock();
+#endif
+  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
+    "OOOOOOO|:dfitpack.bispev",\
+    capi_kwlist,&tx_capi,&ty_capi,&c_capi,&kx_capi,&ky_capi,&x_capi,&y_capi))
+    return NULL;
+/*frompyobj*/
+  /* Processing variable kx */
+    f2py_success = int_from_pyobj(&kx,kx_capi,"dfitpack.bispev() 4th argument (kx) can't be converted to int");
+  if (f2py_success) {
+  /* Processing variable tx */
+  ;
+  capi_tx_intent |= F2PY_INTENT_IN;
+  capi_tx_tmp = array_from_pyobj(PyArray_DOUBLE,tx_Dims,tx_Rank,capi_tx_intent,tx_capi);
+  if (capi_tx_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 1st argument `tx' of dfitpack.bispev to C/Fortran array" );
+  } else {
+    tx = (double *)(capi_tx_tmp->data);
+
+  /* Processing variable ty */
+  ;
+  capi_ty_intent |= F2PY_INTENT_IN;
+  capi_ty_tmp = array_from_pyobj(PyArray_DOUBLE,ty_Dims,ty_Rank,capi_ty_intent,ty_capi);
+  if (capi_ty_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 2nd argument `ty' of dfitpack.bispev to C/Fortran array" );
+  } else {
+    ty = (double *)(capi_ty_tmp->data);
+
+  /* Processing variable ier */
+  /* Processing variable y */
+  ;
+  capi_y_intent |= F2PY_INTENT_IN;
+  capi_y_tmp = array_from_pyobj(PyArray_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi);
+  if (capi_y_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 7th argument `y' of dfitpack.bispev to C/Fortran array" );
+  } else {
+    y = (double *)(capi_y_tmp->data);
+
+  /* Processing variable x */
+  ;
+  capi_x_intent |= F2PY_INTENT_IN;
+  capi_x_tmp = array_from_pyobj(PyArray_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
+  if (capi_x_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 6th argument `x' of dfitpack.bispev to C/Fortran array" );
+  } else {
+    x = (double *)(capi_x_tmp->data);
+
+  /* Processing variable ky */
+    f2py_success = int_from_pyobj(&ky,ky_capi,"dfitpack.bispev() 5th argument (ky) can't be converted to int");
+  if (f2py_success) {
+  /* Processing variable nx */
+  nx = len(tx);
+  /* Processing variable ny */
+  ny = len(ty);
+  /* Processing variable my */
+  my = len(y);
+  /* Processing variable mx */
+  mx = len(x);
+  /* Processing variable kwrk */
+  kwrk = mx+my;
+  /* Processing variable c */
+  c_Dims[0]=(nx-kx-1)*(ny-ky-1);
+  capi_c_intent |= F2PY_INTENT_IN;
+  capi_c_tmp = array_from_pyobj(PyArray_DOUBLE,c_Dims,c_Rank,capi_c_intent,c_capi);
+  if (capi_c_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 3rd argument `c' of dfitpack.bispev to C/Fortran array" );
+  } else {
+    c = (double *)(capi_c_tmp->data);
+
+  CHECKARRAY(len(c)==(nx-kx-1)*(ny-ky-1),"len(c)==(nx-kx-1)*(ny-ky-1)","3rd argument c") {
+  /* Processing variable lwrk */
+  lwrk = mx*(kx+1)+my*(ky+1);
+  /* Processing variable z */
+  z_Dims[0]=mx,z_Dims[1]=my;
+  capi_z_intent |= F2PY_INTENT_C|F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
+  capi_z_tmp = array_from_pyobj(PyArray_DOUBLE,z_Dims,z_Rank,capi_z_intent,Py_None);
+  if (capi_z_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `z' of dfitpack.bispev to C/Fortran array" );
+  } else {
+    z = (double *)(capi_z_tmp->data);
+
+  /* Processing variable iwrk */
+  iwrk_Dims[0]=kwrk;
+  capi_iwrk_intent |= F2PY_INTENT_CACHE|F2PY_INTENT_HIDE;
+  capi_iwrk_tmp = array_from_pyobj(PyArray_INT,iwrk_Dims,iwrk_Rank,capi_iwrk_intent,Py_None);
+  if (capi_iwrk_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `iwrk' of dfitpack.bispev to C/Fortran array" );
+  } else {
+    iwrk = (int *)(capi_iwrk_tmp->data);
+
+  /* Processing variable wrk */
+  wrk_Dims[0]=lwrk;
+  capi_wrk_intent |= F2PY_INTENT_CACHE|F2PY_INTENT_HIDE;
+  capi_wrk_tmp = array_from_pyobj(PyArray_DOUBLE,wrk_Dims,wrk_Rank,capi_wrk_intent,Py_None);
+  if (capi_wrk_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `wrk' of dfitpack.bispev to C/Fortran array" );
+  } else {
+    wrk = (double *)(capi_wrk_tmp->data);
+
+/*end of frompyobj*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_call_clock();
+#endif
+/*callfortranroutine*/
+        (*f2py_func)(tx,&nx,ty,&ny,c,&kx,&ky,x,&mx,y,&my,z,wrk,&lwrk,iwrk,&kwrk,&ier);
+if (PyErr_Occurred())
+  f2py_success = 0;
+#ifdef F2PY_REPORT_ATEXIT
+f2py_stop_call_clock();
+#endif
+/*end of callfortranroutine*/
+    if (f2py_success) {
+/*pyobjfrom*/
+/*end of pyobjfrom*/
+    CFUNCSMESS("Building return value.\n");
+    capi_buildvalue = Py_BuildValue("Ni",capi_z_tmp,ier);
+/*closepyobjfrom*/
+/*end of closepyobjfrom*/
+    } /*if (f2py_success) after callfortranroutine*/
+/*cleanupfrompyobj*/
+    Py_XDECREF(capi_wrk_tmp);
+  }  /*if (capi_wrk_tmp == NULL) ... else of wrk*/
+  /* End of cleaning variable wrk */
+    Py_XDECREF(capi_iwrk_tmp);
+  }  /*if (capi_iwrk_tmp == NULL) ... else of iwrk*/
+  /* End of cleaning variable iwrk */
+  }  /*if (capi_z_tmp == NULL) ... else of z*/
+  /* End of cleaning variable z */
+  /* End of cleaning variable lwrk */
+  } /*CHECKARRAY(len(c)==(nx-kx-1)*(ny-ky-1))*/
+  if((PyObject *)capi_c_tmp!=c_capi) {
+    Py_XDECREF(capi_c_tmp); }
+  }  /*if (capi_c_tmp == NULL) ... else of c*/
+  /* End of cleaning variable c */
+  /* End of cleaning variable kwrk */
+  /* End of cleaning variable mx */
+  /* End of cleaning variable my */
+  /* End of cleaning variable ny */
+  /* End of cleaning variable nx */
+  } /*if (f2py_success) of ky*/
+  /* End of cleaning variable ky */
+  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_y_tmp!=y_capi) {
+    Py_XDECREF(capi_y_tmp); }
+  }  /*if (capi_y_tmp == NULL) ... else of y*/
+  /* End of cleaning variable y */
+  /* End of cleaning variable ier */
+  if((PyObject *)capi_ty_tmp!=ty_capi) {
+    Py_XDECREF(capi_ty_tmp); }
+  }  /*if (capi_ty_tmp == NULL) ... else of ty*/
+  /* End of cleaning variable ty */
+  if((PyObject *)capi_tx_tmp!=tx_capi) {
+    Py_XDECREF(capi_tx_tmp); }
+  }  /*if (capi_tx_tmp == NULL) ... else of tx*/
+  /* End of cleaning variable tx */
+  } /*if (f2py_success) of kx*/
+  /* End of cleaning variable kx */
+/*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 bispev *******************************/
+
+/******************************** surfit_smth ********************************/
+static char doc_f2py_rout_dfitpack_surfit_smth[] = "\
+Function signature:\n\
+  nx,tx,ny,ty,c,fp,wrk1,ier = surfit_smth(x,y,z,[w,xb,xe,yb,ye,kx,ky,s,nxest,nyest,eps,lwrk2])\n\
+Required arguments:\n"
+"  x : input rank-1 array('d') with bounds (m)\n"
+"  y : input rank-1 array('d') with bounds (m)\n"
+"  z : input rank-1 array('d') with bounds (m)\n"
+"Optional arguments:\n"
+"  w := 1.0 input rank-1 array('d') with bounds (m)\n"
+"  xb := dmin(x,m) input float\n"
+"  xe := dmax(x,m) input float\n"
+"  yb := dmin(y,m) input float\n"
+"  ye := dmax(y,m) input float\n"
+"  kx := 3 input int\n"
+"  ky := 3 input int\n"
+"  s := m input float\n"
+"  nxest := imax(kx+1+sqrt(m/2),2*(kx+1)) input int\n"
+"  nyest := imax(ky+1+sqrt(m/2),2*(ky+1)) input int\n"
+"  eps := 1e-016 input float\n"
+"  lwrk2 := calc_surfit_lwrk2(m,kx,ky,nxest,nyest) input int\n"
+"Return objects:\n"
+"  nx : int\n"
+"  tx : rank-1 array('d') with bounds (nmax)\n"
+"  ny : int\n"
+"  ty : rank-1 array('d') with bounds (nmax)\n"
+"  c : rank-1 array('d') with bounds ((nxest-kx-1)*(nyest-ky-1))\n"
+"  fp : float\n"
+"  wrk1 : rank-1 array('d') with bounds (lwrk1)\n"
+"  ier : int";
+/* extern void F_FUNC(surfit,SURFIT)(int*,int*,double*,double*,double*,double*,double*,double*,double*,double*,int*,int*,double*,int*,int*,int*,double*,int*,double*,int*,double*,double*,double*,double*,int*,double*,int*,int*,int*,int*); */
+static PyObject *f2py_rout_dfitpack_surfit_smth(const PyObject *capi_self,
+                           PyObject *capi_args,
+                           PyObject *capi_keywds,
+                           void (*f2py_func)(int*,int*,double*,double*,double*,double*,double*,double*,double*,double*,int*,int*,double*,int*,int*,int*,double*,int*,double*,int*,double*,double*,double*,double*,int*,double*,int*,int*,int*,int*)) {
+  PyObject * volatile capi_buildvalue = NULL;
+  volatile int f2py_success = 1;
+/*decl*/
+
+  int iopt = 0;
+  int m = 0;
+  double *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;
+  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 *z = NULL;
+  npy_intp z_Dims[1] = {-1};
+  const int z_Rank = 1;
+  PyArrayObject *capi_z_tmp = NULL;
+  int capi_z_intent = 0;
+  PyObject *z_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 xb = 0;
+  PyObject *xb_capi = Py_None;
+  double xe = 0;
+  PyObject *xe_capi = Py_None;
+  double yb = 0;
+  PyObject *yb_capi = Py_None;
+  double ye = 0;
+  PyObject *ye_capi = Py_None;
+  int kx = 0;
+  PyObject *kx_capi = Py_None;
+  int ky = 0;
+  PyObject *ky_capi = Py_None;
+  double s = 0;
+  PyObject *s_capi = Py_None;
+  int nxest = 0;
+  PyObject *nxest_capi = Py_None;
+  int nyest = 0;
+  PyObject *nyest_capi = Py_None;
+  int nmax = 0;
+  double eps = 0;
+  PyObject *eps_capi = Py_None;
+  int nx = 0;
+  double *tx = NULL;
+  npy_intp tx_Dims[1] = {-1};
+  const int tx_Rank = 1;
+  PyArrayObject *capi_tx_tmp = NULL;
+  int capi_tx_intent = 0;
+  int ny = 0;
+  double *ty = NULL;
+  npy_intp ty_Dims[1] = {-1};
+  const int ty_Rank = 1;
+  PyArrayObject *capi_ty_tmp = NULL;
+  int capi_ty_intent = 0;
+  double *c = NULL;
+  npy_intp c_Dims[1] = {-1};
+  const int c_Rank = 1;
+  PyArrayObject *capi_c_tmp = NULL;
+  int capi_c_intent = 0;
+  double fp = 0;
+  double *wrk1 = NULL;
+  npy_intp wrk1_Dims[1] = {-1};
+  const int wrk1_Rank = 1;
+  PyArrayObject *capi_wrk1_tmp = NULL;
+  int capi_wrk1_intent = 0;
+  int lwrk1 = 0;
+  double *wrk2 = NULL;
+  npy_intp wrk2_Dims[1] = {-1};
+  const int wrk2_Rank = 1;
+  PyArrayObject *capi_wrk2_tmp = NULL;
+  int capi_wrk2_intent = 0;
+  int lwrk2 = 0;
+  PyObject *lwrk2_capi = Py_None;
+  int *iwrk = NULL;
+  npy_intp iwrk_Dims[1] = {-1};
+  const int iwrk_Rank = 1;
+  PyArrayObject *capi_iwrk_tmp = NULL;
+  int capi_iwrk_intent = 0;
+  int kwrk = 0;
+  int ier = 0;
+  static char *capi_kwlist[] = {"x","y","z","w","xb","xe","yb","ye","kx","ky","s","nxest","nyest","eps","lwrk2",NULL};
+
+/*routdebugenter*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_clock();
+#endif
+  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
+    "OOO|OOOOOOOOOOOO:dfitpack.surfit_smth",\
+    capi_kwlist,&x_capi,&y_capi,&z_capi,&w_capi,&xb_capi,&xe_capi,&yb_capi,&ye_capi,&kx_capi,&ky_capi,&s_capi,&nxest_capi,&nyest_capi,&eps_capi,&lwrk2_capi))
+    return NULL;
+/*frompyobj*/
+  /* Processing variable fp */
+  /* Processing variable iopt */
+  iopt = 0;
+  /* Processing variable kx */
+  if (kx_capi == Py_None) kx = 3; else
+    f2py_success = int_from_pyobj(&kx,kx_capi,"dfitpack.surfit_smth() 6th keyword (kx) can't be converted to int");
+  if (f2py_success) {
+  CHECKSCALAR(1<=kx && kx<=5,"1<=kx && kx<=5","6th keyword kx","surfit_smth:kx=%d",kx) {
+  /* Processing variable ier */
+  /* Processing variable eps */
+  if (eps_capi == Py_None) eps = 1e-016; else
+    f2py_success = double_from_pyobj(&eps,eps_capi,"dfitpack.surfit_smth() 11st keyword (eps) can't be converted to double");
+  if (f2py_success) {
+  CHECKSCALAR(0.0<eps && eps<1.0,"0.0<eps && eps<1.0","11st keyword eps","surfit_smth:eps=%g",eps) {
+  /* Processing variable nx */
+  /* Processing variable ny */
+  /* Processing variable x */
+  ;
+  capi_x_intent |= F2PY_INTENT_IN;
+  capi_x_tmp = array_from_pyobj(PyArray_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
+  if (capi_x_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 1st argument `x' of dfitpack.surfit_smth to C/Fortran array" );
+  } else {
+    x = (double *)(capi_x_tmp->data);
+
+  /* Processing variable ky */
+  if (ky_capi == Py_None) ky = 3; else
+    f2py_success = int_from_pyobj(&ky,ky_capi,"dfitpack.surfit_smth() 7th keyword (ky) can't be converted to int");
+  if (f2py_success) {
+  CHECKSCALAR(1<=ky && ky<=5,"1<=ky && ky<=5","7th keyword ky","surfit_smth:ky=%d",ky) {
+  /* Processing variable m */
+  m = len(x);
+  CHECKSCALAR(m>=(kx+1)*(ky+1),"m>=(kx+1)*(ky+1)","hidden m","surfit_smth:m=%d",m) {
+  /* Processing variable s */
+  if (s_capi == Py_None) s = m; else
+    f2py_success = double_from_pyobj(&s,s_capi,"dfitpack.surfit_smth() 8th keyword (s) can't be converted to double");
+  if (f2py_success) {
+  CHECKSCALAR(0.0<=s,"0.0<=s","8th keyword s","surfit_smth:s=%g",s) {
+  /* Processing variable w */
+  w_Dims[0]=m;
+  capi_w_intent |= F2PY_INTENT_IN|F2PY_OPTIONAL;
+  capi_w_tmp = array_from_pyobj(PyArray_DOUBLE,w_Dims,w_Rank,capi_w_intent,w_capi);
+  if (capi_w_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 1st keyword `w' of dfitpack.surfit_smth to C/Fortran array" );
+  } else {
+    w = (double *)(capi_w_tmp->data);
+
+  if (w_capi == Py_None) {
+
+
+    int *_i,capi_i=0;
+    CFUNCSMESS("surfit_smth: Initializing w=1.0\n");
+    if (initforcomb(capi_w_tmp->dimensions,capi_w_tmp->nd,1)) {
+      while ((_i = nextforcomb()))
+        w[capi_i++] = 1.0; /* fortran way */
+    } else {
+      if (!PyErr_Occurred())
+        PyErr_SetString(dfitpack_error,"Initialization of 1st keyword w failed (initforcomb).");
+      f2py_success = 0;
+    }
+  }
+  if (f2py_success) {
+  CHECKARRAY(len(w)==m,"len(w)==m","1st keyword w") {
+  /* Processing variable y */
+  y_Dims[0]=m;
+  capi_y_intent |= F2PY_INTENT_IN;
+  capi_y_tmp = array_from_pyobj(PyArray_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi);
+  if (capi_y_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 2nd argument `y' of dfitpack.surfit_smth to C/Fortran array" );
+  } else {
+    y = (double *)(capi_y_tmp->data);
+
+  CHECKARRAY(len(y)==m,"len(y)==m","2nd argument y") {
+  /* Processing variable z */
+  z_Dims[0]=m;
+  capi_z_intent |= F2PY_INTENT_IN;
+  capi_z_tmp = array_from_pyobj(PyArray_DOUBLE,z_Dims,z_Rank,capi_z_intent,z_capi);
+  if (capi_z_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 3rd argument `z' of dfitpack.surfit_smth to C/Fortran array" );
+  } else {
+    z = (double *)(capi_z_tmp->data);
+
+  CHECKARRAY(len(z)==m,"len(z)==m","3rd argument z") {
+  /* Processing variable xb */
+  if (xb_capi == Py_None) xb = dmin(x,m); else
+    f2py_success = double_from_pyobj(&xb,xb_capi,"dfitpack.surfit_smth() 2nd keyword (xb) can't be converted to double");
+  if (f2py_success) {
+  /* Processing variable yb */
+  if (yb_capi == Py_None) yb = dmin(y,m); else
+    f2py_success = double_from_pyobj(&yb,yb_capi,"dfitpack.surfit_smth() 4th keyword (yb) can't be converted to double");
+  if (f2py_success) {
+  /* Processing variable ye */
+  if (ye_capi == Py_None) ye = dmax(y,m); else
+    f2py_success = double_from_pyobj(&ye,ye_capi,"dfitpack.surfit_smth() 5th keyword (ye) can't be converted to double");
+  if (f2py_success) {
+  /* Processing variable xe */
+  if (xe_capi == Py_None) xe = dmax(x,m); else
+    f2py_success = double_from_pyobj(&xe,xe_capi,"dfitpack.surfit_smth() 3rd keyword (xe) can't be converted to double");
+  if (f2py_success) {
+  /* Processing variable nxest */
+  if (nxest_capi == Py_None) nxest = imax(kx+1+sqrt(m/2),2*(kx+1)); else
+    f2py_success = int_from_pyobj(&nxest,nxest_capi,"dfitpack.surfit_smth() 9th keyword (nxest) can't be converted to int");
+  if (f2py_success) {
+  CHECKSCALAR(nxest>=2*(kx+1),"nxest>=2*(kx+1)","9th keyword nxest","surfit_smth:nxest=%d",nxest) {
+  /* Processing variable nyest */
+  if (nyest_capi == Py_None) nyest = imax(ky+1+sqrt(m/2),2*(ky+1)); else
+    f2py_success = int_from_pyobj(&nyest,nyest_capi,"dfitpack.surfit_smth() 10th keyword (nyest) can't be converted to int");
+  if (f2py_success) {
+  CHECKSCALAR(nyest>=2*(ky+1),"nyest>=2*(ky+1)","10th keyword nyest","surfit_smth:nyest=%d",nyest) {
+  /* Processing variable nmax */
+  nmax = MAX(nxest,nyest);
+  /* Processing variable lwrk2 */
+  if (lwrk2_capi == Py_None) lwrk2 = calc_surfit_lwrk2(m,kx,ky,nxest,nyest); else
+    f2py_success = int_from_pyobj(&lwrk2,lwrk2_capi,"dfitpack.surfit_smth() 12nd keyword (lwrk2) can't be converted to int");
+  if (f2py_success) {
+  /* Processing variable lwrk1 */
+  lwrk1 = calc_surfit_lwrk1(m,kx,ky,nxest,nyest);
+  /* Processing variable kwrk */
+  kwrk = m+(nxest-2*kx-1)*(nyest-2*ky-1);
+  /* Processing variable c */
+  c_Dims[0]=(nxest-kx-1)*(nyest-ky-1);
+  capi_c_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
+  capi_c_tmp = array_from_pyobj(PyArray_DOUBLE,c_Dims,c_Rank,capi_c_intent,Py_None);
+  if (capi_c_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `c' of dfitpack.surfit_smth to C/Fortran array" );
+  } else {
+    c = (double *)(capi_c_tmp->data);
+
+  /* Processing variable tx */
+  tx_Dims[0]=nmax;
+  capi_tx_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
+  capi_tx_tmp = array_from_pyobj(PyArray_DOUBLE,tx_Dims,tx_Rank,capi_tx_intent,Py_None);
+  if (capi_tx_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `tx' of dfitpack.surfit_smth to C/Fortran array" );
+  } else {
+    tx = (double *)(capi_tx_tmp->data);
+
+  /* Processing variable ty */
+  ty_Dims[0]=nmax;
+  capi_ty_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
+  capi_ty_tmp = array_from_pyobj(PyArray_DOUBLE,ty_Dims,ty_Rank,capi_ty_intent,Py_None);
+  if (capi_ty_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `ty' of dfitpack.surfit_smth to C/Fortran array" );
+  } else {
+    ty = (double *)(capi_ty_tmp->data);
+
+  /* Processing variable iwrk */
+  iwrk_Dims[0]=kwrk;
+  capi_iwrk_intent |= F2PY_INTENT_CACHE|F2PY_INTENT_HIDE;
+  capi_iwrk_tmp = array_from_pyobj(PyArray_INT,iwrk_Dims,iwrk_Rank,capi_iwrk_intent,Py_None);
+  if (capi_iwrk_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `iwrk' of dfitpack.surfit_smth to C/Fortran array" );
+  } else {
+    iwrk = (int *)(capi_iwrk_tmp->data);
+
+  /* Processing variable wrk2 */
+  wrk2_Dims[0]=lwrk2;
+  capi_wrk2_intent |= F2PY_INTENT_CACHE|F2PY_INTENT_HIDE;
+  capi_wrk2_tmp = array_from_pyobj(PyArray_DOUBLE,wrk2_Dims,wrk2_Rank,capi_wrk2_intent,Py_None);
+  if (capi_wrk2_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `wrk2' of dfitpack.surfit_smth to C/Fortran array" );
+  } else {
+    wrk2 = (double *)(capi_wrk2_tmp->data);
+
+  /* Processing variable wrk1 */
+  wrk1_Dims[0]=lwrk1;
+  capi_wrk1_intent |= F2PY_INTENT_CACHE|F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
+  capi_wrk1_tmp = array_from_pyobj(PyArray_DOUBLE,wrk1_Dims,wrk1_Rank,capi_wrk1_intent,Py_None);
+  if (capi_wrk1_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `wrk1' of dfitpack.surfit_smth to C/Fortran array" );
+  } else {
+    wrk1 = (double *)(capi_wrk1_tmp->data);
+
+/*end of frompyobj*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_call_clock();
+#endif
+/*callfortranroutine*/
+        (*f2py_func)(&iopt,&m,x,y,z,w,&xb,&xe,&yb,&ye,&kx,&ky,&s,&nxest,&nyest,&nmax,&eps,&nx,tx,&ny,ty,c,&fp,wrk1,&lwrk1,wrk2,&lwrk2,iwrk,&kwrk,&ier);
+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("iNiNNdNi",nx,capi_tx_tmp,ny,capi_ty_tmp,capi_c_tmp,fp,capi_wrk1_tmp,ier);
+/*closepyobjfrom*/
+/*end of closepyobjfrom*/
+    } /*if (f2py_success) after callfortranroutine*/
+/*cleanupfrompyobj*/
+  }  /*if (capi_wrk1_tmp == NULL) ... else of wrk1*/
+  /* End of cleaning variable wrk1 */
+    Py_XDECREF(capi_wrk2_tmp);
+  }  /*if (capi_wrk2_tmp == NULL) ... else of wrk2*/
+  /* End of cleaning variable wrk2 */
+    Py_XDECREF(capi_iwrk_tmp);
+  }  /*if (capi_iwrk_tmp == NULL) ... else of iwrk*/
+  /* End of cleaning variable iwrk */
+  }  /*if (capi_ty_tmp == NULL) ... else of ty*/
+  /* End of cleaning variable ty */
+  }  /*if (capi_tx_tmp == NULL) ... else of tx*/
+  /* End of cleaning variable tx */
+  }  /*if (capi_c_tmp == NULL) ... else of c*/
+  /* End of cleaning variable c */
+  /* End of cleaning variable kwrk */
+  /* End of cleaning variable lwrk1 */
+  } /*if (f2py_success) of lwrk2*/
+  /* End of cleaning variable lwrk2 */
+  /* End of cleaning variable nmax */
+  } /*CHECKSCALAR(nyest>=2*(ky+1))*/
+  } /*if (f2py_success) of nyest*/
+  /* End of cleaning variable nyest */
+  } /*CHECKSCALAR(nxest>=2*(kx+1))*/
+  } /*if (f2py_success) of nxest*/
+  /* End of cleaning variable nxest */
+  } /*if (f2py_success) of xe*/
+  /* End of cleaning variable xe */
+  } /*if (f2py_success) of ye*/
+  /* End of cleaning variable ye */
+  } /*if (f2py_success) of yb*/
+  /* End of cleaning variable yb */
+  } /*if (f2py_success) of xb*/
+  /* End of cleaning variable xb */
+  } /*CHECKARRAY(len(z)==m)*/
+  if((PyObject *)capi_z_tmp!=z_capi) {
+    Py_XDECREF(capi_z_tmp); }
+  }  /*if (capi_z_tmp == NULL) ... else of z*/
+  /* End of cleaning variable z */
+  } /*CHECKARRAY(len(y)==m)*/
+  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 */
+  } /*CHECKARRAY(len(w)==m)*/
+  }  /*if (f2py_success) of w init*/
+  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 */
+  } /*CHECKSCALAR(0.0<=s)*/
+  } /*if (f2py_success) of s*/
+  /* End of cleaning variable s */
+  } /*CHECKSCALAR(m>=(kx+1)*(ky+1))*/
+  /* End of cleaning variable m */
+  } /*CHECKSCALAR(1<=ky && ky<=5)*/
+  } /*if (f2py_success) of ky*/
+  /* End of cleaning variable ky */
+  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 cleaning variable ny */
+  /* End of cleaning variable nx */
+  } /*CHECKSCALAR(0.0<eps && eps<1.0)*/
+  } /*if (f2py_success) of eps*/
+  /* End of cleaning variable eps */
+  /* End of cleaning variable ier */
+  } /*CHECKSCALAR(1<=kx && kx<=5)*/
+  } /*if (f2py_success) of kx*/
+  /* End of cleaning variable kx */
+  /* End of cleaning variable iopt */
+  /* End of cleaning variable fp */
+/*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 surfit_smth *****************************/
+
+/********************************* surfit_lsq *********************************/
+static char doc_f2py_rout_dfitpack_surfit_lsq[] = "\
+Function signature:\n\
+  tx,ty,c,fp,ier = surfit_lsq(x,y,z,tx,ty,[w,xb,xe,yb,ye,kx,ky,eps,lwrk2,overwrite_tx,overwrite_ty])\n\
+Required arguments:\n"
+"  x : input rank-1 array('d') with bounds (m)\n"
+"  y : input rank-1 array('d') with bounds (m)\n"
+"  z : input rank-1 array('d') with bounds (m)\n"
+"  tx : input rank-1 array('d') with bounds (nx)\n"
+"  ty : input rank-1 array('d') with bounds (ny)\n"
+"Optional arguments:\n"
+"  w := 1.0 input rank-1 array('d') with bounds (m)\n"
+"  xb := calc_b(x,m,tx,nx) input float\n"
+"  xe := calc_e(x,m,tx,nx) input float\n"
+"  yb := calc_b(y,m,ty,ny) input float\n"
+"  ye := calc_e(y,m,ty,ny) input float\n"
+"  kx := 3 input int\n"
+"  ky := 3 input int\n"
+"  eps := 1e-016 input float\n"
+"  overwrite_tx := 1 input int\n"
+"  overwrite_ty := 1 input int\n"
+"  lwrk2 := calc_surfit_lwrk2(m,kx,ky,nxest,nyest) input int\n"
+"Return objects:\n"
+"  tx : rank-1 array('d') with bounds (nx)\n"
+"  ty : rank-1 array('d') with bounds (ny)\n"
+"  c : rank-1 array('d') with bounds ((nx-kx-1)*(ny-ky-1))\n"
+"  fp : float\n"
+"  ier : int";
+/* extern void F_FUNC(surfit,SURFIT)(int*,int*,double*,double*,double*,double*,double*,double*,double*,double*,int*,int*,double*,int*,int*,int*,double*,int*,double*,int*,double*,double*,double*,double*,int*,double*,int*,int*,int*,int*); */
+static PyObject *f2py_rout_dfitpack_surfit_lsq(const PyObject *capi_self,
+                           PyObject *capi_args,
+                           PyObject *capi_keywds,
+                           void (*f2py_func)(int*,int*,double*,double*,double*,double*,double*,double*,double*,double*,int*,int*,double*,int*,int*,int*,double*,int*,double*,int*,double*,double*,double*,double*,int*,double*,int*,int*,int*,int*)) {
+  PyObject * volatile capi_buildvalue = NULL;
+  volatile int f2py_success = 1;
+/*decl*/
+
+  int iopt = 0;
+  int m = 0;
+  double *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;
+  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 *z = NULL;
+  npy_intp z_Dims[1] = {-1};
+  const int z_Rank = 1;
+  PyArrayObject *capi_z_tmp = NULL;
+  int capi_z_intent = 0;
+  PyObject *z_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 xb = 0;
+  PyObject *xb_capi = Py_None;
+  double xe = 0;
+  PyObject *xe_capi = Py_None;
+  double yb = 0;
+  PyObject *yb_capi = Py_None;
+  double ye = 0;
+  PyObject *ye_capi = Py_None;
+  int kx = 0;
+  PyObject *kx_capi = Py_None;
+  int ky = 0;
+  PyObject *ky_capi = Py_None;
+  double s = 0;
+  int nxest = 0;
+  int nyest = 0;
+  int nmax = 0;
+  double eps = 0;
+  PyObject *eps_capi = Py_None;
+  int nx = 0;
+  double *tx = NULL;
+  npy_intp tx_Dims[1] = {-1};
+  const int tx_Rank = 1;
+  PyArrayObject *capi_tx_tmp = NULL;
+  int capi_tx_intent = 0;
+  int capi_overwrite_tx = 1;
+  PyObject *tx_capi = Py_None;
+  int ny = 0;
+  double *ty = NULL;
+  npy_intp ty_Dims[1] = {-1};
+  const int ty_Rank = 1;
+  PyArrayObject *capi_ty_tmp = NULL;
+  int capi_ty_intent = 0;
+  int capi_overwrite_ty = 1;
+  PyObject *ty_capi = Py_None;
+  double *c = NULL;
+  npy_intp c_Dims[1] = {-1};
+  const int c_Rank = 1;
+  PyArrayObject *capi_c_tmp = NULL;
+  int capi_c_intent = 0;
+  double fp = 0;
+  double *wrk1 = NULL;
+  npy_intp wrk1_Dims[1] = {-1};
+  const int wrk1_Rank = 1;
+  PyArrayObject *capi_wrk1_tmp = NULL;
+  int capi_wrk1_intent = 0;
+  int lwrk1 = 0;
+  double *wrk2 = NULL;
+  npy_intp wrk2_Dims[1] = {-1};
+  const int wrk2_Rank = 1;
+  PyArrayObject *capi_wrk2_tmp = NULL;
+  int capi_wrk2_intent = 0;
+  int lwrk2 = 0;
+  PyObject *lwrk2_capi = Py_None;
+  int *iwrk = NULL;
+  npy_intp iwrk_Dims[1] = {-1};
+  const int iwrk_Rank = 1;
+  PyArrayObject *capi_iwrk_tmp = NULL;
+  int capi_iwrk_intent = 0;
+  int kwrk = 0;
+  int ier = 0;
+  static char *capi_kwlist[] = {"x","y","z","tx","ty","w","xb","xe","yb","ye","kx","ky","eps","lwrk2","overwrite_tx","overwrite_ty",NULL};
+
+/*routdebugenter*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_clock();
+#endif
+  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
+    "OOOOO|OOOOOOOOOii:dfitpack.surfit_lsq",\
+    capi_kwlist,&x_capi,&y_capi,&z_capi,&tx_capi,&ty_capi,&w_capi,&xb_capi,&xe_capi,&yb_capi,&ye_capi,&kx_capi,&ky_capi,&eps_capi,&lwrk2_capi,&capi_overwrite_tx,&capi_overwrite_ty))
+    return NULL;
+/*frompyobj*/
+  /* Processing variable fp */
+  /* Processing variable iopt */
+  iopt = -1;
+  /* Processing variable kx */
+  if (kx_capi == Py_None) kx = 3; else
+    f2py_success = int_from_pyobj(&kx,kx_capi,"dfitpack.surfit_lsq() 6th keyword (kx) can't be converted to int");
+  if (f2py_success) {
+  CHECKSCALAR(1<=kx && kx<=5,"1<=kx && kx<=5","6th keyword kx","surfit_lsq:kx=%d",kx) {
+  /* Processing variable tx */
+  capi_tx_intent |= (capi_overwrite_tx?0:F2PY_INTENT_COPY);
+  ;
+  capi_tx_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
+  capi_tx_tmp = array_from_pyobj(PyArray_DOUBLE,tx_Dims,tx_Rank,capi_tx_intent,tx_capi);
+  if (capi_tx_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 4th argument `tx' of dfitpack.surfit_lsq to C/Fortran array" );
+  } else {
+    tx = (double *)(capi_tx_tmp->data);
+
+  /* Processing variable ty */
+  capi_ty_intent |= (capi_overwrite_ty?0:F2PY_INTENT_COPY);
+  ;
+  capi_ty_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
+  capi_ty_tmp = array_from_pyobj(PyArray_DOUBLE,ty_Dims,ty_Rank,capi_ty_intent,ty_capi);
+  if (capi_ty_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 5th argument `ty' of dfitpack.surfit_lsq to C/Fortran array" );
+  } else {
+    ty = (double *)(capi_ty_tmp->data);
+
+  /* Processing variable ier */
+  /* Processing variable eps */
+  if (eps_capi == Py_None) eps = 1e-016; else
+    f2py_success = double_from_pyobj(&eps,eps_capi,"dfitpack.surfit_lsq() 8th keyword (eps) can't be converted to double");
+  if (f2py_success) {
+  CHECKSCALAR(0.0<eps && eps<1.0,"0.0<eps && eps<1.0","8th keyword eps","surfit_lsq:eps=%g",eps) {
+  /* Processing variable s */
+  s = 0.0;
+  /* Processing variable x */
+  ;
+  capi_x_intent |= F2PY_INTENT_IN;
+  capi_x_tmp = array_from_pyobj(PyArray_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
+  if (capi_x_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 1st argument `x' of dfitpack.surfit_lsq to C/Fortran array" );
+  } else {
+    x = (double *)(capi_x_tmp->data);
+
+  /* Processing variable ky */
+  if (ky_capi == Py_None) ky = 3; else
+    f2py_success = int_from_pyobj(&ky,ky_capi,"dfitpack.surfit_lsq() 7th keyword (ky) can't be converted to int");
+  if (f2py_success) {
+  CHECKSCALAR(1<=ky && ky<=5,"1<=ky && ky<=5","7th keyword ky","surfit_lsq:ky=%d",ky) {
+  /* Processing variable m */
+  m = len(x);
+  CHECKSCALAR(m>=(kx+1)*(ky+1),"m>=(kx+1)*(ky+1)","hidden m","surfit_lsq:m=%d",m) {
+  /* Processing variable nx */
+  nx = len(tx);
+  CHECKSCALAR(2*kx+2<=nx,"2*kx+2<=nx","hidden nx","surfit_lsq:nx=%d",nx) {
+  /* Processing variable ny */
+  ny = len(ty);
+  CHECKSCALAR(2*ky+2<=ny,"2*ky+2<=ny","hidden ny","surfit_lsq:ny=%d",ny) {
+  /* Processing variable w */
+  w_Dims[0]=m;
+  capi_w_intent |= F2PY_INTENT_IN|F2PY_OPTIONAL;
+  capi_w_tmp = array_from_pyobj(PyArray_DOUBLE,w_Dims,w_Rank,capi_w_intent,w_capi);
+  if (capi_w_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 1st keyword `w' of dfitpack.surfit_lsq to C/Fortran array" );
+  } else {
+    w = (double *)(capi_w_tmp->data);
+
+  if (w_capi == Py_None) {
+
+
+    int *_i,capi_i=0;
+    CFUNCSMESS("surfit_lsq: Initializing w=1.0\n");
+    if (initforcomb(capi_w_tmp->dimensions,capi_w_tmp->nd,1)) {
+      while ((_i = nextforcomb()))
+        w[capi_i++] = 1.0; /* fortran way */
+    } else {
+      if (!PyErr_Occurred())
+        PyErr_SetString(dfitpack_error,"Initialization of 1st keyword w failed (initforcomb).");
+      f2py_success = 0;
+    }
+  }
+  if (f2py_success) {
+  CHECKARRAY(len(w)==m,"len(w)==m","1st keyword w") {
+  /* Processing variable y */
+  y_Dims[0]=m;
+  capi_y_intent |= F2PY_INTENT_IN;
+  capi_y_tmp = array_from_pyobj(PyArray_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi);
+  if (capi_y_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 2nd argument `y' of dfitpack.surfit_lsq to C/Fortran array" );
+  } else {
+    y = (double *)(capi_y_tmp->data);
+
+  CHECKARRAY(len(y)==m,"len(y)==m","2nd argument y") {
+  /* Processing variable z */
+  z_Dims[0]=m;
+  capi_z_intent |= F2PY_INTENT_IN;
+  capi_z_tmp = array_from_pyobj(PyArray_DOUBLE,z_Dims,z_Rank,capi_z_intent,z_capi);
+  if (capi_z_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 3rd argument `z' of dfitpack.surfit_lsq to C/Fortran array" );
+  } else {
+    z = (double *)(capi_z_tmp->data);
+
+  CHECKARRAY(len(z)==m,"len(z)==m","3rd argument z") {
+  /* Processing variable nmax */
+  nmax = MAX(nx,ny);
+  /* Processing variable xb */
+  if (xb_capi == Py_None) xb = calc_b(x,m,tx,nx); else
+    f2py_success = double_from_pyobj(&xb,xb_capi,"dfitpack.surfit_lsq() 2nd keyword (xb) can't be converted to double");
+  if (f2py_success) {
+  /* Processing variable yb */
+  if (yb_capi == Py_None) yb = calc_b(y,m,ty,ny); else
+    f2py_success = double_from_pyobj(&yb,yb_capi,"dfitpack.surfit_lsq() 4th keyword (yb) can't be converted to double");
+  if (f2py_success) {
+  /* Processing variable ye */
+  if (ye_capi == Py_None) ye = calc_e(y,m,ty,ny); else
+    f2py_success = double_from_pyobj(&ye,ye_capi,"dfitpack.surfit_lsq() 5th keyword (ye) can't be converted to double");
+  if (f2py_success) {
+  /* Processing variable xe */
+  if (xe_capi == Py_None) xe = calc_e(x,m,tx,nx); else
+    f2py_success = double_from_pyobj(&xe,xe_capi,"dfitpack.surfit_lsq() 3rd keyword (xe) can't be converted to double");
+  if (f2py_success) {
+  /* Processing variable nxest */
+  nxest = nx;
+  /* Processing variable kwrk */
+  kwrk = m+(nx-2*kx-1)*(ny-2*ky-1);
+  /* Processing variable c */
+  c_Dims[0]=(nx-kx-1)*(ny-ky-1);
+  capi_c_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
+  capi_c_tmp = array_from_pyobj(PyArray_DOUBLE,c_Dims,c_Rank,capi_c_intent,Py_None);
+  if (capi_c_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `c' of dfitpack.surfit_lsq to C/Fortran array" );
+  } else {
+    c = (double *)(capi_c_tmp->data);
+
+  /* Processing variable nyest */
+  nyest = ny;
+  /* Processing variable iwrk */
+  iwrk_Dims[0]=kwrk;
+  capi_iwrk_intent |= F2PY_INTENT_CACHE|F2PY_INTENT_HIDE;
+  capi_iwrk_tmp = array_from_pyobj(PyArray_INT,iwrk_Dims,iwrk_Rank,capi_iwrk_intent,Py_None);
+  if (capi_iwrk_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `iwrk' of dfitpack.surfit_lsq to C/Fortran array" );
+  } else {
+    iwrk = (int *)(capi_iwrk_tmp->data);
+
+  /* Processing variable lwrk2 */
+  if (lwrk2_capi == Py_None) lwrk2 = calc_surfit_lwrk2(m,kx,ky,nxest,nyest); else
+    f2py_success = int_from_pyobj(&lwrk2,lwrk2_capi,"dfitpack.surfit_lsq() 9th keyword (lwrk2) can't be converted to int");
+  if (f2py_success) {
+  /* Processing variable lwrk1 */
+  lwrk1 = calc_surfit_lwrk1(m,kx,ky,nxest,nyest);
+  /* Processing variable wrk2 */
+  wrk2_Dims[0]=lwrk2;
+  capi_wrk2_intent |= F2PY_INTENT_CACHE|F2PY_INTENT_HIDE;
+  capi_wrk2_tmp = array_from_pyobj(PyArray_DOUBLE,wrk2_Dims,wrk2_Rank,capi_wrk2_intent,Py_None);
+  if (capi_wrk2_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `wrk2' of dfitpack.surfit_lsq to C/Fortran array" );
+  } else {
+    wrk2 = (double *)(capi_wrk2_tmp->data);
+
+  /* Processing variable wrk1 */
+  wrk1_Dims[0]=lwrk1;
+  capi_wrk1_intent |= F2PY_INTENT_CACHE|F2PY_INTENT_HIDE;
+  capi_wrk1_tmp = array_from_pyobj(PyArray_DOUBLE,wrk1_Dims,wrk1_Rank,capi_wrk1_intent,Py_None);
+  if (capi_wrk1_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `wrk1' of dfitpack.surfit_lsq to C/Fortran array" );
+  } else {
+    wrk1 = (double *)(capi_wrk1_tmp->data);
+
+/*end of frompyobj*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_call_clock();
+#endif
+/*callfortranroutine*/
+        (*f2py_func)(&iopt,&m,x,y,z,w,&xb,&xe,&yb,&ye,&kx,&ky,&s,&nxest,&nyest,&nmax,&eps,&nx,tx,&ny,ty,c,&fp,wrk1,&lwrk1,wrk2,&lwrk2,iwrk,&kwrk,&ier);
+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("NNNdi",capi_tx_tmp,capi_ty_tmp,capi_c_tmp,fp,ier);
+/*closepyobjfrom*/
+/*end of closepyobjfrom*/
+    } /*if (f2py_success) after callfortranroutine*/
+/*cleanupfrompyobj*/
+    Py_XDECREF(capi_wrk1_tmp);
+  }  /*if (capi_wrk1_tmp == NULL) ... else of wrk1*/
+  /* End of cleaning variable wrk1 */
+    Py_XDECREF(capi_wrk2_tmp);
+  }  /*if (capi_wrk2_tmp == NULL) ... else of wrk2*/
+  /* End of cleaning variable wrk2 */
+  /* End of cleaning variable lwrk1 */
+  } /*if (f2py_success) of lwrk2*/
+  /* End of cleaning variable lwrk2 */
+    Py_XDECREF(capi_iwrk_tmp);
+  }  /*if (capi_iwrk_tmp == NULL) ... else of iwrk*/
+  /* End of cleaning variable iwrk */
+  /* End of cleaning variable nyest */
+  }  /*if (capi_c_tmp == NULL) ... else of c*/
+  /* End of cleaning variable c */
+  /* End of cleaning variable kwrk */
+  /* End of cleaning variable nxest */
+  } /*if (f2py_success) of xe*/
+  /* End of cleaning variable xe */
+  } /*if (f2py_success) of ye*/
+  /* End of cleaning variable ye */
+  } /*if (f2py_success) of yb*/
+  /* End of cleaning variable yb */
+  } /*if (f2py_success) of xb*/
+  /* End of cleaning variable xb */
+  /* End of cleaning variable nmax */
+  } /*CHECKARRAY(len(z)==m)*/
+  if((PyObject *)capi_z_tmp!=z_capi) {
+    Py_XDECREF(capi_z_tmp); }
+  }  /*if (capi_z_tmp == NULL) ... else of z*/
+  /* End of cleaning variable z */
+  } /*CHECKARRAY(len(y)==m)*/
+  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 */
+  } /*CHECKARRAY(len(w)==m)*/
+  }  /*if (f2py_success) of w init*/
+  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 */
+  } /*CHECKSCALAR(2*ky+2<=ny)*/
+  /* End of cleaning variable ny */
+  } /*CHECKSCALAR(2*kx+2<=nx)*/
+  /* End of cleaning variable nx */
+  } /*CHECKSCALAR(m>=(kx+1)*(ky+1))*/
+  /* End of cleaning variable m */
+  } /*CHECKSCALAR(1<=ky && ky<=5)*/
+  } /*if (f2py_success) of ky*/
+  /* End of cleaning variable ky */
+  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 cleaning variable s */
+  } /*CHECKSCALAR(0.0<eps && eps<1.0)*/
+  } /*if (f2py_success) of eps*/
+  /* End of cleaning variable eps */
+  /* End of cleaning variable ier */
+  }  /*if (capi_ty_tmp == NULL) ... else of ty*/
+  /* End of cleaning variable ty */
+  }  /*if (capi_tx_tmp == NULL) ... else of tx*/
+  /* End of cleaning variable tx */
+  } /*CHECKSCALAR(1<=kx && kx<=5)*/
+  } /*if (f2py_success) of kx*/
+  /* End of cleaning variable kx */
+  /* End of cleaning variable iopt */
+  /* End of cleaning variable fp */
+/*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 surfit_lsq *****************************/
+
+/******************************** regrid_smth ********************************/
+static char doc_f2py_rout_dfitpack_regrid_smth[] = "\
+Function signature:\n\
+  nx,tx,ny,ty,c,fp,ier = regrid_smth(x,y,z,[xb,xe,yb,ye,kx,ky,s])\n\
+Required arguments:\n"
+"  x : input rank-1 array('d') with bounds (mx)\n"
+"  y : input rank-1 array('d') with bounds (my)\n"
+"  z : input rank-1 array('d') with bounds (mx*my)\n"
+"Optional arguments:\n"
+"  xb := dmin(x,mx) input float\n"
+"  xe := dmax(x,mx) input float\n"
+"  yb := dmin(y,my) input float\n"
+"  ye := dmax(y,my) input float\n"
+"  kx := 3 input int\n"
+"  ky := 3 input int\n"
+"  s := 0.0 input float\n"
+"Return objects:\n"
+"  nx : int\n"
+"  tx : rank-1 array('d') with bounds (nxest)\n"
+"  ny : int\n"
+"  ty : rank-1 array('d') with bounds (nyest)\n"
+"  c : rank-1 array('d') with bounds ((nxest-kx-1)*(nyest-ky-1))\n"
+"  fp : float\n"
+"  ier : int";
+/* extern void F_FUNC(regrid,REGRID)(int*,int*,double*,int*,double*,double*,double*,double*,double*,double*,int*,int*,double*,int*,int*,int*,double*,int*,double*,double*,double*,double*,int*,int*,int*,int*); */
+static PyObject *f2py_rout_dfitpack_regrid_smth(const PyObject *capi_self,
+                           PyObject *capi_args,
+                           PyObject *capi_keywds,
+                           void (*f2py_func)(int*,int*,double*,int*,double*,double*,double*,double*,double*,double*,int*,int*,double*,int*,int*,int*,double*,int*,double*,double*,double*,double*,int*,int*,int*,int*)) {
+  PyObject * volatile capi_buildvalue = NULL;
+  volatile int f2py_success = 1;
+/*decl*/
+
+  int iopt = 0;
+  int mx = 0;
+  double *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;
+  int my = 0;
+  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 *z = NULL;
+  npy_intp z_Dims[1] = {-1};
+  const int z_Rank = 1;
+  PyArrayObject *capi_z_tmp = NULL;
+  int capi_z_intent = 0;
+  PyObject *z_capi = Py_None;
+  double xb = 0;
+  PyObject *xb_capi = Py_None;
+  double xe = 0;
+  PyObject *xe_capi = Py_None;
+  double yb = 0;
+  PyObject *yb_capi = Py_None;
+  double ye = 0;
+  PyObject *ye_capi = Py_None;
+  int kx = 0;
+  PyObject *kx_capi = Py_None;
+  int ky = 0;
+  PyObject *ky_capi = Py_None;
+  double s = 0;
+  PyObject *s_capi = Py_None;
+  int nxest = 0;
+  int nyest = 0;
+  int nx = 0;
+  double *tx = NULL;
+  npy_intp tx_Dims[1] = {-1};
+  const int tx_Rank = 1;
+  PyArrayObject *capi_tx_tmp = NULL;
+  int capi_tx_intent = 0;
+  int ny = 0;
+  double *ty = NULL;
+  npy_intp ty_Dims[1] = {-1};
+  const int ty_Rank = 1;
+  PyArrayObject *capi_ty_tmp = NULL;
+  int capi_ty_intent = 0;
+  double *c = NULL;
+  npy_intp c_Dims[1] = {-1};
+  const int c_Rank = 1;
+  PyArrayObject *capi_c_tmp = NULL;
+  int capi_c_intent = 0;
+  double fp = 0;
+  double *wrk = NULL;
+  npy_intp wrk_Dims[1] = {-1};
+  const int wrk_Rank = 1;
+  PyArrayObject *capi_wrk_tmp = NULL;
+  int capi_wrk_intent = 0;
+  int lwrk = 0;
+  int *iwrk = NULL;
+  npy_intp iwrk_Dims[1] = {-1};
+  const int iwrk_Rank = 1;
+  PyArrayObject *capi_iwrk_tmp = NULL;
+  int capi_iwrk_intent = 0;
+  int kwrk = 0;
+  int ier = 0;
+  static char *capi_kwlist[] = {"x","y","z","xb","xe","yb","ye","kx","ky","s",NULL};
+
+/*routdebugenter*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_clock();
+#endif
+  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
+    "OOO|OOOOOOO:dfitpack.regrid_smth",\
+    capi_kwlist,&x_capi,&y_capi,&z_capi,&xb_capi,&xe_capi,&yb_capi,&ye_capi,&kx_capi,&ky_capi,&s_capi))
+    return NULL;
+/*frompyobj*/
+  /* Processing variable fp */
+  /* Processing variable iopt */
+  iopt = 0;
+  /* Processing variable kx */
+  if (kx_capi == Py_None) kx = 3; else
+    f2py_success = int_from_pyobj(&kx,kx_capi,"dfitpack.regrid_smth() 5th keyword (kx) can't be converted to int");
+  if (f2py_success) {
+  CHECKSCALAR(1<=kx && kx<=5,"1<=kx && kx<=5","5th keyword kx","regrid_smth:kx=%d",kx) {
+  /* Processing variable ier */
+  /* Processing variable nx */
+  /* Processing variable ny */
+  /* Processing variable s */
+  if (s_capi == Py_None) s = 0.0; else
+    f2py_success = double_from_pyobj(&s,s_capi,"dfitpack.regrid_smth() 7th keyword (s) can't be converted to double");
+  if (f2py_success) {
+  CHECKSCALAR(0.0<=s,"0.0<=s","7th keyword s","regrid_smth:s=%g",s) {
+  /* Processing variable y */
+  ;
+  capi_y_intent |= F2PY_INTENT_IN;
+  capi_y_tmp = array_from_pyobj(PyArray_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi);
+  if (capi_y_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 2nd argument `y' of dfitpack.regrid_smth to C/Fortran array" );
+  } else {
+    y = (double *)(capi_y_tmp->data);
+
+  /* Processing variable x */
+  ;
+  capi_x_intent |= F2PY_INTENT_IN;
+  capi_x_tmp = array_from_pyobj(PyArray_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
+  if (capi_x_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 1st argument `x' of dfitpack.regrid_smth to C/Fortran array" );
+  } else {
+    x = (double *)(capi_x_tmp->data);
+
+  /* Processing variable ky */
+  if (ky_capi == Py_None) ky = 3; else
+    f2py_success = int_from_pyobj(&ky,ky_capi,"dfitpack.regrid_smth() 6th keyword (ky) can't be converted to int");
+  if (f2py_success) {
+  CHECKSCALAR(1<=ky && ky<=5,"1<=ky && ky<=5","6th keyword ky","regrid_smth:ky=%d",ky) {
+  /* Processing variable my */
+  my = len(y);
+  CHECKSCALAR(my>ky,"my>ky","hidden my","regrid_smth:my=%d",my) {
+  /* Processing variable mx */
+  mx = len(x);
+  CHECKSCALAR(mx>kx,"mx>kx","hidden mx","regrid_smth:mx=%d",mx) {
+  /* Processing variable xb */
+  if (xb_capi == Py_None) xb = dmin(x,mx); else
+    f2py_success = double_from_pyobj(&xb,xb_capi,"dfitpack.regrid_smth() 1st keyword (xb) can't be converted to double");
+  if (f2py_success) {
+  /* Processing variable yb */
+  if (yb_capi == Py_None) yb = dmin(y,my); else
+    f2py_success = double_from_pyobj(&yb,yb_capi,"dfitpack.regrid_smth() 3rd keyword (yb) can't be converted to double");
+  if (f2py_success) {
+  /* Processing variable ye */
+  if (ye_capi == Py_None) ye = dmax(y,my); else
+    f2py_success = double_from_pyobj(&ye,ye_capi,"dfitpack.regrid_smth() 4th keyword (ye) can't be converted to double");
+  if (f2py_success) {
+  /* Processing variable xe */
+  if (xe_capi == Py_None) xe = dmax(x,mx); else
+    f2py_success = double_from_pyobj(&xe,xe_capi,"dfitpack.regrid_smth() 2nd keyword (xe) can't be converted to double");
+  if (f2py_success) {
+  /* Processing variable nxest */
+  nxest = mx+kx+1;
+  CHECKSCALAR(nxest>=2*(kx+1),"nxest>=2*(kx+1)","hidden nxest","regrid_smth:nxest=%d",nxest) {
+  /* Processing variable nyest */
+  nyest = my+ky+1;
+  CHECKSCALAR(nyest>=2*(ky+1),"nyest>=2*(ky+1)","hidden nyest","regrid_smth:nyest=%d",nyest) {
+  /* Processing variable tx */
+  tx_Dims[0]=nxest;
+  capi_tx_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
+  capi_tx_tmp = array_from_pyobj(PyArray_DOUBLE,tx_Dims,tx_Rank,capi_tx_intent,Py_None);
+  if (capi_tx_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `tx' of dfitpack.regrid_smth to C/Fortran array" );
+  } else {
+    tx = (double *)(capi_tx_tmp->data);
+
+  /* Processing variable ty */
+  ty_Dims[0]=nyest;
+  capi_ty_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
+  capi_ty_tmp = array_from_pyobj(PyArray_DOUBLE,ty_Dims,ty_Rank,capi_ty_intent,Py_None);
+  if (capi_ty_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `ty' of dfitpack.regrid_smth to C/Fortran array" );
+  } else {
+    ty = (double *)(capi_ty_tmp->data);
+
+  /* Processing variable lwrk */
+  lwrk = calc_regrid_lwrk(mx,my,kx,ky,nxest,nyest);
+  /* Processing variable z */
+  z_Dims[0]=mx*my;
+  capi_z_intent |= F2PY_INTENT_IN;
+  capi_z_tmp = array_from_pyobj(PyArray_DOUBLE,z_Dims,z_Rank,capi_z_intent,z_capi);
+  if (capi_z_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 3rd argument `z' of dfitpack.regrid_smth to C/Fortran array" );
+  } else {
+    z = (double *)(capi_z_tmp->data);
+
+  CHECKARRAY(len(z)==mx*my,"len(z)==mx*my","3rd argument z") {
+  /* Processing variable kwrk */
+  kwrk = 3+mx+my+nxest+nyest;
+  /* Processing variable c */
+  c_Dims[0]=(nxest-kx-1)*(nyest-ky-1);
+  capi_c_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
+  capi_c_tmp = array_from_pyobj(PyArray_DOUBLE,c_Dims,c_Rank,capi_c_intent,Py_None);
+  if (capi_c_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `c' of dfitpack.regrid_smth to C/Fortran array" );
+  } else {
+    c = (double *)(capi_c_tmp->data);
+
+  /* Processing variable wrk */
+  wrk_Dims[0]=lwrk;
+  capi_wrk_intent |= F2PY_INTENT_CACHE|F2PY_INTENT_HIDE;
+  capi_wrk_tmp = array_from_pyobj(PyArray_DOUBLE,wrk_Dims,wrk_Rank,capi_wrk_intent,Py_None);
+  if (capi_wrk_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `wrk' of dfitpack.regrid_smth to C/Fortran array" );
+  } else {
+    wrk = (double *)(capi_wrk_tmp->data);
+
+  /* Processing variable iwrk */
+  iwrk_Dims[0]=kwrk;
+  capi_iwrk_intent |= F2PY_INTENT_CACHE|F2PY_INTENT_HIDE;
+  capi_iwrk_tmp = array_from_pyobj(PyArray_INT,iwrk_Dims,iwrk_Rank,capi_iwrk_intent,Py_None);
+  if (capi_iwrk_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `iwrk' of dfitpack.regrid_smth to C/Fortran array" );
+  } else {
+    iwrk = (int *)(capi_iwrk_tmp->data);
+
+/*end of frompyobj*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_call_clock();
+#endif
+/*callfortranroutine*/
+        (*f2py_func)(&iopt,&mx,x,&my,y,z,&xb,&xe,&yb,&ye,&kx,&ky,&s,&nxest,&nyest,&nx,tx,&ny,ty,c,&fp,wrk,&lwrk,iwrk,&kwrk,&ier);
+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("iNiNNdi",nx,capi_tx_tmp,ny,capi_ty_tmp,capi_c_tmp,fp,ier);
+/*closepyobjfrom*/
+/*end of closepyobjfrom*/
+    } /*if (f2py_success) after callfortranroutine*/
+/*cleanupfrompyobj*/
+    Py_XDECREF(capi_iwrk_tmp);
+  }  /*if (capi_iwrk_tmp == NULL) ... else of iwrk*/
+  /* End of cleaning variable iwrk */
+    Py_XDECREF(capi_wrk_tmp);
+  }  /*if (capi_wrk_tmp == NULL) ... else of wrk*/
+  /* End of cleaning variable wrk */
+  }  /*if (capi_c_tmp == NULL) ... else of c*/
+  /* End of cleaning variable c */
+  /* End of cleaning variable kwrk */
+  } /*CHECKARRAY(len(z)==mx*my)*/
+  if((PyObject *)capi_z_tmp!=z_capi) {
+    Py_XDECREF(capi_z_tmp); }
+  }  /*if (capi_z_tmp == NULL) ... else of z*/
+  /* End of cleaning variable z */
+  /* End of cleaning variable lwrk */
+  }  /*if (capi_ty_tmp == NULL) ... else of ty*/
+  /* End of cleaning variable ty */
+  }  /*if (capi_tx_tmp == NULL) ... else of tx*/
+  /* End of cleaning variable tx */
+  } /*CHECKSCALAR(nyest>=2*(ky+1))*/
+  /* End of cleaning variable nyest */
+  } /*CHECKSCALAR(nxest>=2*(kx+1))*/
+  /* End of cleaning variable nxest */
+  } /*if (f2py_success) of xe*/
+  /* End of cleaning variable xe */
+  } /*if (f2py_success) of ye*/
+  /* End of cleaning variable ye */
+  } /*if (f2py_success) of yb*/
+  /* End of cleaning variable yb */
+  } /*if (f2py_success) of xb*/
+  /* End of cleaning variable xb */
+  } /*CHECKSCALAR(mx>kx)*/
+  /* End of cleaning variable mx */
+  } /*CHECKSCALAR(my>ky)*/
+  /* End of cleaning variable my */
+  } /*CHECKSCALAR(1<=ky && ky<=5)*/
+  } /*if (f2py_success) of ky*/
+  /* End of cleaning variable ky */
+  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_y_tmp!=y_capi) {
+    Py_XDECREF(capi_y_tmp); }
+  }  /*if (capi_y_tmp == NULL) ... else of y*/
+  /* End of cleaning variable y */
+  } /*CHECKSCALAR(0.0<=s)*/
+  } /*if (f2py_success) of s*/
+  /* End of cleaning variable s */
+  /* End of cleaning variable ny */
+  /* End of cleaning variable nx */
+  /* End of cleaning variable ier */
+  } /*CHECKSCALAR(1<=kx && kx<=5)*/
+  } /*if (f2py_success) of kx*/
+  /* End of cleaning variable kx */
+  /* End of cleaning variable iopt */
+  /* End of cleaning variable fp */
+/*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 regrid_smth *****************************/
+
+/*********************************** dblint ***********************************/
+static char doc_f2py_rout_dfitpack_dblint[] = "\
+Function signature:\n\
+  dblint = dblint(tx,ty,c,kx,ky,xb,xe,yb,ye)\n\
+Required arguments:\n"
+"  tx : input rank-1 array('d') with bounds (nx)\n"
+"  ty : input rank-1 array('d') with bounds (ny)\n"
+"  c : input rank-1 array('d') with bounds ((nx-kx-1)*(ny-ky-1))\n"
+"  kx : input int\n"
+"  ky : input int\n"
+"  xb : input float\n"
+"  xe : input float\n"
+"  yb : input float\n"
+"  ye : input float\n"
+"Return objects:\n"
+"  dblint : float";
+/* extern void F_WRAPPEDFUNC(dblint,DBLINT)(double*,double*,int*,double*,int*,double*,int*,int*,double*,double*,double*,double*,double*); */
+static PyObject *f2py_rout_dfitpack_dblint(const PyObject *capi_self,
+                           PyObject *capi_args,
+                           PyObject *capi_keywds,
+                           void (*f2py_func)(double*,double*,int*,double*,int*,double*,int*,int*,double*,double*,double*,double*,double*)) {
+  PyObject * volatile capi_buildvalue = NULL;
+  volatile int f2py_success = 1;
+/*decl*/
+
+  double dblint = 0;
+  double *tx = NULL;
+  npy_intp tx_Dims[1] = {-1};
+  const int tx_Rank = 1;
+  PyArrayObject *capi_tx_tmp = NULL;
+  int capi_tx_intent = 0;
+  PyObject *tx_capi = Py_None;
+  int nx = 0;
+  double *ty = NULL;
+  npy_intp ty_Dims[1] = {-1};
+  const int ty_Rank = 1;
+  PyArrayObject *capi_ty_tmp = NULL;
+  int capi_ty_intent = 0;
+  PyObject *ty_capi = Py_None;
+  int ny = 0;
+  double *c = NULL;
+  npy_intp c_Dims[1] = {-1};
+  const int c_Rank = 1;
+  PyArrayObject *capi_c_tmp = NULL;
+  int capi_c_intent = 0;
+  PyObject *c_capi = Py_None;
+  int kx = 0;
+  PyObject *kx_capi = Py_None;
+  int ky = 0;
+  PyObject *ky_capi = Py_None;
+  double xb = 0;
+  PyObject *xb_capi = Py_None;
+  double xe = 0;
+  PyObject *xe_capi = Py_None;
+  double yb = 0;
+  PyObject *yb_capi = Py_None;
+  double ye = 0;
+  PyObject *ye_capi = Py_None;
+  double *wrk = NULL;
+  npy_intp wrk_Dims[1] = {-1};
+  const int wrk_Rank = 1;
+  PyArrayObject *capi_wrk_tmp = NULL;
+  int capi_wrk_intent = 0;
+  static char *capi_kwlist[] = {"tx","ty","c","kx","ky","xb","xe","yb","ye",NULL};
+
+/*routdebugenter*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_clock();
+#endif
+  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
+    "OOOOOOOOO|:dfitpack.dblint",\
+    capi_kwlist,&tx_capi,&ty_capi,&c_capi,&kx_capi,&ky_capi,&xb_capi,&xe_capi,&yb_capi,&ye_capi))
+    return NULL;
+/*frompyobj*/
+  /* Processing variable kx */
+    f2py_success = int_from_pyobj(&kx,kx_capi,"dfitpack.dblint() 4th argument (kx) can't be converted to int");
+  if (f2py_success) {
+  /* Processing variable tx */
+  ;
+  capi_tx_intent |= F2PY_INTENT_IN;
+  capi_tx_tmp = array_from_pyobj(PyArray_DOUBLE,tx_Dims,tx_Rank,capi_tx_intent,tx_capi);
+  if (capi_tx_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 1st argument `tx' of dfitpack.dblint to C/Fortran array" );
+  } else {
+    tx = (double *)(capi_tx_tmp->data);
+
+  /* Processing variable ty */
+  ;
+  capi_ty_intent |= F2PY_INTENT_IN;
+  capi_ty_tmp = array_from_pyobj(PyArray_DOUBLE,ty_Dims,ty_Rank,capi_ty_intent,ty_capi);
+  if (capi_ty_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 2nd argument `ty' of dfitpack.dblint to C/Fortran array" );
+  } else {
+    ty = (double *)(capi_ty_tmp->data);
+
+  /* Processing variable xb */
+    f2py_success = double_from_pyobj(&xb,xb_capi,"dfitpack.dblint() 6th argument (xb) can't be converted to double");
+  if (f2py_success) {
+  /* Processing variable yb */
+    f2py_success = double_from_pyobj(&yb,yb_capi,"dfitpack.dblint() 8th argument (yb) can't be converted to double");
+  if (f2py_success) {
+  /* Processing variable ye */
+    f2py_success = double_from_pyobj(&ye,ye_capi,"dfitpack.dblint() 9th argument (ye) can't be converted to double");
+  if (f2py_success) {
+  /* Processing variable xe */
+    f2py_success = double_from_pyobj(&xe,xe_capi,"dfitpack.dblint() 7th argument (xe) can't be converted to double");
+  if (f2py_success) {
+  /* Processing variable ky */
+    f2py_success = int_from_pyobj(&ky,ky_capi,"dfitpack.dblint() 5th argument (ky) can't be converted to int");
+  if (f2py_success) {
+  /* Processing variable dblint */
+  /* Processing variable nx */
+  nx = len(tx);
+  /* Processing variable ny */
+  ny = len(ty);
+  /* Processing variable c */
+  c_Dims[0]=(nx-kx-1)*(ny-ky-1);
+  capi_c_intent |= F2PY_INTENT_IN;
+  capi_c_tmp = array_from_pyobj(PyArray_DOUBLE,c_Dims,c_Rank,capi_c_intent,c_capi);
+  if (capi_c_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting 3rd argument `c' of dfitpack.dblint to C/Fortran array" );
+  } else {
+    c = (double *)(capi_c_tmp->data);
+
+  CHECKARRAY(len(c)==(nx-kx-1)*(ny-ky-1),"len(c)==(nx-kx-1)*(ny-ky-1)","3rd argument c") {
+  /* Processing variable wrk */
+  wrk_Dims[0]=nx+ny-kx-ky-2;
+  capi_wrk_intent |= F2PY_INTENT_CACHE|F2PY_INTENT_HIDE;
+  capi_wrk_tmp = array_from_pyobj(PyArray_DOUBLE,wrk_Dims,wrk_Rank,capi_wrk_intent,Py_None);
+  if (capi_wrk_tmp == NULL) {
+    if (!PyErr_Occurred())
+      PyErr_SetString(dfitpack_error,"failed in converting hidden `wrk' of dfitpack.dblint to C/Fortran array" );
+  } else {
+    wrk = (double *)(capi_wrk_tmp->data);
+
+/*end of frompyobj*/
+#ifdef F2PY_REPORT_ATEXIT
+f2py_start_call_clock();
+#endif
+/*callfortranroutine*/
+  (*f2py_func)(&dblint,tx,&nx,ty,&ny,c,&kx,&ky,&xb,&xe,&yb,&ye,wrk);
+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("d",dblint);
+/*closepyobjfrom*/
+/*end of closepyobjfrom*/
+    } /*if (f2py_success) after callfortranroutine*/
+/*cleanupfrompyobj*/
+    Py_XDECREF(capi_wrk_tmp);
+  }  /*if (capi_wrk_tmp == NULL) ... else of wrk*/
+  /* End of cleaning variable wrk */
+  } /*CHECKARRAY(len(c)==(nx-kx-1)*(ny-ky-1))*/
+  if((PyObject *)capi_c_tmp!=c_capi) {
+    Py_XDECREF(capi_c_tmp); }
+  }  /*if (capi_c_tmp == NULL) ... else of c*/
+  /* End of cleaning variable c */
+  /* End of cleaning variable ny */
+  /* End of cleaning variable nx */
+  /* End of cleaning variable dblint */
+  } /*if (f2py_success) of ky*/
+  /* End of cleaning variable ky */
+  } /*if (f2py_success) of xe*/
+  /* End of cleaning variable xe */
+  } /*if (f2py_success) of ye*/
+  /* End of cleaning variable ye */
+  } /*if (f2py_success) of yb*/
+  /* End of cleaning variable yb */
+  } /*if (f2py_success) of xb*/
+  /* End of cleaning variable xb */
+  if((PyObject *)capi_ty_tmp!=ty_capi) {
+    Py_XDECREF(capi_ty_tmp); }
+  }  /*if (capi_ty_tmp == NULL) ... else of ty*/
+  /* End of cleaning variable ty */
+  if((PyObject *)capi_tx_tmp!=tx_capi) {
+    Py_XDECREF(capi_tx_tmp); }
+  }  /*if (capi_tx_tmp == NULL) ... else of tx*/
+  /* End of cleaning variable tx */
+  } /*if (f2py_success) of kx*/
+  /* End of cleaning variable kx */
+/*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 dblint *******************************/
+/*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[] = {
+  {"splev",-1,{{-1}},0,(char *)F_FUNC(splev,SPLEV),(f2py_init_func)f2py_rout_dfitpack_splev,doc_f2py_rout_dfitpack_splev},
+  {"splder",-1,{{-1}},0,(char *)F_FUNC(splder,SPLDER),(f2py_init_func)f2py_rout_dfitpack_splder,doc_f2py_rout_dfitpack_splder},
+  {"splint",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(splint,SPLINT),(f2py_init_func)f2py_rout_dfitpack_splint,doc_f2py_rout_dfitpack_splint},
+  {"sproot",-1,{{-1}},0,(char *)F_FUNC(sproot,SPROOT),(f2py_init_func)f2py_rout_dfitpack_sproot,doc_f2py_rout_dfitpack_sproot},
+  {"spalde",-1,{{-1}},0,(char *)F_FUNC(spalde,SPALDE),(f2py_init_func)f2py_rout_dfitpack_spalde,doc_f2py_rout_dfitpack_spalde},
+  {"curfit",-1,{{-1}},0,(char *)F_FUNC(curfit,CURFIT),(f2py_init_func)f2py_rout_dfitpack_curfit,doc_f2py_rout_dfitpack_curfit},
+  {"percur",-1,{{-1}},0,(char *)F_FUNC(percur,PERCUR),(f2py_init_func)f2py_rout_dfitpack_percur,doc_f2py_rout_dfitpack_percur},
+  {"parcur",-1,{{-1}},0,(char *)F_FUNC(parcur,PARCUR),(f2py_init_func)f2py_rout_dfitpack_parcur,doc_f2py_rout_dfitpack_parcur},
+  {"fpcurf0",-1,{{-1}},0,(char *)F_FUNC(fpcurf,FPCURF),(f2py_init_func)f2py_rout_dfitpack_fpcurf0,doc_f2py_rout_dfitpack_fpcurf0},
+  {"fpcurf1",-1,{{-1}},0,(char *)F_FUNC(fpcurf,FPCURF),(f2py_init_func)f2py_rout_dfitpack_fpcurf1,doc_f2py_rout_dfitpack_fpcurf1},
+  {"fpcurfm1",-1,{{-1}},0,(char *)F_FUNC(fpcurf,FPCURF),(f2py_init_func)f2py_rout_dfitpack_fpcurfm1,doc_f2py_rout_dfitpack_fpcurfm1},
+  {"bispev",-1,{{-1}},0,(char *)F_FUNC(bispev,BISPEV),(f2py_init_func)f2py_rout_dfitpack_bispev,doc_f2py_rout_dfitpack_bispev},
+  {"surfit_smth",-1,{{-1}},0,(char *)F_FUNC(surfit,SURFIT),(f2py_init_func)f2py_rout_dfitpack_surfit_smth,doc_f2py_rout_dfitpack_surfit_smth},
+  {"surfit_lsq",-1,{{-1}},0,(char *)F_FUNC(surfit,SURFIT),(f2py_init_func)f2py_rout_dfitpack_surfit_lsq,doc_f2py_rout_dfitpack_surfit_lsq},
+  {"regrid_smth",-1,{{-1}},0,(char *)F_FUNC(regrid,REGRID),(f2py_init_func)f2py_rout_dfitpack_regrid_smth,doc_f2py_rout_dfitpack_regrid_smth},
+  {"dblint",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(dblint,DBLINT),(f2py_init_func)f2py_rout_dfitpack_dblint,doc_f2py_rout_dfitpack_dblint},
+
+/*eof routine_defs*/
+  {NULL}
+};
+
+static PyMethodDef f2py_module_methods[] = {
+
+  {NULL,NULL}
+};
+
+PyMODINIT_FUNC initdfitpack(void) {
+  int i;
+  PyObject *m,*d, *s;
+  m = dfitpack_module = Py_InitModule("dfitpack", f2py_module_methods);
+  PyFortran_Type.ob_type = &PyType_Type;
+  import_array();
+  if (PyErr_Occurred())
+    {PyErr_SetString(PyExc_ImportError, "can't initialize module dfitpack (failed to import numpy)"); return;}
+  d = PyModule_GetDict(m);
+  s = PyString_FromString("$Revision: $");
+  PyDict_SetItemString(d, "__version__", s);
+  s = PyString_FromString("This module 'dfitpack' is auto-generated with f2py (version:2_4422).\nFunctions:\n"
+"  y = splev(t,c,k,x)\n"
+"  y = splder(t,c,k,x,nu=1)\n"
+"  splint = splint(t,c,k,a,b)\n"
+"  zero,m,ier = sproot(t,c,mest=3*(n-7))\n"
+"  d,ier = spalde(t,c,k,x)\n"
+"  n,c,fp,ier = curfit(iopt,x,y,w,t,wrk,iwrk,xb=x[0],xe=x[m-1],k=3,s=0.0)\n"
+"  n,c,fp,ier = percur(iopt,x,y,w,t,wrk,iwrk,k=3,s=0.0)\n"
+"  n,c,fp,ier = parcur(iopt,ipar,idim,u,x,w,ub,ue,t,wrk,iwrk,k=3.0,s=0.0)\n"
+"  x,y,w,xb,xe,k,s,n,t,c,fp,fpint,nrdata,ier = fpcurf0(x,y,k,w=1.0,xb=x[0],xe=x[m-1],s=m,nest=(s==0.0?m+k+1:MAX(m/2,2*k1)))\n"
+"  x,y,w,xb,xe,k,s,n,t,c,fp,fpint,nrdata,ier = fpcurf1(x,y,w,xb,xe,k,s,n,t,c,fp,fpint,nrdata,ier,overwrite_x=1,overwrite_y=1,overwrite_w=1,overwrite_t=1,overwrite_c=1,overwrite_fpint=1,overwrite_nrdata=1)\n"
+"  x,y,w,xb,xe,k,s,n,t,c,fp,fpint,nrdata,ier = fpcurfm1(x,y,k,t,w=1.0,xb=x[0],xe=x[m-1],overwrite_t=1)\n"
+"  z,ier = bispev(tx,ty,c,kx,ky,x,y)\n"
+"  nx,tx,ny,ty,c,fp,wrk1,ier = surfit_smth(x,y,z,w=1.0,xb=dmin(x,m),xe=dmax(x,m),yb=dmin(y,m),ye=dmax(y,m),kx=3,ky=3,s=m,nxest=imax(kx+1+sqrt(m/2),2*(kx+1)),nyest=imax(ky+1+sqrt(m/2),2*(ky+1)),eps=1e-016,lwrk2=calc_surfit_lwrk2(m,kx,ky,nxest,nyest))\n"
+"  tx,ty,c,fp,ier = surfit_lsq(x,y,z,tx,ty,w=1.0,xb=calc_b(x,m,tx,nx),xe=calc_e(x,m,tx,nx),yb=calc_b(y,m,ty,ny),ye=calc_e(y,m,ty,ny),kx=3,ky=3,eps=1e-016,lwrk2=calc_surfit_lwrk2(m,kx,ky,nxest,nyest),overwrite_tx=1,overwrite_ty=1)\n"
+"  nx,tx,ny,ty,c,fp,ier = regrid_smth(x,y,z,xb=dmin(x,mx),xe=dmax(x,mx),yb=dmin(y,my),ye=dmax(y,my),kx=3,ky=3,s=0.0)\n"
+"  dblint = dblint(tx,ty,c,kx,ky,xb,xe,yb,ye)\n"
+".");
+  PyDict_SetItemString(d, "__doc__", s);
+  dfitpack_error = PyErr_NewException ("dfitpack.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]));
+
+
+
+    {
+      extern double F_FUNC(splint,SPLINT)(void);
+      PyObject* o = PyDict_GetItemString(d,"splint");
+      PyObject_SetAttrString(o,"_cpointer", PyCObject_FromVoidPtr((void*)F_FUNC(splint,SPLINT),NULL));
+    }
+    
+
+
+
+
+
+
+
+
+
+
+
+
+
+    {
+      extern double F_FUNC(dblint,DBLINT)(void);
+      PyObject* o = PyDict_GetItemString(d,"dblint");
+      PyObject_SetAttrString(o,"_cpointer", PyCObject_FromVoidPtr((void*)F_FUNC(dblint,DBLINT),NULL));
+    }
+    
+/*eof initf2pywraphooks*/
+/*eof initf90modhooks*/
+
+/*eof initcommonhooks*/
+
+
+#ifdef F2PY_REPORT_ATEXIT
+  if (! PyErr_Occurred())
+    on_exit(f2py_report_on_exit,(void*)"dfitpack");
+#endif
+
+}
+#ifdef __cplusplus
+}
+#endif

Added: branches/Interpolate1D/build/src.win32-2.5/fitpack.pyf
===================================================================
--- branches/Interpolate1D/build/src.win32-2.5/fitpack.pyf	2008-07-16 00:26:23 UTC (rev 4545)
+++ branches/Interpolate1D/build/src.win32-2.5/fitpack.pyf	2008-07-16 22:08:51 UTC (rev 4546)
@@ -0,0 +1,479 @@
+!    -*- f90 -*-
+! Author: Pearu Peterson <pearu@cens.ioc.ee>
+!
+python module dfitpack ! in
+
+  usercode '''
+
+static double dmax(double* seq,int len) {
+  double val;
+  int i;
+  if (len<1)
+    return -1e308;
+  val = seq[0];
+  for(i=1;i<len;++i)
+    if (seq[i]>val) val = seq[i];
+  return val;
+}
+static double dmin(double* seq,int len) {
+  double val;
+  int i;
+  if (len<1)
+    return 1e308;
+  val = seq[0];
+  for(i=1;i<len;++i)
+    if (seq[i]<val) val = seq[i];
+  return val;
+}
+static double calc_b(double* x,int m,double* tx,int nx) {
+  double val1 = dmin(x,m);
+  double val2 = dmin(tx,nx);
+  if (val2>val1) return val1;
+  val1 = dmax(tx,nx);
+  return val2 - (val1-val2)/nx;
+}
+static double calc_e(double* x,int m,double* tx,int nx) {
+  double val1 = dmax(x,m);
+  double val2 = dmax(tx,nx);
+  if (val2<val1) return val1;
+  val1 = dmin(tx,nx);
+  return val2 + (val2-val1)/nx;
+}
+static int imax(int i1,int i2) {
+  return MAX(i1,i2);
+}
+
+static int calc_surfit_lwrk1(int m, int kx, int ky, int nxest, int nyest) {
+ int u = nxest-kx-1;
+ int v = nyest-ky-1;
+ int km = MAX(kx,ky)+1;
+ int ne = MAX(nxest,nyest);
+ int bx = kx*v+ky+1;
+ int by = ky*u+kx+1;
+ int b1,b2;
+ if (bx<=by) {b1=bx;b2=bx+v-ky;}
+ else {b1=by;b2=by+u-kx;}
+ return u*v*(2+b1+b2)+2*(u+v+km*(m+ne)+ne-kx-ky)+b2+1;
+}
+static int calc_surfit_lwrk2(int m, int kx, int ky, int nxest, int nyest) {
+ int u = nxest-kx-1;
+ int v = nyest-ky-1;
+ int bx = kx*v+ky+1;
+ int by = ky*u+kx+1;
+ int b2 = (bx<=by?bx+v-ky:by+u-kx);
+ return u*v*(b2+1)+b2;
+}
+
+static int calc_regrid_lwrk(int mx, int my, int kx, int ky, 
+                            int nxest, int nyest) {
+ int u = MAX(my, nxest);
+ return 4+nxest*(my+2*kx+5)+nyest*(2*ky+5)+mx*(kx+1)+my*(ky+1)+u;
+}
+'''
+
+  interface
+
+     !!!!!!!!!! Univariate spline !!!!!!!!!!!
+
+     subroutine splev(t,n,c,k,x,y,m,ier)
+       ! y = splev(t,c,k,x)
+       real*8 dimension(n),intent(in) :: t
+       integer intent(hide),depend(t) :: n=len(t)
+       real*8 dimension(n),depend(n,k),check(len(c)==n),intent(in) :: c
+       integer :: k
+       real*8 dimension(m),intent(in) :: x
+       real*8 dimension(m),depend(m),intent(out) :: y
+       integer intent(hide),depend(x) :: m=len(x)
+       integer intent(hide) :: ier
+     end subroutine splev
+
+     subroutine splder(t,n,c,k,nu,x,y,m,wrk,ier)
+       ! dy = splder(t,c,k,x,[nu])
+       real*8 dimension(n) :: t
+       integer depend(t),intent(hide) :: n=len(t)
+       real*8 dimension(n),depend(n,k),check(len(c)==n),intent(in) :: c
+       integer :: k
+       integer depend(k),check(0<=nu && nu<=k) :: nu = 1
+       real*8 dimension(m) :: x
+       real*8 dimension(m),depend(m),intent(out) :: y
+       integer depend(x),intent(hide) :: m=len(x)
+       real*8 dimension(n),depend(n),intent(cache,hide) :: wrk
+       integer intent(hide) :: ier
+     end subroutine splder
+
+     function splint(t,n,c,k,a,b,wrk)
+       ! iy = splint(t,c,k,a,b)
+       real*8 dimension(n),intent(in) :: t
+       integer intent(hide),depend(t) :: n=len(t)
+       real*8 dimension(n),depend(n),check(len(c)==n) :: c
+       integer intent(in) :: k
+       real*8 intent(in) :: a
+       real*8 intent(in) :: b
+       real*8 dimension(n),depend(n),intent(cache,hide) :: wrk
+       real*8 :: splint
+     end function splint
+
+     subroutine sproot(t,n,c,zero,mest,m,ier)
+       ! zero,m,ier = sproot(t,c[,mest])
+       real*8 dimension(n),intent(in) :: t
+       integer intent(hide),depend(t),check(n>=8) :: n=len(t)
+       real*8 dimension(n),depend(n),check(len(c)==n) :: c
+       real*8 dimension(mest),intent(out),depend(mest) :: zero
+       integer optional,intent(in),depend(n) :: mest=3*(n-7)
+       integer intent(out) :: m
+       integer intent(out) :: ier
+     end subroutine sproot
+
+     subroutine spalde(t,n,c,k,x,d,ier)
+       ! d,ier = spalde(t,c,k,x)
+
+       callprotoargument double*,int*,double*,int*,double*,double*,int*
+       callstatement {int k1=k+1; (*f2py_func)(t,&n,c,&k1,&x,d,&ier); }
+
+       real*8 dimension(n) :: t
+       integer intent(hide),depend(t) :: n=len(t)
+       real*8 dimension(n),depend(n),check(len(c)==n) :: c
+       integer intent(in) :: k
+       real*8 intent(in) :: x
+       real*8 dimension(k+1),intent(out),depend(k) :: d
+       integer intent(out) :: ier
+     end subroutine spalde
+
+     subroutine curfit(iopt,m,x,y,w,xb,xe,k,s,nest,n,t,c,fp,wrk,lwrk,iwrk,ier)
+       ! in  curfit.f
+       integer :: iopt
+       integer intent(hide),depend(x),check(m>k),depend(k) :: m=len(x)
+       real*8 dimension(m) :: x
+       real*8 dimension(m),depend(m),check(len(y)==m) :: y
+       real*8 dimension(m),depend(m),check(len(w)==m) :: w
+       real*8 optional,depend(x),check(xb<=x[0]) :: xb = x[0]
+       real*8 optional,depend(x,m),check(xe>=x[m-1]) :: xe = x[m-1]
+       integer optional,check(1<=k && k <=5),intent(in) :: k=3
+       real*8 optional,check(s>=0.0) :: s = 0.0
+       integer intent(hide),depend(t) :: nest=len(t)
+       integer intent(out), depend(nest) :: n=nest
+       real*8 dimension(nest),intent(inout) :: t
+       real*8 dimension(n),intent(out) :: c
+       real*8 intent(out) :: fp
+       real*8 dimension(lwrk),intent(inout) :: wrk
+       integer intent(hide),depend(wrk) :: lwrk=len(wrk)
+       integer dimension(nest),intent(inout) :: iwrk
+       integer intent(out) :: ier
+     end subroutine curfit
+
+     subroutine percur(iopt,m,x,y,w,k,s,nest,n,t,c,fp,wrk,lwrk,iwrk,ier) 
+       ! in percur.f
+       integer :: iopt
+       integer intent(hide),depend(x),check(m>k),depend(k) :: m=len(x)
+       real*8 dimension(m) :: x
+       real*8 dimension(m),depend(m),check(len(y)==m) :: y
+       real*8 dimension(m),depend(m),check(len(w)==m) :: w
+       integer optional,check(1<=k && k <=5),intent(in) :: k=3
+       real*8 optional,check(s>=0.0) :: s = 0.0
+       integer intent(hide),depend(t) :: nest=len(t)
+       integer intent(out), depend(nest) :: n=nest
+       real*8 dimension(nest),intent(inout) :: t
+       real*8 dimension(n),intent(out) :: c
+       real*8 intent(out) :: fp
+       real*8 dimension(lwrk),intent(inout) :: wrk
+       integer intent(hide),depend(wrk) :: lwrk=len(wrk)
+       integer dimension(nest),intent(inout) :: iwrk
+       integer intent(out) :: ier
+     end subroutine percur
+     
+
+     subroutine parcur(iopt,ipar,idim,m,u,mx,x,w,ub,ue,k,s,nest,n,t,nc,c,fp,wrk,lwrk,iwrk,ier) 
+       ! in parcur.f
+       integer check(iopt>=-1 && iopt <= 1):: iopt
+       integer check(ipar == 1 || ipar == 0) :: ipar
+       integer check(idim > 0 && idim < 11) :: idim
+       integer intent(hide),depend(u,k),check(m>k) :: m=len(u)
+       real*8 dimension(m), intent(inout) :: u
+       integer intent(hide),depend(x,idim,m),check(mx>=idim*m) :: mx=len(x)
+       real*8 dimension(mx) :: x
+       real*8 dimension(m) :: w
+       real*8 :: ub
+       real*8 :: ue
+       integer optional, check(1<=k && k<=5) :: k=3.0
+       real*8 optional, check(s>=0.0) :: s = 0.0
+       integer intent(hide), depend(t) :: nest=len(t)
+       integer intent(out), depend(nest) :: n=nest
+       real*8 dimension(nest), intent(inout) :: t
+       integer intent(hide), depend(c,nest,idim), check(nc>=idim*nest) :: nc=len(c)
+       real*8 dimension(nc), intent(out) :: c
+       real*8 intent(out) :: fp
+       real*8 dimension(lwrk), intent(inout) :: wrk
+       integer intent(hide),depend(wrk) :: lwrk=len(wrk)
+       integer dimension(nest), intent(inout) :: iwrk
+       integer intent(out) :: ier
+     end subroutine parcur
+
+
+     subroutine fpcurf0(iopt,x,y,w,m,xb,xe,k,s,nest,tol,maxit,k1,k2,n,t,c,fp,fpint,wrk,nrdata,ier)
+       ! x,y,w,xb,xe,k,s,n,t,c,fp,fpint,nrdata,ier = \
+       !   fpcurf0(x,y,k,[w,xb,xe,s,nest])
+
+       fortranname fpcurf
+       callprotoargument int*,double*,double*,double*,int*,double*,double*,int*,double*,int*,double*,int*,int*,int*,int*,double*,double*,double*,double*,double*,double*,double*,double*,double*,int*,int*
+       callstatement (*f2py_func)(&iopt,x,y,w,&m,&xb,&xe,&k,&s,&nest,&tol,&maxit,&k1,&k2,&n,t,c,&fp,fpint,wrk,wrk+nest,wrk+nest*k2,wrk+nest*2*k2,wrk+nest*3*k2,nrdata,&ier)
+
+       integer intent(hide) :: iopt = 0
+       real*8 dimension(m),intent(in,out) :: x
+       real*8 dimension(m),depend(m),check(len(y)==m),intent(in,out) :: y
+       real*8 dimension(m),depend(m),check(len(w)==m),intent(in,out) :: w = 1.0
+       integer intent(hide),depend(x),check(m>k),depend(k) :: m=len(x)
+       real*8 intent(in,out),depend(x),check(xb<=x[0]) :: xb = x[0]
+       real*8 intent(in,out),depend(x,m),check(xe>=x[m-1]) :: xe = x[m-1]
+       integer check(1<=k && k<=5),intent(in,out) :: k
+       real*8 check(s>=0.0),depend(m),intent(in,out) :: s = m
+       integer intent(in),depend(m,s,k,k1),check(nest>=2*k1) :: nest = (s==0.0?m+k+1:MAX(m/2,2*k1))
+       real*8 intent(hide) :: tol = 0.001
+       integer intent(hide) :: maxit = 20
+       integer intent(hide),depend(k) :: k1=k+1
+       integer intent(hide),depend(k) :: k2=k+2
+       integer intent(out) :: n
+       real*8 dimension(nest),intent(out),depend(nest) :: t
+       real*8 dimension(nest),depend(nest),intent(out) :: c
+       real*8 intent(out) :: fp
+       real*8 dimension(nest),depend(nest),intent(out,cache)  :: fpint
+       real*8 dimension(nest*3*k2+m*k1),intent(cache,hide),depend(nest,k1,k2,m) :: wrk
+       integer dimension(nest),depend(nest),intent(out,cache) :: nrdata
+       integer intent(out) :: ier
+     end subroutine fpcurf0
+
+     subroutine fpcurf1(iopt,x,y,w,m,xb,xe,k,s,nest,tol,maxit,k1,k2,n,t,c,fp,fpint,wrk,nrdata,ier)
+       ! x,y,w,xb,xe,k,s,n,t,c,fp,fpint,nrdata,ier = \
+       !   fpcurf1(x,y,w,xb,xe,k,s,n,t,c,fp,fpint,nrdata,ier)
+
+       fortranname fpcurf
+       callprotoargument int*,double*,double*,double*,int*,double*,double*,int*,double*,int*,double*,int*,int*,int*,int*,double*,double*,double*,double*,double*,double*,double*,double*,double*,int*,int*
+       callstatement (*f2py_func)(&iopt,x,y,w,&m,&xb,&xe,&k,&s,&nest,&tol,&maxit,&k1,&k2,&n,t,c,&fp,fpint,wrk,wrk+nest,wrk+nest*k2,wrk+nest*2*k2,wrk+nest*3*k2,nrdata,&ier)
+
+       integer intent(hide) :: iopt = 1
+       real*8 dimension(m),intent(in,out,overwrite) :: x
+       real*8 dimension(m),depend(m),check(len(y)==m),intent(in,out,overwrite) :: y
+       real*8 dimension(m),depend(m),check(len(w)==m),intent(in,out,overwrite) :: w
+       integer intent(hide),depend(x),check(m>k),depend(k) :: m=len(x)
+       real*8 intent(in,out) :: xb
+       real*8 intent(in,out) :: xe
+       integer check(1<=k && k<=5),intent(in,out) :: k
+       real*8 check(s>=0.0),intent(in,out) :: s
+       integer intent(hide),depend(t) :: nest = len(t)
+       real*8 intent(hide) :: tol = 0.001
+       integer intent(hide) :: maxit = 20
+       integer intent(hide),depend(k) :: k1=k+1
+       integer intent(hide),depend(k) :: k2=k+2
+       integer intent(in,out) :: n
+       real*8 dimension(nest),intent(in,out,overwrite) :: t
+       real*8 dimension(nest),depend(nest),check(len(c)==nest),intent(in,out,overwrite) :: c
+       real*8 intent(in,out) :: fp
+       real*8 dimension(nest),depend(nest),check(len(fpint)==nest),intent(in,out,cache,overwrite)  :: fpint
+       real*8 dimension(nest*3*k2+m*k1),intent(cache,hide),depend(nest,k1,k2,m) :: wrk
+       integer dimension(nest),depend(nest),check(len(nrdata)==nest),intent(in,out,cache,overwrite) :: nrdata
+       integer intent(in,out) :: ier
+     end subroutine fpcurf1
+
+     subroutine fpcurfm1(iopt,x,y,w,m,xb,xe,k,s,nest,tol,maxit,k1,k2,n,t,c,fp,fpint,wrk,nrdata,ier)
+       ! x,y,w,xb,xe,k,s,n,t,c,fp,fpint,nrdata,ier = \
+       !   fpcurfm1(x,y,k,t,[w,xb,xe])
+
+       fortranname fpcurf
+       callprotoargument int*,double*,double*,double*,int*,double*,double*,int*,double*,int*,double*,int*,int*,int*,int*,double*,double*,double*,double*,double*,double*,double*,double*,double*,int*,int*
+       callstatement (*f2py_func)(&iopt,x,y,w,&m,&xb,&xe,&k,&s,&nest,&tol,&maxit,&k1,&k2,&n,t,c,&fp,fpint,wrk,wrk+nest,wrk+nest*k2,wrk+nest*2*k2,wrk+nest*3*k2,nrdata,&ier)
+
+       integer intent(hide) :: iopt = -1
+       real*8 dimension(m),intent(in,out) :: x
+       real*8 dimension(m),depend(m),check(len(y)==m),intent(in,out) :: y
+       real*8 dimension(m),depend(m),check(len(w)==m),intent(in,out) :: w = 1.0
+       integer intent(hide),depend(x),check(m>k),depend(k) :: m=len(x)
+       real*8 intent(in,out),depend(x),check(xb<=x[0]) :: xb = x[0]
+       real*8 intent(in,out),depend(x,m),check(xe>=x[m-1]) :: xe = x[m-1]
+       integer check(1<=k && k<=5),intent(in,out) :: k
+       real*8 intent(out) :: s = -1
+       integer intent(hide),depend(n) :: nest = n
+       real*8 intent(hide) :: tol = 0.001
+       integer intent(hide) :: maxit = 20
+       integer intent(hide),depend(k) :: k1=k+1
+       integer intent(hide),depend(k) :: k2=k+2
+       integer intent(out),depend(t) :: n = len(t)
+       real*8 dimension(n),intent(in,out,overwrite) :: t
+       real*8 dimension(nest),depend(nest),intent(out) :: c
+       real*8 intent(out) :: fp
+       real*8 dimension(nest),depend(nest),intent(out,cache)  :: fpint
+       real*8 dimension(nest*3*k2+m*k1),intent(cache,hide),depend(nest,k1,k2,m) :: wrk
+       integer dimension(nest),depend(nest),intent(out,cache) :: nrdata
+       integer intent(out) :: ier
+     end subroutine fpcurfm1
+
+     !!!!!!!!!! Bivariate spline !!!!!!!!!!!
+
+     subroutine bispev(tx,nx,ty,ny,c,kx,ky,x,mx,y,my,z,wrk,lwrk,iwrk,kwrk,ier)
+       ! z,ier = bispev(tx,ty,c,kx,ky,x,y)
+       real*8 dimension(nx),intent(in) :: tx
+       integer intent(hide),depend(tx) :: nx=len(tx)
+       real*8 dimension(ny),intent(in) :: ty
+       integer intent(hide),depend(ty) :: ny=len(ty)
+       real*8 intent(in),dimension((nx-kx-1)*(ny-ky-1)),depend(nx,ny,kx,ky),&
+            check(len(c)==(nx-kx-1)*(ny-ky-1)):: c
+       integer :: kx
+       integer :: ky
+       real*8 intent(in),dimension(mx) :: x
+       integer intent(hide),depend(x) :: mx=len(x)
+       real*8 intent(in),dimension(my) :: y
+       integer intent(hide),depend(y) :: my=len(y)
+       real*8 dimension(mx,my),depend(mx,my),intent(out,c) :: z
+       real*8 dimension(lwrk),depend(lwrk),intent(hide,cache) :: wrk
+       integer intent(hide),depend(mx,kx,my,ky) :: lwrk=mx*(kx+1)+my*(ky+1)
+       integer dimension(kwrk),depend(kwrk),intent(hide,cache) :: iwrk
+       integer intent(hide),depend(mx,my) :: kwrk=mx+my
+       integer intent(out) :: ier
+     end subroutine bispev
+
+     subroutine surfit_smth(iopt,m,x,y,z,w,xb,xe,yb,ye,kx,ky,s,nxest,nyest,&
+          nmax,eps,nx,tx,ny,ty,c,fp,wrk1,lwrk1,wrk2,lwrk2,&
+          iwrk,kwrk,ier)
+       !  nx,tx,ny,ty,c,fp,ier = surfit_smth(x,y,z,[w,xb,xe,yb,ye,kx,ky,s,eps,lwrk2])
+
+       fortranname surfit
+
+       integer intent(hide) :: iopt=0
+       integer intent(hide),depend(x,kx,ky),check(m>=(kx+1)*(ky+1)) &
+            :: m=len(x)
+       real*8 dimension(m) :: x
+       real*8 dimension(m),depend(m),check(len(y)==m) :: y
+       real*8 dimension(m),depend(m),check(len(z)==m) :: z
+       real*8 optional,dimension(m),depend(m),check(len(w)==m) :: w = 1.0
+       real*8 optional,depend(x,m) :: xb=dmin(x,m)
+       real*8 optional,depend(x,m) :: xe=dmax(x,m)
+       real*8 optional,depend(y,m) :: yb=dmin(y,m)
+       real*8 optional,depend(y,m) :: ye=dmax(y,m)
+       integer check(1<=kx && kx<=5) :: kx = 3
+       integer check(1<=ky && ky<=5) :: ky = 3
+       real*8 optional,check(0.0<=s) :: s = m
+       integer optional,depend(kx,m),check(nxest>=2*(kx+1)) &
+            :: nxest = imax(kx+1+sqrt(m/2),2*(kx+1))
+       integer optional,depend(ky,m),check(nyest>=2*(ky+1)) &
+            :: nyest = imax(ky+1+sqrt(m/2),2*(ky+1))
+       integer intent(hide),depend(nxest,nyest) :: nmax=MAX(nxest,nyest)
+       real*8 optional,check(0.0<eps && eps<1.0) :: eps = 1e-16
+       integer intent(out) :: nx
+       real*8 dimension(nmax),intent(out),depend(nmax) :: tx
+       integer intent(out) :: ny
+       real*8 dimension(nmax),intent(out),depend(nmax) :: ty
+       real*8 dimension((nxest-kx-1)*(nyest-ky-1)), &
+            depend(kx,ky,nxest,nyest),intent(out) :: c
+       real*8 intent(out) :: fp
+       real*8 dimension(lwrk1),intent(cache,out),depend(lwrk1) :: wrk1
+       integer intent(hide),depend(m,kx,ky,nxest,nyest) &
+            :: lwrk1=calc_surfit_lwrk1(m,kx,ky,nxest,nyest)
+       real*8 dimension(lwrk2),intent(cache,hide),depend(lwrk2) :: wrk2
+       integer optional,intent(in),depend(kx,ky,nxest,nyest) &
+            :: lwrk2=calc_surfit_lwrk2(m,kx,ky,nxest,nyest)
+       integer dimension(kwrk),depend(kwrk),intent(cache,hide) :: iwrk
+       integer intent(hide),depend(m,nxest,nyest,kx,ky) &
+            :: kwrk=m+(nxest-2*kx-1)*(nyest-2*ky-1)
+       integer intent(out) :: ier
+     end subroutine surfit_smth
+
+     subroutine surfit_lsq(iopt,m,x,y,z,w,xb,xe,yb,ye,kx,ky,s,nxest,nyest,&
+          nmax,eps,nx,tx,ny,ty,c,fp,wrk1,lwrk1,wrk2,lwrk2,&
+          iwrk,kwrk,ier)
+       ! tx,ty,c,fp,ier = surfit_lsq(x,y,z,tx,ty,[w,xb,xe,yb,ye,kx,ky,eps,lwrk2])
+
+       fortranname surfit
+
+       integer intent(hide) :: iopt=-1
+       integer intent(hide),depend(x,kx,ky),check(m>=(kx+1)*(ky+1)) &
+            :: m=len(x)
+       real*8 dimension(m) :: x
+       real*8 dimension(m),depend(m),check(len(y)==m) :: y
+       real*8 dimension(m),depend(m),check(len(z)==m) :: z
+       real*8 optional,dimension(m),depend(m),check(len(w)==m) :: w = 1.0
+       real*8 optional,depend(x,tx,m,nx) :: xb=calc_b(x,m,tx,nx)
+       real*8 optional,depend(x,tx,m,nx) :: xe=calc_e(x,m,tx,nx)
+       real*8 optional,depend(y,ty,m,ny) :: yb=calc_b(y,m,ty,ny)
+       real*8 optional,depend(y,ty,m,ny) :: ye=calc_e(y,m,ty,ny)
+       integer check(1<=kx && kx<=5) :: kx = 3
+       integer check(1<=ky && ky<=5) :: ky = 3
+       real*8 intent(hide) :: s = 0.0
+       integer intent(hide),depend(nx) :: nxest = nx
+       integer intent(hide),depend(ny) :: nyest = ny
+       integer intent(hide),depend(nx,ny) :: nmax=MAX(nx,ny)
+       real*8 optional,check(0.0<eps && eps<1.0) :: eps = 1e-16
+       integer intent(hide),depend(tx,kx),check(2*kx+2<=nx) :: nx = len(tx)
+       real*8 dimension(nx),intent(in,out,overwrite) :: tx
+       integer intent(hide),depend(ty,ky),check(2*ky+2<=ny) :: ny = len(ty)
+       real*8 dimension(ny),intent(in,out,overwrite) :: ty
+       real*8 dimension((nx-kx-1)*(ny-ky-1)),depend(kx,ky,nx,ny),intent(out) :: c
+       real*8 intent(out) :: fp
+       real*8 dimension(lwrk1),intent(cache,hide),depend(lwrk1) :: wrk1
+       integer intent(hide),depend(m,kx,ky,nxest,nyest) &
+            :: lwrk1=calc_surfit_lwrk1(m,kx,ky,nxest,nyest)
+       real*8 dimension(lwrk2),intent(cache,hide),depend(lwrk2) :: wrk2
+       integer optional,intent(in),depend(kx,ky,nxest,nyest) &
+            :: lwrk2=calc_surfit_lwrk2(m,kx,ky,nxest,nyest)
+       integer dimension(kwrk),depend(kwrk),intent(cache,hide) :: iwrk
+       integer intent(hide),depend(m,nx,ny,kx,ky) &
+            :: kwrk=m+(nx-2*kx-1)*(ny-2*ky-1)
+       integer intent(out) :: ier
+     end subroutine surfit_lsq
+    
+     subroutine regrid_smth(iopt,mx,x,my,y,z,xb,xe,yb,ye,kx,ky,s,&
+        nxest,nyest,nx,tx,ny,ty,c,fp,wrk,lwrk,iwrk,kwrk,ier)
+       !  nx,tx,ny,ty,c,fp,ier = regrid_smth(x,y,z,[xb,xe,yb,ye,kx,ky,s])
+
+       fortranname regrid
+
+       integer intent(hide) :: iopt=0
+       integer intent(hide),depend(x,kx),check(mx>kx) :: mx=len(x)
+       real*8 dimension(mx) :: x
+       integer intent(hide),depend(y,ky),check(my>ky) :: my=len(y) 
+       real*8 dimension(my) :: y
+       real*8 dimension(mx*my),depend(mx,my),check(len(z)==mx*my) :: z
+       real*8 optional,depend(x,mx) :: xb=dmin(x,mx)
+       real*8 optional,depend(x,mx) :: xe=dmax(x,mx)
+       real*8 optional,depend(y,my) :: yb=dmin(y,my)
+       real*8 optional,depend(y,my) :: ye=dmax(y,my)
+       integer optional,check(1<=kx && kx<=5) :: kx = 3
+       integer optional,check(1<=ky && ky<=5) :: ky = 3
+       real*8 optional,check(0.0<=s) :: s = 0.0
+       integer intent(hide),depend(kx,mx),check(nxest>=2*(kx+1)) &
+            :: nxest = mx+kx+1
+       integer intent(hide),depend(ky,my),check(nyest>=2*(ky+1)) &
+            :: nyest = my+ky+1
+       integer intent(out) :: nx
+       real*8 dimension(nxest),intent(out),depend(nxest) :: tx
+       integer intent(out) :: ny
+       real*8 dimension(nyest),intent(out),depend(nyest) :: ty
+       real*8 dimension((nxest-kx-1)*(nyest-ky-1)), &
+            depend(kx,ky,nxest,nyest),intent(out) :: c
+       real*8 intent(out) :: fp
+       real*8 dimension(lwrk),intent(cache,hide),depend(lwrk) :: wrk
+       integer intent(hide),depend(mx,my,kx,ky,nxest,nyest) &
+            :: lwrk=calc_regrid_lwrk(mx,my,kx,ky,nxest,nyest)
+       integer dimension(kwrk),depend(kwrk),intent(cache,hide) :: iwrk
+       integer intent(hide),depend(mx,my,nxest,nyest) &
+            :: kwrk=3+mx+my+nxest+nyest
+       integer intent(out) :: ier
+     end subroutine regrid_smth
+     
+     function dblint(tx,nx,ty,ny,c,kx,ky,xb,xe,yb,ye,wrk)
+       ! iy = dblint(tx,ty,c,kx,ky,xb,xe,yb,ye)
+       real*8 dimension(nx),intent(in) :: tx
+       integer intent(hide),depend(tx) :: nx=len(tx)
+       real*8 dimension(ny),intent(in) :: ty
+       integer intent(hide),depend(ty) :: ny=len(ty)
+       real*8 intent(in),dimension((nx-kx-1)*(ny-ky-1)),depend(nx,ny,kx,ky),&
+            check(len(c)==(nx-kx-1)*(ny-ky-1)):: c
+       integer :: kx
+       integer :: ky
+       real*8 intent(in) :: xb
+       real*8 intent(in) :: xe
+       real*8 intent(in) :: yb
+       real*8 intent(in) :: ye
+       real*8 dimension(nx+ny-kx-ky-2),depend(nx,ny,kx,ky),intent(cache,hide) :: wrk
+       real*8 :: dblint
+     end function dblint
+  end interface
+end python module dfitpack
+

Added: branches/Interpolate1D/build/src.win32-2.5/fortranobject.c
===================================================================
--- branches/Interpolate1D/build/src.win32-2.5/fortranobject.c	2008-07-16 00:26:23 UTC (rev 4545)
+++ branches/Interpolate1D/build/src.win32-2.5/fortranobject.c	2008-07-16 22:08:51 UTC (rev 4546)
@@ -0,0 +1,816 @@
+#define FORTRANOBJECT_C
+#include "fortranobject.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+  This file implements: FortranObject, array_from_pyobj, copy_ND_array
+
+  Author: Pearu Peterson <pearu@cens.ioc.ee>
+  $Revision: 1.52 $
+  $Date: 2005/07/11 07:44:20 $
+*/
+
+int
+F2PyDict_SetItemString(PyObject *dict, char *name, PyObject *obj)
+{
+    if (obj==NULL) {
+        fprintf(stderr, "Error loading %s\n", name);
+        if (PyErr_Occurred()) {
+            PyErr_Print();
+            PyErr_Clear();
+        }
+        return -1;
+    }
+    return PyDict_SetItemString(dict, name, obj);
+}
+
+/************************* FortranObject *******************************/
+
+typedef PyObject *(*fortranfunc)(PyObject *,PyObject *,PyObject *,void *);
+
+PyObject *
+PyFortranObject_New(FortranDataDef* defs, f2py_void_func init) {
+    int i;
+    PyFortranObject *fp = NULL;
+    PyObject *v = NULL;
+    if (init!=NULL)                           /* Initialize F90 module objects */
+        (*(init))();
+    if ((fp = PyObject_New(PyFortranObject, &PyFortran_Type))==NULL) return NULL;
+    if ((fp->dict = PyDict_New())==NULL) return NULL;
+    fp->len = 0;
+    while (defs[fp->len].name != NULL) fp->len++;
+    if (fp->len == 0) goto fail;
+    fp->defs = defs;
+    for (i=0;i<fp->len;i++)
+        if (fp->defs[i].rank == -1) {                      /* Is Fortran routine */
+            v = PyFortranObject_NewAsAttr(&(fp->defs[i]));
+            if (v==NULL) return NULL;
+            PyDict_SetItemString(fp->dict,fp->defs[i].name,v);
+        } else
+            if ((fp->defs[i].data)!=NULL) { /* Is Fortran variable or array (not allocatable) */
+                if (fp->defs[i].type == PyArray_STRING) {
+                    int n = fp->defs[i].rank-1;
+                    v = PyArray_New(&PyArray_Type, n, fp->defs[i].dims.d,
+                                    PyArray_STRING, NULL, fp->defs[i].data, fp->defs[i].dims.d[n],
+                                    NPY_FARRAY, NULL);
+                }
+                else {
+                    v = PyArray_New(&PyArray_Type, fp->defs[i].rank, fp->defs[i].dims.d,
+                                    fp->defs[i].type, NULL, fp->defs[i].data, 0, NPY_FARRAY,
+                                    NULL);
+                }
+                if (v==NULL) return NULL;
+                PyDict_SetItemString(fp->dict,fp->defs[i].name,v);
+            }
+    Py_XDECREF(v);
+    return (PyObject *)fp;
+ fail:
+    Py_XDECREF(v);
+    return NULL;
+}
+
+PyObject *
+PyFortranObject_NewAsAttr(FortranDataDef* defs) { /* used for calling F90 module routines */
+    PyFortranObject *fp = NULL;
+    fp = PyObject_New(PyFortranObject, &PyFortran_Type);
+    if (fp == NULL) return NULL;
+    if ((fp->dict = PyDict_New())==NULL) return NULL;
+    fp->len = 1;
+    fp->defs = defs;
+    return (PyObject *)fp;
+}
+
+/* Fortran methods */
+
+static void
+fortran_dealloc(PyFortranObject *fp) {
+    Py_XDECREF(fp->dict);
+    PyMem_Del(fp);
+}
+
+
+static PyMethodDef fortran_methods[] = {
+    {NULL,          NULL}           /* sentinel */
+};
+
+
+static PyObject *
+fortran_doc (FortranDataDef def) {
+    char *p;
+    PyObject *s = NULL;
+    int i;
+    unsigned size=100;
+    if (def.doc!=NULL)
+        size += strlen(def.doc);
+    p = (char*)malloc (size);
+    if (sprintf(p,"%s - ",def.name)==0) goto fail;
+    if (def.rank==-1) {
+        if (def.doc==NULL) {
+            if (sprintf(p,"%sno docs available",p)==0)
+                goto fail;
+        } else {
+            if (sprintf(p,"%s%s",p,def.doc)==0)
+                goto fail;
+        }
+    } else {
+        PyArray_Descr *d = PyArray_DescrFromType(def.type);
+        if (sprintf(p,"%s'%c'-",p,d->type)==0) {Py_DECREF(d); goto fail;}
+        Py_DECREF(d);
+        if (def.data==NULL) {
+            if (sprintf(p,"%sarray(%" NPY_INTP_FMT,p,def.dims.d[0])==0) goto fail;
+            for(i=1;i<def.rank;++i)
+                if (sprintf(p,"%s,%" NPY_INTP_FMT,p,def.dims.d[i])==0) goto fail;
+            if (sprintf(p,"%s), not allocated",p)==0) goto fail;
+        } else {
+            if (def.rank>0) {
+                if (sprintf(p,"%sarray(%"NPY_INTP_FMT,p,def.dims.d[0])==0) goto fail;
+                for(i=1;i<def.rank;i++)
+                    if (sprintf(p,"%s,%" NPY_INTP_FMT,p,def.dims.d[i])==0) goto fail;
+                if (sprintf(p,"%s)",p)==0) goto fail;
+            } else {
+                if (sprintf(p,"%sscalar",p)==0) goto fail;
+            }
+        }
+    }
+    if (sprintf(p,"%s\n",p)==0) goto fail;
+    if (strlen(p)>size) {
+        fprintf(stderr,"fortranobject.c:fortran_doc:len(p)=%zd>%d(size): too long doc string required, increase size\n",strlen(p),size);
+        goto fail;
+    }
+    s = PyString_FromString(p);
+ fail:
+    free(p);
+    return s;
+}
+
+static FortranDataDef *save_def; /* save pointer of an allocatable array */
+static void set_data(char *d,npy_intp *f) {  /* callback from Fortran */
+    if (*f)                               /* In fortran f=allocated(d) */
+        save_def->data = d;
+    else
+        save_def->data = NULL;
+    /* printf("set_data: d=%p,f=%d\n",d,*f); */
+}
+
+static PyObject *
+fortran_getattr(PyFortranObject *fp, char *name) {
+    int i,j,k,flag;
+    if (fp->dict != NULL) {
+        PyObject *v = PyDict_GetItemString(fp->dict, name);
+        if (v != NULL) {
+            Py_INCREF(v);
+            return v;
+        }
+    }
+    for (i=0,j=1;i<fp->len && (j=strcmp(name,fp->defs[i].name));i++);
+    if (j==0)
+        if (fp->defs[i].rank!=-1) {                   /* F90 allocatable array */
+            if (fp->defs[i].func==NULL) return NULL;
+            for(k=0;k<fp->defs[i].rank;++k)
+                fp->defs[i].dims.d[k]=-1;
+            save_def = &fp->defs[i];
+            (*(fp->defs[i].func))(&fp->defs[i].rank,fp->defs[i].dims.d,set_data,&flag);
+            if (flag==2)
+                k = fp->defs[i].rank + 1;
+            else
+                k = fp->defs[i].rank;
+            if (fp->defs[i].data !=NULL) {              /* array is allocated */
+                PyObject *v = PyArray_New(&PyArray_Type, k, fp->defs[i].dims.d,
+                                          fp->defs[i].type, NULL, fp->defs[i].data, 0, NPY_FARRAY,
+                                          NULL);
+                if (v==NULL) return NULL;
+                /* Py_INCREF(v); */
+                return v;
+            } else {                                    /* array is not allocated */
+                Py_INCREF(Py_None);
+                return Py_None;
+            }
+        }
+    if (strcmp(name,"__dict__")==0) {
+        Py_INCREF(fp->dict);
+        return fp->dict;
+    }
+    if (strcmp(name,"__doc__")==0) {
+        PyObject *s = PyString_FromString("");
+        for (i=0;i<fp->len;i++)
+            PyString_ConcatAndDel(&s,fortran_doc(fp->defs[i]));
+        if (PyDict_SetItemString(fp->dict, name, s))
+            return NULL;
+        return s;
+    }
+    if ((strcmp(name,"_cpointer")==0) && (fp->len==1)) {
+        PyObject *cobj = PyCObject_FromVoidPtr((void *)(fp->defs[0].data),NULL);
+        if (PyDict_SetItemString(fp->dict, name, cobj))
+            return NULL;
+        return cobj;
+    }
+    return Py_FindMethod(fortran_methods, (PyObject *)fp, name);
+}
+
+static int
+fortran_setattr(PyFortranObject *fp, char *name, PyObject *v) {
+    int i,j,flag;
+    PyArrayObject *arr = NULL;
+    for (i=0,j=1;i<fp->len && (j=strcmp(name,fp->defs[i].name));i++);
+    if (j==0) {
+        if (fp->defs[i].rank==-1) {
+            PyErr_SetString(PyExc_AttributeError,"over-writing fortran routine");
+            return -1;
+        }
+        if (fp->defs[i].func!=NULL) { /* is allocatable array */
+            npy_intp dims[F2PY_MAX_DIMS];
+            int k;
+            save_def = &fp->defs[i];
+            if (v!=Py_None) {     /* set new value (reallocate if needed --
+                                     see f2py generated code for more
+                                     details ) */
+                for(k=0;k<fp->defs[i].rank;k++) dims[k]=-1;
+                if ((arr = array_from_pyobj(fp->defs[i].type,dims,fp->defs[i].rank,F2PY_INTENT_IN,v))==NULL)
+                    return -1;
+                (*(fp->defs[i].func))(&fp->defs[i].rank,arr->dimensions,set_data,&flag);
+            } else {             /* deallocate */
+                for(k=0;k<fp->defs[i].rank;k++) dims[k]=0;
+                (*(fp->defs[i].func))(&fp->defs[i].rank,dims,set_data,&flag);
+                for(k=0;k<fp->defs[i].rank;k++) dims[k]=-1;
+            }
+            memcpy(fp->defs[i].dims.d,dims,fp->defs[i].rank*sizeof(npy_intp));
+        } else {                     /* not allocatable array */
+            if ((arr = array_from_pyobj(fp->defs[i].type,fp->defs[i].dims.d,fp->defs[i].rank,F2PY_INTENT_IN,v))==NULL)
+                return -1;
+        }
+        if (fp->defs[i].data!=NULL) { /* copy Python object to Fortran array */
+            npy_intp s = PyArray_MultiplyList(fp->defs[i].dims.d,arr->nd);
+            if (s==-1)
+                s = PyArray_MultiplyList(arr->dimensions,arr->nd);
+            if (s<0 ||
+                (memcpy(fp->defs[i].data,arr->data,s*PyArray_ITEMSIZE(arr)))==NULL) {
+                if ((PyObject*)arr!=v) {
+                    Py_DECREF(arr);
+                }
+                return -1;
+            }
+            if ((PyObject*)arr!=v) {
+                Py_DECREF(arr);
+            }
+        } else return (fp->defs[i].func==NULL?-1:0);
+        return 0; /* succesful */
+    }
+    if (fp->dict == NULL) {
+        fp->dict = PyDict_New();
+        if (fp->dict == NULL)
+            return -1;
+    }
+    if (v == NULL) {
+        int rv = PyDict_DelItemString(fp->dict, name);
+        if (rv < 0)
+            PyErr_SetString(PyExc_AttributeError,"delete non-existing fortran attribute");
+        return rv;
+    }
+    else
+        return PyDict_SetItemString(fp->dict, name, v);
+}
+
+static PyObject*
+fortran_call(PyFortranObject *fp, PyObject *arg, PyObject *kw) {
+    int i = 0;
+    /*  printf("fortran call
+        name=%s,func=%p,data=%p,%p\n",fp->defs[i].name,
+        fp->defs[i].func,fp->defs[i].data,&fp->defs[i].data); */
+    if (fp->defs[i].rank==-1) {/* is Fortran routine */
+        if ((fp->defs[i].func==NULL)) {
+            PyErr_Format(PyExc_RuntimeError, "no function to call");
+            return NULL;
+        }
+        else if (fp->defs[i].data==NULL)
+            /* dummy routine */
+            return (*((fortranfunc)(fp->defs[i].func)))((PyObject *)fp,arg,kw,NULL);
+        else
+            return (*((fortranfunc)(fp->defs[i].func)))((PyObject *)fp,arg,kw,
+                                                        (void *)fp->defs[i].data);
+    }
+    PyErr_Format(PyExc_TypeError, "this fortran object is not callable");
+    return NULL;
+}
+
+
+PyTypeObject PyFortran_Type = {
+    PyObject_HEAD_INIT(0)
+    0,                    /*ob_size*/
+    "fortran",                    /*tp_name*/
+    sizeof(PyFortranObject),      /*tp_basicsize*/
+    0,                    /*tp_itemsize*/
+    /* methods */
+    (destructor)fortran_dealloc, /*tp_dealloc*/
+    0,                    /*tp_print*/
+    (getattrfunc)fortran_getattr, /*tp_getattr*/
+    (setattrfunc)fortran_setattr, /*tp_setattr*/
+    0,                    /*tp_compare*/
+    0,                    /*tp_repr*/
+    0,                    /*tp_as_number*/
+    0,                    /*tp_as_sequence*/
+    0,                    /*tp_as_mapping*/
+    0,                    /*tp_hash*/
+    (ternaryfunc)fortran_call,                    /*tp_call*/
+};
+
+/************************* f2py_report_atexit *******************************/
+
+#ifdef F2PY_REPORT_ATEXIT
+static int passed_time = 0;
+static int passed_counter = 0;
+static int passed_call_time = 0;
+static struct timeb start_time;
+static struct timeb stop_time;
+static struct timeb start_call_time;
+static struct timeb stop_call_time;
+static int cb_passed_time = 0;
+static int cb_passed_counter = 0;
+static int cb_passed_call_time = 0;
+static struct timeb cb_start_time;
+static struct timeb cb_stop_time;
+static struct timeb cb_start_call_time;
+static struct timeb cb_stop_call_time;
+
+extern void f2py_start_clock(void) { ftime(&start_time); }
+extern
+void f2py_start_call_clock(void) {
+    f2py_stop_clock();
+    ftime(&start_call_time);
+}
+extern
+void f2py_stop_clock(void) {
+    ftime(&stop_time);
+    passed_time += 1000*(stop_time.time - start_time.time);
+    passed_time += stop_time.millitm - start_time.millitm;
+}
+extern
+void f2py_stop_call_clock(void) {
+    ftime(&stop_call_time);
+    passed_call_time += 1000*(stop_call_time.time - start_call_time.time);
+    passed_call_time += stop_call_time.millitm - start_call_time.millitm;
+    passed_counter += 1;
+    f2py_start_clock();
+}
+
+extern void f2py_cb_start_clock(void) { ftime(&cb_start_time); }
+extern
+void f2py_cb_start_call_clock(void) {
+    f2py_cb_stop_clock();
+    ftime(&cb_start_call_time);
+}
+extern
+void f2py_cb_stop_clock(void) {
+    ftime(&cb_stop_time);
+    cb_passed_time += 1000*(cb_stop_time.time - cb_start_time.time);
+    cb_passed_time += cb_stop_time.millitm - cb_start_time.millitm;
+}
+extern
+void f2py_cb_stop_call_clock(void) {
+    ftime(&cb_stop_call_time);
+    cb_passed_call_time += 1000*(cb_stop_call_time.time - cb_start_call_time.time);
+    cb_passed_call_time += cb_stop_call_time.millitm - cb_start_call_time.millitm;
+    cb_passed_counter += 1;
+    f2py_cb_start_clock();
+}
+
+static int f2py_report_on_exit_been_here = 0;
+extern
+void f2py_report_on_exit(int exit_flag,void *name) {
+    if (f2py_report_on_exit_been_here) {
+        fprintf(stderr,"             %s\n",(char*)name);
+        return;
+    }
+    f2py_report_on_exit_been_here = 1;
+    fprintf(stderr,"                      /-----------------------\\\n");
+    fprintf(stderr,"                     < F2PY performance report >\n");
+    fprintf(stderr,"                      \\-----------------------/\n");
+    fprintf(stderr,"Overall time spent in ...\n");
+    fprintf(stderr,"(a) wrapped (Fortran/C) functions           : %8d msec\n",
+            passed_call_time);
+    fprintf(stderr,"(b) f2py interface,           %6d calls  : %8d msec\n",
+            passed_counter,passed_time);
+    fprintf(stderr,"(c) call-back (Python) functions            : %8d msec\n",
+            cb_passed_call_time);
+    fprintf(stderr,"(d) f2py call-back interface, %6d calls  : %8d msec\n",
+            cb_passed_counter,cb_passed_time);
+
+    fprintf(stderr,"(e) wrapped (Fortran/C) functions (acctual) : %8d msec\n\n",
+            passed_call_time-cb_passed_call_time-cb_passed_time);
+    fprintf(stderr,"Use -DF2PY_REPORT_ATEXIT_DISABLE to disable this message.\n");
+    fprintf(stderr,"Exit status: %d\n",exit_flag);
+    fprintf(stderr,"Modules    : %s\n",(char*)name);
+}
+#endif
+
+/********************** report on array copy ****************************/
+
+#ifdef F2PY_REPORT_ON_ARRAY_COPY
+static void f2py_report_on_array_copy(PyArrayObject* arr) {
+    const long arr_size = PyArray_Size((PyObject *)arr);
+    if (arr_size>F2PY_REPORT_ON_ARRAY_COPY) {
+        fprintf(stderr,"copied an array: size=%ld, elsize=%d\n",
+                arr_size, PyArray_ITEMSIZE(arr));
+    }
+}
+static void f2py_report_on_array_copy_fromany(void) {
+    fprintf(stderr,"created an array from object\n");
+}
+
+#define F2PY_REPORT_ON_ARRAY_COPY_FROMARR f2py_report_on_array_copy((PyArrayObject *)arr)
+#define F2PY_REPORT_ON_ARRAY_COPY_FROMANY f2py_report_on_array_copy_fromany()
+#else
+#define F2PY_REPORT_ON_ARRAY_COPY_FROMARR
+#define F2PY_REPORT_ON_ARRAY_COPY_FROMANY
+#endif
+
+
+/************************* array_from_obj *******************************/
+
+/*
+ * File: array_from_pyobj.c
+ *
+ * Description:
+ * ------------
+ * Provides array_from_pyobj function that returns a contigious array
+ * object with the given dimensions and required storage order, either
+ * in row-major (C) or column-major (Fortran) order. The function
+ * array_from_pyobj is very flexible about its Python object argument
+ * that can be any number, list, tuple, or array.
+ *
+ * array_from_pyobj is used in f2py generated Python extension
+ * modules.
+ *
+ * Author: Pearu Peterson <pearu@cens.ioc.ee>
+ * Created: 13-16 January 2002
+ * $Id: fortranobject.c,v 1.52 2005/07/11 07:44:20 pearu Exp $
+ */
+
+static int
+count_nonpos(const int rank,
+             const npy_intp *dims) {
+    int i=0,r=0;
+    while (i<rank) {
+        if (dims[i] <= 0) ++r;
+        ++i;
+    }
+    return r;
+}
+
+static int check_and_fix_dimensions(const PyArrayObject* arr,
+                                    const int rank,
+                                    npy_intp *dims);
+
+#ifdef DEBUG_COPY_ND_ARRAY
+void dump_dims(int rank, npy_intp* dims) {
+    int i;
+    printf("[");
+    for(i=0;i<rank;++i) {
+        printf("%3" NPY_INTP_FMT, dims[i]);
+    }
+    printf("]\n");
+}
+void dump_attrs(const PyArrayObject* arr) {
+    int rank = arr->nd;
+    npy_intp size = PyArray_Size((PyObject *)arr);
+    printf("\trank = %d, flags = %d, size = %" NPY_INTP_FMT  "\n",
+           rank,arr->flags,size);
+    printf("\tstrides = ");
+    dump_dims(rank,arr->strides);
+    printf("\tdimensions = ");
+    dump_dims(rank,arr->dimensions);
+}
+#endif
+
+#define SWAPTYPE(a,b,t) {t c; c = (a); (a) = (b); (b) = c; }
+
+static int swap_arrays(PyArrayObject* arr1, PyArrayObject* arr2) {
+    SWAPTYPE(arr1->data,arr2->data,char*);
+    SWAPTYPE(arr1->nd,arr2->nd,int);
+    SWAPTYPE(arr1->dimensions,arr2->dimensions,npy_intp*);
+    SWAPTYPE(arr1->strides,arr2->strides,npy_intp*);
+    SWAPTYPE(arr1->base,arr2->base,PyObject*);
+    SWAPTYPE(arr1->descr,arr2->descr,PyArray_Descr*);
+    SWAPTYPE(arr1->flags,arr2->flags,int);
+    /* SWAPTYPE(arr1->weakreflist,arr2->weakreflist,PyObject*); */
+    return 0;
+}
+
+#define ARRAY_ISCOMPATIBLE(arr,type_num)                                \
+    (  (PyArray_ISINTEGER(arr) && PyTypeNum_ISINTEGER(type_num))        \
+       ||(PyArray_ISFLOAT(arr) && PyTypeNum_ISFLOAT(type_num))          \
+       ||(PyArray_ISCOMPLEX(arr) && PyTypeNum_ISCOMPLEX(type_num))      \
+       )
+
+extern
+PyArrayObject* array_from_pyobj(const int type_num,
+                                npy_intp *dims,
+                                const int rank,
+                                const int intent,
+                                PyObject *obj) {
+    /* Note about reference counting
+       -----------------------------
+       If the caller returns the array to Python, it must be done with
+       Py_BuildValue("N",arr).
+       Otherwise, if obj!=arr then the caller must call Py_DECREF(arr).
+
+       Note on intent(cache,out,..)
+       ---------------------
+       Don't expect correct data when returning intent(cache) array.
+
+    */
+    char mess[200];
+    PyArrayObject *arr = NULL;
+    PyArray_Descr *descr;
+    char typechar;
+    int elsize;
+
+    if ((intent & F2PY_INTENT_HIDE)
+        || ((intent & F2PY_INTENT_CACHE) && (obj==Py_None))
+        || ((intent & F2PY_OPTIONAL) && (obj==Py_None))
+        ) {
+        /* intent(cache), optional, intent(hide) */
+        if (count_nonpos(rank,dims)) {
+            int i;
+            sprintf(mess,"failed to create intent(cache|hide)|optional array"
+                    "-- must have defined dimensions but got (");
+            for(i=0;i<rank;++i)
+                sprintf(mess+strlen(mess),"%" NPY_INTP_FMT ",",dims[i]);
+            sprintf(mess+strlen(mess),")");
+            PyErr_SetString(PyExc_ValueError,mess);
+            return NULL;
+        }
+        arr = (PyArrayObject *)
+            PyArray_New(&PyArray_Type, rank, dims, type_num,
+                        NULL,NULL,0,
+                        !(intent&F2PY_INTENT_C),
+                        NULL);
+        if (arr==NULL) return NULL;
+        if (!(intent & F2PY_INTENT_CACHE))
+            PyArray_FILLWBYTE(arr, 0);
+        return arr;
+    }
+
+    descr = PyArray_DescrFromType(type_num);
+    elsize = descr->elsize;
+    typechar = descr->type;
+    Py_DECREF(descr);
+    if (PyArray_Check(obj)) {
+        arr = (PyArrayObject *)obj;
+
+        if (intent & F2PY_INTENT_CACHE) {
+            /* intent(cache) */
+            if (PyArray_ISONESEGMENT(obj)
+                && PyArray_ITEMSIZE((PyArrayObject *)obj)>=elsize) {
+                if (check_and_fix_dimensions((PyArrayObject *)obj,rank,dims)) {
+                    return NULL; /*XXX: set exception */
+                }
+                if (intent & F2PY_INTENT_OUT)
+                    Py_INCREF(obj);
+                return (PyArrayObject *)obj;
+            }
+            sprintf(mess,"failed to initialize intent(cache) array");
+            if (!PyArray_ISONESEGMENT(obj))
+                sprintf(mess+strlen(mess)," -- input must be in one segment");
+            if (PyArray_ITEMSIZE(arr)<elsize)
+                sprintf(mess+strlen(mess)," -- expected at least elsize=%d but got %d",
+                        elsize,PyArray_ITEMSIZE(arr)
+                        );
+            PyErr_SetString(PyExc_ValueError,mess);
+            return NULL;
+        }
+
+        /* here we have always intent(in) or intent(inout) or intent(inplace) */
+
+        if (check_and_fix_dimensions(arr,rank,dims)) {
+            return NULL; /*XXX: set exception */
+        }
+
+        if ((! (intent & F2PY_INTENT_COPY))
+            && PyArray_ITEMSIZE(arr)==elsize
+            && ARRAY_ISCOMPATIBLE(arr,type_num)
+            ) {
+            if ((intent & F2PY_INTENT_C)?PyArray_ISCARRAY(arr):PyArray_ISFARRAY(arr)) {
+                if ((intent & F2PY_INTENT_OUT)) {
+                    Py_INCREF(arr);
+                }
+                /* Returning input array */
+                return arr;
+            }
+        }
+
+        if (intent & F2PY_INTENT_INOUT) {
+            sprintf(mess,"failed to initialize intent(inout) array");
+            if ((intent & F2PY_INTENT_C) && !PyArray_ISCARRAY(arr))
+                sprintf(mess+strlen(mess)," -- input not contiguous");
+            if (!(intent & F2PY_INTENT_C) && !PyArray_ISFARRAY(arr))
+                sprintf(mess+strlen(mess)," -- input not fortran contiguous");
+            if (PyArray_ITEMSIZE(arr)!=elsize)
+                sprintf(mess+strlen(mess)," -- expected elsize=%d but got %d",
+                        elsize,
+                        PyArray_ITEMSIZE(arr)
+                        );
+            if (!(ARRAY_ISCOMPATIBLE(arr,type_num)))
+                sprintf(mess+strlen(mess)," -- input '%c' not compatible to '%c'",
+                        arr->descr->type,typechar);
+            PyErr_SetString(PyExc_ValueError,mess);
+            return NULL;
+        }
+
+        /* here we have always intent(in) or intent(inplace) */
+
+        {
+            PyArrayObject *retarr = (PyArrayObject *) \
+                PyArray_New(&PyArray_Type, arr->nd, arr->dimensions, type_num,
+                            NULL,NULL,0,
+                            !(intent&F2PY_INTENT_C),
+                            NULL);
+            if (retarr==NULL)
+                return NULL;
+            F2PY_REPORT_ON_ARRAY_COPY_FROMARR;
+            if (PyArray_CopyInto(retarr, arr)) {
+                Py_DECREF(retarr);
+                return NULL;
+            }
+            if (intent & F2PY_INTENT_INPLACE) {
+                if (swap_arrays(arr,retarr))
+                    return NULL; /* XXX: set exception */
+                Py_XDECREF(retarr);
+                if (intent & F2PY_INTENT_OUT)
+                    Py_INCREF(arr);
+            } else {
+                arr = retarr;
+            }
+        }
+        return arr;
+    }
+
+    if ((intent & F2PY_INTENT_INOUT)
+        || (intent & F2PY_INTENT_INPLACE)
+        || (intent & F2PY_INTENT_CACHE)) {
+        sprintf(mess,"failed to initialize intent(inout|inplace|cache) array"
+                " -- input must be array but got %s",
+                PyString_AsString(PyObject_Str(PyObject_Type(obj)))
+                );
+        PyErr_SetString(PyExc_TypeError,mess);
+        return NULL;
+    }
+
+    {
+        F2PY_REPORT_ON_ARRAY_COPY_FROMANY;
+        arr = (PyArrayObject *) \
+            PyArray_FromAny(obj,PyArray_DescrFromType(type_num), 0,0,
+                            ((intent & F2PY_INTENT_C)?NPY_CARRAY:NPY_FARRAY) \
+                            | NPY_FORCECAST, NULL);
+        if (arr==NULL)
+            return NULL;
+        if (check_and_fix_dimensions(arr,rank,dims))
+            return NULL; /*XXX: set exception */
+        return arr;
+    }
+
+}
+
+/*****************************************/
+/* Helper functions for array_from_pyobj */
+/*****************************************/
+
+static
+int check_and_fix_dimensions(const PyArrayObject* arr,const int rank,npy_intp *dims) {
+    /*
+      This function fills in blanks (that are -1\'s) in dims list using
+      the dimensions from arr. It also checks that non-blank dims will
+      match with the corresponding values in arr dimensions.
+    */
+    const npy_intp arr_size = (arr->nd)?PyArray_Size((PyObject *)arr):1;
+#ifdef DEBUG_COPY_ND_ARRAY
+    dump_attrs(arr);
+    printf("check_and_fix_dimensions:init: dims=");
+    dump_dims(rank,dims);
+#endif
+    if (rank > arr->nd) { /* [1,2] -> [[1],[2]]; 1 -> [[1]]  */
+        npy_intp new_size = 1;
+        int free_axe = -1;
+        int i;
+        /* Fill dims where -1 or 0; check dimensions; calc new_size; */
+        for(i=0;i<arr->nd;++i) {
+            if (dims[i] >= 0) {
+                if (dims[i]!=arr->dimensions[i]) {
+                    fprintf(stderr,"%d-th dimension must be fixed to %" NPY_INTP_FMT
+                            " but got %" NPY_INTP_FMT "\n",
+                            i,dims[i], arr->dimensions[i]);
+                    return 1;
+                }
+                if (!dims[i]) dims[i] = 1;
+            } else {
+                dims[i] = arr->dimensions[i] ? arr->dimensions[i] : 1;
+            }
+            new_size *= dims[i];
+        }
+        for(i=arr->nd;i<rank;++i)
+            if (dims[i]>1) {
+                fprintf(stderr,"%d-th dimension must be %" NPY_INTP_FMT
+                        " but got 0 (not defined).\n",
+                        i,dims[i]);
+                return 1;
+            } else if (free_axe<0)
+                free_axe = i;
+            else
+                dims[i] = 1;
+        if (free_axe>=0) {
+            dims[free_axe] = arr_size/new_size;
+            new_size *= dims[free_axe];
+        }
+        if (new_size != arr_size) {
+            fprintf(stderr,"confused: new_size=%" NPY_INTP_FMT
+                    ", arr_size=%" NPY_INTP_FMT " (maybe too many free"
+                    " indices)\n", new_size,arr_size);
+            return 1;
+        }
+    } else if (rank==arr->nd) {
+        int i;
+        npy_intp d;
+        for (i=0; i<rank; ++i) {
+            d = arr->dimensions[i];
+            if (dims[i]>=0) {
+                if (d > 1 && d!=dims[i]) {
+                    fprintf(stderr,"%d-th dimension must be fixed to %" NPY_INTP_FMT
+                            " but got %" NPY_INTP_FMT "\n",
+                            i,dims[i],d);
+                    return 1;
+                }
+                if (!dims[i]) dims[i] = 1;
+            } else dims[i] = d;
+        }
+    } else { /* [[1,2]] -> [[1],[2]] */
+        int i,j;
+        npy_intp d;
+        int effrank;
+        npy_intp size;
+        for (i=0,effrank=0;i<arr->nd;++i)
+            if (arr->dimensions[i]>1) ++effrank;
+        if (dims[rank-1]>=0)
+            if (effrank>rank) {
+                fprintf(stderr,"too many axes: %d (effrank=%d), expected rank=%d\n",
+                        arr->nd,effrank,rank);
+                return 1;
+            }
+
+        for (i=0,j=0;i<rank;++i) {
+            while (j<arr->nd && arr->dimensions[j]<2) ++j;
+            if (j>=arr->nd) d = 1;
+            else d = arr->dimensions[j++];
+            if (dims[i]>=0) {
+                if (d>1 && d!=dims[i]) {
+                    fprintf(stderr,"%d-th dimension must be fixed to %" NPY_INTP_FMT
+                            " but got %" NPY_INTP_FMT " (real index=%d)\n",
+                            i,dims[i],d,j-1);
+                    return 1;
+                }
+                if (!dims[i]) dims[i] = 1;
+            } else
+                dims[i] = d;
+        }
+
+        for (i=rank;i<arr->nd;++i) { /* [[1,2],[3,4]] -> [1,2,3,4] */
+            while (j<arr->nd && arr->dimensions[j]<2) ++j;
+            if (j>=arr->nd) d = 1;
+            else d = arr->dimensions[j++];
+            dims[rank-1] *= d;
+        }
+        for (i=0,size=1;i<rank;++i) size *= dims[i];
+        if (size != arr_size) {
+            fprintf(stderr,"confused: size=%" NPY_INTP_FMT ", arr_size=%" NPY_INTP_FMT
+                    ", rank=%d, effrank=%d, arr.nd=%d, dims=[",
+                    size,arr_size,rank,effrank,arr->nd);
+            for (i=0;i<rank;++i) fprintf(stderr," %" NPY_INTP_FMT,dims[i]);
+            fprintf(stderr," ], arr.dims=[");
+            for (i=0;i<arr->nd;++i) fprintf(stderr," %" NPY_INTP_FMT,arr->dimensions[i]);
+            fprintf(stderr," ]\n");
+            return 1;
+        }
+    }
+#ifdef DEBUG_COPY_ND_ARRAY
+    printf("check_and_fix_dimensions:end: dims=");
+    dump_dims(rank,dims);
+#endif
+    return 0;
+}
+
+/* End of file: array_from_pyobj.c */
+
+/************************* copy_ND_array *******************************/
+
+extern
+int copy_ND_array(const PyArrayObject *arr, PyArrayObject *out)
+{
+    F2PY_REPORT_ON_ARRAY_COPY_FROMARR;
+    return PyArray_CopyInto(out, (PyArrayObject *)arr);
+}
+
+#ifdef __cplusplus
+}
+#endif
+/************************* EOF fortranobject.c *******************************/

Added: branches/Interpolate1D/build/src.win32-2.5/fortranobject.h
===================================================================
--- branches/Interpolate1D/build/src.win32-2.5/fortranobject.h	2008-07-16 00:26:23 UTC (rev 4545)
+++ branches/Interpolate1D/build/src.win32-2.5/fortranobject.h	2008-07-16 22:08:51 UTC (rev 4546)
@@ -0,0 +1,124 @@
+#ifndef Py_FORTRANOBJECT_H
+#define Py_FORTRANOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "Python.h"
+
+#ifdef FORTRANOBJECT_C
+#define NO_IMPORT_ARRAY
+#endif
+#define PY_ARRAY_UNIQUE_SYMBOL PyArray_API
+#include "numpy/arrayobject.h"
+
+  /*
+#ifdef F2PY_REPORT_ATEXIT_DISABLE
+#undef F2PY_REPORT_ATEXIT
+#else
+
+#ifndef __FreeBSD__
+#ifndef __WIN32__
+#ifndef __APPLE__
+#define F2PY_REPORT_ATEXIT
+#endif
+#endif
+#endif
+
+#endif
+  */
+
+#ifdef F2PY_REPORT_ATEXIT
+#include <sys/timeb.h>
+  extern void f2py_start_clock(void);
+  extern void f2py_stop_clock(void);
+  extern void f2py_start_call_clock(void);
+  extern void f2py_stop_call_clock(void);
+  extern void f2py_cb_start_clock(void);
+  extern void f2py_cb_stop_clock(void);
+  extern void f2py_cb_start_call_clock(void);
+  extern void f2py_cb_stop_call_clock(void);
+  extern void f2py_report_on_exit(int,void*);
+#endif
+
+#ifdef DMALLOC
+#include "dmalloc.h"
+#endif
+
+/* Fortran object interface */
+
+/*
+123456789-123456789-123456789-123456789-123456789-123456789-123456789-12
+
+PyFortranObject represents various Fortran objects:
+Fortran (module) routines, COMMON blocks, module data. 
+
+Author: Pearu Peterson <pearu@cens.ioc.ee>
+*/
+
+#define F2PY_MAX_DIMS 40
+
+typedef void (*f2py_set_data_func)(char*,npy_intp*);
+typedef void (*f2py_void_func)(void);
+typedef void (*f2py_init_func)(int*,npy_intp*,f2py_set_data_func,int*);
+
+  /*typedef void* (*f2py_c_func)(void*,...);*/
+
+typedef void *(*f2pycfunc)(void);
+
+typedef struct {
+  char *name;                /* attribute (array||routine) name */
+  int rank;                  /* array rank, 0 for scalar, max is F2PY_MAX_DIMS,
+				|| rank=-1 for Fortran routine */
+  struct {npy_intp d[F2PY_MAX_DIMS];} dims; /* dimensions of the array, || not used */
+  int type;                  /* PyArray_<type> || not used */
+  char *data;                /* pointer to array || Fortran routine */
+  f2py_init_func func;            /* initialization function for
+				allocatable arrays:
+				func(&rank,dims,set_ptr_func,name,len(name))
+				|| C/API wrapper for Fortran routine */
+  char *doc;                 /* documentation string; only recommended
+				for routines. */
+} FortranDataDef;
+
+typedef struct {
+  PyObject_HEAD
+  int len;                   /* Number of attributes */
+  FortranDataDef *defs;      /* An array of FortranDataDef's */ 
+  PyObject       *dict;      /* Fortran object attribute dictionary */
+} PyFortranObject;
+
+#define PyFortran_Check(op) ((op)->ob_type == &PyFortran_Type)
+#define PyFortran_Check1(op) (0==strcmp((op)->ob_type->tp_name,"fortran"))
+
+  extern PyTypeObject PyFortran_Type;
+  extern int F2PyDict_SetItemString(PyObject* dict, char *name, PyObject *obj);
+  extern PyObject * PyFortranObject_New(FortranDataDef* defs, f2py_void_func init);
+  extern PyObject * PyFortranObject_NewAsAttr(FortranDataDef* defs);
+
+#define ISCONTIGUOUS(m) ((m)->flags & NPY_CONTIGUOUS)
+#define F2PY_INTENT_IN 1
+#define F2PY_INTENT_INOUT 2
+#define F2PY_INTENT_OUT 4
+#define F2PY_INTENT_HIDE 8
+#define F2PY_INTENT_CACHE 16
+#define F2PY_INTENT_COPY 32
+#define F2PY_INTENT_C 64
+#define F2PY_OPTIONAL 128
+#define F2PY_INTENT_INPLACE 256
+
+  extern PyArrayObject* array_from_pyobj(const int type_num,
+					 npy_intp *dims,
+					 const int rank,
+					 const int intent,
+					 PyObject *obj);
+  extern int copy_ND_array(const PyArrayObject *in, PyArrayObject *out);
+
+#ifdef DEBUG_COPY_ND_ARRAY
+  extern void dump_attrs(const PyArrayObject* arr);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_FORTRANOBJECT_H */

Added: branches/Interpolate1D/dfitpack.py
===================================================================
--- branches/Interpolate1D/dfitpack.py	2008-07-16 00:26:23 UTC (rev 4545)
+++ branches/Interpolate1D/dfitpack.py	2008-07-16 22:08:51 UTC (rev 4546)
@@ -0,0 +1,7 @@
+def __bootstrap__():
+   global __bootstrap__, __loader__, __file__
+   import sys, pkg_resources, imp
+   __file__ = pkg_resources.resource_filename(__name__,'dfitpack.pyd')
+   del __bootstrap__, __loader__
+   imp.load_dynamic(__name__,__file__)
+__bootstrap__()

Added: branches/Interpolate1D/dfitpack.pyd
===================================================================
(Binary files differ)


Property changes on: branches/Interpolate1D/dfitpack.pyd
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream



More information about the Scipy-svn mailing list