Permalink
Browse files

STY: Replace macros in old_define.h with new versions.

  • Loading branch information...
1 parent df4008d commit 8fce1e6f0b79d23c9ba63fc5c5c03db8624987ca @charris charris committed Feb 1, 2012
@@ -122,7 +122,7 @@ PyObject* compute_vq(PyObject* self, PyObject* args)
if (dist_a == NULL) {
goto clean_code_a;
}
- index_a = (PyArrayObject*)PyArray_EMPTY(1, &n, PyArray_INTP, 0);
+ index_a = (PyArrayObject*)PyArray_EMPTY(1, &n, NPY_INTP, 0);
if (index_a == NULL) {
goto clean_dist_a;
}
@@ -134,7 +134,7 @@ PyObject* compute_vq(PyObject* self, PyObject* args)
if (dist_a == NULL) {
goto clean_code_a;
}
- index_a = (PyArrayObject*)PyArray_EMPTY(1, &n, PyArray_INTP, 0);
+ index_a = (PyArrayObject*)PyArray_EMPTY(1, &n, NPY_INTP, 0);
if (index_a == NULL) {
goto clean_dist_a;
}
@@ -132,12 +132,12 @@ int setup_extra_inputs(PyArrayObject **ap_rtol, PyObject *o_rtol, PyArrayObject
/* Setup tolerances */
if (o_rtol == NULL) {
- *ap_rtol = (PyArrayObject *)PyArray_SimpleNew(1, &one, PyArray_DOUBLE);
+ *ap_rtol = (PyArrayObject *)PyArray_SimpleNew(1, &one, NPY_DOUBLE);
if (*ap_rtol == NULL) PYERR2(odepack_error,"Error constructing relative tolerance.");
*(double *)(*ap_rtol)->data = tol; /* Default */
}
else {
- *ap_rtol = (PyArrayObject *)PyArray_ContiguousFromObject(o_rtol,PyArray_DOUBLE,0,1);
+ *ap_rtol = (PyArrayObject *)PyArray_ContiguousFromObject(o_rtol,NPY_DOUBLE,0,1);
if (*ap_rtol == NULL) PYERR2(odepack_error,"Error converting relative tolerance.");
if ((*ap_rtol)->nd == 0); /* rtol is scalar */
else if ((*ap_rtol)->dimensions[0] == neq)
@@ -147,12 +147,12 @@ int setup_extra_inputs(PyArrayObject **ap_rtol, PyObject *o_rtol, PyArrayObject
}
if (o_atol == NULL) {
- *ap_atol = (PyArrayObject *)PyArray_SimpleNew(1,&one,PyArray_DOUBLE);
+ *ap_atol = (PyArrayObject *)PyArray_SimpleNew(1,&one,NPY_DOUBLE);
if (*ap_atol == NULL) PYERR2(odepack_error,"Error constructing absolute tolerance");
*(double *)(*ap_atol)->data = tol;
}
else {
- *ap_atol = (PyArrayObject *)PyArray_ContiguousFromObject(o_atol,PyArray_DOUBLE,0,1);
+ *ap_atol = (PyArrayObject *)PyArray_ContiguousFromObject(o_atol,NPY_DOUBLE,0,1);
if (*ap_atol == NULL) PYERR2(odepack_error,"Error converting absolute tolerance.");
if ((*ap_atol)->nd == 0); /* atol is scalar */
else if ((*ap_atol)->dimensions[0] == neq)
@@ -165,7 +165,7 @@ int setup_extra_inputs(PyArrayObject **ap_rtol, PyObject *o_rtol, PyArrayObject
/* Setup t-critical */
if (o_tcrit != NULL) {
- *ap_tcrit = (PyArrayObject *)PyArray_ContiguousFromObject(o_tcrit,PyArray_DOUBLE,0,1);
+ *ap_tcrit = (PyArrayObject *)PyArray_ContiguousFromObject(o_tcrit,NPY_DOUBLE,0,1);
if (*ap_tcrit == NULL) PYERR2(odepack_error,"Error constructing critical times.");
*numcrit = PyArray_Size((PyObject *)(*ap_tcrit));
}
@@ -193,7 +193,7 @@ int compute_lrw_liw(int *lrw, int *liw, int neq, int jt, int ml, int mu, int mxo
lrn = 20 + nyh*(mxordn+1) + 3*neq;
lrs = 20 + nyh*(mxords+1) + 3*neq + lmat;
- *lrw = NPY_MAX(lrn,lrs);
+ *lrw = PyArray_MAX(lrn,lrs);
*liw = 20 + neq;
return 0;
@@ -252,22 +252,22 @@ static PyObject *odepack_odeint(PyObject *dummy, PyObject *args, PyObject *kwdic
if (mu < 0) mu = 0;
/* Initial input vector */
- ap_y = (PyArrayObject *)PyArray_ContiguousFromObject(y0, PyArray_DOUBLE, 0, 1);
+ ap_y = (PyArrayObject *)PyArray_ContiguousFromObject(y0, NPY_DOUBLE, 0, 1);
if (ap_y == NULL) goto fail;
y = (double *) ap_y->data;
neq = PyArray_Size((PyObject *)ap_y);
dims[1] = neq;
/* Set of output times for integration */
- ap_tout = (PyArrayObject *)PyArray_ContiguousFromObject(p_tout, PyArray_DOUBLE, 0, 1);
+ ap_tout = (PyArrayObject *)PyArray_ContiguousFromObject(p_tout, NPY_DOUBLE, 0, 1);
if (ap_tout == NULL) goto fail;
tout = (double *)ap_tout->data;
ntimes = PyArray_Size((PyObject *)ap_tout);
dims[0] = ntimes;
t = tout[0];
/* Setup array to hold the output evaluations*/
- ap_yout= (PyArrayObject *)PyArray_SimpleNew(2,dims,PyArray_DOUBLE);
+ ap_yout= (PyArrayObject *)PyArray_SimpleNew(2,dims,NPY_DOUBLE);
if (ap_yout== NULL) goto fail;
yout = (double *) ap_yout->data;
/* Copy initial vector into first row of output */
@@ -305,15 +305,15 @@ static PyObject *odepack_odeint(PyObject *dummy, PyObject *args, PyObject *kwdic
/* If full output make some useful output arrays */
if (full_output) {
out_sz = ntimes-1;
- ap_hu = (PyArrayObject *)PyArray_SimpleNew(1,&out_sz,PyArray_DOUBLE);
- ap_tcur = (PyArrayObject *)PyArray_SimpleNew(1,&out_sz,PyArray_DOUBLE);
- ap_tolsf = (PyArrayObject *)PyArray_SimpleNew(1,&out_sz,PyArray_DOUBLE);
- ap_tsw = (PyArrayObject *)PyArray_SimpleNew(1,&out_sz,PyArray_DOUBLE);
- ap_nst = (PyArrayObject *)PyArray_SimpleNew(1,&out_sz,PyArray_INT);
- ap_nfe = (PyArrayObject *)PyArray_SimpleNew(1,&out_sz,PyArray_INT);
- ap_nje = (PyArrayObject *)PyArray_SimpleNew(1,&out_sz,PyArray_INT);
- ap_nqu = (PyArrayObject *)PyArray_SimpleNew(1,&out_sz,PyArray_INT);
- ap_mused = (PyArrayObject *)PyArray_SimpleNew(1,&out_sz,PyArray_INT);
+ ap_hu = (PyArrayObject *)PyArray_SimpleNew(1,&out_sz,NPY_DOUBLE);
+ ap_tcur = (PyArrayObject *)PyArray_SimpleNew(1,&out_sz,NPY_DOUBLE);
+ ap_tolsf = (PyArrayObject *)PyArray_SimpleNew(1,&out_sz,NPY_DOUBLE);
+ ap_tsw = (PyArrayObject *)PyArray_SimpleNew(1,&out_sz,NPY_DOUBLE);
+ ap_nst = (PyArrayObject *)PyArray_SimpleNew(1,&out_sz,NPY_INT);
+ ap_nfe = (PyArrayObject *)PyArray_SimpleNew(1,&out_sz,NPY_INT);
+ ap_nje = (PyArrayObject *)PyArray_SimpleNew(1,&out_sz,NPY_INT);
+ ap_nqu = (PyArrayObject *)PyArray_SimpleNew(1,&out_sz,NPY_INT);
+ ap_mused = (PyArrayObject *)PyArray_SimpleNew(1,&out_sz,NPY_INT);
if (ap_hu == NULL || ap_tcur == NULL || ap_tolsf == NULL || ap_tsw == NULL || ap_nst == NULL || ap_nfe == NULL || ap_nje == NULL || ap_nqu == NULL || ap_mused == NULL) goto fail;
}
@@ -139,11 +139,11 @@ static PyObject *quadpack_qagse(PyObject *dummy, PyObject *args) {
QUAD_INIT_FUNC(fcn,extra_args)
/* Setup iwork and work arrays */
- ap_iord = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_INT);
- ap_alist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
- ap_blist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
- ap_rlist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
- ap_elist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
+ ap_iord = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_INT);
+ ap_alist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
+ ap_blist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
+ ap_rlist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
+ ap_elist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
if (ap_iord == NULL || ap_alist == NULL || ap_blist == NULL || ap_rlist == NULL || ap_elist == NULL) goto fail;
iord = (int *)ap_iord->data;
alist = (double *)ap_alist->data;
@@ -220,11 +220,11 @@ static PyObject *quadpack_qagie(PyObject *dummy, PyObject *args) {
QUAD_INIT_FUNC(fcn,extra_args);
/* Setup iwork and work arrays */
- ap_iord = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_INT);
- ap_alist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
- ap_blist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
- ap_rlist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
- ap_elist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
+ ap_iord = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_INT);
+ ap_alist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
+ ap_blist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
+ ap_rlist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
+ ap_elist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
if (ap_iord == NULL || ap_alist == NULL || ap_blist == NULL || ap_rlist == NULL || ap_elist == NULL) goto fail;
iord = (int *)ap_iord->data;
alist = (double *)ap_alist->data;
@@ -306,21 +306,21 @@ static PyObject *quadpack_qagpe(PyObject *dummy, PyObject *args) {
QUAD_INIT_FUNC(fcn,extra_args)
- ap_points = (PyArrayObject *)PyArray_ContiguousFromObject(o_points, PyArray_DOUBLE, 1, 1);
+ ap_points = (PyArrayObject *)PyArray_ContiguousFromObject(o_points, NPY_DOUBLE, 1, 1);
if (ap_points == NULL) goto fail;
npts2 = ap_points->dimensions[0];
npts2_shape[0] = npts2;
points = (double *)ap_points->data;
/* Setup iwork and work arrays */
- ap_iord = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_INT);
- ap_alist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
- ap_blist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
- ap_rlist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
- ap_elist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
- ap_pts = (PyArrayObject *)PyArray_SimpleNew(1,npts2_shape,PyArray_DOUBLE);
- ap_level = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
- ap_ndin = (PyArrayObject *)PyArray_SimpleNew(1,npts2_shape,PyArray_DOUBLE);
+ ap_iord = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_INT);
+ ap_alist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
+ ap_blist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
+ ap_rlist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
+ ap_elist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
+ ap_pts = (PyArrayObject *)PyArray_SimpleNew(1,npts2_shape,NPY_DOUBLE);
+ ap_level = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
+ ap_ndin = (PyArrayObject *)PyArray_SimpleNew(1,npts2_shape,NPY_DOUBLE);
if (ap_iord == NULL || ap_alist == NULL || ap_blist == NULL || ap_rlist == NULL || ap_elist == NULL || ap_pts == NULL || ap_level == NULL || ap_ndin == NULL) goto fail;
iord = (int *)ap_iord->data;
alist = (double *)ap_alist->data;
@@ -412,26 +412,26 @@ static PyObject *quadpack_qawoe(PyObject *dummy, PyObject *args) {
QUAD_INIT_FUNC(fcn,extra_args)
if (o_chebmo != NULL) {
- ap_chebmo = (PyArrayObject *)PyArray_ContiguousFromObject(o_chebmo, PyArray_DOUBLE, 2, 2);
+ ap_chebmo = (PyArrayObject *)PyArray_ContiguousFromObject(o_chebmo, NPY_DOUBLE, 2, 2);
if (ap_chebmo == NULL) goto fail;
if (ap_chebmo->dimensions[1] != maxp1 || ap_chebmo->dimensions[0] != 25)
PYERR(quadpack_error,"Chebyshev moment array has the wrong size.");
}
else {
sz[0] = 25;
sz[1] = maxp1;
- ap_chebmo = (PyArrayObject *)PyArray_SimpleNew(2,sz,PyArray_DOUBLE);
+ ap_chebmo = (PyArrayObject *)PyArray_SimpleNew(2,sz,NPY_DOUBLE);
if (ap_chebmo == NULL) goto fail;
}
chebmo = (double *) ap_chebmo->data;
/* Setup iwork and work arrays */
- ap_iord = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_INT);
- ap_nnlog = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_INT);
- ap_alist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
- ap_blist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
- ap_rlist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
- ap_elist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
+ ap_iord = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_INT);
+ ap_nnlog = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_INT);
+ ap_alist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
+ ap_blist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
+ ap_rlist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
+ ap_elist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
if (ap_iord == NULL || ap_nnlog == NULL || ap_alist == NULL || ap_blist == NULL || ap_rlist == NULL || ap_elist == NULL) goto fail;
iord = (int *)ap_iord->data;
nnlog = (int *)ap_nnlog->data;
@@ -520,20 +520,20 @@ static PyObject *quadpack_qawfe(PyObject *dummy, PyObject *args) {
sz[0] = 25;
sz[1] = maxp1;
- ap_chebmo = (PyArrayObject *)PyArray_SimpleNew(2,sz,PyArray_DOUBLE);
+ ap_chebmo = (PyArrayObject *)PyArray_SimpleNew(2,sz,NPY_DOUBLE);
if (ap_chebmo == NULL) goto fail;
chebmo = (double *) ap_chebmo->data;
/* Setup iwork and work arrays */
- ap_iord = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_INT);
- ap_nnlog = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_INT);
- ap_alist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
- ap_blist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
- ap_rlist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
- ap_elist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
- ap_rslst = (PyArrayObject *)PyArray_SimpleNew(1,limlst_shape,PyArray_DOUBLE);
- ap_erlst = (PyArrayObject *)PyArray_SimpleNew(1,limlst_shape,PyArray_DOUBLE);
- ap_ierlst = (PyArrayObject *)PyArray_SimpleNew(1,limlst_shape,PyArray_INT);
+ ap_iord = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_INT);
+ ap_nnlog = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_INT);
+ ap_alist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
+ ap_blist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
+ ap_rlist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
+ ap_elist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
+ ap_rslst = (PyArrayObject *)PyArray_SimpleNew(1,limlst_shape,NPY_DOUBLE);
+ ap_erlst = (PyArrayObject *)PyArray_SimpleNew(1,limlst_shape,NPY_DOUBLE);
+ ap_ierlst = (PyArrayObject *)PyArray_SimpleNew(1,limlst_shape,NPY_INT);
if (ap_iord == NULL || ap_nnlog == NULL || ap_alist == NULL || ap_blist == NULL || ap_rlist == NULL || ap_elist == NULL || ap_rslst == NULL || ap_erlst == NULL || ap_ierlst == NULL) goto fail;
iord = (int *)ap_iord->data;
nnlog = (int *)ap_nnlog->data;
@@ -625,11 +625,11 @@ static PyObject *quadpack_qawce(PyObject *dummy, PyObject *args) {
QUAD_INIT_FUNC(fcn,extra_args)
/* Setup iwork and work arrays */
- ap_iord = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_INT);
- ap_alist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
- ap_blist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
- ap_rlist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
- ap_elist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
+ ap_iord = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_INT);
+ ap_alist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
+ ap_blist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
+ ap_rlist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
+ ap_elist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
if (ap_iord == NULL || ap_alist == NULL || ap_blist == NULL || ap_rlist == NULL || ap_elist == NULL) goto fail;
iord = (int *)ap_iord->data;
alist = (double *)ap_alist->data;
@@ -708,11 +708,11 @@ static PyObject *quadpack_qawse(PyObject *dummy, PyObject *args) {
QUAD_INIT_FUNC(fcn,extra_args)
/* Setup iwork and work arrays */
- ap_iord = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_INT);
- ap_alist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
- ap_blist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
- ap_rlist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
- ap_elist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,PyArray_DOUBLE);
+ ap_iord = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_INT);
+ ap_alist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
+ ap_blist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
+ ap_rlist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
+ ap_elist = (PyArrayObject *)PyArray_SimpleNew(1,limit_shape,NPY_DOUBLE);
if (ap_iord == NULL || ap_alist == NULL || ap_blist == NULL || ap_rlist == NULL || ap_elist == NULL) goto fail;
iord = (int *)ap_iord->data;
alist = (double *)ap_alist->data;
@@ -85,13 +85,13 @@ the result tuple when the full_output argument is non-zero.
#define SET_DIAG(ap_diag,o_diag,mode) { /* Set the diag vector from input */ \
if (o_diag == NULL || o_diag == Py_None) { \
- ap_diag = (PyArrayObject *)PyArray_SimpleNew(1,&n,PyArray_DOUBLE); \
+ ap_diag = (PyArrayObject *)PyArray_SimpleNew(1,&n,NPY_DOUBLE); \
if (ap_diag == NULL) goto fail; \
diag = (double *)ap_diag -> data; \
mode = 1; \
} \
else { \
- ap_diag = (PyArrayObject *)PyArray_ContiguousFromObject(o_diag, PyArray_DOUBLE, 1, 1); \
+ ap_diag = (PyArrayObject *)PyArray_ContiguousFromObject(o_diag, NPY_DOUBLE, 1, 1); \
if (ap_diag == NULL) goto fail; \
diag = (double *)ap_diag -> data; \
mode = 2; } }
@@ -154,7 +154,7 @@ static PyObject *call_python_function(PyObject *func, npy_intp n, double *x, PyO
PyArrayObject *result_array = NULL;
/* Build sequence argument from inputs */
- sequence = (PyArrayObject *)PyArray_SimpleNewFromData(1, &n, PyArray_DOUBLE, (char *)x);
+ sequence = (PyArrayObject *)PyArray_SimpleNewFromData(1, &n, NPY_DOUBLE, (char *)x);
if (sequence == NULL) PYERR2(error_obj,"Internal failure to make an array of doubles out of first\n argument to function call.");
/* Build argument list */
@@ -185,7 +185,7 @@ static PyObject *call_python_function(PyObject *func, npy_intp n, double *x, PyO
goto fail;
}
- if ((result_array = (PyArrayObject *)PyArray_ContiguousFromObject(result, PyArray_DOUBLE, dim-1, dim))==NULL)
+ if ((result_array = (PyArrayObject *)PyArray_ContiguousFromObject(result, NPY_DOUBLE, dim-1, dim))==NULL)
PYERR2(error_obj,"Result from function call is not a proper array of floats.");
Py_DECREF(result);
Oops, something went wrong.

0 comments on commit 8fce1e6

Please sign in to comment.