From 3c8c2f51fb93a4121b2d02396d6e97e1623456c3 Mon Sep 17 00:00:00 2001 From: Joris Vankerschaver Date: Wed, 1 Jan 2020 08:17:29 +0000 Subject: [PATCH] MAINT: Remove uses of PyArray_FromDims --- chaco/contour/cntr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chaco/contour/cntr.c b/chaco/contour/cntr.c index 741514eed..61a2cc724 100644 --- a/chaco/contour/cntr.c +++ b/chaco/contour/cntr.c @@ -1338,7 +1338,7 @@ build_cntr_list_v(long *np, double *xp, double *yp, int nparts, long ntotal) { PyObject *point, *all_contours; PyArrayObject *xv, *yv; - int dims[1]; + npy_intp dims[1]; int i; long j, k; @@ -1348,8 +1348,8 @@ build_cntr_list_v(long *np, double *xp, double *yp, int nparts, long ntotal) for (i = 0; i < nparts; i++) { dims[0] = np[i]; - xv = (PyArrayObject *) PyArray_FromDims(1, dims, 'd'); - yv = (PyArrayObject *) PyArray_FromDims(1, dims, 'd'); + xv = (PyArrayObject *) PyArray_SimpleNew(1, dims, NPY_DOUBLE); + yv = (PyArrayObject *) PyArray_SimpleNew(1, dims, NPY_DOUBLE); if (xv == NULL || yv == NULL) goto error; for (j = 0; j < dims[0]; j++) {