diff --git a/numpy/core/src/multiarray/shape.c b/numpy/core/src/multiarray/shape.c index 5207513bf531..a5960044efa9 100644 --- a/numpy/core/src/multiarray/shape.c +++ b/numpy/core/src/multiarray/shape.c @@ -680,9 +680,9 @@ PyArray_SwapAxes(PyArrayObject *ap, int a1, int a2) NPY_NO_EXPORT PyObject * PyArray_Transpose(PyArrayObject *ap, PyArray_Dims *permute) { - npy_intp *axes, axis; - npy_intp i, n; - npy_intp permutation[NPY_MAXDIMS], reverse_permutation[NPY_MAXDIMS]; + npy_intp *axes; + int i, n; + int permutation[NPY_MAXDIMS], reverse_permutation[NPY_MAXDIMS]; PyArrayObject *ret = NULL; int flags; @@ -704,7 +704,7 @@ PyArray_Transpose(PyArrayObject *ap, PyArray_Dims *permute) reverse_permutation[i] = -1; } for (i = 0; i < n; i++) { - axis = axes[i]; + int axis = axes[i]; if (check_and_adjust_axis(&axis, PyArray_NDIM(ap)) < 0) { return NULL; }