Issue #2495 changed gridslice to use correct dimension datatype

Former-commit-id: dc7ad4d465 [formerly 4c3453a657] [formerly aa24bc6fce] [formerly 5e7f2f0bdf [formerly aa24bc6fce [formerly ad33e0ef6530c5528cfa5a349c34a1d11c8c453b]]]
Former-commit-id: 5e7f2f0bdf
Former-commit-id: a6c84a48a463eebfa267a1df2818691820f5dc81 [formerly 05b2a015cb]
Former-commit-id: 90601f6ff8
This commit is contained in:
Brian Clements 2013-11-19 17:46:42 -06:00
parent 2ed2e93b03
commit b7a10192f4
2 changed files with 8 additions and 7 deletions

View file

@ -29,6 +29,7 @@
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* 11/17/09 3580 brockwoo Initial Creation * 11/17/09 3580 brockwoo Initial Creation
* 11/19/13 2495 bclement changed dim arrays/lists to use npy_intp
* *
* </pre> * </pre>
* *
@ -50,7 +51,7 @@ static int dimensions(PyObject * array) {
if (aDim == 3) { if (aDim == 3) {
returnValue |= 4; // 2d arrays returnValue |= 4; // 2d arrays
} else if (aDim == 2) { } else if (aDim == 2) {
npy_int * aDimList = PyArray_DIMS(array); npy_intp * aDimList = PyArray_DIMS(array);
if (aDimList[0] == 1) { if (aDimList[0] == 1) {
returnValue |= 1; //linear array returnValue |= 1; //linear array
} }
@ -79,9 +80,9 @@ static PyObject * defineNumpySlice(PyObject *self, PyObject* args)
int * param3dDim; int * param3dDim;
int levelCount; int levelCount;
int vnz, pnz, vny , pny , vnx , pnx; int vnz, pnz, vny , pny , vnx , pnx;
int dimSize[2]; npy_intp dimSize[2];
npy_int * vdimList; npy_intp * vdimList;
npy_int * pdimList; npy_intp * pdimList;
if (!PyArg_ParseTuple(args, "OOfi", &vc, &param, &targetLevel, &sense)) { if (!PyArg_ParseTuple(args, "OOfi", &vc, &param, &targetLevel, &sense)) {
return NULL; return NULL;
@ -211,9 +212,9 @@ static PyObject * createNumpySlice(PyObject *self, PyObject* args)
int * vc3dDim ; int * vc3dDim ;
int levelCount; int levelCount;
float * vc2d ; float * vc2d ;
int dimSize[2]; npy_intp dimSize[2];
npy_int * vdimList; npy_intp * vdimList;
npy_int * sdimList; npy_intp * sdimList;
if (!PyArg_ParseTuple(args, "OOOi|i", &vc, &s3d, &targetLevel, &sense, &hyb)) { if (!PyArg_ParseTuple(args, "OOOi|i", &vc, &s3d, &targetLevel, &sense, &hyb)) {
return NULL; return NULL;