diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-10-31 05:17:46 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-10-31 05:17:46 +0000 |
commit | b18a794fef392866fc973f40f9f48108d52345e2 (patch) | |
tree | 2f153f9c8169ade835cb2744049764c928eb232e /numpy/core/src | |
parent | 2f43a2fcedd049de347a4cef4fc3456ce2cb0499 (diff) | |
download | numpy-b18a794fef392866fc973f40f9f48108d52345e2.tar.gz |
Fix OBJECT_argmax problem and add test.
Diffstat (limited to 'numpy/core/src')
-rw-r--r-- | numpy/core/src/arraytypes.inc.src | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/numpy/core/src/arraytypes.inc.src b/numpy/core/src/arraytypes.inc.src index 4ccaa1140..e6e44ea14 100644 --- a/numpy/core/src/arraytypes.inc.src +++ b/numpy/core/src/arraytypes.inc.src @@ -1775,8 +1775,7 @@ OBJECT_argmax(PyObject **ip, intp n, intp *max_ind, PyArrayObject *aip) mp=ip[i]; i++; } - if (i==n) return 0; - for(i=n; i<n; i++) { + for(; i<n; i++) { ip++; if (*ip != NULL && PyObject_Compare(*ip,mp) > 0) { mp = *ip; |