diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2017-02-23 00:48:52 +0000 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2017-02-23 09:10:07 +0000 |
commit | 1dacacf9a31e320dc2239e5e4a4ca8f8c11887b2 (patch) | |
tree | e3b36b0a01c0aed615bba498bec54b4528d41e08 /numpy | |
parent | 2aabeafb97bea4e1bfa29d946fbf31e1104e7ae0 (diff) | |
download | numpy-1dacacf9a31e320dc2239e5e4a4ca8f8c11887b2.tar.gz |
BUG: Use int for axes, not intp
Rationale: typeof(PyArray_Dims.len) is int, so typeof(axis) should be the
same.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/src/multiarray/shape.c | 8 |
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; } |