summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/multiarray/ctors.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/src/multiarray/ctors.c b/numpy/core/src/multiarray/ctors.c
index 71bb75e6c..4fb6bc781 100644
--- a/numpy/core/src/multiarray/ctors.c
+++ b/numpy/core/src/multiarray/ctors.c
@@ -785,7 +785,7 @@ discover_dimensions(PyObject *s, int *maxndim, npy_intp *d, int check_it,
#if (PY_VERSION_HEX >= 0x02050000)
d[i] = PyInt_AsSsize_t(PyTuple_GET_ITEM(new, i));
#else
- d[i] = PyInt_AsInt(PyTuple_GET_ITEM(new, i));
+ d[i] = PyInt_AsLong(PyTuple_GET_ITEM(new, i));
#endif
if (d[i] < 0) {
PyErr_SetString(PyExc_RuntimeError,