summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Gohlke <cgohlke@uci.edu>2021-05-13 20:15:10 -0700
committerGitHub <noreply@github.com>2021-05-13 20:15:10 -0700
commita8b20ec40d624549cbb0cba77cc53e39f2741835 (patch)
tree689cfdb2ca28277f13aec632510ef55521b0c0b8
parentfb4ea911607a81ef6633b857122e34229075705e (diff)
downloadnumpy-a8b20ec40d624549cbb0cba77cc53e39f2741835.tar.gz
BUG: fix ValueError in PyArray_Std on win_amd64
-rw-r--r--numpy/core/src/multiarray/calculation.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/src/multiarray/calculation.c b/numpy/core/src/multiarray/calculation.c
index 7308c6b71..de67b35b5 100644
--- a/numpy/core/src/multiarray/calculation.c
+++ b/numpy/core/src/multiarray/calculation.c
@@ -392,7 +392,7 @@ __New_PyArray_Std(PyArrayObject *self, int axis, int rtype, PyArrayObject *out,
else {
val = PyArray_DIM(arrnew,i);
}
- PyTuple_SET_ITEM(newshape, i, PyLong_FromLong((long)val));
+ PyTuple_SET_ITEM(newshape, i, PyLong_FromSsize_t(val));
}
arr2 = (PyArrayObject *)PyArray_Reshape(arr1, newshape);
Py_DECREF(arr1);