diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-08-10 19:38:46 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-08-10 19:38:46 +0000 |
commit | 7451ebe97776507e769f2bf8f5f448aaa4c43305 (patch) | |
tree | b47b6215f1d6c4312e3a9a686684d9148214f8d0 | |
parent | a9314ac69c102f5e93a1ff647aa5943e8545433d (diff) | |
download | numpy-7451ebe97776507e769f2bf8f5f448aaa4c43305.tar.gz |
Fix ticket #239
-rw-r--r-- | numpy/core/src/arrayobject.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c index 5b19dcdca..4a004f313 100644 --- a/numpy/core/src/arrayobject.c +++ b/numpy/core/src/arrayobject.c @@ -6933,8 +6933,8 @@ object_depth_and_dimension(PyObject *s, int max, intp *dims) else obj = PyTuple_GET_ITEM(s, 0); nd = object_depth_and_dimension(obj, max-1, newdims); for (i=1; i<size; i++) { - if (islist) obj = PyList_GET_ITEM(s, 0); - else obj = PyTuple_GET_ITEM(s, 0); + if (islist) obj = PyList_GET_ITEM(s, i); + else obj = PyTuple_GET_ITEM(s, i); test_nd = object_depth_and_dimension(obj, max-1, test_dims); if ((nd != test_nd) || (!PyArray_CompareLists(newdims, test_dims, nd))) { @@ -8051,9 +8051,8 @@ PyArray_FromAny(PyObject *op, PyArray_Descr *newtype, int min_depth, } } else { - int isobject; + int isobject=0; if (flags & UPDATEIFCOPY) goto err; - isobject = 0; if (newtype == NULL) { newtype = _array_find_type(op, NULL, MAX_DIMS); } |