[Numpy-svn] r3657 - trunk/numpy/core/src
numpy-svn at scipy.org
numpy-svn at scipy.org
Tue Apr 3 23:15:39 EDT 2007
Author: oliphant
Date: 2007-04-03 22:14:32 -0500 (Tue, 03 Apr 2007)
New Revision: 3657
Modified:
trunk/numpy/core/src/ufuncobject.c
Log:
Avoid some compiler complaints about non-constants in initialization.
Modified: trunk/numpy/core/src/ufuncobject.c
===================================================================
--- trunk/numpy/core/src/ufuncobject.c 2007-04-03 23:13:30 UTC (rev 3656)
+++ trunk/numpy/core/src/ufuncobject.c 2007-04-04 03:14:32 UTC (rev 3657)
@@ -2081,15 +2081,18 @@
PyArrayObject *idarr;
PyArrayObject *aar;
intp loop_i[MAX_DIMS], outsize=0;
- int arg_types[3] = {otype, otype, otype};
+ int arg_types[3];
PyArray_SCALARKIND scalars[3] = {PyArray_NOSCALAR, PyArray_NOSCALAR,
PyArray_NOSCALAR};
- int i, j;
- int nd = (*arr)->nd;
+ int i, j, nd;
int flags;
/* Reduce type is the type requested of the input
during reduction */
+ nd = (*arr)->nd;
+ arg_types[0] = otype;
+ arg_types[1] = otype;
+ arg_types[2] = otype;
if ((loop = _pya_malloc(sizeof(PyUFuncReduceObject)))==NULL) {
PyErr_NoMemory(); return loop;
}
More information about the Numpy-svn
mailing list