|
5 | 5 | #include "_splinemodule.h"
|
6 | 6 |
|
7 | 7 |
|
| 8 | +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) |
| 9 | + |
| 10 | + |
8 | 11 | static void convert_strides(npy_intp *instrides, npy_intp *convstrides, int size, int N) {
|
9 | 12 | int n;
|
10 | 13 | npy_intp bitshift;
|
@@ -61,7 +64,7 @@ static PyObject *FIRsepsym2d(PyObject *NPY_UNUSED(dummy), PyObject *args) {
|
61 | 64 | return NULL;
|
62 | 65 |
|
63 | 66 | thetype = PyArray_ObjectType(image, NPY_FLOAT);
|
64 |
| - thetype = PyArray_MIN(thetype, NPY_CDOUBLE); |
| 67 | + thetype = MIN(thetype, NPY_CDOUBLE); |
65 | 68 | a_image = (PyArrayObject *)PyArray_FromObject(image, thetype, 2, 2);
|
66 | 69 | if (a_image == NULL)
|
67 | 70 | goto fail;
|
@@ -180,7 +183,7 @@ static PyObject *IIRsymorder1_ic(PyObject *NPY_UNUSED(dummy), PyObject *args) {
|
180 | 183 | return NULL;
|
181 | 184 |
|
182 | 185 | thetype = PyArray_ObjectType(sig, NPY_FLOAT);
|
183 |
| - thetype = PyArray_MIN(thetype, NPY_CDOUBLE); |
| 186 | + thetype = MIN(thetype, NPY_CDOUBLE); |
184 | 187 | a_sig = (PyArrayObject *)PyArray_FromObject(sig, thetype, 1, 2);
|
185 | 188 |
|
186 | 189 | if (a_sig == NULL) {
|
@@ -316,7 +319,7 @@ static PyObject *IIRsymorder2_ic_fwd(PyObject *NPY_UNUSED(dummy), PyObject *args
|
316 | 319 | return NULL;
|
317 | 320 |
|
318 | 321 | thetype = PyArray_ObjectType(sig, NPY_FLOAT);
|
319 |
| - thetype = PyArray_MIN(thetype, NPY_DOUBLE); |
| 322 | + thetype = MIN(thetype, NPY_DOUBLE); |
320 | 323 | a_sig = (PyArrayObject *)PyArray_FromObject(sig, thetype, 1, 2);
|
321 | 324 |
|
322 | 325 | if (a_sig == NULL) {
|
@@ -432,7 +435,7 @@ static PyObject *IIRsymorder2_ic_bwd(PyObject *NPY_UNUSED(dummy), PyObject *args
|
432 | 435 | return NULL;
|
433 | 436 |
|
434 | 437 | thetype = PyArray_ObjectType(sig, NPY_FLOAT);
|
435 |
| - thetype = PyArray_MIN(thetype, NPY_DOUBLE); |
| 438 | + thetype = MIN(thetype, NPY_DOUBLE); |
436 | 439 | a_sig = (PyArrayObject *)PyArray_FromObject(sig, thetype, 1, 2);
|
437 | 440 |
|
438 | 441 | if (a_sig == NULL) {
|
|
0 commit comments