diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2012-02-04 14:04:01 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2012-02-04 17:54:38 -0700 |
commit | 1099bdc9d410381f9206c798971d5ef178537414 (patch) | |
tree | 917b39a642c557123aec4dbaf2c90d99032d3953 | |
parent | 1941ed6c2ae5100ee4c085513ab89500c812aef0 (diff) | |
download | numpy-1099bdc9d410381f9206c798971d5ef178537414.tar.gz |
UPD: Use prefixed versions of double and int in multiarray_tests.c.src.
Just for consistency. Also a few exception style changes.
-rw-r--r-- | numpy/core/src/multiarray/multiarray_tests.c.src | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/numpy/core/src/multiarray/multiarray_tests.c.src b/numpy/core/src/multiarray/multiarray_tests.c.src index 90c63ca44..e1d97b76c 100644 --- a/numpy/core/src/multiarray/multiarray_tests.c.src +++ b/numpy/core/src/multiarray/multiarray_tests.c.src @@ -10,10 +10,11 @@ */ /**begin repeat - * #type = double, int# + * #name = double, int# + * #type = npy_double, npy_int# * #typenum = NPY_DOUBLE, NPY_INT# */ -static int copy_@type@(PyArrayIterObject *itx, PyArrayNeighborhoodIterObject *niterx, +static int copy_@name@(PyArrayIterObject *itx, PyArrayNeighborhoodIterObject *niterx, npy_intp *bounds, PyObject **out) { @@ -142,7 +143,8 @@ test_neighborhood_iterator(PyObject* NPY_UNUSED(self), PyObject* args) goto clean_itx; } if (!PyInt_Check(bound)) { - PyErr_SetString(PyExc_ValueError, "bound not long"); + PyErr_SetString(PyExc_ValueError, + "bound not long"); Py_DECREF(bound); goto clean_itx; } @@ -176,7 +178,8 @@ test_neighborhood_iterator(PyObject* NPY_UNUSED(self), PyObject* args) st = copy_double(itx, niterx, bounds, &out); break; default: - PyErr_SetString(PyExc_ValueError, "Type not supported"); + PyErr_SetString(PyExc_ValueError, + "Type not supported"); goto clean_niterx; } @@ -299,7 +302,8 @@ test_neighborhood_iterator_oob(PyObject* NPY_UNUSED(self), PyObject* args) goto clean_itx; } if (!PyInt_Check(bound)) { - PyErr_SetString(PyExc_ValueError, "bound not long"); + PyErr_SetString(PyExc_ValueError, + "bound not long"); Py_DECREF(bound); goto clean_itx; } @@ -322,7 +326,8 @@ test_neighborhood_iterator_oob(PyObject* NPY_UNUSED(self), PyObject* args) goto clean_itx; } if (!PyInt_Check(bound)) { - PyErr_SetString(PyExc_ValueError, "bound not long"); + PyErr_SetString(PyExc_ValueError, + "bound not long"); Py_DECREF(bound); goto clean_itx; } @@ -342,7 +347,8 @@ test_neighborhood_iterator_oob(PyObject* NPY_UNUSED(self), PyObject* args) st = copy_double_double(niterx1, niterx2, bounds, &out); break; default: - PyErr_SetString(PyExc_ValueError, "Type not supported"); + PyErr_SetString(PyExc_ValueError, + "Type not supported"); goto clean_niterx2; } |