summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Taylor <juliantaylor108@gmail.com>2017-02-25 11:23:25 +0100
committerGitHub <noreply@github.com>2017-02-25 11:23:25 +0100
commite9246860480b6c909e6e00c1cd4371b0e5fee1ce (patch)
tree76972b9e8ec8567238bc57b538b84d86b41030f1
parent7bc881d053d378c3653dfe0c01c5c7ac4b0c6cdb (diff)
parent1dacacf9a31e320dc2239e5e4a4ca8f8c11887b2 (diff)
downloadnumpy-e9246860480b6c909e6e00c1cd4371b0e5fee1ce.tar.gz
Merge pull request #8672 from eric-wieser/patch-8584
BUG: Use int for axes, not intp
-rw-r--r--numpy/core/src/multiarray/shape.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/core/src/multiarray/shape.c b/numpy/core/src/multiarray/shape.c
index 5207513bf..a5960044e 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;
}